nvethernet:MACSEC, add byp lut with VF MAC

Issue: If the supplicant is killed for some reason Data would flow
plain on that interface, this needs to be avoided

Fix: Update bypass LUT such that if the frames from the VF(on which
supplicant is launched) is received on MACSEC either authenticate the
same or drop. Along with this handles below items as well. All the VFs MACIDs
are obtained in OSI to update the bypass LUTs to decide on which VF frames
to be authenticated and which VF frames needs to be bypassed.

1. Remove osi_macsec_en API and have single API to init and deinit
2. Remove explicit command from supplicant to set control port and
set protected frames. Handle the same in osi_macsec_init

Bug 3984665

Change-Id: I8bc8aa95d1e21e99e992b471fb70ed58073163f7
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2878515
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Sanath Kumar Gampa
2023-03-27 12:44:28 +05:30
committed by mobile promotions
parent c6f9d73c58
commit d07b3d604c
4 changed files with 7 additions and 245 deletions

View File

@@ -227,11 +227,7 @@ static ssize_t macsec_enable_show(struct device *dev,
struct macsec_priv_data *macsec_pdata = pdata->macsec_pdata;
unsigned int enabled = macsec_pdata->enabled;
return scnprintf(buf, PAGE_SIZE, "%s\n",
(enabled == (OSI_MACSEC_TX_EN | OSI_MACSEC_RX_EN))
? "txrx" :
(enabled == OSI_MACSEC_TX_EN) ? "tx" :
(enabled == OSI_MACSEC_RX_EN) ? "rx" :
"None");
(enabled == OSI_ENABLE) ? "txrx" : "None");
}
extern int macsec_open(struct macsec_priv_data *macsec_pdata,