net: aquantia: add ethertype and PCP to rx flow filters
authorDmitry Bogdanov <dmitry.bogdanov@aquantia.com>
Mon, 12 Nov 2018 15:46:07 +0000 (15:46 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Nov 2018 16:48:37 +0000 (08:48 -0800)
commit9a8cac4b4dae9d5717d4e5f38e0a5ce41de501ee
treef77a2d3366c43243d85ca52c05fcbf218bf07183
parent54bcb3d162a884adb91a53cc58412093ad64dc11
net: aquantia: add ethertype and PCP to rx flow filters

L2 EtherType filters allows to filter packet by EtherType field or
both EtherType and User Priority (PCP) field of 802.1Q.
UserPriority (vlan) parameter must be accompanied by mask 0x1FFF. That
is to distinguish VLAN filter from L2 Ethertype filter with
UserPriority since both User Priority and VLAN ID are passed in the
same 'vlan' parameter.

Example:
To add a filter that directs IP4 packess of priority 3 to queue 3:
ethtool -N <ethX> flow-type ether proto 0x800 vlan 0x600 m 0x1FFF \
action 3 loc 16

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_filters.h
drivers/net/ethernet/aquantia/atlantic/aq_hw.h
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_utils.h