You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'drivers_iff_no_queue'
Phil Sutter says: ==================== net: Convert drivers to IFF_NO_QUEUE and cleanup afterwards This series converts in-tree users away from the old and deprecated 'tx_queue_len = 0' idiom, adds a warning to notify out-of-tree driver maintainers that there is need for action on their behalf and finally drops any workarounds in scheduling algorithm implementations. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -4120,9 +4120,8 @@ void bond_setup(struct net_device *bond_dev)
|
||||
SET_NETDEV_DEVTYPE(bond_dev, &bond_type);
|
||||
|
||||
/* Initialize the device options */
|
||||
bond_dev->tx_queue_len = 0;
|
||||
bond_dev->flags |= IFF_MASTER|IFF_MULTICAST;
|
||||
bond_dev->priv_flags |= IFF_BONDING | IFF_UNICAST_FLT;
|
||||
bond_dev->priv_flags |= IFF_BONDING | IFF_UNICAST_FLT | IFF_NO_QUEUE;
|
||||
bond_dev->priv_flags &= ~(IFF_XMIT_DST_RELEASE | IFF_TX_SKB_SHARING);
|
||||
|
||||
/* don't acquire bond device's netif_tx_lock when transmitting */
|
||||
|
||||
@@ -1120,7 +1120,7 @@ static void cfhsi_setup(struct net_device *dev)
|
||||
dev->type = ARPHRD_CAIF;
|
||||
dev->flags = IFF_POINTOPOINT | IFF_NOARP;
|
||||
dev->mtu = CFHSI_MAX_CAIF_FRAME_SZ;
|
||||
dev->tx_queue_len = 0;
|
||||
dev->priv_flags |= IFF_NO_QUEUE;
|
||||
dev->destructor = free_netdev;
|
||||
dev->netdev_ops = &cfhsi_netdevops;
|
||||
for (i = 0; i < CFHSI_PRIO_LAST; ++i)
|
||||
|
||||
@@ -427,7 +427,7 @@ static void caifdev_setup(struct net_device *dev)
|
||||
dev->type = ARPHRD_CAIF;
|
||||
dev->flags = IFF_POINTOPOINT | IFF_NOARP;
|
||||
dev->mtu = CAIF_MAX_MTU;
|
||||
dev->tx_queue_len = 0;
|
||||
dev->priv_flags |= IFF_NO_QUEUE;
|
||||
dev->destructor = free_netdev;
|
||||
skb_queue_head_init(&serdev->head);
|
||||
serdev->common.link_select = CAIF_LINK_LOW_LATENCY;
|
||||
|
||||
@@ -710,7 +710,7 @@ static void cfspi_setup(struct net_device *dev)
|
||||
dev->netdev_ops = &cfspi_ops;
|
||||
dev->type = ARPHRD_CAIF;
|
||||
dev->flags = IFF_NOARP | IFF_POINTOPOINT;
|
||||
dev->tx_queue_len = 0;
|
||||
dev->priv_flags |= IFF_NO_QUEUE;
|
||||
dev->mtu = SPI_MAX_PAYLOAD_SIZE;
|
||||
dev->destructor = free_netdev;
|
||||
skb_queue_head_init(&cfspi->qhead);
|
||||
|
||||
+1
-2
@@ -144,10 +144,9 @@ static void dummy_setup(struct net_device *dev)
|
||||
dev->destructor = free_netdev;
|
||||
|
||||
/* Fill in device structure with ethernet-generic values. */
|
||||
dev->tx_queue_len = 0;
|
||||
dev->flags |= IFF_NOARP;
|
||||
dev->flags &= ~IFF_MULTICAST;
|
||||
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
|
||||
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE | IFF_NO_QUEUE;
|
||||
dev->features |= NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_TSO;
|
||||
dev->features |= NETIF_F_HW_CSUM | NETIF_F_HIGHDMA | NETIF_F_LLTX;
|
||||
eth_hw_addr_random(dev);
|
||||
|
||||
@@ -283,7 +283,6 @@ static void geneve_setup(struct net_device *dev)
|
||||
|
||||
SET_NETDEV_DEVTYPE(dev, &geneve_type);
|
||||
|
||||
dev->tx_queue_len = 0;
|
||||
dev->features |= NETIF_F_LLTX;
|
||||
dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM;
|
||||
dev->features |= NETIF_F_RXCSUM;
|
||||
@@ -297,7 +296,7 @@ static void geneve_setup(struct net_device *dev)
|
||||
dev->hw_features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_STAG_TX;
|
||||
|
||||
netif_keep_dst(dev);
|
||||
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
|
||||
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE | IFF_NO_QUEUE;
|
||||
}
|
||||
|
||||
static const struct nla_policy geneve_policy[IFLA_GENEVE_MAX + 1] = {
|
||||
|
||||
@@ -520,12 +520,11 @@ static void ipvlan_link_setup(struct net_device *dev)
|
||||
ether_setup(dev);
|
||||
|
||||
dev->priv_flags &= ~(IFF_XMIT_DST_RELEASE | IFF_TX_SKB_SHARING);
|
||||
dev->priv_flags |= IFF_UNICAST_FLT;
|
||||
dev->priv_flags |= IFF_UNICAST_FLT | IFF_NO_QUEUE;
|
||||
dev->netdev_ops = &ipvlan_netdev_ops;
|
||||
dev->destructor = free_netdev;
|
||||
dev->header_ops = &ipvlan_header_ops;
|
||||
dev->ethtool_ops = &ipvlan_ethtool_ops;
|
||||
dev->tx_queue_len = 0;
|
||||
}
|
||||
|
||||
static const struct nla_policy ipvlan_nl_policy[IFLA_IPVLAN_MAX + 1] =
|
||||
|
||||
@@ -165,10 +165,9 @@ static void loopback_setup(struct net_device *dev)
|
||||
dev->mtu = 64 * 1024;
|
||||
dev->hard_header_len = ETH_HLEN; /* 14 */
|
||||
dev->addr_len = ETH_ALEN; /* 6 */
|
||||
dev->tx_queue_len = 0;
|
||||
dev->type = ARPHRD_LOOPBACK; /* 0x0001*/
|
||||
dev->flags = IFF_LOOPBACK;
|
||||
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
|
||||
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE | IFF_NO_QUEUE;
|
||||
netif_keep_dst(dev);
|
||||
dev->hw_features = NETIF_F_ALL_TSO | NETIF_F_UFO;
|
||||
dev->features = NETIF_F_SG | NETIF_F_FRAGLIST
|
||||
|
||||
+1
-1
@@ -130,7 +130,7 @@ static const struct net_device_ops nlmon_ops = {
|
||||
static void nlmon_setup(struct net_device *dev)
|
||||
{
|
||||
dev->type = ARPHRD_NETLINK;
|
||||
dev->tx_queue_len = 0;
|
||||
dev->priv_flags |= IFF_NO_QUEUE;
|
||||
|
||||
dev->netdev_ops = &nlmon_ops;
|
||||
dev->ethtool_ops = &nlmon_ethtool_ops;
|
||||
|
||||
@@ -2051,9 +2051,9 @@ static void team_setup(struct net_device *dev)
|
||||
dev->netdev_ops = &team_netdev_ops;
|
||||
dev->ethtool_ops = &team_ethtool_ops;
|
||||
dev->destructor = team_destructor;
|
||||
dev->tx_queue_len = 0;
|
||||
dev->flags |= IFF_MULTICAST;
|
||||
dev->priv_flags &= ~(IFF_XMIT_DST_RELEASE | IFF_TX_SKB_SHARING);
|
||||
dev->priv_flags |= IFF_NO_QUEUE;
|
||||
|
||||
/*
|
||||
* Indicate we support unicast address filtering. That way core won't
|
||||
|
||||
@@ -306,6 +306,7 @@ static void veth_setup(struct net_device *dev)
|
||||
|
||||
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
|
||||
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
|
||||
dev->priv_flags |= IFF_NO_QUEUE;
|
||||
|
||||
dev->netdev_ops = &veth_netdev_ops;
|
||||
dev->ethtool_ops = &veth_ethtool_ops;
|
||||
|
||||
+1
-2
@@ -2416,7 +2416,6 @@ static void vxlan_setup(struct net_device *dev)
|
||||
dev->destructor = free_netdev;
|
||||
SET_NETDEV_DEVTYPE(dev, &vxlan_type);
|
||||
|
||||
dev->tx_queue_len = 0;
|
||||
dev->features |= NETIF_F_LLTX;
|
||||
dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM;
|
||||
dev->features |= NETIF_F_RXCSUM;
|
||||
@@ -2428,7 +2427,7 @@ static void vxlan_setup(struct net_device *dev)
|
||||
dev->hw_features |= NETIF_F_GSO_SOFTWARE;
|
||||
dev->hw_features |= NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_STAG_TX;
|
||||
netif_keep_dst(dev);
|
||||
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
|
||||
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE | IFF_NO_QUEUE;
|
||||
|
||||
INIT_LIST_HEAD(&vxlan->next);
|
||||
spin_lock_init(&vxlan->hash_lock);
|
||||
|
||||
@@ -1096,7 +1096,7 @@ static int fr_add_pvc(struct net_device *frad, unsigned int dlci, int type)
|
||||
}
|
||||
dev->netdev_ops = &pvc_ops;
|
||||
dev->mtu = HDLC_MAX_MTU;
|
||||
dev->tx_queue_len = 0;
|
||||
dev->priv_flags |= IFF_NO_QUEUE;
|
||||
dev->ml_priv = pvc;
|
||||
|
||||
if (register_netdevice(dev) != 0) {
|
||||
|
||||
@@ -865,7 +865,7 @@ void hostap_setup_dev(struct net_device *dev, local_info_t *local,
|
||||
|
||||
switch(type) {
|
||||
case HOSTAP_INTERFACE_AP:
|
||||
dev->tx_queue_len = 0; /* use main radio device queue */
|
||||
dev->priv_flags |= IFF_NO_QUEUE; /* use main radio device queue */
|
||||
dev->netdev_ops = &hostap_mgmt_netdev_ops;
|
||||
dev->type = ARPHRD_IEEE80211;
|
||||
dev->header_ops = &hostap_80211_ops;
|
||||
@@ -874,7 +874,7 @@ void hostap_setup_dev(struct net_device *dev, local_info_t *local,
|
||||
dev->netdev_ops = &hostap_master_ops;
|
||||
break;
|
||||
default:
|
||||
dev->tx_queue_len = 0; /* use main radio device queue */
|
||||
dev->priv_flags |= IFF_NO_QUEUE; /* use main radio device queue */
|
||||
dev->netdev_ops = &hostap_netdev_ops;
|
||||
}
|
||||
|
||||
|
||||
@@ -2677,7 +2677,7 @@ static void hwsim_mon_setup(struct net_device *dev)
|
||||
dev->netdev_ops = &hwsim_netdev_ops;
|
||||
dev->destructor = free_netdev;
|
||||
ether_setup(dev);
|
||||
dev->tx_queue_len = 0;
|
||||
dev->priv_flags |= IFF_NO_QUEUE;
|
||||
dev->type = ARPHRD_IEEE80211_RADIOTAP;
|
||||
eth_zero_addr(dev->dev_addr);
|
||||
dev->dev_addr[0] = 0x12;
|
||||
|
||||
@@ -493,7 +493,7 @@ static void WILC_WFI_mon_setup(struct net_device *dev)
|
||||
/* dev->destructor = free_netdev; */
|
||||
PRINT_INFO(CORECONFIG_DBG, "In Ethernet setup function\n");
|
||||
ether_setup(dev);
|
||||
dev->tx_queue_len = 0;
|
||||
dev->priv_flags |= IFF_NO_QUEUE;
|
||||
dev->type = ARPHRD_IEEE80211_RADIOTAP;
|
||||
memset(dev->dev_addr, 0, ETH_ALEN);
|
||||
|
||||
|
||||
@@ -791,10 +791,9 @@ void vlan_setup(struct net_device *dev)
|
||||
{
|
||||
ether_setup(dev);
|
||||
|
||||
dev->priv_flags |= IFF_802_1Q_VLAN;
|
||||
dev->priv_flags |= IFF_802_1Q_VLAN | IFF_NO_QUEUE;
|
||||
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
|
||||
netif_keep_dst(dev);
|
||||
dev->tx_queue_len = 0;
|
||||
|
||||
dev->netdev_ops = &vlan_netdev_ops;
|
||||
dev->destructor = vlan_dev_free;
|
||||
|
||||
@@ -941,7 +941,7 @@ static void batadv_softif_init_early(struct net_device *dev)
|
||||
dev->netdev_ops = &batadv_netdev_ops;
|
||||
dev->destructor = batadv_softif_free;
|
||||
dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
|
||||
dev->tx_queue_len = 0;
|
||||
dev->priv_flags |= IFF_NO_QUEUE;
|
||||
|
||||
/* can't call min_mtu, because the needed variables
|
||||
* have not been initialized yet
|
||||
|
||||
@@ -365,8 +365,7 @@ void br_dev_setup(struct net_device *dev)
|
||||
dev->destructor = br_dev_free;
|
||||
dev->ethtool_ops = &br_ethtool_ops;
|
||||
SET_NETDEV_DEVTYPE(dev, &br_type);
|
||||
dev->tx_queue_len = 0;
|
||||
dev->priv_flags = IFF_EBRIDGE;
|
||||
dev->priv_flags = IFF_EBRIDGE | IFF_NO_QUEUE;
|
||||
|
||||
dev->features = COMMON_FEATURES | NETIF_F_LLTX | NETIF_F_NETNS_LOCAL |
|
||||
NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_STAG_TX;
|
||||
|
||||
+1
-1
@@ -177,7 +177,7 @@ static int transmit(struct cflayer *layer, struct cfpkt *pkt)
|
||||
skb->protocol = htons(ETH_P_CAIF);
|
||||
|
||||
/* Check if we need to handle xoff */
|
||||
if (likely(caifd->netdev->tx_queue_len == 0))
|
||||
if (likely(caifd->netdev->priv_flags & IFF_NO_QUEUE))
|
||||
goto noxoff;
|
||||
|
||||
if (unlikely(caifd->xoff))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user