All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/21] net: Convert drivers to IFF_NO_QUEUE and cleanup afterwards
@ 2015-08-18  8:30 Phil Sutter
  2015-08-18  8:30 ` [PATCH 01/21] net: veth: enable noqueue operation by default Phil Sutter
  2015-08-18 18:56 ` [PATCH 00/21] net: Convert drivers to IFF_NO_QUEUE and cleanup afterwards David Miller
  0 siblings, 2 replies; 32+ messages in thread
From: Phil Sutter @ 2015-08-18  8:30 UTC (permalink / raw)
  To: netdev; +Cc: brouer, davem

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.

Phil Sutter (21):
  net: veth: enable noqueue operation by default
  net: dummy: convert to using IFF_NO_QUEUE
  net: geneve: convert to using IFF_NO_QUEUE
  net: loopback: convert to using IFF_NO_QUEUE
  net: nlmon: convert to using IFF_NO_QUEUE
  net: team: convert to using IFF_NO_QUEUE
  net: vxlan: convert to using IFF_NO_QUEUE
  net: 8021q: convert to using IFF_NO_QUEUE
  net: bridge: convert to using IFF_NO_QUEUE
  net: 6lowpan: convert to using IFF_NO_QUEUE
  net: bonding: convert to using IFF_NO_QUEUE
  net: ipvlan: convert to using IFF_NO_QUEUE
  net: dsa: convert to using IFF_NO_QUEUE
  net: hostap: convert to using IFF_NO_QUEUE
  net: mac80211_hwsim: convert to using IFF_NO_QUEUE
  net: batman-adv: convert to using IFF_NO_QUEUE
  net: hsr: convert to using IFF_NO_QUEUE
  net: caif: convert to using IFF_NO_QUEUE
  staging: wilc1000: convert to using IFF_NO_QUEUE
  net: warn if drivers set tx_queue_len = 0
  net: sched: drop all special handling of tx_queue_len == 0

 drivers/net/bonding/bond_main.c           | 3 +--
 drivers/net/caif/caif_hsi.c               | 2 +-
 drivers/net/caif/caif_serial.c            | 2 +-
 drivers/net/caif/caif_spi.c               | 2 +-
 drivers/net/dummy.c                       | 3 +--
 drivers/net/geneve.c                      | 3 +--
 drivers/net/ipvlan/ipvlan_main.c          | 3 +--
 drivers/net/loopback.c                    | 3 +--
 drivers/net/nlmon.c                       | 2 +-
 drivers/net/team/team.c                   | 2 +-
 drivers/net/veth.c                        | 1 +
 drivers/net/vxlan.c                       | 3 +--
 drivers/net/wan/hdlc_fr.c                 | 2 +-
 drivers/net/wireless/hostap/hostap_main.c | 4 ++--
 drivers/net/wireless/mac80211_hwsim.c     | 2 +-
 drivers/staging/wilc1000/linux_mon.c      | 2 +-
 net/8021q/vlan_dev.c                      | 3 +--
 net/batman-adv/soft-interface.c           | 2 +-
 net/bridge/br_device.c                    | 3 +--
 net/caif/caif_dev.c                       | 2 +-
 net/core/dev.c                            | 3 +++
 net/dsa/slave.c                           | 2 +-
 net/hsr/hsr_device.c                      | 2 +-
 net/ieee802154/6lowpan/core.c             | 2 +-
 net/sched/sch_fifo.c                      | 2 +-
 net/sched/sch_gred.c                      | 8 +++-----
 net/sched/sch_htb.c                       | 6 ++----
 net/sched/sch_plug.c                      | 8 ++------
 net/sched/sch_sfb.c                       | 2 +-
 29 files changed, 36 insertions(+), 48 deletions(-)

-- 
2.1.2

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 01/21] net: veth: enable noqueue operation by default
  2015-08-18  8:30 [PATCH 00/21] net: Convert drivers to IFF_NO_QUEUE and cleanup afterwards Phil Sutter
@ 2015-08-18  8:30 ` Phil Sutter
  2015-08-18  8:30   ` [PATCH 02/21] net: dummy: convert to using IFF_NO_QUEUE Phil Sutter
  2015-08-18 18:56 ` [PATCH 00/21] net: Convert drivers to IFF_NO_QUEUE and cleanup afterwards David Miller
  1 sibling, 1 reply; 32+ messages in thread
From: Phil Sutter @ 2015-08-18  8:30 UTC (permalink / raw)
  To: netdev; +Cc: brouer, davem, Pavel Emelyanov

Signed-off-by: Phil Sutter <phil@nwl.cc>
Cc: Pavel Emelyanov <xemul@openvz.org>
---
 drivers/net/veth.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 343592c..0ef4a5a 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -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;
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 02/21] net: dummy: convert to using IFF_NO_QUEUE
  2015-08-18  8:30 ` [PATCH 01/21] net: veth: enable noqueue operation by default Phil Sutter
@ 2015-08-18  8:30   ` Phil Sutter
  2015-08-18  8:30     ` [PATCH 03/21] net: geneve: " Phil Sutter
  0 siblings, 1 reply; 32+ messages in thread
From: Phil Sutter @ 2015-08-18  8:30 UTC (permalink / raw)
  To: netdev; +Cc: brouer, davem

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 drivers/net/dummy.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c
index 49adbf1..815eb94 100644
--- a/drivers/net/dummy.c
+++ b/drivers/net/dummy.c
@@ -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);
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 03/21] net: geneve: convert to using IFF_NO_QUEUE
  2015-08-18  8:30   ` [PATCH 02/21] net: dummy: convert to using IFF_NO_QUEUE Phil Sutter
@ 2015-08-18  8:30     ` Phil Sutter
  2015-08-18  8:30       ` [PATCH 04/21] net: loopback: " Phil Sutter
  0 siblings, 1 reply; 32+ messages in thread
From: Phil Sutter @ 2015-08-18  8:30 UTC (permalink / raw)
  To: netdev; +Cc: brouer, davem, John W. Linville

Signed-off-by: Phil Sutter <phil@nwl.cc>
Cc: John W. Linville <linville@tuxdriver.com>
---
 drivers/net/geneve.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index 78d49d1..897e1a3 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -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] = {
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 04/21] net: loopback: convert to using IFF_NO_QUEUE
  2015-08-18  8:30     ` [PATCH 03/21] net: geneve: " Phil Sutter
