aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Herbert <tom@herbertland.com>2015-12-14 14:19:41 -0500
committerDavid S. Miller <davem@davemloft.net>2015-12-15 16:49:58 -0500
commit53692b1de419c1b59106909c7f6b4dd3dbc768ac (patch)
tree90e1d746414c8903e821f5f5caed18879bae3de7
parent55dc5a9f2f2afd32d7b1bda44a5fc95e67a3371f (diff)
sctp: Rename NETIF_F_SCTP_CSUM to NETIF_F_SCTP_CRC
The SCTP checksum is really a CRC and is very different from the standards 1's complement checksum that serves as the checksum for IP protocols. This offload interface is also very different. Rename NETIF_F_SCTP_CSUM to NETIF_F_SCTP_CRC to highlight these differences. The term CSUM should be reserved in the stack to refer to the standard 1's complement IP checksum. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c2
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40evf_main.c2
-rw-r--r--drivers/net/ethernet/intel/igb/igb_main.c4
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c4
-rw-r--r--drivers/net/loopback.c2
-rw-r--r--include/linux/netdev_features.h4
-rw-r--r--net/8021q/vlan_dev.c2
-rw-r--r--net/core/ethtool.c4
-rw-r--r--net/netfilter/ipvs/ip_vs_proto_sctp.c2
-rw-r--r--net/sctp/output.c2
10 files changed, 14 insertions, 14 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index b118deb08ce6..a63d980f478e 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -8842,7 +8842,7 @@ static int i40e_config_netdev(struct i40e_vsi *vsi)
8842 8842
8843 netdev->features = NETIF_F_SG | 8843 netdev->features = NETIF_F_SG |
8844 NETIF_F_IP_CSUM | 8844 NETIF_F_IP_CSUM |
8845 NETIF_F_SCTP_CSUM | 8845 NETIF_F_SCTP_CRC |
8846 NETIF_F_HIGHDMA | 8846 NETIF_F_HIGHDMA |
8847 NETIF_F_GSO_UDP_TUNNEL | 8847 NETIF_F_GSO_UDP_TUNNEL |
8848 NETIF_F_GSO_GRE | 8848 NETIF_F_GSO_GRE |
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 455394cf7f80..4d05ff6f0423 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -2321,7 +2321,7 @@ int i40evf_process_config(struct i40evf_adapter *adapter)
2321 netdev->features |= NETIF_F_HIGHDMA | 2321 netdev->features |= NETIF_F_HIGHDMA |
2322 NETIF_F_SG | 2322 NETIF_F_SG |
2323 NETIF_F_IP_CSUM | 2323 NETIF_F_IP_CSUM |
2324 NETIF_F_SCTP_CSUM | 2324 NETIF_F_SCTP_CRC |
2325 NETIF_F_IPV6_CSUM | 2325 NETIF_F_IPV6_CSUM |
2326 NETIF_F_TSO | 2326 NETIF_F_TSO |
2327 NETIF_F_TSO6 | 2327 NETIF_F_TSO6 |
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 7afde455326d..31e5f3942839 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -2379,8 +2379,8 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
2379 } 2379 }
2380 2380
2381 if (hw->mac.type >= e1000_82576) { 2381 if (hw->mac.type >= e1000_82576) {
2382 netdev->hw_features |= NETIF_F_SCTP_CSUM; 2382 netdev->hw_features |= NETIF_F_SCTP_CRC;
2383 netdev->features |= NETIF_F_SCTP_CSUM; 2383 netdev->features |= NETIF_F_SCTP_CRC;
2384 } 2384 }
2385 2385
2386 netdev->priv_flags |= IFF_UNICAST_FLT; 2386 netdev->priv_flags |= IFF_UNICAST_FLT;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 66c64a376719..9f27001cac1f 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -8995,8 +8995,8 @@ skip_sriov:
8995 case ixgbe_mac_X540: 8995 case ixgbe_mac_X540:
8996 case ixgbe_mac_X550: 8996 case ixgbe_mac_X550:
8997 case ixgbe_mac_X550EM_x: 8997 case ixgbe_mac_X550EM_x:
8998 netdev->features |= NETIF_F_SCTP_CSUM; 8998 netdev->features |= NETIF_F_SCTP_CRC;
8999 netdev->hw_features |= NETIF_F_SCTP_CSUM | 8999 netdev->hw_features |= NETIF_F_SCTP_CRC |
9000 NETIF_F_NTUPLE; 9000 NETIF_F_NTUPLE;
9001 break; 9001 break;
9002 default: 9002 default:
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index dc7d970bd1c0..a400288cb37b 100644
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -175,7 +175,7 @@ static void loopback_setup(struct net_device *dev)
175 | NETIF_F_UFO 175 | NETIF_F_UFO
176 | NETIF_F_HW_CSUM 176 | NETIF_F_HW_CSUM
177 | NETIF_F_RXCSUM 177 | NETIF_F_RXCSUM
178 | NETIF_F_SCTP_CSUM 178 | NETIF_F_SCTP_CRC
179 | NETIF_F_HIGHDMA 179 | NETIF_F_HIGHDMA
180 | NETIF_F_LLTX 180 | NETIF_F_LLTX
181 | NETIF_F_NETNS_LOCAL 181 | NETIF_F_NETNS_LOCAL
diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
index f0d87347df19..6395f8309393 100644
--- a/include/linux/netdev_features.h
+++ b/include/linux/netdev_features.h
@@ -52,7 +52,7 @@ enum {
52 NETIF_F_GSO_TUNNEL_REMCSUM_BIT, 52 NETIF_F_GSO_TUNNEL_REMCSUM_BIT,
53 53
54 NETIF_F_FCOE_CRC_BIT, /* FCoE CRC32 */ 54 NETIF_F_FCOE_CRC_BIT, /* FCoE CRC32 */
55 NETIF_F_SCTP_CSUM_BIT, /* SCTP checksum offload */ 55 NETIF_F_SCTP_CRC_BIT, /* SCTP checksum offload */
56 NETIF_F_FCOE_MTU_BIT, /* Supports max FCoE MTU, 2158 bytes*/ 56 NETIF_F_FCOE_MTU_BIT, /* Supports max FCoE MTU, 2158 bytes*/
57 NETIF_F_NTUPLE_BIT, /* N-tuple filters supported */ 57 NETIF_F_NTUPLE_BIT, /* N-tuple filters supported */
58 NETIF_F_RXHASH_BIT, /* Receive hashing offload */ 58 NETIF_F_RXHASH_BIT, /* Receive hashing offload */
@@ -103,7 +103,7 @@ enum {
103#define NETIF_F_NTUPLE __NETIF_F(NTUPLE) 103#define NETIF_F_NTUPLE __NETIF_F(NTUPLE)
104#define NETIF_F_RXCSUM __NETIF_F(RXCSUM) 104#define NETIF_F_RXCSUM __NETIF_F(RXCSUM)
105#define NETIF_F_RXHASH __NETIF_F(RXHASH) 105#define NETIF_F_RXHASH __NETIF_F(RXHASH)
106#define NETIF_F_SCTP_CSUM __NETIF_F(SCTP_CSUM) 106#define NETIF_F_SCTP_CRC __NETIF_F(SCTP_CRC)
107#define NETIF_F_SG __NETIF_F(SG) 107#define NETIF_F_SG __NETIF_F(SG)
108#define NETIF_F_TSO6 __NETIF_F(TSO6) 108#define NETIF_F_TSO6 __NETIF_F(TSO6)
109#define NETIF_F_TSO_ECN __NETIF_F(TSO_ECN) 109#define NETIF_F_TSO_ECN __NETIF_F(TSO_ECN)
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 9f4bd137e045..45b74e875381 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -545,7 +545,7 @@ static int vlan_dev_init(struct net_device *dev)
545 545
546 dev->hw_features = NETIF_F_ALL_CSUM | NETIF_F_SG | 546 dev->hw_features = NETIF_F_ALL_CSUM | NETIF_F_SG |
547 NETIF_F_FRAGLIST | NETIF_F_GSO_SOFTWARE | 547 NETIF_F_FRAGLIST | NETIF_F_GSO_SOFTWARE |
548 NETIF_F_HIGHDMA | NETIF_F_SCTP_CSUM | 548 NETIF_F_HIGHDMA | NETIF_F_SCTP_CRC |
549 NETIF_F_ALL_FCOE; 549 NETIF_F_ALL_FCOE;
550 550
551 dev->features |= real_dev->vlan_features | NETIF_F_LLTX | 551 dev->features |= real_dev->vlan_features | NETIF_F_LLTX |
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index 29edf74846fc..4a0cab85d67d 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -87,7 +87,7 @@ static const char netdev_features_strings[NETDEV_FEATURE_COUNT][ETH_GSTRING_LEN]
87 [NETIF_F_GSO_UDP_TUNNEL_BIT] = "tx-udp_tnl-segmentation", 87 [NETIF_F_GSO_UDP_TUNNEL_BIT] = "tx-udp_tnl-segmentation",
88 88
89 [NETIF_F_FCOE_CRC_BIT] = "tx-checksum-fcoe-crc", 89 [NETIF_F_FCOE_CRC_BIT] = "tx-checksum-fcoe-crc",
90 [NETIF_F_SCTP_CSUM_BIT] = "tx-checksum-sctp", 90 [NETIF_F_SCTP_CRC_BIT] = "tx-checksum-sctp",
91 [NETIF_F_FCOE_MTU_BIT] = "fcoe-mtu", 91 [NETIF_F_FCOE_MTU_BIT] = "fcoe-mtu",
92 [NETIF_F_NTUPLE_BIT] = "rx-ntuple-filter", 92 [NETIF_F_NTUPLE_BIT] = "rx-ntuple-filter",
93 [NETIF_F_RXHASH_BIT] = "rx-hashing", 93 [NETIF_F_RXHASH_BIT] = "rx-hashing",
@@ -235,7 +235,7 @@ static netdev_features_t ethtool_get_feature_mask(u32 eth_cmd)
235 switch (eth_cmd) { 235 switch (eth_cmd) {
236 case ETHTOOL_GTXCSUM: 236 case ETHTOOL_GTXCSUM:
237 case ETHTOOL_STXCSUM: 237 case ETHTOOL_STXCSUM:
238 return NETIF_F_ALL_CSUM | NETIF_F_SCTP_CSUM; 238 return NETIF_F_ALL_CSUM | NETIF_F_SCTP_CRC;
239 case ETHTOOL_GRXCSUM: 239 case ETHTOOL_GRXCSUM:
240 case ETHTOOL_SRXCSUM: 240 case ETHTOOL_SRXCSUM:
241 return NETIF_F_RXCSUM; 241 return NETIF_F_RXCSUM;
diff --git a/net/netfilter/ipvs/ip_vs_proto_sctp.c b/net/netfilter/ipvs/ip_vs_proto_sctp.c
index 010ddeec135f..d952d67f904d 100644
--- a/net/netfilter/ipvs/ip_vs_proto_sctp.c
+++ b/net/netfilter/ipvs/ip_vs_proto_sctp.c
@@ -169,7 +169,7 @@ sctp_dnat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp,
169 /* Only update csum if we really have to */ 169 /* Only update csum if we really have to */
170 if (sctph->dest != cp->dport || payload_csum || 170 if (sctph->dest != cp->dport || payload_csum ||
171 (skb->ip_summed == CHECKSUM_PARTIAL && 171 (skb->ip_summed == CHECKSUM_PARTIAL &&
172 !(skb_dst(skb)->dev->features & NETIF_F_SCTP_CSUM))) { 172 !(skb_dst(skb)->dev->features & NETIF_F_SCTP_CRC))) {
173 sctph->dest = cp->dport; 173 sctph->dest = cp->dport;
174 sctp_nat_csum(skb, sctph, sctphoff); 174 sctp_nat_csum(skb, sctph, sctphoff);
175 } else if (skb->ip_summed != CHECKSUM_PARTIAL) { 175 } else if (skb->ip_summed != CHECKSUM_PARTIAL) {
diff --git a/net/sctp/output.c b/net/sctp/output.c
index abe7c2db2412..9d610eddd19e 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -534,7 +534,7 @@ int sctp_packet_transmit(struct sctp_packet *packet)
534 * by CRC32-C as described in <draft-ietf-tsvwg-sctpcsum-02.txt>. 534 * by CRC32-C as described in <draft-ietf-tsvwg-sctpcsum-02.txt>.
535 */ 535 */
536 if (!sctp_checksum_disable) { 536 if (!sctp_checksum_disable) {
537 if (!(dst->dev->features & NETIF_F_SCTP_CSUM) || 537 if (!(dst->dev->features & NETIF_F_SCTP_CRC) ||
538 (dst_xfrm(dst) != NULL) || packet->ipfragok) { 538 (dst_xfrm(dst) != NULL) || packet->ipfragok) {
539 sh->checksum = sctp_compute_cksum(nskb, 0); 539 sh->checksum = sctp_compute_cksum(nskb, 0);
540 } else { 540 } else {