* [PATCH] examples/l2fwd-macsec: enable extended packet number
@ 2024-09-16 11:26 Akhil Goyal
0 siblings, 0 replies; only message in thread
From: Akhil Goyal @ 2024-09-16 11:26 UTC (permalink / raw)
To: dev; +Cc: thomas, david.marchand, vattunuru, Akhil Goyal
Enabled the extended packet number(XPN) case so that
traffic runs for longer duration without raising interrupt
for PN threshold as the application currently does not handle
rekeying.
Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
examples/l2fwd-macsec/main.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/examples/l2fwd-macsec/main.c b/examples/l2fwd-macsec/main.c
index 294ee113e3..b262d3ba0b 100644
--- a/examples/l2fwd-macsec/main.c
+++ b/examples/l2fwd-macsec/main.c
@@ -446,7 +446,8 @@ fill_macsec_sc_conf(uint16_t portid, struct rte_security_macsec_sc *sc_conf)
}
sc_conf->sc_tx.active = 1;
sc_conf->sc_tx.sci = mcs_port_params[portid].sci;
- if (mcs_port_params[portid].xpn > 0)
+ if (mcs_port_params[portid].alg == RTE_SECURITY_MACSEC_ALG_GCM_XPN_128 ||
+ mcs_port_params[portid].alg == RTE_SECURITY_MACSEC_ALG_GCM_XPN_256)
sc_conf->sc_tx.is_xpn = 1;
} else {
for (i = 0; i < RTE_SECURITY_MACSEC_NUM_AN; i++) {
@@ -456,7 +457,8 @@ fill_macsec_sc_conf(uint16_t portid, struct rte_security_macsec_sc *sc_conf)
}
}
sc_conf->sc_rx.active = 1;
- if (mcs_port_params[portid].xpn > 0)
+ if (mcs_port_params[portid].alg == RTE_SECURITY_MACSEC_ALG_GCM_XPN_128 ||
+ mcs_port_params[portid].alg == RTE_SECURITY_MACSEC_ALG_GCM_XPN_256)
sc_conf->sc_rx.is_xpn = 1;
}
}
@@ -1008,7 +1010,7 @@ l2fwd_macsec_default_options(struct l2fwd_macsec_options *options)
if ((options->rx_portmask & (1 << portid)) != 0)
mcs_port_params[portid].dir = RTE_SECURITY_MACSEC_DIR_RX;
- mcs_port_params[portid].alg = RTE_SECURITY_MACSEC_ALG_GCM_128;
+ mcs_port_params[portid].alg = RTE_SECURITY_MACSEC_ALG_GCM_XPN_128;
memcpy(mcs_port_params[portid].sa_key.data, key, 16);
mcs_port_params[portid].sa_key.len = 16;
memcpy(mcs_port_params[portid].salt, salt, MCS_SALT_LEN);
--
2.25.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-09-16 11:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-16 11:26 [PATCH] examples/l2fwd-macsec: enable extended packet number Akhil Goyal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).