@ 2015-08-18  8:30       ` Phil Sutter
  2015-08-18  8:30         ` [PATCH 05/21] net: nlmon: " Phil Sutter
  0 siblings, 1 reply; 32+ messages in thread
From: Phil Sutter @ 2015-08-18  8:30 UTC (permalink / raw)
  To: netdev; +Cc: brouer, davem

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 drivers/net/loopback.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index c76283c..dc7d970 100644
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -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
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 05/21] net: nlmon: convert to using IFF_NO_QUEUE
  2015-08-18  8:30       ` [PATCH 04/21] net: loopback: " Phil Sutter
@ 2015-08-18  8:30         ` Phil Sutter
  2015-08-18  8:30           ` [PATCH 06/21] net: team: " Phil Sutter
  0 siblings, 1 reply; 32+ messages in thread
From: Phil Sutter @ 2015-08-18  8:30 UTC (permalink / raw)
  To: netdev; +Cc: brouer, davem, Daniel Borkmann

Signed-off-by: Phil Sutter <phil@nwl.cc>
Cc: Daniel Borkmann <dborkman@redhat.com>
---
 drivers/net/nlmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/nlmon.c b/drivers/net/nlmon.c
index 34924df..7b7c70e 100644
--- a/drivers/net/nlmon.c
+++ b/drivers/net/nlmon.c
@@ -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;
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 06/21] net: team: convert to using IFF_NO_QUEUE
  2015-08-18  8:30         ` [PATCH 05/21] net: nlmon: " Phil Sutter
@ 2015-08-18  8:30           ` Phil Sutter
  2015-08-18  8:30             ` [PATCH 07/21] net: vxlan: " Phil Sutter
  0 siblings, 1 reply; 32+ messages in thread
From: Phil Sutter @ 2015-08-18  8:30 UTC (permalink / raw)
  To: netdev; +Cc: brouer, davem, Jiri Pirko

Signed-off-by: Phil Sutter <phil@nwl.cc>
Cc: Jiri Pirko <jiri@resnulli.us>
---
 drivers/net/team/team.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index daa054b..651d35e 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -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
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 07/21] net: vxlan: convert to using IFF_NO_QUEUE
  2015-08-18  8:30           ` [PATCH 06/21] net: team: " Phil Sutter
@ 2015-08-18  8:30             ` Phil Sutter
  2015-08-18  8:30               ` [PATCH 08/21] net: 8021q: " Phil Sutter
  0 siblings, 1 reply; 32+ messages in thread
From: Phil Sutter @ 2015-08-18  8:30 UTC (permalink / raw)
  To: netdev; +Cc: brouer, davem, Stephen Hemminger

Signed-off-by: Phil Sutter <phil@nwl.cc>
Cc: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/vxlan.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 06c0731..ad51dac 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -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);
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 08/21] net: 8021q: convert to using IFF_NO_QUEUE
  2015-08-18  8:30             ` [PATCH 07/21] net: vxlan: " Phil Sutter
@ 2015-08-18  8:30               ` Phil Sutter
  2015-08-18  8:30                 ` [PATCH 09/21] net: bridge: " Phil Sutter
  0 siblings, 1 reply; 32+ messages in thread
From: Phil Sutter @ 2015-08-18  8:30 UTC (permalink / raw)
  To: netdev; +Cc: brouer, davem, Patrick McHardy

Signed-off-by: Phil Sutter <phil@nwl.cc>
Cc: Patrick McHardy <kaber@trash.net>
---
 net/8021q/vlan_dev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 01d7ba8..fded865 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -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;
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 09/21] net: bridge: convert to using IFF_NO_QUEUE
  2015-08-18  8:30               ` [PATCH 08/21] net: 8021q: " Phil Sutter
@ 2015-08-18  8:30                 ` Phil Sutter
  2015-08-18  8:30                   ` [PATCH 10/21] net: 6lowpan: " Phil Sutter
  0 siblings, 1 reply; 32+ messages in thread
From: Phil Sutter @ 2015-08-18  8:30 UTC (permalink / raw)
  To: netdev; +Cc: brouer, davem, Stephen Hemminger

Signed-off-by: Phil Sutter <phil@nwl.cc>
Cc: Stephen Hemminger <stephen@networkplumber.org>
---
 net/bridge/br_device.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index 0aa8f5c..6ed2feb 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -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;
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 10/21] net: 6lowpan: convert to using IFF_NO_QUEUE
  2015-08-18  8:30                 ` [PATCH 09/21] net: bridge: " Phil Sutter
@ 2015-08-18  8:30                   ` Phil Sutter
  2015-08-18  8:30                     ` [PATCH 11/21] net: bonding: " Phil Sutter
  0 siblings, 1 reply; 32+ messages in thread
From: Phil Sutter @ 2015-08-18  8:30 UTC (permalink / raw)
  To: netdev; +Cc: brouer, davem, Alexander Aring

Signed-off-by: Phil Sutter <phil@nwl.cc>
Cc: Alexander Aring <alex.aring@gmail.com>
---
 net/ieee802154/6lowpan/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ieee802154/6lowpan/core.c b/net/ieee802154/6lowpan/core.c
index f20a387..d7fb995 100644
--- a/net/ieee802154/6lowpan/core.c
+++ b/net/ieee802154/6lowpan/core.c
@@ -91,7 +91,7 @@ static void lowpan_setup(struct net_device *dev)
 	dev->hard_header_len	= 2 + 1 + 20 + 14;
 	dev->needed_tailroom	= 2; /* FCS */
 	dev->mtu		= IPV6_MIN_MTU;
