net: microchip: vcap: Add tc flower keys for lan966x
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Wed, 8 Feb 2023 13:08:39 +0000 (14:08 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Feb 2023 08:03:09 +0000 (08:03 +0000)
commit47400aaea4ffdc306f0fd698f8c13b02e133130e
tree72d7375ab5257c6234135a089c3569fd63fcabc5
parent21119e2c6e8461677c86decc9cdbcfb14bde0741
net: microchip: vcap: Add tc flower keys for lan966x

Add the following TC flower filter keys to lan966x for IS2:
- ipv4_addr (sip and dip)
- ipv6_addr (sip and dip)
- control (IPv4 fragments)
- portnum (tcp and udp port numbers)
- basic (L3 and L4 protocol)
- vlan (outer vlan tag info)
- tcp (tcp flags)
- ip (tos field)

As the parsing of these keys is similar between lan966x and sparx5, move
the code in a separate file to be shared by these 2 chips. And put the
specific parsing outside of the common functions.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/microchip/lan966x/lan966x_tc_flower.c
drivers/net/ethernet/microchip/sparx5/sparx5_tc_flower.c
drivers/net/ethernet/microchip/vcap/Makefile
drivers/net/ethernet/microchip/vcap/vcap_tc.c [new file with mode: 0644]
drivers/net/ethernet/microchip/vcap/vcap_tc.h [new file with mode: 0644]