octeontx2-pf: TC flower offload support for ICMP type and code
authorGeetha sowjanya <gakula@marvell.com>
Wed, 22 Nov 2023 11:41:42 +0000 (17:11 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Nov 2023 12:10:17 +0000 (12:10 +0000)
commita8d4879d5f1fac060719567d1a8e8f8e68a127fc
treedbe5cb4cc390c23782210ea815c859ccdf761f6f
parentaadbd27f9674d7f5457331fe0248b370d5c1f25d
octeontx2-pf: TC flower offload support for ICMP type and code

Adds tc offload support for matching on ICMP type and code.

Example usage:
To enable adding tc ingress rules
        tc qdisc add dev eth0 ingress

TC rule drop the ICMP echo reply:
        tc filter add dev eth0 protocol ip parent ffff: \
        flower ip_proto icmp type 8 code 0 skip_sw action drop

TC rule to drop ICMPv6 echo reply:
        tc filter add dev eth0 protocol ipv6 parent ffff: flower \
        indev eth0 ip_proto icmpv6 type 128 code 0 action drop

Signed-off-by: Geetha sowjanya <gakula@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/mbox.h
drivers/net/ethernet/marvell/octeontx2/af/npc.h
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc_fs.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c