-	dev->tx_queue_len	= 0;
+	dev->priv_flags		|= IFF_NO_QUEUE;
 	dev->flags		= IFF_BROADCAST | IFF_MULTICAST;
 	dev->watchdog_timeo	= 0;
 
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 11/21] net: bonding: convert to using IFF_NO_QUEUE
  2015-08-18  8:30                   ` [PATCH 10/21] net: 6lowpan: " Phil Sutter
@ 2015-08-18  8:30                     ` Phil Sutter
  2015-08-18  8:30                       ` [PATCH 12/21] net: ipvlan: " Phil Sutter
  0 siblings, 1 reply; 32+ messages in thread
From: Phil Sutter @ 2015-08-18  8:30 UTC (permalink / raw)
  To: netdev; +Cc: brouer, davem, Jay Vosburgh, Veaceslav Falico, Andy Gospodarek

Signed-off-by: Phil Sutter <phil@nwl.cc>
Cc: Jay Vosburgh <j.vosburgh@gmail.com>
Cc: Veaceslav Falico <vfalico@gmail.com>
Cc: Andy Gospodarek <gospo@cumulusnetworks.com>
---
 drivers/net/bonding/bond_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 2d7d72c..0ef2ed3 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -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 */
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 12/21] net: ipvlan: convert to using IFF_NO_QUEUE
  2015-08-18  8:30                     ` [PATCH 11/21] net: bonding: " Phil Sutter
@ 2015-08-18  8:30                       ` Phil Sutter
  2015-08-18  8:30                         ` [PATCH 13/21] net: dsa: " Phil Sutter
  0 siblings, 1 reply; 32+ messages in thread
From: Phil Sutter @ 2015-08-18  8:30 UTC (permalink / raw)
  To: netdev; +Cc: brouer, davem, Mahesh Bandewar

Signed-off-by: Phil Sutter <phil@nwl.cc>
Cc: Mahesh Bandewar <maheshb@google.com>
---
 drivers/net/ipvlan/ipvlan_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
index 20b58bd..a9268db 100644
--- a/drivers/net/ipvlan/ipvlan_main.c
+++ b/drivers/net/ipvlan/ipvlan_main.c
@@ -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] =
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 13/21] net: dsa: convert to using IFF_NO_QUEUE
  2015-08-18  8:30                       ` [PATCH 12/21] net: ipvlan: " Phil Sutter
@ 2015-08-18  8:30                         ` Phil Sutter
  2015-08-18  8:30                           ` [PATCH 14/21] net: hostap: " Phil Sutter
  0 siblings, 1 reply; 32+ messages in thread
From: Phil Sutter @ 2015-08-18  8:30 UTC (permalink / raw)
  To: netdev; +Cc: brouer, davem, Lennert Buytenhek

Signed-off-by: Phil Sutter <phil@nwl.cc>
Cc: Lennert Buytenhek <buytenh@wantstofly.org>
---
 net/dsa/slave.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 373ff31..cce9738 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -1147,7 +1147,7 @@ int dsa_slave_create(struct dsa_switch *ds, struct device *parent,
 	slave_dev->features = master->vlan_features;
 	slave_dev->ethtool_ops = &dsa_slave_ethtool_ops;
 	eth_hw_addr_inherit(slave_dev, master);
-	slave_dev->tx_queue_len = 0;
+	slave_dev->priv_flags |= IFF_NO_QUEUE;
 	slave_dev->netdev_ops = &dsa_slave_netdev_ops;
 	slave_dev->switchdev_ops = &dsa_slave_switchdev_ops;
 
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 14/21] net: hostap: convert to using IFF_NO_QUEUE
  2015-08-18  8:30                         ` [PATCH 13/21] net: dsa: " Phil Sutter
@ 2015-08-18  8:30                           ` Phil Sutter
  2015-08-18  8:30                             ` [PATCH 15/21] net: mac80211_hwsim: " Phil Sutter
  0 siblings, 1 reply; 32+ messages in thread
From: Phil Sutter @ 2015-08-18  8:30 UTC (permalink / raw)
  To: netdev; +Cc: brouer, davem, Jouni Malinen

Signed-off-by: Phil Sutter <phil@nwl.cc>
Cc: Jouni Malinen <j@w1.fi>
---
 drivers/net/wireless/hostap/hostap_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c
index 01de1a3..80d4228 100644
--- a/drivers/net/wireless/hostap/hostap_main.c
+++ b/drivers/net/wireless/hostap/hostap_main.c
@@ -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;
 	}
 
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 15/21] net: mac80211_hwsim: convert to using IFF_NO_QUEUE
  2015-08-18  8:30                           ` [PATCH 14/21] net: hostap: " Phil Sutter
@ 2015-08-18  8:30                             ` Phil Sutter
  2015-08-18  8:30                               ` [PATCH 16/21] net: batman-adv: " Phil Sutter
  2015-08-18  8:43                               ` [PATCH 15/21] net: mac80211_hwsim: convert to using IFF_NO_QUEUE Johannes Berg
  0 siblings, 2 replies; 32+ messages in thread
From: Phil Sutter @ 2015-08-18  8:30 UTC (permalink / raw)
  To: netdev; +Cc: brouer, davem, Johannes Berg

Signed-off-by: Phil Sutter <phil@nwl.cc>
Cc: Johannes Berg <johannes@sipsolutions.net>
---
 drivers/net/wireless/mac80211_hwsim.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 99e873d..a1dbcb2 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2676,7 +2676,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;
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 16/21] net: batman-adv: convert to using IFF_NO_QUEUE
  2015-08-18  8:30                             ` [PATCH 15/21] net: mac80211_hwsim: " Phil Sutter
@ 2015-08-18  8:30                               ` Phil Sutter
  2015-08-18  8:30                                 ` [PATCH 17/21] net: hsr: " Phil Sutter
  2015-08-18  8:43                               ` [PATCH 15/21] net: mac80211_hwsim: convert to using IFF_NO_QUEUE Johannes Berg
  1 sibling, 1 reply; 32+ messages in thread
From: Phil Sutter @ 2015-08-18  8:30 UTC (permalink / raw)
  To: netdev; +Cc: brouer, davem, Marek Lindner, Simon Wunderlich, Antonio Quartulli

