]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
netdev_features: convert NETIF_F_LLTX to dev->lltx
authorAlexander Lobakin <aleksander.lobakin@intel.com>
Thu, 29 Aug 2024 12:33:37 +0000 (14:33 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 3 Sep 2024 09:36:43 +0000 (11:36 +0200)
NETIF_F_LLTX can't be changed via Ethtool and is not a feature,
rather an attribute, very similar to IFF_NO_QUEUE (and hot).
Free one netdev_features_t bit and make it a "hot" private flag.

Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
57 files changed:
Documentation/networking/net_cachelines/net_device.rst
Documentation/networking/netdev-features.rst
Documentation/networking/netdevices.rst
drivers/net/amt.c
drivers/net/bareudp.c
drivers/net/bonding/bond_main.c
drivers/net/dummy.c
drivers/net/ethernet/chelsio/cxgb/cxgb2.c
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/netronome/nfp/nfp_net_repr.c
drivers/net/ethernet/pasemi/pasemi_mac.c
drivers/net/ethernet/qualcomm/rmnet/rmnet_vnd.c
drivers/net/ethernet/sfc/ef100_rep.c
drivers/net/ethernet/tehuti/tehuti.c
drivers/net/ethernet/tehuti/tehuti.h
drivers/net/ethernet/toshiba/spider_net.c
drivers/net/geneve.c
drivers/net/gtp.c
drivers/net/hamradio/bpqether.c
drivers/net/ipvlan/ipvlan_main.c
drivers/net/loopback.c
drivers/net/macsec.c
drivers/net/macvlan.c
drivers/net/net_failover.c
drivers/net/netkit.c
drivers/net/nlmon.c
drivers/net/ppp/ppp_generic.c
drivers/net/rionet.c
drivers/net/team/team_core.c
drivers/net/tun.c
drivers/net/veth.c
drivers/net/vrf.c
drivers/net/vsockmon.c
drivers/net/vxlan/vxlan_core.c
drivers/net/wireguard/device.c
drivers/staging/octeon/ethernet.c
include/linux/netdev_features.h
include/linux/netdevice.h
lib/test_bpf.c
net/8021q/vlan_dev.c
net/batman-adv/soft-interface.c
net/bridge/br_device.c
net/core/net-sysfs.c
net/dsa/user.c
net/ethtool/common.c
net/hsr/hsr_device.c
net/ipv4/ip_gre.c
net/ipv4/ip_vti.c
net/ipv4/ipip.c
net/ipv6/ip6_gre.c
net/ipv6/ip6_tunnel.c
net/ipv6/sit.c
net/l2tp/l2tp_eth.c
net/openvswitch/vport-internal_dev.c
net/xfrm/xfrm_interface_core.c

index 1fe3cdfe35822d3c77cf0822c6c1d20386cd7cb8..e5531927707453d776bbb8468a11943285d9f395 100644 (file)
@@ -8,6 +8,7 @@ net_device struct fast path usage breakdown
 Type                                Name                    fastpath_tx_access  fastpath_rx_access  Comments
 ..struct                            ..net_device                                                    
 unsigned_long:32                    priv_flags              read_mostly         -                   __dev_queue_xmit(tx)
+unsigned_long:1                     lltx                    read_mostly         -                   HARD_TX_LOCK,HARD_TX_TRYLOCK,HARD_TX_UNLOCK(tx)
 char                                name[16]                -                   -                   
 struct_netdev_name_node*            name_node                                                       
 struct_dev_ifalias*                 ifalias                                                         
index d7b15bb64deb6339f400ee9903d9d6ec20d5cc27..f29d982ebf5d3bc40f4de94530167c1fd251af80 100644 (file)
@@ -139,14 +139,6 @@ chained skbs (skb->next/prev list).
 Features contained in NETIF_F_SOFT_FEATURES are features of networking
 stack. Driver should not change behaviour based on them.
 
- * LLTX driver (deprecated for hardware drivers)
-
-NETIF_F_LLTX is meant to be used by drivers that don't need locking at all,
-e.g. software tunnels.
-
-This is also used in a few legacy drivers that implement their
-own locking, don't use it for new (hardware) drivers.
-
  * netns-local device
 
 NETIF_F_NETNS_LOCAL is set for devices that are not allowed to move between
index c2476917a6c37d9b87e8b5d59f2e00fa0a30e26a..857c9784f87efc704e185ee81876c23376d10367 100644 (file)
@@ -258,11 +258,11 @@ ndo_get_stats:
 ndo_start_xmit:
        Synchronization: __netif_tx_lock spinlock.
 
-       When the driver sets NETIF_F_LLTX in dev->features this will be
+       When the driver sets dev->lltx this will be
        called without holding netif_tx_lock. In this case the driver
        has to lock by itself when needed.
        The locking there should also properly protect against
-       set_rx_mode. WARNING: use of NETIF_F_LLTX is deprecated.
+       set_rx_mode. WARNING: use of dev->lltx is deprecated.
        Don't use it for new drivers.
 
        Context: Process with BHs disabled or BH (timer),
index 6d15ab3bfbbcac33e5e5c2850c9b2b4b673b60bc..921bbfd72a3868c604777331eb1bd9cc06d02d1f 100644 (file)
@@ -3098,7 +3098,7 @@ static void amt_link_setup(struct net_device *dev)
        dev->hard_header_len    = 0;
        dev->addr_len           = 0;
        dev->priv_flags         |= IFF_NO_QUEUE;
-       dev->features           |= NETIF_F_LLTX;
+       dev->lltx               = true;
        dev->features           |= NETIF_F_GSO_SOFTWARE;
        dev->features           |= NETIF_F_NETNS_LOCAL;
        dev->hw_features        |= NETIF_F_SG | NETIF_F_HW_CSUM;
index d5c56ca91b77164095886ada180c64382e34c12c..6f4de883e872f8cda744d0c77d6be4c3171cd158 100644 (file)
@@ -553,7 +553,6 @@ static void bareudp_setup(struct net_device *dev)
        SET_NETDEV_DEVTYPE(dev, &bareudp_type);
        dev->features    |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_FRAGLIST;
        dev->features    |= NETIF_F_RXCSUM;
-       dev->features    |= NETIF_F_LLTX;
        dev->features    |= NETIF_F_GSO_SOFTWARE;
        dev->hw_features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_FRAGLIST;
        dev->hw_features |= NETIF_F_RXCSUM;
@@ -566,6 +565,7 @@ static void bareudp_setup(struct net_device *dev)
        dev->type = ARPHRD_NONE;
        netif_keep_dst(dev);
        dev->priv_flags |= IFF_NO_QUEUE;
+       dev->lltx = true;
        dev->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST;
        dev->pcpu_stat_type = NETDEV_PCPU_STAT_TSTATS;
 }
index cb6a694313d557f32d7e51986a1cd4b1ae008196..8ae887cdc231b1f6676068e1bbecdd715fb524a0 100644 (file)
@@ -5928,7 +5928,7 @@ void bond_setup(struct net_device *bond_dev)
 #endif /* CONFIG_XFRM_OFFLOAD */
 
        /* don't acquire bond device's netif_tx_lock when transmitting */
-       bond_dev->features |= NETIF_F_LLTX;
+       bond_dev->lltx = true;
 
        /* By default, we declare the bond to be fully
         * VLAN hardware accelerated capable. Special
index d29b5d7af0d72b6ff845edf998237164c0e2e076..e9c5e1e11fa02dcb195dd0a62ee64e609da436b9 100644 (file)
@@ -109,9 +109,10 @@ static void dummy_setup(struct net_device *dev)
        dev->flags |= IFF_NOARP;
        dev->flags &= ~IFF_MULTICAST;
        dev->priv_flags |= IFF_LIVE_ADDR_CHANGE | IFF_NO_QUEUE;
+       dev->lltx = true;
        dev->features   |= NETIF_F_SG | NETIF_F_FRAGLIST;
        dev->features   |= NETIF_F_GSO_SOFTWARE;
-       dev->features   |= NETIF_F_HW_CSUM | NETIF_F_HIGHDMA | NETIF_F_LLTX;
+       dev->features   |= NETIF_F_HW_CSUM | NETIF_F_HIGHDMA;
        dev->features   |= NETIF_F_GSO_ENCAP_ALL;
        dev->hw_features |= dev->features;
        dev->hw_enc_features |= dev->features;
index 7d7d3e0098df2e3114e8c8cc5ecb02b8327f4755..3b7068832f95efd0fb5baecb895e13bbf9970c06 100644 (file)
@@ -1034,7 +1034,8 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
                netdev->hw_features |= NETIF_F_SG | NETIF_F_IP_CSUM |
                        NETIF_F_RXCSUM;
                netdev->features |= NETIF_F_SG | NETIF_F_IP_CSUM |
-                       NETIF_F_RXCSUM | NETIF_F_LLTX | NETIF_F_HIGHDMA;
+                       NETIF_F_RXCSUM | NETIF_F_HIGHDMA;
+               netdev->lltx = true;
 
                if (vlan_tso_capable(adapter)) {
                        netdev->features |=
index 5d99cfb4e99482c85a071a396c08ef9447116600..1d0208b5db7dcab009f7f6ac3e263a343e432512 100644 (file)
@@ -229,7 +229,7 @@ static int dpaa_netdev_init(struct net_device *net_dev,
        net_dev->max_mtu = dpaa_get_max_mtu();
 
        net_dev->hw_features |= (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
-                                NETIF_F_LLTX | NETIF_F_RXHASH);
+                                NETIF_F_RXHASH);
 
        net_dev->hw_features |= NETIF_F_SG | NETIF_F_HIGHDMA;
        /* The kernels enables GSO automatically, if we declare NETIF_F_SG.
@@ -239,6 +239,7 @@ static int dpaa_netdev_init(struct net_device *net_dev,
        net_dev->features |= NETIF_F_RXCSUM;
 
        net_dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
+       net_dev->lltx = true;
        /* we do not want shared skbs on TX */
        net_dev->priv_flags &= ~IFF_TX_SKB_SHARING;
 
index 6866807973daa1b68f846bd9cd53274135a51223..29886a8ba73f33d31d9045719bd4b166a8ad1ba8 100644 (file)
@@ -4594,12 +4594,13 @@ static int dpaa2_eth_netdev_init(struct net_device *net_dev)
 
        net_dev->priv_flags |= supported;
        net_dev->priv_flags &= ~not_supported;
+       net_dev->lltx = true;
 
        /* Features */
        net_dev->features = NETIF_F_RXCSUM |
                            NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |
                            NETIF_F_SG | NETIF_F_HIGHDMA |
-                           NETIF_F_LLTX | NETIF_F_HW_TC | NETIF_F_TSO;
+                           NETIF_F_HW_TC | NETIF_F_TSO;
        net_dev->gso_max_segs = DPAA2_ETH_ENQUEUE_MAX_FDS;
        net_dev->hw_features = net_dev->features;
        net_dev->xdp_features = NETDEV_XDP_ACT_BASIC |
index f064789f324058ab8d93def564deeafce0584727..44d6e125bd6f003b7b1a2aa5645c38412b8608fd 100644 (file)
@@ -1676,9 +1676,10 @@ static int mlxsw_sp_port_create(struct mlxsw_sp *mlxsw_sp, u16 local_port,
 
        netif_carrier_off(dev);
 
-       dev->features |= NETIF_F_NETNS_LOCAL | NETIF_F_LLTX | NETIF_F_SG |
+       dev->features |= NETIF_F_NETNS_LOCAL | NETIF_F_SG |
                         NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_HW_TC;
        dev->hw_features |= NETIF_F_HW_TC | NETIF_F_LOOPBACK;
+       dev->lltx = true;
 
        dev->min_mtu = ETH_MIN_MTU;
        dev->max_mtu = MLXSW_PORT_MAX_MTU - MLXSW_PORT_ETH_FRAME_HDR;
index eee0bfc41074ee9af6dd0efd0bcc0998c0c2c43c..227e7a5d712e37b6df5f9b619aa3578f4de43826 100644 (file)
@@ -248,7 +248,6 @@ nfp_repr_fix_features(struct net_device *netdev, netdev_features_t features)
 
        features = netdev_intersect_features(features, lower_features);
        features |= old_features & (NETIF_F_SOFT_FEATURES | NETIF_F_HW_TC);
-       features |= NETIF_F_LLTX;
 
        return features;
 }
