netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] vlan: Calling vlan_hwaccel_do_receive() is always valid.
@ 2010-10-21 21:30 Jesse Gross
  2010-10-21 21:30 ` [PATCH 2/2] bnx2/bnx2x: Unsupported Ethtool operations should return -EINVAL Jesse Gross
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jesse Gross @ 2010-10-21 21:30 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

It is now acceptable to receive vlan tagged packets at any time,
even if CONFIG_VLAN_8021Q is not set.  This means that calling
vlan_hwaccel_do_receive() should not result in BUG() but rather just
behave as if there were no vlan devices configured.

Reported-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
---
 include/linux/if_vlan.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index e607256..cbd3dcd 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -153,7 +153,8 @@ static inline u16 vlan_dev_vlan_id(const struct net_device *dev)
 
 static inline bool vlan_hwaccel_do_receive(struct sk_buff **skb)
 {
-	BUG();
+	if ((*skb)->vlan_tci & VLAN_VID_MASK)
+		(*skb)->pkt_type = PACKET_OTHERHOST;
 	return false;
 }
 #endif
-- 
1.7.1


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

end of thread, other threads:[~2010-10-22  3:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-21 21:30 [PATCH 1/2] vlan: Calling vlan_hwaccel_do_receive() is always valid Jesse Gross
2010-10-21 21:30 ` [PATCH 2/2] bnx2/bnx2x: Unsupported Ethtool operations should return -EINVAL Jesse Gross
2010-10-22  3:00   ` David Miller
2010-10-22  0:46 ` [PATCH 1/2] vlan: Calling vlan_hwaccel_do_receive() is always valid Dmitry Kravkov
2010-10-22  3:00 ` 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).