netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] cxgb4: offload VLAN flows regardless of VLAN ethtype
@ 2019-05-23 15:11 Raju Rangoju
  2019-05-23 16:39 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Raju Rangoju @ 2019-05-23 15:11 UTC (permalink / raw)
  To: netdev, davem; +Cc: nirranjan, dt, rajur

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: ad9af3e09c (cxgb4: add tc flower match support for vlan)
Signed-off-by: Raju Rangoju <rajur@chelsio.com>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c
index 6e2d80008a79..cfaf8f618d1f 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c
@@ -197,6 +197,9 @@ static void cxgb4_process_flow_match(struct net_device *dev,
 		fs->val.ivlan = vlan_tci;
 		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
 		 * as 802.1Q. Also, when vlan tag is present in packets,
 		 * ethtype match is used then to match on ethtype of inner
@@ -207,8 +210,6 @@ static void cxgb4_process_flow_match(struct net_device *dev,
 		 * ethtype value with ethtype of inner header.
 		 */
 		if (fs->val.ethtype == ETH_P_8021Q) {
-			fs->val.ivlan_vld = 1;
-			fs->mask.ivlan_vld = 1;
 			fs->val.ethtype = 0;
 			fs->mask.ethtype = 0;
 		}
-- 
2.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] cxgb4: offload VLAN flows regardless of VLAN ethtype
  2019-05-23 15:11 [PATCH net] cxgb4: offload VLAN flows regardless of VLAN ethtype Raju Rangoju
@ 2019-05-23 16:39 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-05-23 16:39 UTC (permalink / raw)
  To: rajur; +Cc: netdev, nirranjan, dt

From: Raju Rangoju <rajur@chelsio.com>
Date: Thu, 23 May 2019 20:41:44 +0530

> 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: ad9af3e09c (cxgb4: add tc flower match support for vlan)
> Signed-off-by: Raju Rangoju <rajur@chelsio.com>

Applied and queued up for -stable.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-23 16:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-23 15:11 [PATCH net] cxgb4: offload VLAN flows regardless of VLAN ethtype Raju Rangoju
2019-05-23 16:39 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).