netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net] ixgbevf: fix VF untagging when 802.1 prio is set
@ 2012-07-18  2:23 Jeff Kirsher
  2012-07-18  2:31 ` Jeff Kirsher
  0 siblings, 1 reply; 2+ messages in thread
From: Jeff Kirsher @ 2012-07-18  2:23 UTC (permalink / raw)
  To: davem; +Cc: Pascal Bouchareine, netdev, gospo, sassmann, Jeff Kirsher

From: Pascal Bouchareine <pascal@gandi.net>

We have had an issue when using ixgbe+ixgbevf and 802.1 VLAN tagging.

When attaching a VLAN to a VF, frames with a 802.1q priority appeared
untagged on the VF hence not reaching the VLAN, where frames with
priority 0 where tagged as expected and seen by the VLAN device.

This seems due to the way ixgbevf is looking up the full tag
(prio+cfi+vlan) against the adapter active_vlans, as a condition to mark
the skb tagged.

Signed-off-by: Pascal Bouchareine <pascal@gandi.net>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 41e3225..c16d32f 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -304,7 +304,7 @@ static void ixgbevf_receive_skb(struct ixgbevf_q_vector *q_vector,
 	bool is_vlan = (status & IXGBE_RXD_STAT_VP);
 	u16 tag = le16_to_cpu(rx_desc->wb.upper.vlan);
 
-	if (is_vlan && test_bit(tag, adapter->active_vlans))
+	if (is_vlan && test_bit(tag & VLAN_VID_MASK, adapter->active_vlans))
 		__vlan_hwaccel_put_tag(skb, tag);
 
 	if (!(adapter->flags & IXGBE_FLAG_IN_NETPOLL))
-- 
1.7.10.4

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

* Re: [net] ixgbevf: fix VF untagging when 802.1 prio is set
  2012-07-18  2:23 [net] ixgbevf: fix VF untagging when 802.1 prio is set Jeff Kirsher
@ 2012-07-18  2:31 ` Jeff Kirsher
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Kirsher @ 2012-07-18  2:31 UTC (permalink / raw)
  To: davem; +Cc: Pascal Bouchareine, netdev, gospo, sassmann

[-- Attachment #1: Type: text/plain, Size: 981 bytes --]

On Tue, 2012-07-17 at 19:23 -0700, Jeff Kirsher wrote:
> From: Pascal Bouchareine <pascal@gandi.net>
> 
> We have had an issue when using ixgbe+ixgbevf and 802.1 VLAN tagging.
> 
> When attaching a VLAN to a VF, frames with a 802.1q priority appeared
> untagged on the VF hence not reaching the VLAN, where frames with
> priority 0 where tagged as expected and seen by the VLAN device.
> 
> This seems due to the way ixgbevf is looking up the full tag
> (prio+cfi+vlan) against the adapter active_vlans, as a condition to
> mark
> the skb tagged.
> 
> Signed-off-by: Pascal Bouchareine <pascal@gandi.net>
> Tested-by: Sibai Li <sibai.li@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> ---
>  drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-) 

Dave-

Disregard, I just read your message about "that's it for net".  I will
push this into my net-next tree.

Cheers,
Jeff

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2012-07-18  2:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-18  2:23 [net] ixgbevf: fix VF untagging when 802.1 prio is set Jeff Kirsher
2012-07-18  2:31 ` Jeff Kirsher

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).