netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/06]: e1000: don't truncate VLAN TCI with VLAN stripping
       [not found] <487148E0.5040407@trash.net>
@ 2008-07-06 22:48 ` Patrick McHardy
  2008-07-06 22:48 ` [PATCH 02/06]: e1000e: " Patrick McHardy
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: Patrick McHardy @ 2008-07-06 22:48 UTC (permalink / raw)
  To: Linux Netdev List
  Cc: Jeff Garzik, jeffrey.t.kirsher, jesse.brandeburg, PJ Waskiewicz,
	john.ronciak

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




[-- Attachment #2: 01.diff --]
[-- Type: text/x-diff, Size: 2135 bytes --]

e1000: don't truncate VLAN TCI with VLAN stripping

The vlan_hwaccel_{rx,receive_skb} functions expect the full TCI field
for priority mappings, don't truncate the upper 4 bits.

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit 4e95de3d2639cf46d4c88556f36585647ee96912
tree 197487137f449c7d88fc77f4147a2d22bb8382e4
parent aee18a8cf28808b7302ef698d77fa73883e60f1b
author Patrick McHardy <kaber@trash.net> Mon, 07 Jul 2008 00:25:13 +0200
committer Patrick McHardy <kaber@trash.net> Mon, 07 Jul 2008 00:25:13 +0200

 drivers/net/e1000/e1000_main.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 311ca26..7aa458f 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -4277,8 +4277,7 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,
 		if (unlikely(adapter->vlgrp &&
 			    (status & E1000_RXD_STAT_VP))) {
 			vlan_hwaccel_receive_skb(skb, adapter->vlgrp,
-						 le16_to_cpu(rx_desc->special) &
-						 E1000_RXD_SPC_VLAN_MASK);
+						 le16_to_cpu(rx_desc->special));
 		} else {
 			netif_receive_skb(skb);
 		}
@@ -4286,8 +4285,7 @@ e1000_clean_rx_irq(struct e1000_adapter *adapter,
 		if (unlikely(adapter->vlgrp &&
 			    (status & E1000_RXD_STAT_VP))) {
 			vlan_hwaccel_rx(skb, adapter->vlgrp,
-					le16_to_cpu(rx_desc->special) &
-					E1000_RXD_SPC_VLAN_MASK);
+					le16_to_cpu(rx_desc->special));
 		} else {
 			netif_rx(skb);
 		}
@@ -4464,16 +4462,14 @@ copydone:
 #ifdef CONFIG_E1000_NAPI
 		if (unlikely(adapter->vlgrp && (staterr & E1000_RXD_STAT_VP))) {
 			vlan_hwaccel_receive_skb(skb, adapter->vlgrp,
-				le16_to_cpu(rx_desc->wb.middle.vlan) &
-				E1000_RXD_SPC_VLAN_MASK);
+				le16_to_cpu(rx_desc->wb.middle.vlan));
 		} else {
 			netif_receive_skb(skb);
 		}
 #else /* CONFIG_E1000_NAPI */
 		if (unlikely(adapter->vlgrp && (staterr & E1000_RXD_STAT_VP))) {
 			vlan_hwaccel_rx(skb, adapter->vlgrp,
-				le16_to_cpu(rx_desc->wb.middle.vlan) &
-				E1000_RXD_SPC_VLAN_MASK);
+				le16_to_cpu(rx_desc->wb.middle.vlan));
 		} else {
 			netif_rx(skb);
 		}


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

