vlan: Calling vlan_hwaccel_do_receive() is always valid.
Subsystems (2)
PATCH 1/2 vlan: Calling vlan_hwaccel_do_receive() is always valid.
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.
--- include/linux/if_vlan.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
include/linux/if_vlan.h +2 -1
@@ -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
Signature · 1 line
1.7.1
PATCH 2/2 bnx2/bnx2x: Unsupported Ethtool operations should return -EINVAL.
Some cards don't support changing vlan offloading settings. Make Ethtool set_flags return -EINVAL in those cases.
--- drivers/net/bnx2.c | 2 +- drivers/net/bnx2x/bnx2x_ethtool.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/bnx2.c +1 -1
@@ -7528,7 +7528,7 @@ bnx2_set_flags(struct net_device *dev, u32 data)if (!(bp->flags &BNX2_FLAG_CAN_KEEP_VLAN ) && !(data Ð_FLAG_RXVLAN )) -return -EOPNOTSUPP ; +return -EINVAL ; rc =ethtool_op_set_flags (dev, data,ETH_FLAG_RXHASH |ETH_FLAG_RXVLAN |ETH_FLAG_TXVLAN );
drivers/net/bnx2x/bnx2x_ethtool.c +1 -1
@@ -1123,7 +1123,7 @@ static int bnx2x_set_flags(struct net_device *dev, u32 data) }if (!(data Ð_FLAG_RXVLAN )) -return -EOPNOTSUPP ; +return -EINVAL ;if ((data Ð_FLAG_LRO ) && bp->rx_csum && bp->disable_tpa)return -EINVAL ;
Signature · 1 line
1.7.1
Re: [PATCH 2/2] bnx2/bnx2x: Unsupported Ethtool operations should return -EINVAL.
From: Jesse Gross <[email protected]>
Date: Thu, 21 Oct 2010 14:30:43 -0700
Quoted 5 lines
Some cards don't support changing vlan offloading settings. Make Ethtool
set_flagsreturn-EINVALin those cases.Reported-by Ben Hutchings <[email protected]>Signed-off-by Jesse Gross <[email protected]>
Applied.
Thanks, this solves the problem.
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jesse Gross
Sent: Thursday, October 21, 2010 11:31 PM
To: David Miller
Cc: [email protected]
Subject: [PATCH 1/2] vlan: Calling vlan_hwaccel_do_receive() is always valid.
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.
--- include/linux/if_vlan.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
include/linux/if_vlan.h +2 -1
@@ -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
Signature · 6 lines
1.7.1 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Jesse Gross <[email protected]>
Date: Thu, 21 Oct 2010 14:30:42 -0700
Quoted 7 lines
It is now acceptable to receive vlan tagged packets at any time, even if
CONFIG_VLAN_8021Qis not set. This means that callingvlan_hwaccel_do_receive()should not result inBUG()but rather just behave as if there were no vlan devices configured.Reported-by Vladislav Zolotarov <[email protected]>Signed-off-by Jesse Gross <[email protected]>
Applied.