summary refs log tree commit diff
path: root/drivers/net/ethernet/marvell/octeontx2/af/npc.h
diff options
context:
space:
mode:
authorNaveen Mamindlapalli <naveenm@marvell.com>2021-03-18 15:32:12 +0530
committerDavid S. Miller <davem@davemloft.net>2021-03-18 11:37:22 -0700
commit2b9cef6679020938666a81f3b6e743cdfcb8b32d (patch)
treed473e0d9479437bf8c77be41dd1f2015696b6fd6 /drivers/net/ethernet/marvell/octeontx2/af/npc.h
parenta04be4b6b539cfce52181f6f8f15a823d99f520c (diff)
downloadlinux-2b9cef6679020938666a81f3b6e743cdfcb8b32d.tar.gz
octeontx2-pf: Add ip tos and ip proto icmp/icmpv6 flow offload support
Add support for programming the HW MCAM match key with IP tos, IP(v6)
proto icmp/icmpv6, allowing flow offload rules to be installed using
those fields. The NPC HW extracts layer type, which will be used as a
matching criteria for different IP protocols.

The ethtool n-tuple filter logic has been updated to parse the IP tos
and l4proto for HW offloading. l4proto tcp/udp/sctp/ah/esp/icmp are
supported. See example usage below.

Ex: Redirect l4proto icmp to vf 0 queue 0
ethtool -U eth0 flow-type ip4 l4proto 1 action vf 0 queue 0

Ex: Redirect flow with ip tos 8 to vf 0 queue 0
ethtool -U eth0 flow-type ip4 tos 8 vf 0 queue 0

Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/octeontx2/af/npc.h')
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/af/npc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/npc.h b/drivers/net/ethernet/marvell/octeontx2/af/npc.h
index 0675c55dcc7a..1e012e787260 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/npc.h
+++ b/drivers/net/ethernet/marvell/octeontx2/af/npc.h
@@ -167,6 +167,8 @@ enum key_fields {
 	NPC_IPPROTO_SCTP,
 	NPC_IPPROTO_AH,
 	NPC_IPPROTO_ESP,
+	NPC_IPPROTO_ICMP,
+	NPC_IPPROTO_ICMP6,
 	NPC_SPORT_TCP,
 	NPC_DPORT_TCP,
 	NPC_SPORT_UDP,