* [PATCH 02/06]: e1000e: don't truncate VLAN TCI with VLAN stripping
       [not found] <487148E0.5040407@trash.net>
  2008-07-06 22:48 ` [PATCH 01/06]: e1000: don't truncate VLAN TCI with VLAN stripping Patrick McHardy
@ 2008-07-06 22:48 ` Patrick McHardy
  2008-07-06 22:48 ` [PATCH 03/06]: igb: " Patrick McHardy
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: Patrick McHardy @ 2008-07-06 22:48 UTC (permalink / raw)
  To: Linux Netdev List
  Cc: Jeff Garzik, jeffrey.t.kirsher, jesse.brandeburg, PJ Waskiewicz,
	john.ronciak

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




[-- Attachment #2: 02.diff --]
[-- Type: text/x-diff, Size: 1094 bytes --]

e1000e: don't truncate VLAN TCI with VLAN stripping

The vlan_hwaccel_{rx,receive_skb} functions expect the full TCI field
for priority mappings, don't truncate the upper 4 bits.

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit aef20146b65b227a9eba0fa84bd1bd36fbdd7805
tree 0f064a48f2c2191b06f061877973cd0613dc718c
parent 4e95de3d2639cf46d4c88556f36585647ee96912
author Patrick McHardy <kaber@trash.net> Mon, 07 Jul 2008 00:25:13 +0200
committer Patrick McHardy <kaber@trash.net> Mon, 07 Jul 2008 00:25:13 +0200

 drivers/net/e1000e/netdev.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index acdd616..80592bd 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -98,8 +98,7 @@ static void e1000_receive_skb(struct e1000_adapter *adapter,
 
 	if (adapter->vlgrp && (status & E1000_RXD_STAT_VP))
 		vlan_hwaccel_receive_skb(skb, adapter->vlgrp,
-					 le16_to_cpu(vlan) &
-					 E1000_RXD_SPC_VLAN_MASK);
+					 le16_to_cpu(vlan));
 	else
 		netif_receive_skb(skb);
 


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

* [PATCH 03/06]: igb: don't truncate VLAN TCI with VLAN stripping
       [not found] <487148E0.5040407@trash.net>
  2008-07-06 22:48 ` [PATCH 01/06]: e1000: don't truncate VLAN TCI with VLAN stripping Patrick McHardy
  2008-07-06 22:48 ` [PATCH 02/06]: e1000e: " Patrick McHardy
@ 2008-07-06 22:48 ` Patrick McHardy
  2008-07-06 22:48 ` [PATCH 04/06]: ixgb: " Patrick McHardy
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 6+ messages in thread
From: Patrick McHardy @ 2008-07-06 22:48 UTC (permalink / raw)
  To: Linux Netdev List
  Cc: Jeff Garzik, jeffrey.t.kirsher, jesse.brandeburg, PJ Waskiewicz,
	john.ronciak

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




[-- Attachment #2: 03.diff --]
[-- Type: text/x-diff, Size: 1112 bytes --]

igb: don't truncate VLAN TCI with VLAN stripping

The vlan_hwaccel_{rx,receive_skb} functions expect the full TCI field
for priority mappings, don't truncate the upper 4 bits.

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit 4295edfa0ab04aff6be3c396e58cb5033aa729bc
tree 0cc631675d1eb2adc9a34b9d0cba32a124b9254d
parent aef20146b65b227a9eba0fa84bd1bd36fbdd7805
author Patrick McHardy <kaber@trash.net> Mon, 07 Jul 2008 00:25:13 +0200
committer Patrick McHardy <kaber@trash.net> Mon, 07 Jul 2008 00:25:13 +0200

 drivers/net/igb/igb_main.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 7bc6fae..afd4ce3 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -3391,8 +3391,7 @@ static void igb_receive_skb(struct igb_adapter *adapter, u8 status, __le16 vlan,
 {
 	if (adapter->vlgrp && (status & E1000_RXD_STAT_VP))
 		vlan_hwaccel_receive_skb(skb, adapter->vlgrp,
-					 le16_to_cpu(vlan) &
-					 E1000_RXD_SPC_VLAN_MASK);
+					 le16_to_cpu(vlan));
 	else
 		netif_receive_skb(skb);
 }


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

* [PATCH 04/06]: ixgb: don't truncate VLAN TCI with VLAN stripping
       [not found] <487148E0.5040407@trash.net>
                   ` (2 preceding siblings ...)
  2008-07-06 22:48 ` [PATCH 03/06]: igb: " Patrick McHardy
@ 2008-07-06 22:48 ` Patrick McHardy
  2008-07-06 22:48 ` [PATCH 05/06]: starfire: " Patrick McHardy
  2008-07-06 22:48 ` [PATCH 06/06]: tehuti: " Patrick McHardy
  5 siblings, 0 replies; 6+ messages in thread
From: Patrick McHardy @ 2008-07-06 22:48 UTC (permalink / raw)
  To: Linux Netdev List
  Cc: Jeff Garzik, jeffrey.t.kirsher, jesse.brandeburg, PJ Waskiewicz,
	john.ronciak

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

