Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1537443

Re: [PATCH v2] tun: Use netif_receive_skb instead of netif_rx

From Jason Wang <jasowang@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] tun: Use netif_receive_skb instead of netif_rx
Date 2016-12-07 04:40 +0100
Message-ID <sLB5D-2Ah-5@gated-at.bofh.it> (permalink)
References <sJw0q-23K-31@gated-at.bofh.it> <sJFwJ-LR-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 2016年12月02日 03:43, David Miller wrote:
> From: Andrey Konovalov <andreyknvl@google.com>
> Date: Thu,  1 Dec 2016 10:34:40 +0100
>
>> This patch changes tun.c to call netif_receive_skb instead of netif_rx
>> when a packet is received (if CONFIG_4KSTACKS is not enabled to avoid
>> stack exhaustion). The difference between the two is that netif_rx queues
>> the packet into the backlog, and netif_receive_skb proccesses the packet
>> in the current context.
>>
>> This patch is required for syzkaller [1] to collect coverage from packet
>> receive paths, when a packet being received through tun (syzkaller collects
>> coverage per process in the process context).
>>
>> As mentioned by Eric this change also speeds up tun/tap. As measured by
>> Peter it speeds up his closed-loop single-stream tap/OVS benchmark by
>> about 23%, from 700k packets/second to 867k packets/second.
>>
>> A similar patch was introduced back in 2010 [2, 3], but the author found
>> out that the patch doesn't help with the task he had in mind (for cgroups
>> to shape network traffic based on the original process) and decided not to
>> go further with it. The main concern back then was about possible stack
>> exhaustion with 4K stacks.
>>
>> [1] https://github.com/google/syzkaller
>>
>> [2] https://www.spinics.net/lists/netdev/thrd440.html#130570
>>
>> [3] https://www.spinics.net/lists/netdev/msg130570.html
>>
>> Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
>> ---
>>
>> Changes since v1:
>> - incorporate Eric's note about speed improvements in commit description
>> - use netif_receive_skb CONFIG_4KSTACKS is not enabled
> Applied to net-next, thanks!

David, looks like this commit is not in net-next.git.

Please help to check.

Thanks

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2] tun: Use netif_receive_skb instead of netif_rx Andrey Konovalov <andreyknvl@google.com> - 2016-12-01 10:40 +0100
  Re: [PATCH v2] tun: Use netif_receive_skb instead of netif_rx Jason Wang <jasowang@redhat.com> - 2016-12-01 10:50 +0100
  Re: [PATCH v2] tun: Use netif_receive_skb instead of netif_rx "Michael S. Tsirkin" <mst@redhat.com> - 2016-12-01 14:10 +0100
  Re: [PATCH v2] tun: Use netif_receive_skb instead of netif_rx David Miller <davem@davemloft.net> - 2016-12-01 20:50 +0100
    Re: [PATCH v2] tun: Use netif_receive_skb instead of netif_rx David Miller <davem@davemloft.net> - 2016-12-07 04:30 +0100
      Re: [PATCH v2] tun: Use netif_receive_skb instead of netif_rx Jason Wang <jasowang@redhat.com> - 2016-12-07 04:50 +0100
    Re: [PATCH v2] tun: Use netif_receive_skb instead of netif_rx Jason Wang <jasowang@redhat.com> - 2016-12-07 04:40 +0100

csiph-web