Commit 404dc0fd authored by Michal Mazur's avatar Michal Mazur Committed by David S. Miller

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: 21e6699e ("octeontx2-af: Add NPC KPU profile")
Signed-off-by: default avatarMichal Mazur <mmazur2@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 845fe191
...@@ -63,8 +63,13 @@ enum npc_kpu_lb_ltype { ...@@ -63,8 +63,13 @@ enum npc_kpu_lb_ltype {
NPC_LT_LB_CUSTOM1 = 0xF, NPC_LT_LB_CUSTOM1 = 0xF,
}; };
/* Don't modify ltypes up to IP6_EXT, otherwise length and checksum of IP
* headers may not be checked correctly. IPv4 ltypes and IPv6 ltypes must
* differ only at bit 0 so mask 0xE can be used to detect extended headers.
*/
enum npc_kpu_lc_ltype { enum npc_kpu_lc_ltype {
NPC_LT_LC_IP = 1, NPC_LT_LC_PTP = 1,
NPC_LT_LC_IP,
NPC_LT_LC_IP_OPT, NPC_LT_LC_IP_OPT,
NPC_LT_LC_IP6, NPC_LT_LC_IP6,
NPC_LT_LC_IP6_EXT, NPC_LT_LC_IP6_EXT,
...@@ -72,7 +77,6 @@ enum npc_kpu_lc_ltype { ...@@ -72,7 +77,6 @@ enum npc_kpu_lc_ltype {
NPC_LT_LC_RARP, NPC_LT_LC_RARP,
NPC_LT_LC_MPLS, NPC_LT_LC_MPLS,
NPC_LT_LC_NSH, NPC_LT_LC_NSH,
NPC_LT_LC_PTP,
NPC_LT_LC_FCOE, NPC_LT_LC_FCOE,
NPC_LT_LC_NGIO, NPC_LT_LC_NGIO,
NPC_LT_LC_CUSTOM0 = 0xE, NPC_LT_LC_CUSTOM0 = 0xE,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment