]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
sctp: Rename NETIF_F_SCTP_CSUM to NETIF_F_SCTP_CRC
authorTom Herbert <tom@herbertland.com>
Mon, 14 Dec 2015 19:19:41 +0000 (11:19 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Dec 2015 21:49:58 +0000 (16:49 -0500)
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>
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40evf/i40evf_main.c
drivers/net/ethernet/intel/igb/igb_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/net/loopback.c
include/linux/netdev_features.h
net/8021q/vlan_dev.c
net/core/ethtool.c
net/netfilter/ipvs/ip_vs_proto_sctp.c
net/sctp/output.c

index b118deb08ce60f48f6a306d7c86bc7621c5786e8..a63d980f478e73c9fda05e54cfb730b7602892d9 100644 (file)
@@ -8842,7 +8842,7 @@ static int i40e_config_netdev(struct i40e_vsi *vsi)
 
        netdev->features = NETIF_F_SG                  |
                           NETIF_F_IP_CSUM             |
-                          NETIF_F_SCTP_CSUM           |
+                          NETIF_F_SCTP_CRC            |
                           NETIF_F_HIGHDMA             |
                           NETIF_F_GSO_UDP_TUNNEL      |
                           NETIF_F_GSO_GRE             |
index 455394cf7f80c3199117587ca896510cb23bb622..4d05ff6f0423143ae463b89678383765ab6ae3a8 100644 (file)
@@ -2321,7 +2321,7 @@ int i40evf_process_config(struct i40evf_adapter *adapter)
        netdev->features |= NETIF_F_HIGHDMA |
                            NETIF_F_SG |
                            NETIF_F_IP_CSUM |
-                           NETIF_F_SCTP_CSUM |
+                           NETIF_F_SCTP_CRC |
                            NETIF_F_IPV6_CSUM |
                            NETIF_F_TSO |
                            NETIF_F_TSO6 |
index 7afde455326d741ad5959741519b9e22b7fac6d2..31e5f39428393818257853b44b0b4915f4817eac 100644 (file)
@@ -2379,8 +2379,8 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        }
 
        if (hw->mac.type >= e1000_82576) {
-               netdev->hw_features |= NETIF_F_SCTP_CSUM;
-               netdev->features |= NETIF_F_SCTP_CSUM;
+               netdev->hw_features |= NETIF_F_SCTP_CRC;
+               netdev->features |= NETIF_F_SCTP_CRC;
        }
 
        netdev->priv_flags |= IFF_UNICAST_FLT;
index 66c64a3767198d78f49efe2b52bf03a99de0dc04..9f27001cac1fcc4bddcd630b1f072056b0b889a9 100644 (file)
@@ -8995,8 +8995,8 @@ skip_sriov:
        case ixgbe_mac_X540:
        case ixgbe_mac_X550:
        case ixgbe_mac_X550EM_x:
-               netdev->features |= NETIF_F_SCTP_CSUM;
-               netdev->hw_features |= NETIF_F_SCTP_CSUM |
+               netdev->features |= NETIF_F_SCTP_CRC;
+               netdev->hw_features |= NETIF_F_SCTP_CRC |
                                       NETIF_F_NTUPLE;
                break;
        default:
index dc7d970bd1c0baaf1f707df87001da8f59f3d74a..a400288cb37b9bfb6190f1bd7c64d02e97713956 100644 (file)
@@ -175,7 +175,7 @@ static void loopback_setup(struct net_device *dev)
                | NETIF_F_UFO
                | NETIF_F_HW_CSUM
                | NETIF_F_RXCSUM
-               | NETIF_F_SCTP_CSUM
+               | NETIF_F_SCTP_CRC
                | NETIF_F_HIGHDMA
                | NETIF_F_LLTX
                | NETIF_F_NETNS_LOCAL
