summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/marvell/octeontx2/af/npc.h
diff options
context:
space:
mode:
authorNaveen Mamindlapalli <naveenm@marvell.com>2021-01-11 14:25:37 +0300
committerJakub Kicinski <kuba@kernel.org>2021-01-14 06:11:48 +0300
commitb7cf966126eb16c96bcd13e5ba63657b7e2baef2 (patch)
tree47c322de382f6443f4b7a2e027d1458d2191255e /drivers/net/ethernet/marvell/octeontx2/af/npc.h
parent324cefaf1c723625e93f703d6e6d78e28996b315 (diff)
downloadlinux-b7cf966126eb16c96bcd13e5ba63657b7e2baef2.tar.xz
octeontx2-pf: Add flow classification using IP next level protocol
This patch adds support to install flow rules using ipv4 proto or ipv6 next header field to distinguish between tcp/udp/sctp/esp/ah flows when user doesn't specify the other match creteria related to the flow such as tcp/udp/sctp source port and destination port, ah/esp spi value. This is achieved by matching the layer type extracted by NPC HW into the search key. Modified the driver to use Ethertype as match criteria when user doesn't specify source IP address and dest IP address. The esp/ah flow rule matching using security parameter index (spi) is not supported as of now since the field is not extracted into MCAM search key. Modified npc_check_field function to return bool. Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com> Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Link: https://lore.kernel.org/r/20210111112537.3277-1-naveenm@marvell.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/marvell/octeontx2/af/npc.h')
-rw-r--r--drivers/net/ethernet/marvell/octeontx2/af/npc.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/npc.h b/drivers/net/ethernet/marvell/octeontx2/af/npc.h
index a1f79445db71..3c640f6aba92 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/npc.h
+++ b/drivers/net/ethernet/marvell/octeontx2/af/npc.h
@@ -162,6 +162,11 @@ enum key_fields {
NPC_DIP_IPV4,
NPC_SIP_IPV6,
NPC_DIP_IPV6,
+ NPC_IPPROTO_TCP,
+ NPC_IPPROTO_UDP,
+ NPC_IPPROTO_SCTP,
+ NPC_IPPROTO_AH,
+ NPC_IPPROTO_ESP,
NPC_SPORT_TCP,
NPC_DPORT_TCP,
NPC_SPORT_UDP,