* [PATCH] examples/l2fwd-macsec: enable extended packet number
@ 2024-09-16 11:26 Akhil Goyal
2024-10-09 14:57 ` Akhil Goyal
0 siblings, 1 reply; 2+ messages 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] 2+ messages in thread
* RE: [PATCH] examples/l2fwd-macsec: enable extended packet number
2024-09-16 11:26 [PATCH] examples/l2fwd-macsec: enable extended packet number Akhil Goyal
@ 2024-10-09 14:57 ` Akhil Goyal
0 siblings, 0 replies; 2+ messages in thread
From: Akhil Goyal @ 2024-10-09 14:57 UTC (permalink / raw)
To: Akhil Goyal, dev; +Cc: thomas, david.marchand, Vamsi Krishna Attunuru
> -----Original Message-----
> From: Akhil Goyal <gakhil@marvell.com>
> Sent: Monday, September 16, 2024 4:57 PM
> To: dev@dpdk.org
> Cc: thomas@monjalon.net; david.marchand@redhat.com; Vamsi Krishna
> Attunuru <vattunuru@marvell.com>; Akhil Goyal <gakhil@marvell.com>
> Subject: [PATCH] examples/l2fwd-macsec: enable extended packet number
>
> 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>
Applied to dpdk-next-crypto
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-09 14:57 UTC | newest]
Thread overview: 2+ messages (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
2024-10-09 14:57 ` 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).