[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230928084430.1882670-8-radu-nicolae.pirea@oss.nxp.com>
Date: Thu, 28 Sep 2023 11:44:27 +0300
From: "Radu Pirea (NXP OSS)" <radu-nicolae.pirea@....nxp.com>
To: sgoutham@...vell.com,
gakula@...vell.com,
sbhatta@...vell.com,
hkelam@...vell.com,
davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
borisp@...dia.com,
saeedm@...dia.com,
leon@...nel.org,
sd@...asysnail.net,
andrew@...n.ch,
hkallweit1@...il.com,
linux@...linux.org.uk,
richardcochran@...il.com,
sebastian.tobuschat@....nxp.com
Cc: linux-kernel@...r.kernel.org,
netdev@...r.kernel.org,
linux-rdma@...r.kernel.org,
"Radu Pirea (NXP OSS)" <radu-nicolae.pirea@....nxp.com>
Subject: [PATCH net-next v6 07/10] net/mlx5e: macsec: use update_pn flag instead of PN comparation
When updating the SA, use the new update_pn flags instead of comparing the
new PN with the initial one.
Signed-off-by: Radu Pirea (NXP OSS) <radu-nicolae.pirea@....nxp.com>
---
Changes in v6:
- patch added in v6
drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
index c9c1db971652..d4ebd8743114 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c
@@ -580,7 +580,7 @@ static int mlx5e_macsec_upd_txsa(struct macsec_context *ctx)
goto out;
}
- if (tx_sa->next_pn != ctx_tx_sa->next_pn_halves.lower) {
+ if (ctx->sa.update_pn) {
netdev_err(netdev, "MACsec offload: update TX sa %d PN isn't supported\n",
assoc_num);
err = -EINVAL;
@@ -973,7 +973,7 @@ static int mlx5e_macsec_upd_rxsa(struct macsec_context *ctx)
goto out;
}
- if (rx_sa->next_pn != ctx_rx_sa->next_pn_halves.lower) {
+ if (ctx->sa.update_pn) {
netdev_err(ctx->netdev,
"MACsec offload update RX sa %d PN isn't supported\n",
assoc_num);
--
2.34.1
Powered by blists - more mailing lists