Signed-off-by: Phil Sutter <phil@nwl.cc>
Cc: Marek Lindner <mareklindner@neomailbox.ch>
Cc: Simon Wunderlich <sw@simonwunderlich.de>
Cc: Antonio Quartulli <antonio@meshcoding.com>
---
 net/batman-adv/soft-interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index a2fc843..c452bc6 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -936,7 +936,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
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 17/21] net: hsr: convert to using IFF_NO_QUEUE
  2015-08-18  8:30                               ` [PATCH 16/21] net: batman-adv: " Phil Sutter
@ 2015-08-18  8:30                                 ` Phil Sutter
  2015-08-18  8:30                                   ` [PATCH 18/21] net: caif: " Phil Sutter
  0 siblings, 1 reply; 32+ messages in thread
From: Phil Sutter @ 2015-08-18  8:30 UTC (permalink / raw)
  To: netdev; +Cc: brouer, davem, Arvid Brodin

Signed-off-by: Phil Sutter <phil@nwl.cc>
Cc: Arvid Brodin <arvid.brodin@alten.se>
---
 net/hsr/hsr_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/hsr/hsr_device.c b/net/hsr/hsr_device.c
index 44d2746..35a9788 100644
--- a/net/hsr/hsr_device.c
+++ b/net/hsr/hsr_device.c
@@ -392,7 +392,7 @@ void hsr_dev_setup(struct net_device *dev)
 	dev->header_ops = &hsr_header_ops;
 	dev->netdev_ops = &hsr_device_ops;
 	SET_NETDEV_DEVTYPE(dev, &hsr_type);
-	dev->tx_queue_len = 0;
+	dev->priv_flags |= IFF_NO_QUEUE;
 
 	dev->destructor = hsr_dev_destroy;
 
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 18/21] net: caif: convert to using IFF_NO_QUEUE
  2015-08-18  8:30                                 ` [PATCH 17/21] net: hsr: " Phil Sutter
@ 2015-08-18  8:30                                   ` Phil Sutter
  2015-08-18  8:30                                     ` [PATCH 19/21] staging: wilc1000: " Phil Sutter
  0 siblings, 1 reply; 32+ messages in thread
From: Phil Sutter @ 2015-08-18  8:30 UTC (permalink / raw)
  To: netdev; +Cc: brouer, davem, Dmitry Tarnyagin

Signed-off-by: Phil Sutter <phil@nwl.cc>
Cc: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
---
 drivers/net/caif/caif_hsi.c    | 2 +-
 drivers/net/caif/caif_serial.c | 2 +-
 drivers/net/caif/caif_spi.c    | 2 +-
 drivers/net/wan/hdlc_fr.c      | 2 +-
 net/caif/caif_dev.c            | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/caif/caif_hsi.c b/drivers/net/caif/caif_hsi.c
index b3b922a..615c65d 100644
--- a/drivers/net/caif/caif_hsi.c
+++ b/drivers/net/caif/caif_hsi.c
@@ -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)
diff --git a/drivers/net/caif/caif_serial.c b/drivers/net/caif/caif_serial.c
index 9da0653..c2dea49 100644
--- a/drivers/net/caif/caif_serial.c
+++ b/drivers/net/caif/caif_serial.c
@@ -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;
diff --git a/drivers/net/caif/caif_spi.c b/drivers/net/caif/caif_spi.c
index 72ea9ff..de39620 100644
--- a/drivers/net/caif/caif_spi.c
+++ b/drivers/net/caif/caif_spi.c
@@ -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);
diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c
index 3ebed1c..e92aaf6 100644
--- a/drivers/net/wan/hdlc_fr.c
+++ b/drivers/net/wan/hdlc_fr.c
@@ -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) {
diff --git a/net/caif/caif_dev.c b/net/caif/caif_dev.c
index edbca46..d730a0f 100644
--- a/net/caif/caif_dev.c
+++ b/net/caif/caif_dev.c
@@ -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))
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 19/21] staging: wilc1000: convert to using IFF_NO_QUEUE
  2015-08-18  8:30                                   ` [PATCH 18/21] net: caif: " Phil Sutter
@ 2015-08-18  8:30                                     ` Phil Sutter
  2015-08-18  8:30                                       ` [PATCH 20/21] net: warn if drivers set tx_queue_len = 0 Phil Sutter
  0 siblings, 1 reply; 32+ messages in thread
From: Phil Sutter @ 2015-08-18  8:30 UTC (permalink / raw)
  To: netdev; +Cc: brouer, davem, Johnny Kim, Rachel Kim, Dean Lee, Chris Park

Signed-off-by: Phil Sutter <phil@nwl.cc>
Cc: Johnny Kim <johnny.kim@atmel.com>
Cc: Rachel Kim <rachel.kim@atmel.com>
Cc: Dean Lee <dean.lee@atmel.com>
Cc: Chris Park <chris.park@atmel.com>
---
 drivers/staging/wilc1000/linux_mon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c
index f5296f5..a1f66ad 100644
--- a/drivers/staging/wilc1000/linux_mon.c
+++ b/drivers/staging/wilc1000/linux_mon.c
@@ -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);
 
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 20/21] net: warn if drivers set tx_queue_len = 0
  2015-08-18  8:30                                     ` [PATCH 19/21] staging: wilc1000: " Phil Sutter
@ 2015-08-18  8:30                                       ` Phil Sutter
  2015-08-18  8:30                                         ` [PATCH 21/21] net: sched: drop all special handling of tx_queue_len == 0 Phil Sutter
  2015-08-18 14:47                                         ` [PATCH 20/21] net: warn if drivers set tx_queue_len = 0 Eric Dumazet
  0 siblings, 2 replies; 32+ messages in thread
From: Phil Sutter @ 2015-08-18  8:30 UTC (permalink / raw)
  To: netdev; +Cc: brouer, davem

Due to the introduction of IFF_NO_QUEUE, there is a better way for
drivers to indicate that no qdisc should be attached by default. Though,
the old convention can't be dropped since ignoring that setting would
break drivers still using it. Instead, add a warning so out-of-tree
driver maintainers get a chance to adjust their code before we finally
get rid of any special handling of tx_queue_len == 0.

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 net/core/dev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/core/dev.c b/net/core/dev.c
index 4870c35..b1f3f48 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -6997,6 +6997,9 @@ struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
 	dev->priv_flags = IFF_XMIT_DST_RELEASE | IFF_XMIT_DST_RELEASE_PERM;
 	setup(dev);
 
+	if (!dev->tx_queue_len)
+		printk(KERN_WARNING "%s uses DEPRECATED zero tx_queue_len - convert driver to use IFF_NO_QUEUE instead.\n", name);
+
 	dev->num_tx_queues = txqs;
 	dev->real_num_tx_queues = txqs;
 	if (netif_alloc_netdev_queues(dev))
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 21/21] net: sched: drop all special handling of tx_queue_len == 0
  2015-08-18  8:30                                       ` [PATCH 20/21] net: warn if drivers set tx_queue_len = 0 Phil Sutter
