]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
net: aquantia: add support of L3/L4 ntuple filters
authorDmitry Bogdanov <dmitry.bogdanov@aquantia.com>
Mon, 12 Nov 2018 15:46:02 +0000 (15:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Nov 2018 16:48:37 +0000 (08:48 -0800)
commita6ed6f2269d64b0eb65e27eac16c9852ff05e50f
treeca0a297ff48eac4b7df6770940b42f41c6dc7ad5
parent8d0bcb012f57729e44991a45f5ba3266a58de268
net: aquantia: add support of L3/L4 ntuple filters

Add support of L3/L4 5-tuple {protocol, src-ip, dst-ip, src-port, dst-port}
filters. Mask is not supported. Src-port and dst-port are only compared for
TCP/UDP/SCTP packets. Both IPv4 and IPv6 are supported.
The supported actions are the drop and the queue assignment.
Due to fixed order of the rules in the NIC, the location 32-39 are
reserved for L3/L4 5-tuple filters. The locations 32 and 36 are
reserved for IPv6 filters.

Examples:
sudo ethtool -N eth0 flow-type ip6 src-ip 2001:db8:0:f101::2 \
dst-ip 2001:db8:0:f101::5 action -1 loc 36

sudo ethtool -N eth0 flow-type udp4 src-ip 10.0.0.4 \
dst-ip 10.0.0.7 src-port 2000 dst-port 2001 action 2 loc 32

Signed-off-by: Dmitry Bogdanov <dmitry.bogdanov@aquantia.com>
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/aquantia/atlantic/aq_filters.c
drivers/net/ethernet/aquantia/atlantic/aq_hw.h
drivers/net/ethernet/aquantia/atlantic/aq_nic.h
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h