]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: MACsec, fix mlx5e_macsec_update_rxsa bail condition and functionality
authorRaed Salem <raeds@nvidia.com>
Mon, 31 Oct 2022 07:24:06 +0000 (09:24 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 24 Nov 2022 08:03:22 +0000 (00:03 -0800)
commit37cb187a0592c9a832655f4ef72841c1afc80a77
tree5a40289f5dfdd5bdfa862c8e811ad377486e00cf
parent2f66d7b2c57fef83dddd18f9db3ec83a9f4d21ff
net/mlx5e: MACsec, fix mlx5e_macsec_update_rxsa bail condition and functionality

Fix update Rx SA wrong bail condition, naturally update functionality
needs to check that something changed otherwise bailout currently the
active state check does just the opposite, furthermore unlike deactivate
path which remove the macsec rules to deactivate the offload, the
activation path does not include the counter part installation of the
macsec rules.

Fix by using correct bailout condition and when Rx SA changes state to
active then add the relevant macsec rules.

While at it, refine function name to reflect more precisely its role.

Fixes: b995ba4f97bf ("net/mlx5e: Add MACsec offload Rx command support")
Signed-off-by: Raed Salem <raeds@nvidia.com>
Reviewed-by: Emeel Hakim <ehakim@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c