@ 2015-08-18  8:30                                         ` Phil Sutter
  2015-08-18 14:47                                         ` [PATCH 20/21] net: warn if drivers set tx_queue_len = 0 Eric Dumazet
  1 sibling, 0 replies; 32+ messages in thread
From: Phil Sutter @ 2015-08-18  8:30 UTC (permalink / raw)
  To: netdev; +Cc: brouer, davem, Jamal Hadi Salim

Those were all workarounds for the formerly double meaning of
tx_queue_len, which broke scheduling algorithms if untreated.

Now that all in-tree drivers have been converted away from setting
tx_queue_len = 0, it should be safe to drop these workarounds for
categorically broken setups.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
---
 net/sched/sch_fifo.c | 2 +-
 net/sched/sch_gred.c | 8 +++-----
 net/sched/sch_htb.c  | 6 ++----
 net/sched/sch_plug.c | 8 ++------
 net/sched/sch_sfb.c  | 2 +-
 5 files changed, 9 insertions(+), 17 deletions(-)

diff --git a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c
index 2e2398c..2177eac 100644
--- a/net/sched/sch_fifo.c
+++ b/net/sched/sch_fifo.c
@@ -54,7 +54,7 @@ static int fifo_init(struct Qdisc *sch, struct nlattr *opt)
 	bool is_bfifo = sch->ops == &bfifo_qdisc_ops;
 
 	if (opt == NULL) {
-		u32 limit = qdisc_dev(sch)->tx_queue_len ? : 1;
+		u32 limit = qdisc_dev(sch)->tx_queue_len;
 
 		if (is_bfifo)
 			limit *= psched_mtu(qdisc_dev(sch));
diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c
index abb9f2f..8010510 100644
--- a/net/sched/sch_gred.c
+++ b/net/sched/sch_gred.c
@@ -512,11 +512,9 @@ static int gred_init(struct Qdisc *sch, struct nlattr *opt)
 
 	if (tb[TCA_GRED_LIMIT])
 		sch->limit = nla_get_u32(tb[TCA_GRED_LIMIT]);
-	else {
-		u32 qlen = qdisc_dev(sch)->tx_queue_len ? : 1;
-
-		sch->limit = qlen * psched_mtu(qdisc_dev(sch));
-	}
+	else
+		sch->limit = qdisc_dev(sch)->tx_queue_len
+		             * psched_mtu(qdisc_dev(sch));
 
 	return gred_change_table_def(sch, tb[TCA_GRED_DPS]);
 }
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index f1acb0f..cf4b0f8 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -1048,11 +1048,9 @@ static int htb_init(struct Qdisc *sch, struct nlattr *opt)
 
 	if (tb[TCA_HTB_DIRECT_QLEN])
 		q->direct_qlen = nla_get_u32(tb[TCA_HTB_DIRECT_QLEN]);
-	else {
+	else
 		q->direct_qlen = qdisc_dev(sch)->tx_queue_len;
-		if (q->direct_qlen < 2)	/* some devices have zero tx_queue_len */
-			q->direct_qlen = 2;
-	}
+
 	if ((q->rate2quantum = gopt->rate2quantum) < 1)
 		q->rate2quantum = 1;
 	q->defcls = gopt->defcls;
diff --git a/net/sched/sch_plug.c b/net/sched/sch_plug.c
index ade9445..5abfe44 100644
--- a/net/sched/sch_plug.c
+++ b/net/sched/sch_plug.c
@@ -130,12 +130,8 @@ static int plug_init(struct Qdisc *sch, struct nlattr *opt)
 	q->unplug_indefinite = false;
 
 	if (opt == NULL) {
-		/* We will set a default limit of 100 pkts (~150kB)
-		 * in case tx_queue_len is not available. The
-		 * default value is completely arbitrary.
-		 */
-		u32 pkt_limit = qdisc_dev(sch)->tx_queue_len ? : 100;
-		q->limit = pkt_limit * psched_mtu(qdisc_dev(sch));
+		q->limit = qdisc_dev(sch)->tx_queue_len
+		           * psched_mtu(qdisc_dev(sch));
 	} else {
 		struct tc_plug_qopt *ctl = nla_data(opt);
 
diff --git a/net/sched/sch_sfb.c b/net/sched/sch_sfb.c
index 4b81519..dcdff5c 100644
--- a/net/sched/sch_sfb.c
+++ b/net/sched/sch_sfb.c
@@ -502,7 +502,7 @@ static int sfb_change(struct Qdisc *sch, struct nlattr *opt)
 
 	limit = ctl->limit;
 	if (limit == 0)
-		limit = max_t(u32, qdisc_dev(sch)->tx_queue_len, 1);
+		limit = qdisc_dev(sch)->tx_queue_len;
 
 	child = fifo_create_dflt(sch, &pfifo_qdisc_ops, limit);
 	if (IS_ERR(child))
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 32+ messages in thread

* Re: [PATCH 15/21] net: mac80211_hwsim: convert to using IFF_NO_QUEUE
  2015-08-18  8:30                             ` [PATCH 15/21] net: mac80211_hwsim: " Phil Sutter
  2015-08-18  8:30                               ` [PATCH 16/21] net: batman-adv: " Phil Sutter
@ 2015-08-18  8:43                               ` Johannes Berg
  2015-08-18 18:54                                 ` David Miller
  1 sibling, 1 reply; 32+ messages in thread
From: Johannes Berg @ 2015-08-18  8:43 UTC (permalink / raw)
  To: Phil Sutter, netdev; +Cc: brouer, davem

On Tue, 2015-08-18 at 10:30 +0200, Phil Sutter wrote:
> Signed-off-by: Phil Sutter <phil@nwl.cc>
> Cc: Johannes Berg <johannes@sipsolutions.net>
> ---
>  drivers/net/wireless/mac80211_hwsim.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/mac80211_hwsim.c 
> b/drivers/net/wireless/mac80211_hwsim.c
> index 99e873d..a1dbcb2 100644
> --- a/drivers/net/wireless/mac80211_hwsim.c
> +++ b/drivers/net/wireless/mac80211_hwsim.c
> @@ -2676,7 +2676,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;
> 
Fine with me; Dave, are you going to pick up the entire series
(presumably there was one, I only got this patch)?

Note that there's no TX possible on this particular netdev anyway.

johannes

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 20/21] net: warn if drivers set tx_queue_len = 0
  2015-08-18  8:30                                       ` [PATCH 20/21] net: warn if drivers set tx_queue_len = 0 Phil Sutter
  2015-08-18  8:30                                         ` [PATCH 21/21] net: sched: drop all special handling of tx_queue_len == 0 Phil Sutter
