mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
nvethernet: MACSEC send InstanceID to supplicant
Issue: If MGBE0 is not up and if we try to run supplicant on MGBE1/2/3 then we would see a crash as we were accessing the TZ space allocated to MGBE0 which is not up yet Fix: Sending the Instance ID to supplicant so that supplicant will access the TZ space corresponding to the MGBE interface which is up Bug 200765688 Change-Id: I42893d6142f7b8495a06e31d88a920353114e141 Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2593897 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Bhadram Varka <vbhadram@nvidia.com> Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Revanth Kumar Uppala
parent
06eca7dba3
commit
ee3b01231e
@@ -1399,6 +1399,16 @@ static int macsec_tz_kt_config(struct ether_priv_data *pdata,
|
||||
ret = -EINVAL;
|
||||
goto failure;
|
||||
}
|
||||
if (cmd == NV_MACSEC_CMD_TZ_KT_RESET) {
|
||||
nest = nla_nest_start(msg, NV_MACSEC_ATTR_TZ_KT_RESET);
|
||||
if (!nest) {
|
||||
ret = EINVAL;
|
||||
goto failure;
|
||||
}
|
||||
nla_put_u32(msg, NV_MACSEC_TZ_KT_RESET_INSTANCE_ID,
|
||||
macsec_pdata->id);
|
||||
nla_nest_end(msg, nest);
|
||||
}
|
||||
|
||||
if (cmd == NV_MACSEC_CMD_TZ_CONFIG && kt_config != NULL) {
|
||||
/* pr_err("%s: ctrl: %hu rw: %hu idx: %hu flags: %#x\n"
|
||||
|
||||
@@ -62,6 +62,14 @@ enum nv_macsec_tz_attrs {
|
||||
NV_MACSEC_TZ_ATTR_MAX = __NV_MACSEC_TZ_ATTR_END - 1,
|
||||
};
|
||||
|
||||
enum nv_macsec_tz_kt_reset_attrs {
|
||||
NV_MACSEC_TZ_KT_RESET_ATTR_UNSPEC,
|
||||
NV_MACSEC_TZ_KT_RESET_INSTANCE_ID,
|
||||
__NV_MACSEC_TZ_KT_RESET_ATTR_END,
|
||||
NUM_KT_RESET_ATTR = __NV_MACSEC_TZ_KT_RESET_ATTR_END,
|
||||
NV_MACSEC_TZ_KT_RESET_ATTR_MAX = __NV_MACSEC_TZ_KT_RESET_ATTR_END - 1,
|
||||
};
|
||||
|
||||
enum nv_macsec_attrs {
|
||||
NV_MACSEC_ATTR_UNSPEC,
|
||||
NV_MACSEC_ATTR_IFNAME,
|
||||
@@ -73,6 +81,7 @@ enum nv_macsec_attrs {
|
||||
NV_MACSEC_ATTR_CTRL_PORT_EN,
|
||||
NV_MACSEC_ATTR_SA_CONFIG, /* Nested SA config */
|
||||
NV_MACSEC_ATTR_TZ_CONFIG, /* Nested TZ config */
|
||||
NV_MACSEC_ATTR_TZ_KT_RESET, /* Nested TZ KT config */
|
||||
__NV_MACSEC_ATTR_END,
|
||||
NUM_NV_MACSEC_ATTR = __NV_MACSEC_ATTR_END,
|
||||
NV_MACSEC_ATTR_MAX = __NV_MACSEC_ATTR_END - 1,
|
||||
@@ -97,6 +106,10 @@ static const struct nla_policy nv_macsec_tz_genl_policy[NUM_NV_MACSEC_TZ_ATTR] =
|
||||
[NV_MACSEC_TZ_ATTR_FLAG] = { .type = NLA_U32 },
|
||||
};
|
||||
|
||||
static const struct nla_policy nv_kt_reset_genl_policy[NUM_KT_RESET_ATTR] = {
|
||||
[NV_MACSEC_TZ_KT_RESET_INSTANCE_ID] = { .type = NLA_U32 },
|
||||
};
|
||||
|
||||
static const struct nla_policy nv_macsec_genl_policy[NUM_NV_MACSEC_ATTR] = {
|
||||
[NV_MACSEC_ATTR_IFNAME] = { .type = NLA_STRING },
|
||||
[NV_MACSEC_ATTR_TXSC_PORT] = { .type = NLA_U16 },
|
||||
@@ -104,6 +117,7 @@ static const struct nla_policy nv_macsec_genl_policy[NUM_NV_MACSEC_ATTR] = {
|
||||
[NV_MACSEC_ATTR_REPLAY_WINDOW] = { .type = NLA_U32 },
|
||||
[NV_MACSEC_ATTR_SA_CONFIG] = { .type = NLA_NESTED },
|
||||
[NV_MACSEC_ATTR_TZ_CONFIG] = { .type = NLA_NESTED },
|
||||
[NV_MACSEC_ATTR_TZ_KT_RESET] = { .type = NLA_NESTED },
|
||||
};
|
||||
|
||||
enum nv_macsec_nl_commands {
|
||||
|
||||
Reference in New Issue
Block a user