kernel:nvidia-oot:Support for multiple MACSec SCs

Add support to accept multiple supplicant launch on same VF so that DUT
can have multiple MACSEC links with different ethernet peers

Pass Peer MACID to OSI such that the same is added to SCI LUT

Bug 4754899

Change-Id: Iaf56eb4d7ebc3266a0d3ceb3dbc76a1547ed608c
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3237500
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Sanath Kumar Gampa
2024-10-21 07:07:11 +00:00
committed by Jon Hunter
parent fe18381161
commit c5aa651596
2 changed files with 8 additions and 1 deletions

View File

@@ -38,7 +38,7 @@
/**
* @brief Maximum number of supplicants allowed per VF
*/
#define MAX_SUPPLICANTS_ALLOWED 1
#define MAX_SUPPLICANTS_ALLOWED 48
#define NV_MACSEC_GENL_VERSION 1
@@ -63,6 +63,7 @@
enum nv_macsec_sa_attrs {
NV_MACSEC_SA_ATTR_UNSPEC,
NV_MACSEC_SA_ATTR_SCI,
NV_MACSEC_SA_ATTR_PEER_MACID,
NV_MACSEC_SA_ATTR_AN,
NV_MACSEC_SA_ATTR_PN,
NV_MACSEC_SA_ATTR_LOWEST_PN,
@@ -123,6 +124,8 @@ enum nv_macsec_attrs {
static const struct nla_policy nv_macsec_sa_genl_policy[NUM_NV_MACSEC_SA_ATTR] = {
[NV_MACSEC_SA_ATTR_SCI] = { .type = NLA_BINARY,
.len = 8, }, /* SCI is 64bit */
[NV_MACSEC_SA_ATTR_PEER_MACID] = { .type = NLA_BINARY,
.len = 6, }, /* MACID is 48bit */
[NV_MACSEC_SA_ATTR_AN] = { .type = NLA_U8 },
[NV_MACSEC_SA_ATTR_PN] = { .type = NLA_U32 },
[NV_MACSEC_SA_ATTR_LOWEST_PN] = { .type = NLA_U32 },