Skip to content

Commit 404dc0f

Browse files
Michal Mazurdavem330
authored andcommitted
octeontx2-af: fix detection of IP layer
Checksum and length checks are not enabled for IPv4 header with options and IPv6 with extension headers. To fix this a change in enum npc_kpu_lc_ltype is required which will allow adjustment of LTYPE_MASK to detect all types of IP headers. Fixes: 21e6699 ("octeontx2-af: Add NPC KPU profile") Signed-off-by: Michal Mazur <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 845fe19 commit 404dc0f

File tree

1 file changed

+6
-2
lines changed
  • drivers/net/ethernet/marvell/octeontx2/af

1 file changed

+6
-2
lines changed

drivers/net/ethernet/marvell/octeontx2/af/npc.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,20 @@ enum npc_kpu_lb_ltype {
6363
NPC_LT_LB_CUSTOM1 = 0xF,
6464
};
6565

66+
/* Don't modify ltypes up to IP6_EXT, otherwise length and checksum of IP
67+
* headers may not be checked correctly. IPv4 ltypes and IPv6 ltypes must
68+
* differ only at bit 0 so mask 0xE can be used to detect extended headers.
69+
*/
6670
enum npc_kpu_lc_ltype {
67-
NPC_LT_LC_IP = 1,
71+
NPC_LT_LC_PTP = 1,
72+
NPC_LT_LC_IP,
6873
NPC_LT_LC_IP_OPT,
6974
NPC_LT_LC_IP6,
7075
NPC_LT_LC_IP6_EXT,
7176
NPC_LT_LC_ARP,
7277
NPC_LT_LC_RARP,
7378
NPC_LT_LC_MPLS,
7479
NPC_LT_LC_NSH,
75-
NPC_LT_LC_PTP,
7680
NPC_LT_LC_FCOE,
7781
NPC_LT_LC_NGIO,
7882
NPC_LT_LC_CUSTOM0 = 0xE,

0 commit comments

Comments
 (0)