osi:macsec:lowest pn changes to enable sa

Enhancement to receive lowest_pn from supplicant
as part of receive AN enable

Bug 3371004

Change-Id: If81f8449f7ebda996c95117e2c84722fdc57c5d0
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2619949
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Krishna Thota <kthota@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Sanath Kumar Gampa
2021-11-02 09:21:48 +05:30
committed by mobile promotions
parent ee1da8d41d
commit c52ad89f9d
2 changed files with 3 additions and 2 deletions

View File

@@ -278,6 +278,8 @@ struct osi_macsec_sc_info {
nveu8_t curr_an;
/** Next PN to use for the current AN */
nveu32_t next_pn;
/** Lowest PN to use for the current AN */
nveu32_t lowest_pn;
/** bitmap of valid AN */
nveu32_t an_valid;
/** PN window */

View File

@@ -2859,8 +2859,7 @@ static nve32_t add_upd_sc(struct osi_core_priv_data *const osi_core,
lut_config.lut_sel = OSI_LUT_SEL_SA_STATE;
table_config->index = (sc->sc_idx_start * OSI_MAX_NUM_SA) + sc->curr_an;
lut_config.sa_state_out.next_pn = sc->next_pn;
/* TODO - LLPN might have to be updated out of band for replay prot*/
lut_config.sa_state_out.lowest_pn = sc->next_pn;
lut_config.sa_state_out.lowest_pn = sc->lowest_pn;
lut_config.flags |= OSI_LUT_FLAGS_ENTRY_VALID;
ret = macsec_lut_config(osi_core, &lut_config);
if (ret < 0) {