aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorTom Herbert <tom@herbertland.com>2015-12-14 14:19:43 -0500
committerDavid S. Miller <davem@davemloft.net>2015-12-15 16:50:08 -0500
commita188222b6ed29404ac2d4232d35d1fe0e77af370 (patch)
tree2fe4ff36f70c2864e3016b904f6bc6bdccacabb8 /net/ipv4
parent253aab0597d9e16014888639f801ff89df6949c3 (diff)
net: Rename NETIF_F_ALL_CSUM to NETIF_F_CSUM_MASK
The name NETIF_F_ALL_CSUM is a misnomer. This does not correspond to the set of features for offloading all checksums. This is a mask of the checksum offload related features bits. It is incorrect to set both NETIF_F_HW_CSUM and NETIF_F_IP_CSUM or NETIF_F_IPV6 at the same time for features of a device. This patch: - Changes instances of NETIF_F_ALL_CSUM to NETIF_F_CSUM_MASK (where NETIF_F_ALL_CSUM is being used as a mask). - Changes bonding, sfc/efx, ipvlan, macvlan, vlan, and team drivers to use NEITF_F_HW_CSUM in features list instead of NETIF_F_ALL_CSUM. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/tcp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index c82cca18c90f..cf7ef7be79f0 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1018,7 +1018,7 @@ int tcp_sendpage(struct sock *sk, struct page *page, int offset,
1018 ssize_t res; 1018 ssize_t res;
1019 1019
1020 if (!(sk->sk_route_caps & NETIF_F_SG) || 1020 if (!(sk->sk_route_caps & NETIF_F_SG) ||
1021 !(sk->sk_route_caps & NETIF_F_ALL_CSUM)) 1021 !(sk->sk_route_caps & NETIF_F_CSUM_MASK))
1022 return sock_no_sendpage(sk->sk_socket, page, offset, size, 1022 return sock_no_sendpage(sk->sk_socket, page, offset, size,
1023 flags); 1023 flags);
1024 1024
@@ -1175,7 +1175,7 @@ new_segment:
1175 /* 1175 /*
1176 * Check whether we can use HW checksum. 1176 * Check whether we can use HW checksum.
1177 */ 1177 */
1178 if (sk->sk_route_caps & NETIF_F_ALL_CSUM) 1178 if (sk->sk_route_caps & NETIF_F_CSUM_MASK)
1179 skb->ip_summed = CHECKSUM_PARTIAL; 1179 skb->ip_summed = CHECKSUM_PARTIAL;
1180 1180
1181 skb_entail(sk, skb); 1181 skb_entail(sk, skb);