From: Akhil Goyal <gakhil@marvell.com>
To: <dev@dpdk.org>
Cc: <thomas@monjalon.net>, <david.marchand@redhat.com>,
<vattunuru@marvell.com>, Akhil Goyal <gakhil@marvell.com>
Subject: [PATCH] examples/l2fwd-macsec: enable extended packet number
Date: Mon, 16 Sep 2024 16:56:36 +0530 [thread overview]
Message-ID: <20240916112636.3158391-1-gakhil@marvell.com> (raw)
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
next reply other threads:[~2024-09-16 11:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-16 11:26 Akhil Goyal [this message]
2024-10-09 14:57 ` Akhil Goyal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240916112636.3158391-1-gakhil@marvell.com \
--to=gakhil@marvell.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=thomas@monjalon.net \
--cc=vattunuru@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).