@ 2015-08-18 14:47                                         ` Eric Dumazet
  2015-08-18 18:14                                           ` Phil Sutter
  2015-08-19 18:39                                           ` Phil Sutter
  1 sibling, 2 replies; 32+ messages in thread
From: Eric Dumazet @ 2015-08-18 14:47 UTC (permalink / raw)
  To: Phil Sutter; +Cc: netdev, brouer, davem

On Tue, 2015-08-18 at 10:30 +0200, Phil Sutter wrote:
> Due to the introduction of IFF_NO_QUEUE, there is a better way for
> drivers to indicate that no qdisc should be attached by default. Though,
> the old convention can't be dropped since ignoring that setting would
> break drivers still using it. Instead, add a warning so out-of-tree
> driver maintainers get a chance to adjust their code before we finally
> get rid of any special handling of tx_queue_len == 0.

How an admin can remove qdisc on a regular ethernet device with this
schem ?

I was doing :

tc qdisc replace dev eth0 root pfifo
ifconfig eth0 txqueuelen 0
tc qdisc del dev eth0 root


I see nothing in your patches to avoid the DEPRECATED warning.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 20/21] net: warn if drivers set tx_queue_len = 0
  2015-08-18 14:47                                         ` [PATCH 20/21] net: warn if drivers set tx_queue_len = 0 Eric Dumazet
@ 2015-08-18 18:14                                           ` Phil Sutter
  2015-08-19 18:39                                           ` Phil Sutter
  1 sibling, 0 replies; 32+ messages in thread
From: Phil Sutter @ 2015-08-18 18:14 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev, brouer, davem

On Tue, Aug 18, 2015 at 07:47:28AM -0700, Eric Dumazet wrote:
> On Tue, 2015-08-18 at 10:30 +0200, Phil Sutter wrote:
> > Due to the introduction of IFF_NO_QUEUE, there is a better way for
> > drivers to indicate that no qdisc should be attached by default. Though,
> > the old convention can't be dropped since ignoring that setting would
> > break drivers still using it. Instead, add a warning so out-of-tree
> > driver maintainers get a chance to adjust their code before we finally
> > get rid of any special handling of tx_queue_len == 0.
> 
> How an admin can remove qdisc on a regular ethernet device with this
> schem ?
> 
> I was doing :
> 
> tc qdisc replace dev eth0 root pfifo
> ifconfig eth0 txqueuelen 0
> tc qdisc del dev eth0 root
> 
> 
> I see nothing in your patches to avoid the DEPRECATED warning.

Well, the warning is printed only upon interface registration, so
affects only drivers which set tx_queue_len = 0 by default. If you do
the above, you won't hit that check.

But you've got a point here: If we drop the special handling of
tx_queue_len == 0, there won't be any chance to change a non-virtual
interface's qdisc to noqueue anymore. This is definitely something to
reconsider before going any further.

Thanks, Phil

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 15/21] net: mac80211_hwsim: convert to using IFF_NO_QUEUE
  2015-08-18  8:43                               ` [PATCH 15/21] net: mac80211_hwsim: convert to using IFF_NO_QUEUE Johannes Berg
@ 2015-08-18 18:54                                 ` David Miller
  0 siblings, 0 replies; 32+ messages in thread
From: David Miller @ 2015-08-18 18:54 UTC (permalink / raw)
  To: johannes; +Cc: phil, netdev, brouer

From: Johannes Berg <johannes@sipsolutions.net>
Date: Tue, 18 Aug 2015 10:43:55 +0200

> On Tue, 2015-08-18 at 10:30 +0200, Phil Sutter wrote:
>> Signed-off-by: Phil Sutter <phil@nwl.cc>
>> Cc: Johannes Berg <johannes@sipsolutions.net>
>> ---
>>  drivers/net/wireless/mac80211_hwsim.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/net/wireless/mac80211_hwsim.c 
>> b/drivers/net/wireless/mac80211_hwsim.c
>> index 99e873d..a1dbcb2 100644
>> --- a/drivers/net/wireless/mac80211_hwsim.c
>> +++ b/drivers/net/wireless/mac80211_hwsim.c
>> @@ -2676,7 +2676,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;
>> 
> Fine with me; Dave, are you going to pick up the entire series
> (presumably there was one, I only got this patch)?
> 
> Note that there's no TX possible on this particular netdev anyway.

Yes, I'm going to take the full series.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 00/21] net: Convert drivers to IFF_NO_QUEUE and cleanup afterwards
  2015-08-18  8:30 [PATCH 00/21] net: Convert drivers to IFF_NO_QUEUE and cleanup afterwards Phil Sutter
  2015-08-18  8:30 ` [PATCH 01/21] net: veth: enable noqueue operation by default Phil Sutter
@ 2015-08-18 18:56 ` David Miller
  1 sibling, 0 replies; 32+ messages in thread
From: David Miller @ 2015-08-18 18:56 UTC (permalink / raw)
  To: phil; +Cc: netdev, brouer

From: Phil Sutter <phil@nwl.cc>
Date: Tue, 18 Aug 2015 10:30:28 +0200

> 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.

I've applied this series, but please address the removal of trivial qdiscs issue
that Eric Dumazet brought up.

Thanks.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 20/21] net: warn if drivers set tx_queue_len = 0
  2015-08-18 14:47                                         ` [PATCH 20/21] net: warn if drivers set tx_queue_len = 0 Eric Dumazet
  2015-08-18 18:14                                           ` Phil Sutter
@ 2015-08-19 18:39                                           ` Phil Sutter
  2015-08-19 20:21                                             ` Phil Sutter
  1 sibling, 1 reply; 32+ messages in thread
