summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/aquantia/atlantic/aq_nic.h
diff options
context:
space:
mode:
authorDmitry Bogdanov <dmitry.bogdanov@aquantia.com>2018-11-12 15:46:05 +0000
committerDavid S. Miller <davem@davemloft.net>2018-11-14 08:48:37 -0800
commit54bcb3d162a884adb91a53cc58412093ad64dc11 (patch)
treec31b0e71d0e39c7264aff69fb1efac866e9b9b68 /drivers/net/ethernet/aquantia/atlantic/aq_nic.h
parenta6ed6f2269d64b0eb65e27eac16c9852ff05e50f (diff)
net: aquantia: add vlan id to rx flow filters
The VLAN filter (VLAN id) is compared against 16 filters. VLAN id must be accompanied by mask 0xF000. 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. Flow type may be any as it is not matched for VLAN filter. Due to fixed order of the rules in the NIC, the location 0-15 are reserved for vlan filters. Example: To add a rule that directs packets from VLAN 2001 to queue 5: ethtool -N <ethX> flow-type ip4 vlan 2001 m 0xF000 action 5 loc 0 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>
Diffstat (limited to 'drivers/net/ethernet/aquantia/atlantic/aq_nic.h')
-rw-r--r--drivers/net/ethernet/aquantia/atlantic/aq_nic.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.h b/drivers/net/ethernet/aquantia/atlantic/aq_nic.h
index d3a087ef4b9f..6e971bd7f7b9 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.h
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.h
@@ -61,6 +61,10 @@ struct aq_nic_cfg_s {
#define AQ_NIC_TCVEC2RING(_NIC_, _TC_, _VEC_) \
((_TC_) * AQ_CFG_TCS_MAX + (_VEC_))
+struct aq_hw_rx_fl2 {
+ struct aq_rx_filter_vlan aq_vlans[AQ_VLAN_MAX_FILTERS];
+};
+
struct aq_hw_rx_fl3l4 {
u8 active_ipv4;
u8 active_ipv6:2;
@@ -70,6 +74,7 @@ struct aq_hw_rx_fl3l4 {
struct aq_hw_rx_fltrs_s {
struct hlist_head filter_list;
u16 active_filters;
+ struct aq_hw_rx_fl2 fl2;
struct aq_hw_rx_fl3l4 fl3l4;
};