net: Fix IPv6 GSO type checks in Intel ethernet drivers
Found this problem when testing IPv6 from a KVM guest to a remote host via e1000e device on the host. The following patch fixes the check for IPv6 GSO packet in Intel ethernet drivers to use skb_is_gso_v6(). SKB_GSO_DODGY is also set when packets are forwarded from a guest. Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8581145f39
commit
8e1e8a4779
4 changed files with 4 additions and 4 deletions
|
@ -3786,7 +3786,7 @@ static int e1000_tso(struct e1000_adapter *adapter,
|
||||||
0, IPPROTO_TCP, 0);
|
0, IPPROTO_TCP, 0);
|
||||||
cmd_length = E1000_TXD_CMD_IP;
|
cmd_length = E1000_TXD_CMD_IP;
|
||||||
ipcse = skb_transport_offset(skb) - 1;
|
ipcse = skb_transport_offset(skb) - 1;
|
||||||
} else if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV6) {
|
} else if (skb_is_gso_v6(skb)) {
|
||||||
ipv6_hdr(skb)->payload_len = 0;
|
ipv6_hdr(skb)->payload_len = 0;
|
||||||
tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
|
tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
|
||||||
&ipv6_hdr(skb)->daddr,
|
&ipv6_hdr(skb)->daddr,
|
||||||
|
|
|
@ -3422,7 +3422,7 @@ static inline int igb_tso_adv(struct igb_ring *tx_ring,
|
||||||
iph->daddr, 0,
|
iph->daddr, 0,
|
||||||
IPPROTO_TCP,
|
IPPROTO_TCP,
|
||||||
0);
|
0);
|
||||||
} else if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV6) {
|
} else if (skb_is_gso_v6(skb)) {
|
||||||
ipv6_hdr(skb)->payload_len = 0;
|
ipv6_hdr(skb)->payload_len = 0;
|
||||||
tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
|
tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
|
||||||
&ipv6_hdr(skb)->daddr,
|
&ipv6_hdr(skb)->daddr,
|
||||||
|
|
|
@ -1963,7 +1963,7 @@ static int igbvf_tso(struct igbvf_adapter *adapter,
|
||||||
iph->daddr, 0,
|
iph->daddr, 0,
|
||||||
IPPROTO_TCP,
|
IPPROTO_TCP,
|
||||||
0);
|
0);
|
||||||
} else if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV6) {
|
} else if (skb_is_gso_v6(skb)) {
|
||||||
ipv6_hdr(skb)->payload_len = 0;
|
ipv6_hdr(skb)->payload_len = 0;
|
||||||
tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
|
tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
|
||||||
&ipv6_hdr(skb)->daddr,
|
&ipv6_hdr(skb)->daddr,
|
||||||
|
|
|
@ -4928,7 +4928,7 @@ static int ixgbe_tso(struct ixgbe_adapter *adapter,
|
||||||
iph->daddr, 0,
|
iph->daddr, 0,
|
||||||
IPPROTO_TCP,
|
IPPROTO_TCP,
|
||||||
0);
|
0);
|
||||||
} else if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV6) {
|
} else if (skb_is_gso_v6(skb)) {
|
||||||
ipv6_hdr(skb)->payload_len = 0;
|
ipv6_hdr(skb)->payload_len = 0;
|
||||||
tcp_hdr(skb)->check =
|
tcp_hdr(skb)->check =
|
||||||
~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
|
~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
|
||||||
|
|
Reference in a new issue