Patrick McHardy wrote:
> These patches fix all drivers supporting VLAN header stripping to
> pass the complete VLAN TCI to vlan_hwaccel_{rx,receive_skb} instead
> of just the VID. The upper three bits contain the priority and are
> used for ingress priority mappings.
>
> The e1000 patch is runtime tested, the others only compile tested.
>
>
>  drivers/net/e1000/e1000_main.c |   12 ++++--------
>  drivers/net/e1000e/netdev.c    |    3 +--
>  drivers/net/igb/igb_main.c     |    3 +--
>  drivers/net/ixgb/ixgb_main.c   |    6 ++----
>  drivers/net/starfire.c         |    2 +-
>  drivers/net/tehuti.c           |    2 +-
>  drivers/net/tehuti.h           |    1 +
>  7 files changed, 11 insertions(+), 18 deletions(-)
>
> Patrick McHardy (6):
>       e1000: don't truncate VLAN TCI with VLAN stripping
>       e1000e: don't truncate VLAN TCI with VLAN stripping
>       igb: don't truncate VLAN TCI with VLAN stripping
>       ixgb: don't truncate VLAN TCI with VLAN stripping
>       starfire: don't truncate VLAN TCI with VLAN stripping
>       tehuti: don't truncate VLAN TCI with VLAN stripping
>
>   


[-- Attachment #2: 04.diff --]
[-- Type: text/x-diff, Size: 1440 bytes --]

ixgb: don't truncate VLAN TCI with VLAN stripping

The vlan_hwaccel_{rx,receive_skb} functions expect the full TCI field
for priority mappings, don't truncate the upper 4 bits.

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit 92c22c36d1e18c443bbbe0097c005ebc94e82a4f
tree 55cbe321e6dde27e06e1cec6bc6a73ae8ab14608
parent 4295edfa0ab04aff6be3c396e58cb5033aa729bc
author Patrick McHardy <kaber@trash.net> Mon, 07 Jul 2008 00:25:14 +0200
committer Patrick McHardy <kaber@trash.net> Mon, 07 Jul 2008 00:25:14 +0200

 drivers/net/ixgb/ixgb_main.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index cb8dadd..41f3adf 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -2045,16 +2045,14 @@ ixgb_clean_rx_irq(struct ixgb_adapter *adapter)
 #ifdef CONFIG_IXGB_NAPI
 		if(adapter->vlgrp && (status & IXGB_RX_DESC_STATUS_VP)) {
 			vlan_hwaccel_receive_skb(skb, adapter->vlgrp,
-				le16_to_cpu(rx_desc->special) &
-					IXGB_RX_DESC_SPECIAL_VLAN_MASK);
+				le16_to_cpu(rx_desc->special));
 		} else {
 			netif_receive_skb(skb);
 		}
 #else /* CONFIG_IXGB_NAPI */
 		if(adapter->vlgrp && (status & IXGB_RX_DESC_STATUS_VP)) {
 			vlan_hwaccel_rx(skb, adapter->vlgrp,
-				le16_to_cpu(rx_desc->special) &
-					IXGB_RX_DESC_SPECIAL_VLAN_MASK);
+				le16_to_cpu(rx_desc->special));
 		} else {
 			netif_rx(skb);
 		}


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

* [PATCH 05/06]: starfire: don't truncate VLAN TCI with VLAN stripping
       [not found] <487148E0.5040407@trash.net>
                   ` (3 preceding siblings ...)
  2008-07-06 22:48 ` [PATCH 04/06]: ixgb: " Patrick McHardy
@ 2008-07-06 22:48 ` Patrick McHardy
  2008-07-06 22:48 ` [PATCH 06/06]: tehuti: " Patrick McHardy
  5 siblings, 0 replies; 6+ messages in thread
From: Patrick McHardy @ 2008-07-06 22:48 UTC (permalink / raw)
  To: Linux Netdev List; +Cc: Jeff Garzik, ionut

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




[-- Attachment #2: 05.diff --]
[-- Type: text/x-diff, Size: 1255 bytes --]

starfire: don't truncate VLAN TCI with VLAN stripping

The vlan_hwaccel_{rx,receive_skb} functions expect the full TCI field
for priority mappings, don't truncate the upper 4 bits.

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit c8695f4c66c53182b2b6dc8a848d07e0208edd5d
tree 520848e31ff58269e8486a3116387a21e67f3202
parent 92c22c36d1e18c443bbbe0097c005ebc94e82a4f
author Patrick McHardy <kaber@trash.net> Mon, 07 Jul 2008 00:25:14 +0200
committer Patrick McHardy <kaber@trash.net> Mon, 07 Jul 2008 00:25:14 +0200

 drivers/net/starfire.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c
index 7b7b171..2038f38 100644
--- a/drivers/net/starfire.c
+++ b/drivers/net/starfire.c
@@ -1510,7 +1510,7 @@ static int __netdev_rx(struct net_device *dev, int *quota)
 			if (debug > 4)
 				printk(KERN_DEBUG "  netdev_rx() vlanid = %d\n", le16_to_cpu(desc->vlanid));
 			/* vlan_netdev_receive_skb() expects a packet with the VLAN tag stripped out */
-			vlan_netdev_receive_skb(skb, np->vlgrp, le16_to_cpu(desc->vlanid) & VLAN_VID_MASK);
+			vlan_netdev_receive_skb(skb, np->vlgrp, le16_to_cpu(desc->vlanid));
 		} else
 #endif /* VLAN_SUPPORT */
 			netdev_receive_skb(skb);


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

