Thread (6 messages) flat view 6 messages, 3 authors, 2017-09-26

Re: [PATCH,v3,net-next 1/2] tun: enable NAPI for TUN/TAP driver

From: Mahesh Bandewar (महेश बंडेवार) <hidden>
Date: 2017-09-25 16:24:10

On Fri, Sep 22, 2017 at 1:49 PM, Petar Penkov [off-list ref] wrote:
Changes TUN driver to use napi_gro_receive() upon receiving packets
rather than netif_rx_ni(). Adds flag IFF_NAPI that enables these
changes and operation is not affected if the flag is disabled.  SKBs
are constructed upon packet arrival and are queued to be processed
later.

The new path was evaluated with a benchmark with the following setup:
Open two tap devices and a receiver thread that reads in a loop for
each device. Start one sender thread and pin all threads to different
CPUs. Send 1M minimum UDP packets to each device and measure sending
time for each of the sending methods:
        napi_gro_receive():     4.90s
        netif_rx_ni():          4.90s
        netif_receive_skb():    7.20s

Signed-off-by: Petar Penkov <redacted>
Thank you Petar.

Acked-by: Mahesh Bandewar <redacted>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Mahesh Bandewar <redacted>
Cc: Willem de Bruijn <willemb@google.com>
Cc: davem@davemloft.net
Cc: ppenkov@stanford.edu
---
 drivers/net/tun.c           | 133 +++++++++++++++++++++++++++++++++++++++-----
 include/uapi/linux/if_tun.h |   1 +
 2 files changed, 119 insertions(+), 15 deletions(-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help