@@ -386,7 +385,7 @@ int nfp_repr_init(struct nfp_app *app, struct net_device *netdev,
        netif_set_tso_max_segs(netdev, NFP_NET_LSO_MAX_SEGS);
 
        netdev->priv_flags |= IFF_NO_QUEUE | IFF_DISABLE_NETPOLL;
-       netdev->features |= NETIF_F_LLTX;
+       netdev->lltx = true;
 
        if (nfp_app_has_tc(app)) {
                netdev->features |= NETIF_F_HW_TC;
index 62ba269da90265f8aef27e1de757c49193e5a680..cb4e12df7719dffaa594893a7bb0e52c86bf8cf1 100644 (file)
@@ -1699,8 +1699,9 @@ pasemi_mac_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
        netif_napi_add(dev, &mac->napi, pasemi_mac_poll);
 
-       dev->features = NETIF_F_IP_CSUM | NETIF_F_LLTX | NETIF_F_SG |
-                       NETIF_F_HIGHDMA | NETIF_F_GSO;
+       dev->features = NETIF_F_IP_CSUM | NETIF_F_SG | NETIF_F_HIGHDMA |
+                       NETIF_F_GSO;
+       dev->lltx = true;
 
        mac->dma_pdev = pci_get_device(PCI_VENDOR_ID_PASEMI, 0xa007, NULL);
        if (!mac->dma_pdev) {
index f1e40aade127bf1033c06128049c558e72d9474b..4f0ddcedfa9790dc5843fdea85b2da4bc8329775 100644 (file)
@@ -286,7 +286,7 @@ void rmnet_vnd_setup(struct net_device *rmnet_dev)
        rmnet_dev->needs_free_netdev = true;
        rmnet_dev->ethtool_ops = &rmnet_ethtool_ops;
 
-       rmnet_dev->features |= NETIF_F_LLTX;
+       rmnet_dev->lltx = true;
 
        /* This perm addr will be used as interface identifier by IPv6 */
        rmnet_dev->addr_assign_type = NET_ADDR_RANDOM;
index 0b3083ef0eada45d8e3bbe04a1cea20603ede7a3..e923e1796369d0ae1c8c451a7df1efab7d1a5574 100644 (file)
@@ -233,8 +233,8 @@ static struct efx_rep *efx_ef100_rep_create_netdev(struct efx_nic *efx,
        net_dev->ethtool_ops = &efx_ef100_rep_ethtool_ops;
        net_dev->min_mtu = EFX_MIN_MTU;
        net_dev->max_mtu = EFX_MAX_MTU;
-       net_dev->features |= NETIF_F_LLTX;
-       net_dev->hw_features |= NETIF_F_LLTX;
+       net_dev->lltx = true;
+
        return efv;
 fail1:
        free_netdev(net_dev);
index ede5f7890fb4b001c0fa714511124a75012c168a..fc77f424f90bb142b5fbe6a016457291d7769681 100644 (file)
@@ -1671,7 +1671,7 @@ static netdev_tx_t bdx_tx_transmit(struct sk_buff *skb,
 
 #endif
 #ifdef BDX_LLTX
-       netif_trans_update(ndev); /* NETIF_F_LLTX driver :( */
+       netif_trans_update(ndev); /* dev->lltx driver :( */
 #endif
        ndev->stats.tx_packets++;
        ndev->stats.tx_bytes += skb->len;
@@ -2019,7 +2019,7 @@ bdx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                 * set multicast list callback has to use priv->tx_lock.
                 */
 #ifdef BDX_LLTX
-               ndev->features |= NETIF_F_LLTX;
+               ndev->lltx = true;
 #endif
                /* MTU range: 60 - 16384 */
                ndev->min_mtu = ETH_ZLEN;
index 909e7296cecfa475f65b04a7a57955ce26834721..47a2d3e5f8ede6dccf54aeb8c81c7b5b8ca858a2 100644 (file)
@@ -260,7 +260,7 @@ struct bdx_priv {
        int tx_update_mark;
        int tx_noupd;
 #endif
-       spinlock_t tx_lock;     /* NETIF_F_LLTX mode */
+       spinlock_t tx_lock;     /* dev->lltx mode */
 
        /* rarely used */
        u8 port;
index 87e67121477cb57eaaefa7588203a75025fd701c..a4937c18d7cb5b1bf69cd14e350fb19ebd60b584 100644 (file)
@@ -2277,10 +2277,11 @@ spider_net_setup_netdev(struct spider_net_card *card)
        netdev->hw_features = NETIF_F_RXCSUM | NETIF_F_IP_CSUM;
        if (SPIDER_NET_RX_CSUM_DEFAULT)
                netdev->features |= NETIF_F_RXCSUM;
-       netdev->features |= NETIF_F_IP_CSUM | NETIF_F_LLTX;
+       netdev->features |= NETIF_F_IP_CSUM;
        /* some time: NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX |
         *              NETIF_F_HW_VLAN_CTAG_FILTER
         */
+       netdev->lltx = true;
 
        /* MTU range: 64 - 2294 */
        netdev->min_mtu = SPIDER_NET_MIN_MTU;
index 838e85ddec6710af7739e3b0144ef6414d6c7492..7f611c74eb629bfe033844932dd82a45005252a1 100644 (file)
@@ -1194,7 +1194,6 @@ static void geneve_setup(struct net_device *dev)
 
        SET_NETDEV_DEVTYPE(dev, &geneve_type);
 
-       dev->features    |= NETIF_F_LLTX;
        dev->features    |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_FRAGLIST;
        dev->features    |= NETIF_F_RXCSUM;
        dev->features    |= NETIF_F_GSO_SOFTWARE;
@@ -1215,6 +1214,7 @@ static void geneve_setup(struct net_device *dev)
        netif_keep_dst(dev);
        dev->priv_flags &= ~IFF_TX_SKB_SHARING;
        dev->priv_flags |= IFF_LIVE_ADDR_CHANGE | IFF_NO_QUEUE;
+       dev->lltx = true;
        eth_hw_addr_random(dev);
 }
 
index 2e94d10348ccebf6e663032bb587cedcefbc82f1..a60bfb1abb7f01e41cfe1986fa764bc8df0525de 100644 (file)
@@ -1356,7 +1356,7 @@ static void gtp_link_setup(struct net_device *dev)
 
        dev->pcpu_stat_type = NETDEV_PCPU_STAT_TSTATS;
        dev->priv_flags |= IFF_NO_QUEUE;
-       dev->features   |= NETIF_F_LLTX;
+       dev->lltx = true;
        netif_keep_dst(dev);
 
        dev->needed_headroom    = LL_MAX_HEADER + GTP_IPV4_MAXLEN;
index 83a16d10eedbc74b9d29bf83d9d17661987698c9..bac1bb69d63a11922d73a57d69a97eb4cb53c98b 100644 (file)
@@ -458,7 +458,7 @@ static void bpq_setup(struct net_device *dev)
        dev->needs_free_netdev = true;
 
        dev->flags      = 0;
-       dev->features   = NETIF_F_LLTX; /* Allow recursion */
+       dev->lltx = true;       /* Allow recursion */
 
 #if IS_ENABLED(CONFIG_AX25)
        dev->header_ops      = &ax25_header_ops;
index 094f44dac5c85fd03b12c71ada473457415db66a..ee2c3cf4df365eb3d4e476d421a7ec42f30016d1 100644 (file)
@@ -114,7 +114,7 @@ static void ipvlan_port_destroy(struct net_device *dev)
         NETIF_F_GSO_ROBUST | NETIF_F_GSO_SOFTWARE | NETIF_F_GSO_ENCAP_ALL)
 
 #define IPVLAN_ALWAYS_ON \
-       (IPVLAN_ALWAYS_ON_OFLOADS | NETIF_F_LLTX | NETIF_F_VLAN_CHALLENGED)
+       (IPVLAN_ALWAYS_ON_OFLOADS | NETIF_F_VLAN_CHALLENGED)
 
 #define IPVLAN_FEATURES \
        (NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST | \
@@ -141,6 +141,7 @@ static int ipvlan_init(struct net_device *dev)
        dev->vlan_features = phy_dev->vlan_features & IPVLAN_FEATURES;
        dev->vlan_features |= IPVLAN_ALWAYS_ON_OFLOADS;
        dev->hw_enc_features |= dev->features;
+       dev->lltx = true;
        netif_inherit_tso_max(dev, phy_dev);
        dev->hard_header_len = phy_dev->hard_header_len;
 
index 2b486e7c749ca31f2914751c8c1514b416c25af4..bf857782be0ff3ee8eb9ea43bc2163970458bbb7 100644 (file)
@@ -171,6 +171,7 @@ static void gen_lo_setup(struct net_device *dev,
        dev->type               = ARPHRD_LOOPBACK;      /* 0x0001*/
        dev->flags              = IFF_LOOPBACK;
        dev->priv_flags         |= IFF_LIVE_ADDR_CHANGE | IFF_NO_QUEUE;
+       dev->lltx               = true;
        netif_keep_dst(dev);
        dev->hw_features        = NETIF_F_GSO_SOFTWARE;
        dev->features           = NETIF_F_SG | NETIF_F_FRAGLIST
@@ -179,7 +180,6 @@ static void gen_lo_setup(struct net_device *dev,
                | NETIF_F_RXCSUM
                | NETIF_F_SCTP_CRC
                | NETIF_F_HIGHDMA
-               | NETIF_F_LLTX
                | NETIF_F_NETNS_LOCAL
                | NETIF_F_VLAN_CHALLENGED
                | NETIF_F_LOOPBACK;
index 2da70bc3dd8695b7eee1be90df4d1f6e11f21d08..12d1b205f6d1173cb1d0001d2bfb05a172a65ff1 100644 (file)
@@ -3550,7 +3550,8 @@ static int macsec_dev_init(struct net_device *dev)
                return err;
 
        dev->features = real_dev->features & MACSEC_FEATURES;
-       dev->features |= NETIF_F_LLTX | NETIF_F_GSO_SOFTWARE;
+       dev->features |= NETIF_F_GSO_SOFTWARE;
+       dev->lltx = true;
        dev->pcpu_stat_type = NETDEV_PCPU_STAT_TSTATS;
 
        macsec_set_head_tail_room(dev);
@@ -3581,7 +3582,6 @@ static netdev_features_t macsec_fix_features(struct net_device *dev,
 
        features &= (real_dev->features & MACSEC_FEATURES) |
                    NETIF_F_GSO_SOFTWARE | NETIF_F_SOFT_FEATURES;
-       features |= NETIF_F_LLTX;
 
        return features;
 }
index b45f137f365e7adf759106c97a785a499bf7f2c3..cf18e66de142c9a19b8b169c26a62137118e3e41 100644 (file)
@@ -900,7 +900,7 @@ static struct lock_class_key macvlan_netdev_addr_lock_key;
        (NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE | \
         NETIF_F_GSO_ROBUST | NETIF_F_GSO_ENCAP_ALL)
 
-#define ALWAYS_ON_FEATURES (ALWAYS_ON_OFFLOADS | NETIF_F_LLTX)
+#define ALWAYS_ON_FEATURES ALWAYS_ON_OFFLOADS
 
 #define MACVLAN_FEATURES \
        (NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST | \
@@ -932,6 +932,7 @@ static int macvlan_init(struct net_device *dev)
        dev->vlan_features      = lowerdev->vlan_features & MACVLAN_FEATURES;
        dev->vlan_features      |= ALWAYS_ON_OFFLOADS;
        dev->hw_enc_features    |= dev->features;
+       dev->lltx               = true;
        netif_inherit_tso_max(dev, lowerdev);
        dev->hard_header_len    = lowerdev->hard_header_len;
        macvlan_set_lockdep_class(dev);
index 963d8b4af28d797652c776a74c670697f3db3515..06728385a35fb258af61e853da5fcdf4ea5ca1a1 100644 (file)
@@ -731,7 +731,7 @@ struct failover *net_failover_create(struct net_device *standby_dev)
                                       IFF_TX_SKB_SHARING);
 
        /* don't acquire failover netdev's netif_tx_lock when transmitting */
-       failover_dev->features |= NETIF_F_LLTX;
+       failover_dev->lltx = true;
 
        /* Don't allow failover devices to change network namespaces. */
        failover_dev->features |= NETIF_F_NETNS_LOCAL;
index 16789cd446e9e47fd738f12a9cde4e1eeef55fcf..79232f5cc0882f42bb590fe35e41282def996fdf 100644 (file)
@@ -255,11 +255,12 @@ static void netkit_setup(struct net_device *dev)
        dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
        dev->priv_flags |= IFF_PHONY_HEADROOM;
        dev->priv_flags |= IFF_NO_QUEUE;
+       dev->lltx = true;
 
        dev->ethtool_ops = &netkit_ethtool_ops;
        dev->netdev_ops  = &netkit_netdev_ops;
 
-       dev->features |= netkit_features | NETIF_F_LLTX;
+       dev->features |= netkit_features;
        dev->hw_features = netkit_features;
        dev->hw_enc_features = netkit_features;
        dev->mpls_features = NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE;
index e5a0987a263e5567d17afde560a2e2da3ea7bc4c..8bfd4ee5a8c4fb0175b4feec6d366308213f3ccb 100644 (file)
@@ -63,13 +63,13 @@ static void nlmon_setup(struct net_device *dev)
 {
        dev->type = ARPHRD_NETLINK;
        dev->priv_flags |= IFF_NO_QUEUE;
+       dev->lltx = true;
 
        dev->netdev_ops = &nlmon_ops;
        dev->ethtool_ops = &nlmon_ethtool_ops;
        dev->needs_free_netdev = true;
 
-       dev->features = NETIF_F_SG | NETIF_F_FRAGLIST |
-                       NETIF_F_HIGHDMA | NETIF_F_LLTX;
+       dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA;
        dev->flags = IFF_NOARP;
        dev->pcpu_stat_type = NETDEV_PCPU_STAT_LSTATS;
 
index eb9acfcaeb097496b5e28c87af13f5b4091a9bed..4b2971e2bf484a13b5e94ac3b9862224adac4c41 100644 (file)
@@ -1631,7 +1631,7 @@ static void ppp_setup(struct net_device *dev)
        dev->netdev_ops = &ppp_netdev_ops;
        SET_NETDEV_DEVTYPE(dev, &ppp_type);
 
-       dev->features |= NETIF_F_LLTX;
+       dev->lltx = true;
 
        dev->hard_header_len = PPP_HDRLEN;
        dev->mtu = PPP_MRU;
index 4eececc945138b6e5e1ba4d1d791b7b582d9946c..318a0ef1af50da306c80b63265cca1dee26d1840 100644 (file)
@@ -515,7 +515,7 @@ static int rionet_setup_netdev(struct rio_mport *mport, struct net_device *ndev)
        /* MTU range: 68 - 4082 */
        ndev->min_mtu = ETH_MIN_MTU;
        ndev->max_mtu = RIONET_MAX_MTU;
-       ndev->features = NETIF_F_LLTX;
+       ndev->lltx = true;
        SET_NETDEV_DEV(ndev, &mport->dev);
        ndev->ethtool_ops = &rionet_ethtool_ops;
 
index ab1935a4aa2cd68459af8f3af2fcfb8345b437b9..1d1bad3cedc2d762d1f0e50f184e2f4e29b0dd9a 100644 (file)
@@ -2189,8 +2189,8 @@ static void team_setup(struct net_device *dev)
         * Let this up to underlay drivers.
         */
        dev->priv_flags |= IFF_UNICAST_FLT | IFF_LIVE_ADDR_CHANGE;
+       dev->lltx = true;
 
-       dev->features |= NETIF_F_LLTX;
        dev->features |= NETIF_F_GRO;
 
        /* Don't allow team devices to change network namespaces. */
index 1d06c560c5e653e0df063cb576e836ead3409001..a645c36f2ceeb69f0ced4066206fbc5dc32b8569 100644 (file)
@@ -990,10 +990,11 @@ static int tun_net_init(struct net_device *dev)
        dev->hw_features = NETIF_F_SG | NETIF_F_FRAGLIST |
                           TUN_USER_FEATURES | NETIF_F_HW_VLAN_CTAG_TX |
                           NETIF_F_HW_VLAN_STAG_TX;
-       dev->features = dev->hw_features | NETIF_F_LLTX;
+       dev->features = dev->hw_features;
        dev->vlan_features = dev->features &
                             ~(NETIF_F_HW_VLAN_CTAG_TX |
                               NETIF_F_HW_VLAN_STAG_TX);
+       dev->lltx = true;
 
        tun->flags = (tun->flags & ~TUN_FEATURES) |
                      (ifr->ifr_flags & TUN_FEATURES);
@@ -1129,7 +1130,7 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
                goto drop;
        }
 
-       /* NETIF_F_LLTX requires to do our own update of trans_start */
+       /* dev->lltx requires to do our own update of trans_start */
        queue = netdev_get_tx_queue(dev, txq);
        txq_trans_cond_update(queue);
 
index 34499b91a8bde047d0da5c9e5f543e392d5df6a5..18148e068aa0067f0ec3f18e891e2f54c448ff71 100644 (file)
@@ -1697,11 +1697,11 @@ static void veth_setup(struct net_device *dev)
        dev->priv_flags |= IFF_NO_QUEUE;
        dev->priv_flags |= IFF_PHONY_HEADROOM;
        dev->priv_flags |= IFF_DISABLE_NETPOLL;
+       dev->lltx = true;
 
        dev->netdev_ops = &veth_netdev_ops;
        dev->xdp_metadata_ops = &veth_xdp_metadata_ops;
        dev->ethtool_ops = &veth_ethtool_ops;
-       dev->features |= NETIF_F_LLTX;
        dev->features |= VETH_FEATURES;
        dev->vlan_features = dev->features &
                             ~(NETIF_F_HW_VLAN_CTAG_TX |
index a900908eb24a6f3608852ad8687b5946d02469bf..b1d4ef538995eff249d5cf60be699c281b7e96a8 100644 (file)
@@ -1635,7 +1635,7 @@ static void vrf_setup(struct net_device *dev)
        eth_hw_addr_random(dev);
 
        /* don't acquire vrf device's netif_tx_lock when transmitting */
-       dev->features |= NETIF_F_LLTX;
+       dev->lltx = true;
 
        /* don't allow vrf devices to change network namespaces. */
        dev->features |= NETIF_F_NETNS_LOCAL;
index 4c260074c091f167ee92b0bfda90175533695910..53fb76d574c6e2d17f57ba375a2510ea01637ce7 100644 (file)
@@ -83,13 +83,13 @@ static void vsockmon_setup(struct net_device *dev)
 {
        dev->type = ARPHRD_VSOCKMON;
        dev->priv_flags |= IFF_NO_QUEUE;
+       dev->lltx = true;
 
        dev->netdev_ops = &vsockmon_ops;
        dev->ethtool_ops = &vsockmon_ethtool_ops;
        dev->needs_free_netdev = true;
 
-       dev->features = NETIF_F_SG | NETIF_F_FRAGLIST |
-                       NETIF_F_HIGHDMA | NETIF_F_LLTX;
+       dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA;
 
        dev->flags = IFF_NOARP;
 
index 4a54dd1950c1005808bd6b68d833952101706862..53dcb9fffc04fe8109a032c53dff95674f6dc635 100644 (file)
@@ -3321,7 +3321,6 @@ static void vxlan_setup(struct net_device *dev)
        dev->needs_free_netdev = true;
        SET_NETDEV_DEVTYPE(dev, &vxlan_type);
 
-       dev->features   |= NETIF_F_LLTX;
        dev->features   |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_FRAGLIST;
        dev->features   |= NETIF_F_RXCSUM;
        dev->features   |= NETIF_F_GSO_SOFTWARE;
@@ -3333,6 +3332,7 @@ static void vxlan_setup(struct net_device *dev)
        netif_keep_dst(dev);
        dev->priv_flags |= IFF_NO_QUEUE;
        dev->change_proto_down = true;
+       dev->lltx = true;
 
        /* MTU range: 68 - 65535 */
        dev->min_mtu = ETH_MIN_MTU;
index 3feb36ee5bfb44726eecee6db3b9463c62087a95..45e9b908dbfb05633f1496130cc005653130fd1a 100644 (file)
@@ -289,7 +289,7 @@ static void wg_setup(struct net_device *dev)
        dev->type = ARPHRD_NONE;
        dev->flags = IFF_POINTOPOINT | IFF_NOARP;
        dev->priv_flags |= IFF_NO_QUEUE;
-       dev->features |= NETIF_F_LLTX;
+       dev->lltx = true;
        dev->features |= WG_NETDEV_FEATURES;
        dev->hw_features |= WG_NETDEV_FEATURES;
        dev->hw_enc_features |= WG_NETDEV_FEATURES;
index 9eee28f2940cf12e6ed981baee2ce178d724662e..a5e99cc78a454f5666b6bb3632e701e794db781e 100644 (file)
@@ -425,7 +425,7 @@ int cvm_oct_common_init(struct net_device *dev)
                dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM;
 
        /* We do our own locking, Linux doesn't need to */
-       dev->features |= NETIF_F_LLTX;
+       dev->lltx = true;
        dev->ethtool_ops = &cvm_oct_ethtool_ops;
 
        cvm_oct_set_mac_filter(dev);
index 7c2d77d75a888cdb2b317cc89296681643b0423e..a2e20b5175841b65d15d59e3d2bb43c3d7dbc9ed 100644 (file)
@@ -24,8 +24,7 @@ enum {
        NETIF_F_HW_VLAN_CTAG_FILTER_BIT,/* Receive filtering on VLAN CTAGs */
        NETIF_F_VLAN_CHALLENGED_BIT,    /* Device cannot handle VLAN packets */
        NETIF_F_GSO_BIT,                /* Enable software GSO. */
-       NETIF_F_LLTX_BIT,               /* LockLess TX - deprecated. Please */
-                                       /* do not use LLTX in new drivers */
+       __UNUSED_NETIF_F_12,
        NETIF_F_NETNS_LOCAL_BIT,        /* Does not change network namespaces */
        NETIF_F_GRO_BIT,                /* Generic receive offload */
        NETIF_F_LRO_BIT,                /* large receive offload */
@@ -120,7 +119,6 @@ enum {
 #define NETIF_F_HW_VLAN_CTAG_TX        __NETIF_F(HW_VLAN_CTAG_TX)
 #define NETIF_F_IP_CSUM                __NETIF_F(IP_CSUM)
 #define NETIF_F_IPV6_CSUM      __NETIF_F(IPV6_CSUM)
-#define NETIF_F_LLTX           __NETIF_F(LLTX)
 #define NETIF_F_LOOPBACK       __NETIF_F(LOOPBACK)
 #define NETIF_F_LRO            __NETIF_F(LRO)
 #define NETIF_F_NETNS_LOCAL    __NETIF_F(NETNS_LOCAL)
@@ -193,7 +191,7 @@ static inline int find_next_netdev_feature(u64 feature, unsigned long start)
 /* Features valid for ethtool to change */
 /* = all defined minus driver/device-class-related */
 #define NETIF_F_NEVER_CHANGE   (NETIF_F_VLAN_CHALLENGED | \
-                                NETIF_F_LLTX | NETIF_F_NETNS_LOCAL)
+                                NETIF_F_NETNS_LOCAL)
 
 /* remember that ((t)1 << t_BITS) is undefined in C99 */
 #define NETIF_F_ETHTOOL_BITS   ((__NETIF_F_BIT(NETDEV_FEATURE_COUNT - 1) | \
index d6f35c9d8580d22c55417bfc0e743998095866f5..e22ca5e0749029435e06d1f63f06267053e735c0 100644 (file)
@@ -1720,6 +1720,9 @@ enum netdev_reg_state {
  *
  *     @priv_flags:    flags invisible to userspace defined as bits, see
  *                     enum netdev_priv_flags for the definitions
+ *     @lltx:          device supports lockless Tx. Deprecated for real HW
+ *                     drivers. Mainly used by logical interfaces, such as
+ *                     bonding and tunnels
  *
  *     @name:  This is the first field of the "visible" part of this structure
  *             (i.e. as seen by users in the "Space.c" file).  It is the name
@@ -2018,6 +2021,7 @@ struct net_device {
        __cacheline_group_begin(net_device_read_tx);
        struct_group(priv_flags_fast,
                unsigned long           priv_flags:32;
+               unsigned long           lltx:1;
        );
        const struct net_device_ops *netdev_ops;
        const struct header_ops *header_ops;
@@ -4433,7 +4437,7 @@ static inline void netif_tx_unlock_bh(struct net_device *dev)
 }
 
 #define HARD_TX_LOCK(dev, txq, cpu) {                  \
-       if ((dev->features & NETIF_F_LLTX) == 0) {      \
+       if (!(dev)->lltx) {                             \
                __netif_tx_lock(txq, cpu);              \
        } else {                                        \
                __netif_tx_acquire(txq);                \
@@ -4441,12 +4445,12 @@ static inline void netif_tx_unlock_bh(struct net_device *dev)
 }
 
 #define HARD_TX_TRYLOCK(dev, txq)                      \
-       (((dev->features & NETIF_F_LLTX) == 0) ?        \
+       (!(dev)->lltx ?                                 \
                __netif_tx_trylock(txq) :               \
                __netif_tx_acquire(txq))
 
 #define HARD_TX_UNLOCK(dev, txq) {                     \
-       if ((dev->features & NETIF_F_LLTX) == 0) {      \
+       if (!(dev)->lltx) {                             \
                __netif_tx_unlock(txq);                 \
        } else {                                        \
                __netif_tx_release(txq);                \
index ca4b0eea81a267bee223127668d76eabf17fc24e..fa5edd6ef7f7631ed06a55b337675b8c9178975a 100644 (file)
@@ -15077,8 +15077,7 @@ static struct skb_segment_test skb_segment_tests[] __initconst = {
                .build_skb = build_test_skb_linear_no_head_frag,
                .features = NETIF_F_SG | NETIF_F_FRAGLIST |
                            NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_GSO |
-                           NETIF_F_LLTX | NETIF_F_GRO |
-                           NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM |
+                           NETIF_F_GRO | NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM |
                            NETIF_F_HW_VLAN_STAG_TX
        }
 };
index 217be32426b58a654bb66f889b82bc19a8c3c8e9..3ca485537d778afa9a697ba10c3e2988827bc5f9 100644 (file)
@@ -569,7 +569,8 @@ static int vlan_dev_init(struct net_device *dev)
        if (real_dev->vlan_features & NETIF_F_HW_MACSEC)
                dev->hw_features |= NETIF_F_HW_MACSEC;
 
-       dev->features |= dev->hw_features | NETIF_F_LLTX;
+       dev->features |= dev->hw_features;
+       dev->lltx = true;
        netif_inherit_tso_max(dev, real_dev);
        if (dev->features & NETIF_F_VLAN_FEATURES)
                netdev_warn(real_dev, "VLAN features are set incorrectly.  Q-in-Q configurations may not work correctly.\n");
@@ -655,7 +656,6 @@ static netdev_features_t vlan_dev_fix_features(struct net_device *dev,
                lower_features |= NETIF_F_HW_CSUM;
        features = netdev_intersect_features(features, lower_features);
        features |= old_features & (NETIF_F_SOFT_FEATURES | NETIF_F_GSO_SOFTWARE);
-       features |= NETIF_F_LLTX;
 
        return features;
 }
index 30ecbc2ef1fd9cb9d06674d039f65a4c4b53ec56..e791a73ef901b1ce63f194ba8c1811d2af957f42 100644 (file)
@@ -1021,8 +1021,8 @@ static void batadv_softif_init_early(struct net_device *dev)
        dev->needs_free_netdev = true;
        dev->priv_destructor = batadv_softif_free;
        dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_NETNS_LOCAL;
-       dev->features |= NETIF_F_LLTX;
        dev->priv_flags |= IFF_NO_QUEUE;
+       dev->lltx = true;
 
        /* can't call min_mtu, because the needed variables
         * have not been initialized yet
index fb1115857e497b434d362b3fe452ac144ff2e90a..a6d25113dfb18517456d68d60ef3b9ac1e9824d0 100644 (file)
@@ -487,8 +487,9 @@ void br_dev_setup(struct net_device *dev)
        dev->ethtool_ops = &br_ethtool_ops;
        SET_NETDEV_DEVTYPE(dev, &br_type);
        dev->priv_flags = IFF_EBRIDGE | IFF_NO_QUEUE;
+       dev->lltx = true;
 
-       dev->features = COMMON_FEATURES | NETIF_F_LLTX | NETIF_F_NETNS_LOCAL |
+       dev->features = COMMON_FEATURES | NETIF_F_NETNS_LOCAL |
                        NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_STAG_TX;
        dev->hw_features = COMMON_FEATURES | NETIF_F_HW_VLAN_CTAG_TX |
                           NETIF_F_HW_VLAN_STAG_TX;
index 444f23e74f8e6bed058eee09e03e045d4df6bd52..01a9fb54ef42ee16508be8a203affcfd51c45998 100644 (file)
@@ -1764,8 +1764,7 @@ static const struct kobj_type netdev_queue_ktype = {
 
 static bool netdev_uses_bql(const struct net_device *dev)
 {
-       if (dev->features & NETIF_F_LLTX ||
-           dev->priv_flags & IFF_NO_QUEUE)
+       if (dev->lltx || (dev->priv_flags & IFF_NO_QUEUE))
                return false;
 
        return IS_ENABLED(CONFIG_BQL);
index f5adfa1d978a2839a574275330783c3eb19544c9..74eda9b30608e65c8c1c0afe965b5b4d589ea7e0 100644 (file)
@@ -2642,11 +2642,12 @@ void dsa_user_setup_tagger(struct net_device *user)
 
        user->features = conduit->vlan_features | NETIF_F_HW_TC;
        user->hw_features |= NETIF_F_HW_TC;
-       user->features |= NETIF_F_LLTX;
        if (user->needed_tailroom)
                user->features &= ~(NETIF_F_SG | NETIF_F_FRAGLIST);
        if (ds->needs_standalone_vlan_filtering)
                user->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
+
+       user->lltx = true;
 }
 
 int dsa_user_suspend(struct net_device *user_dev)
index 7257ae272296f95a8a665096e7ccb067eabd5707..447fc80e1b0069289caeafe66973af7e66c25625 100644 (file)
@@ -25,7 +25,6 @@ const char netdev_features_strings[NETDEV_FEATURE_COUNT][ETH_GSTRING_LEN] = {
        [NETIF_F_HW_VLAN_STAG_FILTER_BIT] = "rx-vlan-stag-filter",
        [NETIF_F_VLAN_CHALLENGED_BIT] =  "vlan-challenged",
        [NETIF_F_GSO_BIT] =              "tx-generic-segmentation",
-       [NETIF_F_LLTX_BIT] =             "tx-lockless",
        [NETIF_F_NETNS_LOCAL_BIT] =      "netns-local",
        [NETIF_F_GRO_BIT] =              "rx-gro",
        [NETIF_F_GRO_HW_BIT] =           "rx-gro-hw",
index e4cc6b78dcfc40643ad386780573a53dd089bb54..d4c7830766621be747e72dd08fe6ba042ba1d4c5 100644 (file)
@@ -554,6 +554,8 @@ void hsr_dev_setup(struct net_device *dev)
        dev->netdev_ops = &hsr_device_ops;
        SET_NETDEV_DEVTYPE(dev, &hsr_type);
        dev->priv_flags |= IFF_NO_QUEUE | IFF_DISABLE_NETPOLL;
+       /* Prevent recursive tx locking */
+       dev->lltx = true;
 
        dev->needs_free_netdev = true;
 
@@ -563,8 +565,6 @@ void hsr_dev_setup(struct net_device *dev)
 
        dev->features = dev->hw_features;
 
-       /* Prevent recursive tx locking */
-       dev->features |= NETIF_F_LLTX;
        /* VLAN on top of HSR needs testing and probably some work on
         * hsr_header_create() etc.
         */
index ba205473522e4e6ca8eed831726b1fd48791638e..b54c41f3ae3cd146075ee775fb6c770b3fe69a2e 100644 (file)
@@ -996,7 +996,7 @@ static void __gre_tunnel_init(struct net_device *dev)
        tunnel->hlen = tunnel->tun_hlen + tunnel->encap_hlen;
        dev->needed_headroom = tunnel->hlen + sizeof(tunnel->parms.iph);
 
-       dev->features           |= GRE_FEATURES | NETIF_F_LLTX;
+       dev->features           |= GRE_FEATURES;
        dev->hw_features        |= GRE_FEATURES;
 
        /* TCP offload with GRE SEQ is not supported, nor can we support 2
@@ -1010,6 +1010,8 @@ static void __gre_tunnel_init(struct net_device *dev)
 
        dev->features |= NETIF_F_GSO_SOFTWARE;
        dev->hw_features |= NETIF_F_GSO_SOFTWARE;
+
+       dev->lltx = true;
 }
 
 static int ipgre_tunnel_init(struct net_device *dev)
index 14536da9f5dc0fdb3ff4a0db6402b219f776083c..f0b4419cef349329bf9ecad8d581111979786029 100644 (file)
@@ -443,7 +443,7 @@ static int vti_tunnel_init(struct net_device *dev)
 
        dev->flags              = IFF_NOARP;
        dev->addr_len           = 4;
-       dev->features           |= NETIF_F_LLTX;
+       dev->lltx               = true;
        netif_keep_dst(dev);
 
        return ip_tunnel_init(dev);
index 923a2ef68c2f41d3e1d50e7aa249569c4c3ec3a7..dc0db5895e0e0668c28bc6ae2937181bc784ea06 100644 (file)
@@ -378,7 +378,7 @@ static void ipip_tunnel_setup(struct net_device *dev)
        dev->type               = ARPHRD_TUNNEL;
        dev->flags              = IFF_NOARP;
        dev->addr_len           = 4;
-       dev->features           |= NETIF_F_LLTX;
+       dev->lltx               = true;
        netif_keep_dst(dev);
 
        dev->features           |= IPIP_FEATURES;
index 3942bd2ade78b4841a604c285ce119f5f6f7bf0f..08beab638bda6af92b5e71a08fe107d12e9100d8 100644 (file)
@@ -1471,7 +1471,7 @@ static void ip6gre_tnl_init_features(struct net_device *dev)
 {
        struct ip6_tnl *nt = netdev_priv(dev);
 
-       dev->features           |= GRE6_FEATURES | NETIF_F_LLTX;
+       dev->features           |= GRE6_FEATURES;
        dev->hw_features        |= GRE6_FEATURES;
 
        /* TCP offload with GRE SEQ is not supported, nor can we support 2
@@ -1485,6 +1485,8 @@ static void ip6gre_tnl_init_features(struct net_device *dev)
 
        dev->features |= NETIF_F_GSO_SOFTWARE;
        dev->hw_features |= NETIF_F_GSO_SOFTWARE;
+
+       dev->lltx = true;
 }
 
 static int ip6gre_tunnel_init_common(struct net_device *dev)
index 87dfb565a9f81b663a06f07df63d2604c9a85cac..cbef0fcece7157699a4ded50b235876c7c64b3af 100644 (file)
@@ -1849,7 +1849,7 @@ static void ip6_tnl_dev_setup(struct net_device *dev)
        dev->type = ARPHRD_TUNNEL6;
        dev->flags |= IFF_NOARP;
        dev->addr_len = sizeof(struct in6_addr);
-       dev->features |= NETIF_F_LLTX;
+       dev->lltx = true;
        dev->pcpu_stat_type = NETDEV_PCPU_STAT_TSTATS;
        netif_keep_dst(dev);
 
index 3b2eed7fc7659e96fbebe8885fd273689c2379ea..58306522fb1e7c180363b7d1cec67b929d9dccf7 100644 (file)
@@ -1436,7 +1436,7 @@ static void ipip6_tunnel_setup(struct net_device *dev)
        dev->flags              = IFF_NOARP;
        netif_keep_dst(dev);
        dev->addr_len           = 4;
-       dev->features           |= NETIF_F_LLTX;
+       dev->lltx               = true;
        dev->features           |= SIT_FEATURES;
        dev->hw_features        |= SIT_FEATURES;
        dev->pcpu_stat_type     = NETDEV_PCPU_STAT_TSTATS;
index 15a862f33f76c2c8b40614c44e6d4ffc1ed0c9c8..d692b902e120ca0b2ec32897dc0dc516f3520839 100644 (file)
@@ -97,7 +97,7 @@ static void l2tp_eth_dev_setup(struct net_device *dev)
        SET_NETDEV_DEVTYPE(dev, &l2tpeth_type);
        ether_setup(dev);
        dev->priv_flags         &= ~IFF_TX_SKB_SHARING;
-       dev->features           |= NETIF_F_LLTX;
+       dev->lltx               = true;
        dev->netdev_ops         = &l2tp_eth_netdev_ops;
        dev->needs_free_netdev  = true;
        dev->pcpu_stat_type     = NETDEV_PCPU_STAT_TSTATS;
index 4b33133cbdfffa9eb1cf8044fb11743898bb53a9..3a369a31c5cc93b9d7eeb5f33a86c50a47866014 100644 (file)
@@ -102,19 +102,20 @@ static void do_setup(struct net_device *netdev)
        netdev->priv_flags &= ~IFF_TX_SKB_SHARING;
        netdev->priv_flags |= IFF_LIVE_ADDR_CHANGE | IFF_OPENVSWITCH |
                              IFF_NO_QUEUE;
+       netdev->lltx = true;
        netdev->needs_free_netdev = true;
        netdev->priv_destructor = NULL;
        netdev->ethtool_ops = &internal_dev_ethtool_ops;
        netdev->rtnl_link_ops = &internal_dev_link_ops;
 
-       netdev->features = NETIF_F_LLTX | NETIF_F_SG | NETIF_F_FRAGLIST |
-                          NETIF_F_HIGHDMA | NETIF_F_HW_CSUM |
-                          NETIF_F_GSO_SOFTWARE | NETIF_F_GSO_ENCAP_ALL;
+       netdev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA |
+                          NETIF_F_HW_CSUM | NETIF_F_GSO_SOFTWARE |
+                          NETIF_F_GSO_ENCAP_ALL;
 
        netdev->vlan_features = netdev->features;
        netdev->hw_enc_features = netdev->features;
        netdev->features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_STAG_TX;
-       netdev->hw_features = netdev->features & ~NETIF_F_LLTX;
+       netdev->hw_features = netdev->features;
 
        eth_hw_addr_random(netdev);
 }
index e50e4bf993fa473769a0062ffcc661daefaf1b6b..98f1e2b67c76b3e65b32b10b50cc9da9494ac52c 100644 (file)
@@ -769,7 +769,7 @@ static int xfrmi_dev_init(struct net_device *dev)
        if (err)
                return err;
 
-       dev->features |= NETIF_F_LLTX;
+       dev->lltx = true;
        dev->features |= XFRMI_FEATURES;
        dev->hw_features |= XFRMI_FEATURES;