On 2017年01月01日 05:03, Stephen Hemminger wrote:
On Fri, 30 Dec 2016 13:20:51 +0800
Jason Wang 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
+static int rx_batched;
+
On 2017年01月01日 01:31, David Miller wrote:
From: Jason Wang
Date: Fri, 30 Dec 2016 13:20:51 +0800
@@ -1283,10 +1314,15 @@ static ssize_t tun_get_user(struct tun_struct *tun,
struct tun_file *tfile,
skb_probe_transport_header(skb, 0);
rxhash = skb_get_hash(skb);
+
#ifndef CON
On Fri, 30 Dec 2016 13:20:51 +0800
Jason Wang 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
>
> +static int rx_batched;
> +module_param(rx_batched, int, 0444);
From: Jason Wang
Date: Fri, 30 Dec 2016 13:20:51 +0800
> @@ -1283,10 +1314,15 @@ static ssize_t tun_get_user(struct tun_struct *tun,
> struct tun_file *tfile,
> skb_probe_transport_header(skb, 0);
>
> rxhash = skb_get_hash(skb);
> +
> #ifndef CONFIG_4KSTACKS
> - local_bh_disab
We can only process 1 packet at one time during sendmsg(). This often
lead bad cache utilization under heavy load. So this patch tries to do
some batching during rx before submitting them to host network
stack. This is done through accepting MSG_MORE as a hint from
sendmsg() caller, if it was set,