net/mlx5e: Fix MACsec initial packet number
authorEmeel Hakim <ehakim@nvidia.com>
Wed, 21 Sep 2022 18:10:48 +0000 (11:10 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 23 Sep 2022 01:01:32 +0000 (18:01 -0700)
commitcb6d3c0f1baeaa554557a4203fe40142e2d67b92
tree9f88fb9987093e383b3ef1a82be7ed67717720ef
parent6c5e0b25db3af34c4a0c7076f84a2adf0fee17a0
net/mlx5e: Fix MACsec initial packet number

Currently when creating MACsec object, next_pn which represents
the initial packet number (PN) is considered only in TX flow.
The above causes mismatch between TX and RX initial PN which
is reflected in packet drops.
Fix by considering next_pn in RX flow too.

Fixes: aae3454e4d4c ("net/mlx5e: Add MACsec offload Rx command support")
Signed-off-by: Emeel Hakim <ehakim@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c