index f0d87347df19edd25d84d61dab931ebf8112117d..6395f83093933bfe745e9aa1fa8a61c60fab358c 100644 (file)
@@ -52,7 +52,7 @@ enum {
                NETIF_F_GSO_TUNNEL_REMCSUM_BIT,
 
        NETIF_F_FCOE_CRC_BIT,           /* FCoE CRC32 */
-       NETIF_F_SCTP_CSUM_BIT,          /* SCTP checksum offload */
+       NETIF_F_SCTP_CRC_BIT,           /* SCTP checksum offload */
        NETIF_F_FCOE_MTU_BIT,           /* Supports max FCoE MTU, 2158 bytes*/
        NETIF_F_NTUPLE_BIT,             /* N-tuple filters supported */
        NETIF_F_RXHASH_BIT,             /* Receive hashing offload */
@@ -103,7 +103,7 @@ enum {
 #define NETIF_F_NTUPLE         __NETIF_F(NTUPLE)
 #define NETIF_F_RXCSUM         __NETIF_F(RXCSUM)
 #define NETIF_F_RXHASH         __NETIF_F(RXHASH)
-#define NETIF_F_SCTP_CSUM      __NETIF_F(SCTP_CSUM)
+#define NETIF_F_SCTP_CRC       __NETIF_F(SCTP_CRC)
 #define NETIF_F_SG             __NETIF_F(SG)
 #define NETIF_F_TSO6           __NETIF_F(TSO6)
 #define NETIF_F_TSO_ECN                __NETIF_F(TSO_ECN)
index 9f4bd137e045f0d239543a9e83900788c3b4c6a9..45b74e875381ff8b619bab05e32c8eb8261820e3 100644 (file)
@@ -545,7 +545,7 @@ static int vlan_dev_init(struct net_device *dev)
 
        dev->hw_features = NETIF_F_ALL_CSUM | NETIF_F_SG |
                           NETIF_F_FRAGLIST | NETIF_F_GSO_SOFTWARE |
-                          NETIF_F_HIGHDMA | NETIF_F_SCTP_CSUM |
+                          NETIF_F_HIGHDMA | NETIF_F_SCTP_CRC |
                           NETIF_F_ALL_FCOE;
 
        dev->features |= real_dev->vlan_features | NETIF_F_LLTX |
index 29edf74846fc9cfef49f3fc35b4ba41de6c254af..4a0cab85d67d3396f1b7698c1aca8cd2a5189670 100644 (file)
@@ -87,7 +87,7 @@ static const char netdev_features_strings[NETDEV_FEATURE_COUNT][ETH_GSTRING_LEN]
        [NETIF_F_GSO_UDP_TUNNEL_BIT] =   "tx-udp_tnl-segmentation",
 
        [NETIF_F_FCOE_CRC_BIT] =         "tx-checksum-fcoe-crc",
-       [NETIF_F_SCTP_CSUM_BIT] =        "tx-checksum-sctp",
+       [NETIF_F_SCTP_CRC_BIT] =        "tx-checksum-sctp",
        [NETIF_F_FCOE_MTU_BIT] =         "fcoe-mtu",
        [NETIF_F_NTUPLE_BIT] =           "rx-ntuple-filter",
        [NETIF_F_RXHASH_BIT] =           "rx-hashing",
@@ -235,7 +235,7 @@ static netdev_features_t ethtool_get_feature_mask(u32 eth_cmd)
        switch (eth_cmd) {
        case ETHTOOL_GTXCSUM:
        case ETHTOOL_STXCSUM:
-               return NETIF_F_ALL_CSUM | NETIF_F_SCTP_CSUM;
+               return NETIF_F_ALL_CSUM | NETIF_F_SCTP_CRC;
        case ETHTOOL_GRXCSUM:
        case ETHTOOL_SRXCSUM:
                return NETIF_F_RXCSUM;
index 010ddeec135f50950d2f9a356bc7211c351dde9a..d952d67f904d1124ed0c5adfa20a51f82207181c 100644 (file)
@@ -169,7 +169,7 @@ sctp_dnat_handler(struct sk_buff *skb, struct ip_vs_protocol *pp,
        /* Only update csum if we really have to */
        if (sctph->dest != cp->dport || payload_csum ||
            (skb->ip_summed == CHECKSUM_PARTIAL &&
-            !(skb_dst(skb)->dev->features & NETIF_F_SCTP_CSUM))) {
+            !(skb_dst(skb)->dev->features & NETIF_F_SCTP_CRC))) {
                sctph->dest = cp->dport;
                sctp_nat_csum(skb, sctph, sctphoff);
        } else if (skb->ip_summed != CHECKSUM_PARTIAL) {
index abe7c2db24120a13992131e2be9a19c70a297de0..9d610eddd19ef2320fc34ae9d91e7426ae5f50f9 100644 (file)
@@ -534,7 +534,7 @@ int sctp_packet_transmit(struct sctp_packet *packet)
         * by CRC32-C as described in <draft-ietf-tsvwg-sctpcsum-02.txt>.
         */
        if (!sctp_checksum_disable) {
-               if (!(dst->dev->features & NETIF_F_SCTP_CSUM) ||
+               if (!(dst->dev->features & NETIF_F_SCTP_CRC) ||
                    (dst_xfrm(dst) != NULL) || packet->ipfragok) {
                        sh->checksum = sctp_compute_cksum(nskb, 0);
                } else {