Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

octeontx2-af: Fix default entries mcam entry action

As per design, AF should update the default MCAM action only when
mcam_index is -1. A bug in the previous patch caused default entries
to be changed even when the request was not for them.

Fixes: 570ba37898ec ("octeontx2-af: Update RSS algorithm index")
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260216090338.1318976-1-hkelam@marvell.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Hariprasad Kelam and committed by
Jakub Kicinski
45be47bf 284f1f17

+22 -19
+22 -19
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c
··· 1042 1042 rvu_write64(rvu, blkaddr, 1043 1043 NPC_AF_MCAMEX_BANKX_ACTION(index, bank), *(u64 *)&action); 1044 1044 1045 - /* update the VF flow rule action with the VF default entry action */ 1046 - if (mcam_index < 0) 1047 - npc_update_vf_flow_entry(rvu, mcam, blkaddr, pcifunc, 1048 - *(u64 *)&action); 1049 - 1050 1045 /* update the action change in default rule */ 1051 1046 pfvf = rvu_get_pfvf(rvu, pcifunc); 1052 1047 if (pfvf->def_ucast_rule) 1053 1048 pfvf->def_ucast_rule->rx_action = action; 1054 1049 1055 - index = npc_get_nixlf_mcam_index(mcam, pcifunc, 1056 - nixlf, NIXLF_PROMISC_ENTRY); 1050 + if (mcam_index < 0) { 1051 + /* update the VF flow rule action with the VF default 1052 + * entry action 1053 + */ 1054 + npc_update_vf_flow_entry(rvu, mcam, blkaddr, pcifunc, 1055 + *(u64 *)&action); 1057 1056 1058 - /* If PF's promiscuous entry is enabled, 1059 - * Set RSS action for that entry as well 1060 - */ 1061 - npc_update_rx_action_with_alg_idx(rvu, action, pfvf, index, blkaddr, 1062 - alg_idx); 1057 + index = npc_get_nixlf_mcam_index(mcam, pcifunc, 1058 + nixlf, NIXLF_PROMISC_ENTRY); 1063 1059 1064 - index = npc_get_nixlf_mcam_index(mcam, pcifunc, 1065 - nixlf, NIXLF_ALLMULTI_ENTRY); 1066 - /* If PF's allmulti entry is enabled, 1067 - * Set RSS action for that entry as well 1068 - */ 1069 - npc_update_rx_action_with_alg_idx(rvu, action, pfvf, index, blkaddr, 1070 - alg_idx); 1060 + /* If PF's promiscuous entry is enabled, 1061 + * Set RSS action for that entry as well 1062 + */ 1063 + npc_update_rx_action_with_alg_idx(rvu, action, pfvf, index, 1064 + blkaddr, alg_idx); 1065 + 1066 + index = npc_get_nixlf_mcam_index(mcam, pcifunc, 1067 + nixlf, NIXLF_ALLMULTI_ENTRY); 1068 + /* If PF's allmulti entry is enabled, 1069 + * Set RSS action for that entry as well 1070 + */ 1071 + npc_update_rx_action_with_alg_idx(rvu, action, pfvf, index, 1072 + blkaddr, alg_idx); 1073 + } 1071 1074 } 1072 1075 1073 1076 void npc_enadis_default_mce_entry(struct rvu *rvu, u16 pcifunc,