diff options
| author | Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> | 2015-01-29 06:37:10 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-01-30 21:03:47 -0500 |
| commit | 10e4fb333c9ad72491f80bed018f8007e17060d1 (patch) | |
| tree | 90e90c74520964e5beedbb35b3cb304f3f5005eb /drivers/net/ethernet/intel/ixgbevf | |
| parent | 0213668f060ea966ee8f4e6334f0fd27b6a1c428 (diff) | |
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>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbevf')
| -rw-r--r-- | drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index 62a0d8e0f17d..38c7a0be8197 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | |||
| @@ -3099,7 +3099,7 @@ static int ixgbevf_tso(struct ixgbevf_ring *tx_ring, | |||
| 3099 | /* ADV DTYP TUCMD MKRLOC/ISCSIHEDLEN */ | 3099 | /* ADV DTYP TUCMD MKRLOC/ISCSIHEDLEN */ |
| 3100 | type_tucmd = IXGBE_ADVTXD_TUCMD_L4T_TCP; | 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 | struct iphdr *iph = ip_hdr(skb); | 3103 | struct iphdr *iph = ip_hdr(skb); |
| 3104 | iph->tot_len = 0; | 3104 | iph->tot_len = 0; |
| 3105 | iph->check = 0; | 3105 | iph->check = 0; |
| @@ -3156,7 +3156,7 @@ static void ixgbevf_tx_csum(struct ixgbevf_ring *tx_ring, | |||
| 3156 | 3156 | ||
| 3157 | if (skb->ip_summed == CHECKSUM_PARTIAL) { | 3157 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
| 3158 | u8 l4_hdr = 0; | 3158 | u8 l4_hdr = 0; |
| 3159 | switch (skb->protocol) { | 3159 | switch (first->protocol) { |
| 3160 | case htons(ETH_P_IP): | 3160 | case htons(ETH_P_IP): |
| 3161 | vlan_macip_lens |= skb_network_header_len(skb); | 3161 | vlan_macip_lens |= skb_network_header_len(skb); |
| 3162 | type_tucmd |= IXGBE_ADVTXD_TUCMD_IPV4; | 3162 | type_tucmd |= IXGBE_ADVTXD_TUCMD_IPV4; |
