All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Linux Netdev List <netdev@vger.kernel.org>
Cc: Jeff Garzik <jeff@garzik.org>,
	baum@tehutinetworks.net, andy@greyhouse.net
Subject: [PATCH 06/06]: tehuti: don't truncate VLAN TCI with VLAN stripping
Date: Mon, 07 Jul 2008 00:48:21 +0200	[thread overview]
Message-ID: <48714BB5.2010107@trash.net> (raw)
In-Reply-To: <487148E0.5040407@trash.net>

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


      parent reply	other threads:[~2008-07-06 22:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 ` Patrick McHardy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48714BB5.2010107@trash.net \
    --to=kaber@trash.net \
    --cc=andy@greyhouse.net \
    --cc=baum@tehutinetworks.net \
    --cc=jeff@garzik.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.