From: Akhil Goyal <gakhil@marvell.com>
To: <dev@dpdk.org>
Cc: <adwivedi@marvell.com>, <jerinj@marvell.com>,
<vattunuru@marvell.com>, Akhil Goyal <gakhil@marvell.com>
Subject: [PATCH v2 1/3] security: add MACsec algo in capability index
Date: Tue, 19 Sep 2023 19:24:07 +0530 [thread overview]
Message-ID: <20230919135409.2544309-2-gakhil@marvell.com> (raw)
In-Reply-To: <20230919135409.2544309-1-gakhil@marvell.com>
From: Ankur Dwivedi <adwivedi@marvell.com>
This patch adds the MACsec algorithm field in security capability index
structure. This field is compared against the MACsec alg to return the
correct capability.
Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
---
lib/security/rte_security.c | 4 ++++
lib/security/rte_security.h | 3 +++
2 files changed, 7 insertions(+)
diff --git a/lib/security/rte_security.c b/lib/security/rte_security.c
index c4d64bb8e9..2d729b735b 100644
--- a/lib/security/rte_security.c
+++ b/lib/security/rte_security.c
@@ -282,6 +282,10 @@ rte_security_capability_get(struct rte_security_ctx *instance,
if (capability->docsis.direction ==
idx->docsis.direction)
return capability;
+ } else if (idx->protocol ==
+ RTE_SECURITY_PROTOCOL_MACSEC) {
+ if (idx->macsec.alg == capability->macsec.alg)
+ return capability;
}
}
}
diff --git a/lib/security/rte_security.h b/lib/security/rte_security.h
index c6550f4d8d..439bbb957f 100644
--- a/lib/security/rte_security.h
+++ b/lib/security/rte_security.h
@@ -1252,6 +1252,9 @@ struct rte_security_capability_idx {
struct {
enum rte_security_docsis_direction direction;
} docsis;
+ struct {
+ enum rte_security_macsec_alg alg;
+ } macsec;
};
};
--
2.25.1
next prev parent reply other threads:[~2023-09-19 13:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-31 3:44 [PATCH " Akhil Goyal
2023-07-31 3:44 ` [PATCH 2/3] net/cnxk: add MACsec capability Akhil Goyal
2023-07-31 3:44 ` [PATCH 3/3] test/security: add capability verification for MACsec Akhil Goyal
2023-09-19 13:54 ` [PATCH v2 0/3] MACsec capability verification Akhil Goyal
2023-09-19 13:54 ` Akhil Goyal [this message]
2023-09-19 13:54 ` [PATCH v2 2/3] net/cnxk: add MACsec capability Akhil Goyal
2023-09-19 13:54 ` [PATCH v2 3/3] test/security: add capability verification for MACsec Akhil Goyal
2023-09-19 19:17 ` [PATCH v2 0/3] MACsec capability verification 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=20230919135409.2544309-2-gakhil@marvell.com \
--to=gakhil@marvell.com \
--cc=adwivedi@marvell.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--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).