netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Jason Wang <jasowang@redhat.com>
Cc: netdev@vger.kernel.org,
	virtualization@lists.linux-foundation.org, wexu@redhat.com,
	kvm@vger.kernel.org, mst@redhat.com
Subject: Re: [PATCH net-next V3 3/3] tun: rx batching
Date: Sat, 31 Dec 2016 13:03:32 -0800	[thread overview]
Message-ID: <20161231130333.347cb8f3@xeon-e3> (raw)
In-Reply-To: <1483075251-6889-4-git-send-email-jasowang@redhat.com>

On Fri, 30 Dec 2016 13:20:51 +0800
Jason Wang <jasowang@redhat.com> wrote:

> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> index cd8e02c..a268ed9 100644
> --- a/drivers/net/tun.c
> +++ b/drivers/net/tun.c
> @@ -75,6 +75,10 @@
>  
>  #include <linux/uaccess.h>
>  
> +static int rx_batched;
> +module_param(rx_batched, int, 0444);
> +MODULE_PARM_DESC(rx_batched, "Number of packets batched in rx");
> +
>  /* Uncomment to enable debugging */

I like the concept or rx batching. But controlling it via a module parameter
is one of the worst API choices.  Ethtool would be better to use because that is
how other network devices control batching.

If you do ethtool, you could even extend it to have an number of packets
and max latency value.

  parent reply	other threads:[~2016-12-31 21:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-30  5:20 [PATCH net-next V3 0/3] vhost_net tx batching Jason Wang
2016-12-30  5:20 ` [PATCH net-next V3 1/3] vhost: better detection of available buffers Jason Wang
2016-12-30  5:20 ` [PATCH net-next V3 2/3] vhost_net: tx batching Jason Wang
2016-12-30  5:20 ` [PATCH net-next V3 3/3] tun: rx batching Jason Wang
2016-12-31 17:31   ` David Miller
2017-01-03  3:12     ` Jason Wang
2016-12-31 21:03   ` Stephen Hemminger [this message]
2017-01-03  3:18     ` Jason 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=20161231130333.347cb8f3@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=wexu@redhat.com \
    /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).