Skip to content

Commit 60795bb

Browse files
satheeshpauldavem330
authored andcommitted
octeontx2-af: fix issue with IPv4 match for RSS
While performing RSS based on IPv4, packets with IPv4 options are not being considered. Adding changes to match both plain IPv4 and IPv4 with option header. Fixes: 41a7aa7 ("octeontx2-af: NIX Rx flowkey configuration for RSS") Signed-off-by: Satheesh Paul <[email protected]> Reviewed-by: Kalesh AP <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e23ac10 commit 60795bb

File tree

1 file changed

+4
-3
lines changed
  • drivers/net/ethernet/marvell/octeontx2/af

1 file changed

+4
-3
lines changed

drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3866,6 +3866,8 @@ static int get_flowkey_alg_idx(struct nix_hw *nix_hw, u32 flow_cfg)
38663866

38673867
/* Mask to match ipv6(NPC_LT_LC_IP6) and ipv6 ext(NPC_LT_LC_IP6_EXT) */
38683868
#define NPC_LT_LC_IP6_MATCH_MSK ((~(NPC_LT_LC_IP6 ^ NPC_LT_LC_IP6_EXT)) & 0xf)
3869+
/* Mask to match both ipv4(NPC_LT_LC_IP) and ipv4 ext(NPC_LT_LC_IP_OPT) */
3870+
#define NPC_LT_LC_IP_MATCH_MSK ((~(NPC_LT_LC_IP ^ NPC_LT_LC_IP_OPT)) & 0xf)
38693871

38703872
static int set_flowkey_fields(struct nix_rx_flowkey_alg *alg, u32 flow_cfg)
38713873
{
@@ -3936,7 +3938,7 @@ static int set_flowkey_fields(struct nix_rx_flowkey_alg *alg, u32 flow_cfg)
39363938
field->hdr_offset = 9; /* offset */
39373939
field->bytesm1 = 0; /* 1 byte */
39383940
field->ltype_match = NPC_LT_LC_IP;
3939-
field->ltype_mask = 0xF;
3941+
field->ltype_mask = NPC_LT_LC_IP_MATCH_MSK;
39403942
break;
39413943
case NIX_FLOW_KEY_TYPE_IPV4:
39423944
case NIX_FLOW_KEY_TYPE_INNR_IPV4:
@@ -3963,8 +3965,7 @@ static int set_flowkey_fields(struct nix_rx_flowkey_alg *alg, u32 flow_cfg)
39633965
field->bytesm1 = 3; /* DIP, 4 bytes */
39643966
}
39653967
}
3966-
3967-
field->ltype_mask = 0xF; /* Match only IPv4 */
3968+
field->ltype_mask = NPC_LT_LC_IP_MATCH_MSK;
39683969
keyoff_marker = false;
39693970
break;
39703971
case NIX_FLOW_KEY_TYPE_IPV6:

0 commit comments

Comments
 (0)