e1000(e): use new helper tcp_v6_gso_csum_prep
authorHeiner Kallweit <hkallweit1@gmail.com>
Tue, 18 Feb 2020 20:05:02 +0000 (21:05 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Feb 2020 19:20:59 +0000 (11:20 -0800)
Use new helper tcp_v6_gso_csum_prep in additional network drivers.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/e1000/e1000_main.c
drivers/net/ethernet/intel/e1000e/netdev.c

index 2bced34c19ba731b928ba9bc571b2ef09e13893f..f7103356ef56288efb05b58b7671bb8f23d465ca 100644 (file)
@@ -2715,11 +2715,7 @@ static int e1000_tso(struct e1000_adapter *adapter,
                        cmd_length = E1000_TXD_CMD_IP;
                        ipcse = skb_transport_offset(skb) - 1;
                } else if (skb_is_gso_v6(skb)) {
-                       ipv6_hdr(skb)->payload_len = 0;
-                       tcp_hdr(skb)->check =
-                               ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
-                                                &ipv6_hdr(skb)->daddr,
-                                                0, IPPROTO_TCP, 0);
+                       tcp_v6_gso_csum_prep(skb);
                        ipcse = 0;
                }
                ipcss = skb_network_offset(skb);
index db4ea58bac8257ed6490c6b224600fe85f52219e..a5a270c5f494ece0a2a4ef59779b4503b3ec1a65 100644 (file)
@@ -5462,10 +5462,7 @@ static int e1000_tso(struct e1000_ring *tx_ring, struct sk_buff *skb,
                cmd_length = E1000_TXD_CMD_IP;
                ipcse = skb_transport_offset(skb) - 1;
        } else if (skb_is_gso_v6(skb)) {
-               ipv6_hdr(skb)->payload_len = 0;
-               tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
-                                                      &ipv6_hdr(skb)->daddr,
-                                                      0, IPPROTO_TCP, 0);
+               tcp_v6_gso_csum_prep(skb);
                ipcse = 0;
        }
        ipcss = skb_network_offset(skb);