All of lore.kernel.org
 help / color / mirror / Atom feed
From: frank.blaschka@de.ibm.com
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
	Stefan Raspl <raspl@linux.vnet.ibm.com>
Subject: [patch 4/4] qeth: Fix IP version detection for VLAN traffic
Date: Wed, 19 Mar 2014 07:58:02 +0100	[thread overview]
Message-ID: <20140319065813.642817087@de.ibm.com> (raw)
In-Reply-To: 20140319065758.841490297@de.ibm.com

[-- Attachment #1: 603-qeth-ip-version-vlan.diff --]
[-- Type: text/plain, Size: 1045 bytes --]

From: Stefan Raspl <raspl@linux.vnet.ibm.com>

The current code would always return 0 for VLAN-encapsulated IP traffic.
One notable side effect was that VLAN traffic would never get prioritized
on OSD and OSX devices when priority queueing modes prio_queueing_tos or
prio_queueing_prec were enabled.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
---
 drivers/s390/net/qeth_core.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h
index a0de045..5333b2c 100644
--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -854,8 +854,11 @@ static inline int qeth_get_micros(void)
 
 static inline int qeth_get_ip_version(struct sk_buff *skb)
 {
-	struct ethhdr *ehdr = (struct ethhdr *)skb->data;
-	switch (ehdr->h_proto) {
+	__be16 *p = &((struct ethhdr *)skb->data)->h_proto;
+
+	if (*p == ETH_P_8021Q)
+		p += 2;
+	switch (*p) {
 	case ETH_P_IPV6:
 		return 6;
 	case ETH_P_IP:

  parent reply	other threads:[~2014-03-19  6:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-19  6:57 [patch 0/4] s390: network patches for net-next frank.blaschka
2014-03-19  6:57 ` [patch 1/4] af_iucv: recvmsg problem for SOCK_STREAM sockets frank.blaschka
2014-03-19  6:58 ` [patch 2/4] qeth: make qeth_query_card_info_cb() static frank.blaschka
2014-03-19  6:58 ` [patch 3/4] qeth: Removed unused parameter frank.blaschka
2014-03-19  6:58 ` frank.blaschka [this message]
2014-03-20  4:07 ` [patch 0/4] s390: network patches for net-next David Miller

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=20140319065813.642817087@de.ibm.com \
    --to=frank.blaschka@de.ibm.com \
    --cc=davem@davemloft.net \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=raspl@linux.vnet.ibm.com \
    /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.