Commit a9baf10a authored by Stefan Raspl's avatar Stefan Raspl Committed by David S. Miller

qeth: Fix IP version detection for VLAN traffic

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: default avatarStefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: default avatarFrank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 43934077
...@@ -854,8 +854,11 @@ static inline int qeth_get_micros(void) ...@@ -854,8 +854,11 @@ static inline int qeth_get_micros(void)
static inline int qeth_get_ip_version(struct sk_buff *skb) static inline int qeth_get_ip_version(struct sk_buff *skb)
{ {
struct ethhdr *ehdr = (struct ethhdr *)skb->data; __be16 *p = &((struct ethhdr *)skb->data)->h_proto;
switch (ehdr->h_proto) {
if (*p == ETH_P_8021Q)
p += 2;
switch (*p) {
case ETH_P_IPV6: case ETH_P_IPV6:
return 6; return 6;
case ETH_P_IP: case ETH_P_IP:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment