Skip to content

Commit

Permalink
qeth: Fix IP version detection for VLAN traffic
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Frank Blaschka <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Stefan Raspl authored and davem330 committed Mar 20, 2014
1 parent 4393407 commit a9baf10
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/s390/net/qeth_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a9baf10

Please sign in to comment.