From: Phil Sutter @ 2015-08-19 18:39 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev, brouer, davem

Hi,

On Tue, Aug 18, 2015 at 07:47:28AM -0700, Eric Dumazet wrote:
> On Tue, 2015-08-18 at 10:30 +0200, Phil Sutter wrote:
> > Due to the introduction of IFF_NO_QUEUE, there is a better way for
> > drivers to indicate that no qdisc should be attached by default. Though,
> > the old convention can't be dropped since ignoring that setting would
> > break drivers still using it. Instead, add a warning so out-of-tree
> > driver maintainers get a chance to adjust their code before we finally
> > get rid of any special handling of tx_queue_len == 0.
> 
> How an admin can remove qdisc on a regular ethernet device with this
> schem ?
> 
> I was doing :
> 
> tc qdisc replace dev eth0 root pfifo
> ifconfig eth0 txqueuelen 0
> tc qdisc del dev eth0 root

I have a hack wich exports the noqueue qdisc like any other standard
one, so it can be attached to a device. Semantics is a bit odd, though:

| # tc qd show dev eth0
| qdisc pfifo_fast 0: root refcnt 2 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
| # tc qd add dev eth0 root pfifo
| # tc qd show dev eth0
| qdisc pfifo 8003: root refcnt 2 limit 1000p
| # tc qd del dev eth0 root
| # tc qd show dev eth0
| qdisc pfifo_fast 0: root refcnt 2 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
| # tc qd add dev eth0 root noqueue
| # tc qd show dev eth0
| # tc qd del dev eth0 root
| RTNETLINK answers: No such file or directory

So whenn I "add" the noqueue qdisc, it actually leads to no qdisc
attached, and none can be removed afterwards. To recover from this
situation, I have to temporarily attach a different qdisc:

| # tc qd add dev eth0 root pfifo
| # tc qd show dev eth0
| qdisc pfifo 8005: root refcnt 2 limit 1000p
| # tc qd del dev eth0 root
| # tc qd show dev eth0
| qdisc pfifo_fast 0: root refcnt 2 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1

This was the quick'n'dirty approach, and I am not satisfied with the
outcome. Instead, I would suggest to have the following:

- noqueue is really the "no queue" like it says, so 'tc qd del root'
  attaches noqueue, no matter if virtual or physical interface
- physical interfaces get pfifo_fast by default, which can be removed to
  get noqueue

This has a few implications:

- the "default" qdisc (pfifo_fast or noqueue) becomes the "initial"
  qdisc
- pfifo_fast needs to be exported, so users can go back to the "initial"
  qdisc of physical devices after having removed it

I'll start implementing the above immediately, but would appreciate to
hear your comments on it meanwhile. I wonder especially what makes the
difference between pfifo and pfifo_fast and why the latter can't be
selected explicitly by a user yet. Are there any good reasons for it
aside from it being the "default" and therefore selecting it can be done
by having tx_queue_len > 0 and removing the root qdisc?

Thanks, Phil

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 20/21] net: warn if drivers set tx_queue_len = 0
  2015-08-19 18:39                                           ` Phil Sutter
@ 2015-08-19 20:21                                             ` Phil Sutter
  2015-08-19 20:31                                               ` Eric Dumazet
  0 siblings, 1 reply; 32+ messages in thread
From: Phil Sutter @ 2015-08-19 20:21 UTC (permalink / raw)
  To: Eric Dumazet, netdev, brouer, davem

On Wed, Aug 19, 2015 at 08:39:24PM +0200, Phil Sutter wrote:
[...]
> I'll start implementing the above immediately, but would appreciate to
> hear your comments on it meanwhile. I wonder especially what makes the
> difference between pfifo and pfifo_fast and why the latter can't be
> selected explicitly by a user yet. Are there any good reasons for it
> aside from it being the "default" and therefore selecting it can be done
> by having tx_queue_len > 0 and removing the root qdisc?

Please ignore most of my questions regarding pfifo_fast here. I based my
assumptions upon 'tc' utility of RHEL7, which is buggy in that it does
not allow to add qdiscs which do not support extra options. Using
mainline tc, pfifo_fast can be attached just like any other qdisc.

Sorry for the noise,

Phil

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 20/21] net: warn if drivers set tx_queue_len = 0
  2015-08-19 20:21                                             ` Phil Sutter
@ 2015-08-19 20:31                                               ` Eric Dumazet
  2015-08-19 20:33                                                 ` Eric Dumazet
  0 siblings, 1 reply; 32+ messages in thread
From: Eric Dumazet @ 2015-08-19 20:31 UTC (permalink / raw)
  To: Phil Sutter; +Cc: netdev, brouer, davem

On Wed, 2015-08-19 at 22:21 +0200, Phil Sutter wrote:
> On Wed, Aug 19, 2015 at 08:39:24PM +0200, Phil Sutter wrote:
> [...]
> > I'll start implementing the above immediately, but would appreciate to
> > hear your comments on it meanwhile. I wonder especially what makes the
> > difference between pfifo and pfifo_fast and why the latter can't be
> > selected explicitly by a user yet. Are there any good reasons for it
> > aside from it being the "default" and therefore selecting it can be done
> > by having tx_queue_len > 0 and removing the root qdisc?
> 
> Please ignore most of my questions regarding pfifo_fast here. I based my
> assumptions upon 'tc' utility of RHEL7, which is buggy in that it does
> not allow to add qdiscs which do not support extra options. Using
> mainline tc, pfifo_fast can be attached just like any other qdisc.
> 
> Sorry for the noise,

Yes, I was about to send you :

