提交 a9baf10a 编写于 作者: S Stefan Raspl 提交者: 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: NStefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: NFrank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 43934077
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册