Commit 10e4fb333c9ad72491f80bed018f8007e17060d1
Committed by
David S. Miller
1 parent
0213668f06
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
ixgbevf: Fix checksum error when using stacked vlan
When a skb has multiple vlans and it is CHECKSUM_PARTIAL, ixgbevf_tx_csum() fails to get the network protocol and checksum related descriptor fields are not configured correctly because skb->protocol doesn't show the L3 protocol in this case. Use first->protocol instead of skb->protocol to get the proper network protocol. Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
... | ... | @@ -3099,7 +3099,7 @@ |
3099 | 3099 | /* ADV DTYP TUCMD MKRLOC/ISCSIHEDLEN */ |
3100 | 3100 | type_tucmd = IXGBE_ADVTXD_TUCMD_L4T_TCP; |
3101 | 3101 | |
3102 | - if (skb->protocol == htons(ETH_P_IP)) { | |
3102 | + if (first->protocol == htons(ETH_P_IP)) { | |
3103 | 3103 | struct iphdr *iph = ip_hdr(skb); |
3104 | 3104 | iph->tot_len = 0; |
3105 | 3105 | iph->check = 0; |
... | ... | @@ -3156,7 +3156,7 @@ |
3156 | 3156 | |
3157 | 3157 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
3158 | 3158 | u8 l4_hdr = 0; |
3159 | - switch (skb->protocol) { | |
3159 | + switch (first->protocol) { | |
3160 | 3160 | case htons(ETH_P_IP): |
3161 | 3161 | vlan_macip_lens |= skb_network_header_len(skb); |
3162 | 3162 | type_tucmd |= IXGBE_ADVTXD_TUCMD_IPV4; |