lpaa5:~# tc qd sh dev eth1
qdisc mq 0: root 
qdisc fq 0: parent :4 limit 10000p flow_limit 1000p buckets 1024 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 quantum 3028 initial_quantum 15140 
qdisc fq 0: parent :3 limit 10000p flow_limit 1000p buckets 1024 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 quantum 3028 initial_quantum 15140 
qdisc fq 0: parent :2 limit 10000p flow_limit 1000p buckets 1024 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 quantum 3028 initial_quantum 15140 
qdisc fq 0: parent :1 limit 10000p flow_limit 1000p buckets 1024 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 quantum 3028 initial_quantum 15140 
lpaa5:~# tc qd replace dev eth1 root pfifo_fast
lpaa5:~# tc -s -d qd sh dev eth1
qdisc pfifo_fast 8003: root refcnt 45 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
 Sent 2662 bytes 22 pkt (dropped 0, overlimits 0 requeues 0) 
 backlog 0b 0p requeues 0 

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 20/21] net: warn if drivers set tx_queue_len = 0
  2015-08-19 20:31                                               ` Eric Dumazet
@ 2015-08-19 20:33                                                 ` Eric Dumazet
  2015-08-19 21:04                                                   ` Phil Sutter
  0 siblings, 1 reply; 32+ messages in thread
From: Eric Dumazet @ 2015-08-19 20:33 UTC (permalink / raw)
  To: Phil Sutter; +Cc: netdev, brouer, davem

On Wed, 2015-08-19 at 13:31 -0700, Eric Dumazet wrote:

> lpaa5:~# tc qd sh dev eth1
> qdisc mq 0: root 
> qdisc fq 0: parent :4 limit 10000p flow_limit 1000p buckets 1024 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 quantum 3028 initial_quantum 15140 
> qdisc fq 0: parent :3 limit 10000p flow_limit 1000p buckets 1024 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 quantum 3028 initial_quantum 15140 
> qdisc fq 0: parent :2 limit 10000p flow_limit 1000p buckets 1024 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 quantum 3028 initial_quantum 15140 
> qdisc fq 0: parent :1 limit 10000p flow_limit 1000p buckets 1024 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 quantum 3028 initial_quantum 15140 

Well, it seems I just leaked fact that we use 3-bands in our fq
implementation ;)

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 20/21] net: warn if drivers set tx_queue_len = 0
  2015-08-19 20:33                                                 ` Eric Dumazet
@ 2015-08-19 21:04                                                   ` Phil Sutter
  0 siblings, 0 replies; 32+ messages in thread
From: Phil Sutter @ 2015-08-19 21:04 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev, brouer, davem

On Wed, Aug 19, 2015 at 01:33:40PM -0700, Eric Dumazet wrote:
> On Wed, 2015-08-19 at 13:31 -0700, Eric Dumazet wrote:
> 
> > lpaa5:~# tc qd sh dev eth1
> > qdisc mq 0: root 
> > qdisc fq 0: parent :4 limit 10000p flow_limit 1000p buckets 1024 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 quantum 3028 initial_quantum 15140 
> > qdisc fq 0: parent :3 limit 10000p flow_limit 1000p buckets 1024 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 quantum 3028 initial_quantum 15140 
> > qdisc fq 0: parent :2 limit 10000p flow_limit 1000p buckets 1024 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 quantum 3028 initial_quantum 15140 
> > qdisc fq 0: parent :1 limit 10000p flow_limit 1000p buckets 1024 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1 quantum 3028 initial_quantum 15140 
> 
> Well, it seems I just leaked fact that we use 3-bands in our fq
> implementation ;)

The problem with subtle details is they cease to be if pointed out. In
another episode I was about to ask who the ominous "we" are, but then I
noticed your mail's message ID. :)

Cheers, Phil

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2015-08-19 21:04 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-18  8:30 [PATCH 00/21] net: Convert drivers to IFF_NO_QUEUE and cleanup afterwards Phil Sutter
2015-08-18  8:30 ` [PATCH 01/21] net: veth: enable noqueue operation by default Phil Sutter
2015-08-18  8:30   ` [PATCH 02/21] net: dummy: convert to using IFF_NO_QUEUE Phil Sutter
2015-08-18  8:30     ` [PATCH 03/21] net: geneve: " Phil Sutter
2015-08-18  8:30       ` [PATCH 04/21] net: loopback: " Phil Sutter
2015-08-18  8:30         ` [PATCH 05/21] net: nlmon: " Phil Sutter
2015-08-18  8:30           ` [PATCH 06/21] net: team: " Phil Sutter
2015-08-18  8:30             ` [PATCH 07/21] net: vxlan: " Phil Sutter
2015-08-18  8:30               ` [PATCH 08/21] net: 8021q: " Phil Sutter
2015-08-18  8:30                 ` [PATCH 09/21] net: bridge: " Phil Sutter
2015-08-18  8:30                   ` [PATCH 10/21] net: 6lowpan: " Phil Sutter
2015-08-18  8:30                     ` [PATCH 11/21] net: bonding: " Phil Sutter
2015-08-18  8:30                       ` [PATCH 12/21] net: ipvlan: " Phil Sutter
2015-08-18  8:30                         ` [PATCH 13/21] net: dsa: " Phil Sutter
2015-08-18  8:30                           ` [PATCH 14/21] net: hostap: " Phil Sutter
2015-08-18  8:30                             ` [PATCH 15/21] net: mac80211_hwsim: " Phil Sutter
2015-08-18  8:30                               ` [PATCH 16/21] net: batman-adv: " Phil Sutter
2015-08-18  8:30                                 ` [PATCH 17/21] net: hsr: " Phil Sutter
2015-08-18  8:30                                   ` [PATCH 18/21] net: caif: " Phil Sutter
2015-08-18  8:30                                     ` [PATCH 19/21] staging: wilc1000: " Phil Sutter
2015-08-18  8:30                                       ` [PATCH 20/21] net: warn if drivers set tx_queue_len = 0 Phil Sutter
2015-08-18  8:30                                         ` [PATCH 21/21] net: sched: drop all special handling of tx_queue_len == 0 Phil Sutter
2015-08-18 14:47                                         ` [PATCH 20/21] net: warn if drivers set tx_queue_len = 0 Eric Dumazet
2015-08-18 18:14                                           ` Phil Sutter
2015-08-19 18:39                                           ` Phil Sutter
2015-08-19 20:21                                             ` Phil Sutter
2015-08-19 20:31                                               ` Eric Dumazet
2015-08-19 20:33                                                 ` Eric Dumazet
2015-08-19 21:04                                                   ` Phil Sutter
2015-08-18  8:43                               ` [PATCH 15/21] net: mac80211_hwsim: convert to using IFF_NO_QUEUE Johannes Berg
2015-08-18 18:54                                 ` David Miller
2015-08-18 18:56 ` [PATCH 00/21] net: Convert drivers to IFF_NO_QUEUE and cleanup afterwards David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.