* [PATCH 06/06]: tehuti: don't truncate VLAN TCI with VLAN stripping
       [not found] <487148E0.5040407@trash.net>
                   ` (4 preceding siblings ...)
  2008-07-06 22:48 ` [PATCH 05/06]: starfire: " Patrick McHardy
@ 2008-07-06 22:48 ` Patrick McHardy
  5 siblings, 0 replies; 6+ messages in thread
From: Patrick McHardy @ 2008-07-06 22:48 UTC (permalink / raw)
  To: Linux Netdev List; +Cc: Jeff Garzik, baum, andy

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




[-- Attachment #2: 06.diff --]
[-- Type: text/x-diff, Size: 1623 bytes --]

tehuti: don't truncate VLAN TCI with VLAN stripping

The vlan_hwaccel_{rx,receive_skb} functions expect the full TCI field
for priority mappings, don't truncate the upper 4 bits.

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit c05578e004584c39ae91f4bd9d82582913905a29
tree 8a22a280fc7cff6badb7c363369054067914e298
parent c8695f4c66c53182b2b6dc8a848d07e0208edd5d
author Patrick McHardy <kaber@trash.net> Mon, 07 Jul 2008 00:25:14 +0200
committer Patrick McHardy <kaber@trash.net> Mon, 07 Jul 2008 00:25:14 +0200

 drivers/net/tehuti.c |    2 +-
 drivers/net/tehuti.h |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/tehuti.c b/drivers/net/tehuti.c
index 432e837..91f9054 100644
--- a/drivers/net/tehuti.c
+++ b/drivers/net/tehuti.c
@@ -1165,7 +1165,7 @@ NETIF_RX_MUX(struct bdx_priv *priv, u32 rxd_val1, u16 rxd_vlan,
 					  GET_RXD_VLAN_ID(rxd_vlan))->name);
 		/* NAPI variant of receive functions */
 		vlan_hwaccel_receive_skb(skb, priv->vlgrp,
-					 GET_RXD_VLAN_ID(rxd_vlan));
+					 GET_RXD_VLAN_TCI(rxd_vlan));
 	} else {
 		netif_receive_skb(skb);
 	}
diff --git a/drivers/net/tehuti.h b/drivers/net/tehuti.h
index efd170f..e620a0e 100644
--- a/drivers/net/tehuti.h
+++ b/drivers/net/tehuti.h
@@ -309,6 +309,7 @@ struct rxf_desc {
 #define GET_RXD_PKT_ID(x)		GET_BITS_SHIFT((x), 3, 28)
 #define GET_RXD_VTAG(x)			GET_BITS_SHIFT((x), 1, 31)
 #define GET_RXD_VLAN_ID(x)		GET_BITS_SHIFT((x), 12, 0)
+#define GET_RXD_VLAN_TCI(x)		GET_BITS_SHIFT((x), 16, 0)
 #define GET_RXD_CFI(x)			GET_BITS_SHIFT((x), 1, 12)
 #define GET_RXD_PRIO(x)			GET_BITS_SHIFT((x), 3, 13)
 


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

end of thread, other threads:[~2008-07-06 22:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <487148E0.5040407@trash.net>
2008-07-06 22:48 ` [PATCH 01/06]: e1000: don't truncate VLAN TCI with VLAN stripping Patrick McHardy
2008-07-06 22:48 ` [PATCH 02/06]: e1000e: " Patrick McHardy
2008-07-06 22:48 ` [PATCH 03/06]: igb: " Patrick McHardy
2008-07-06 22:48 ` [PATCH 04/06]: ixgb: " Patrick McHardy
2008-07-06 22:48 ` [PATCH 05/06]: starfire: " Patrick McHardy
2008-07-06 22:48 ` [PATCH 06/06]: tehuti: " Patrick McHardy

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