]> git.baikalelectronics.ru Git - kernel.git/commit
tun: don't require serialization lock on tx
authorPaolo Abeni <pabeni@redhat.com>
Thu, 14 Apr 2016 16:39:39 +0000 (18:39 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Apr 2016 18:36:26 +0000 (14:36 -0400)
commit3dcb59f6dd1084e49e170292d83ffb1f2e0399b8
tree7190ee48c0ec5310fef9d7380019a5cd0ab5e634
parent0327c5d99a3acf663d1e9cb6c51cfb0314c91722
tun: don't require serialization lock on tx

The current tun_net_xmit() implementation don't need any external
lock since it relies on rcu protection for the tun data structure
and on socket queue lock for skb queuing.

This patch set the NETIF_F_LLTX feature bit in the tun device, so
that on xmit, in absence of qdisc, no serialization lock is acquired
by the caller.

The user space can remove the default tun qdisc with:

tc qdisc replace dev <tun device name> root noqueue

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Acked-by: Eric Dumazet <edumazet@google.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c