提交 9c9144e7 编写于 作者: R Raju Rangoju 提交者: Greg Kroah-Hartman

cxgb4: offload VLAN flows regardless of VLAN ethtype

[ Upstream commit b5730061d1056abf317caea823b94d6e12b5b4f6 ]

VLAN flows never get offloaded unless ivlan_vld is set in filter spec.
It's not compulsory for vlan_ethtype to be set.

So, always enable ivlan_vld bit for offloading VLAN flows regardless of
vlan_ethtype is set or not.

Fixes: ad9af3e0 (cxgb4: add tc flower match support for vlan)
Signed-off-by: NRaju Rangoju <rajur@chelsio.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 3cde0a25
...@@ -228,6 +228,9 @@ static void cxgb4_process_flow_match(struct net_device *dev, ...@@ -228,6 +228,9 @@ static void cxgb4_process_flow_match(struct net_device *dev,
fs->val.ivlan = vlan_tci; fs->val.ivlan = vlan_tci;
fs->mask.ivlan = vlan_tci_mask; fs->mask.ivlan = vlan_tci_mask;
fs->val.ivlan_vld = 1;
fs->mask.ivlan_vld = 1;
/* Chelsio adapters use ivlan_vld bit to match vlan packets /* Chelsio adapters use ivlan_vld bit to match vlan packets
* as 802.1Q. Also, when vlan tag is present in packets, * as 802.1Q. Also, when vlan tag is present in packets,
* ethtype match is used then to match on ethtype of inner * ethtype match is used then to match on ethtype of inner
...@@ -238,8 +241,6 @@ static void cxgb4_process_flow_match(struct net_device *dev, ...@@ -238,8 +241,6 @@ static void cxgb4_process_flow_match(struct net_device *dev,
* ethtype value with ethtype of inner header. * ethtype value with ethtype of inner header.
*/ */
if (fs->val.ethtype == ETH_P_8021Q) { if (fs->val.ethtype == ETH_P_8021Q) {
fs->val.ivlan_vld = 1;
fs->mask.ivlan_vld = 1;
fs->val.ethtype = 0; fs->val.ethtype = 0;
fs->mask.ethtype = 0; fs->mask.ethtype = 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册