netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: netdev@vger.kernel.org
Cc: Jesper Dangaard Brouer <brouer@redhat.com>,
	Cong Wang <cwang@twopensource.com>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	David Miller <davem@davemloft.net>
Subject: [net-next PATCH 1/3] net: make default tx_queue_len configurable
Date: Wed, 29 Jul 2015 22:51:41 +0200	[thread overview]
Message-ID: <1438203103-27013-2-git-send-email-phil@nwl.cc> (raw)
In-Reply-To: <1438203103-27013-1-git-send-email-phil@nwl.cc>

Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 net/Kconfig        | 12 ++++++++++++
 net/ethernet/eth.c |  2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/net/Kconfig b/net/Kconfig
index 7021c1b..21c164f 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -48,6 +48,18 @@ config COMPAT_NETLINK_MESSAGES
 config NET_INGRESS
 	bool
 
+config DEFAULT_TX_QUEUE_LEN
+	prompt "Default TX queue length (in packets)" if EXPERT
+	int
+	default 1000	# Ethernet wants good queues
+	help
+	  Set the default value of tx_queue_len for newly created network
+	  interfaces. It is used by queueing disciplines to determine how many
+	  packets to keep in backlog before starting to drop new ones.
+
+	  The default value of 1000 packets is there for a very long time and
+	  in combination with GSO way too big.
+
 menu "Networking options"
 
 source "net/packet/Kconfig"
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index 77e0f0e..b778586 100644
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -355,7 +355,7 @@ void ether_setup(struct net_device *dev)
 	dev->hard_header_len 	= ETH_HLEN;
 	dev->mtu		= ETH_DATA_LEN;
 	dev->addr_len		= ETH_ALEN;
-	dev->tx_queue_len	= 1000;	/* Ethernet wants good queues */
+	dev->tx_queue_len	= CONFIG_DEFAULT_TX_QUEUE_LEN;
 	dev->flags		= IFF_BROADCAST|IFF_MULTICAST;
 	dev->priv_flags		|= IFF_TX_SKB_SHARING;
 
-- 
2.1.2

  reply	other threads:[~2015-07-29 20:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-29 20:51 [net-next PATCH 0/3] Backwards-compatible noqueue in virtual interfaces Phil Sutter
2015-07-29 20:51 ` Phil Sutter [this message]
2015-07-29 20:51   ` [net-next PATCH 2/3] net: sched: set tx_queue_len to default when changing noqueue device's qdisc Phil Sutter
2015-07-29 20:51     ` [net-next PATCH 3/3] veth: don't assign a qdisc to veth Phil Sutter
2015-07-29 21:10     ` [net-next PATCH 2/3] net: sched: set tx_queue_len to default when changing noqueue device's qdisc Florian Westphal
2015-07-29 21:10     ` Eric Dumazet
2015-07-29 22:08       ` Phil Sutter
2015-07-29 21:06   ` [net-next PATCH 1/3] net: make default tx_queue_len configurable Florian Westphal
2015-07-29 21:34     ` Phil Sutter
2015-07-29 21:37       ` David Miller
2015-08-11 15:48         ` Jesper Dangaard Brouer
2015-08-11 16:23           ` Phil Sutter
2015-08-12  1:13             ` Alexei Starovoitov
2015-08-12 14:55               ` Eric Dumazet
2015-08-13  1:13               ` Phil Sutter
2015-08-13 13:10                 ` Jesper Dangaard Brouer
2015-08-13 15:06                   ` Phil Sutter
2015-07-29 23:10 ` [net-next PATCH 0/3] Backwards-compatible noqueue in virtual interfaces Cong Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1438203103-27013-2-git-send-email-phil@nwl.cc \
    --to=phil@nwl.cc \
    --cc=brouer@redhat.com \
    --cc=cwang@twopensource.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).