]> git.baikalelectronics.ru Git - kernel.git/commit
tuntap: accept an array of XDP buffs through sendmsg()
authorJason Wang <jasowang@redhat.com>
Wed, 12 Sep 2018 03:17:07 +0000 (11:17 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Sep 2018 16:25:40 +0000 (09:25 -0700)
commitd3d7f4b599fa90be8f19e8694bc65322f4d5b570
treea801e9d961ce25b29b1a00603e8662735cefd525
parent8a78bfe64a39a71d145bbc0b0cf9bb4ec85fa0e9
tuntap: accept an array of XDP buffs through sendmsg()

This patch implement TUN_MSG_PTR msg_control type. This type allows
the caller to pass an array of XDP buffs to tuntap through ptr field
of the tun_msg_control. If an XDP program is attached, tuntap can run
XDP program directly. If not, tuntap will build skb and do a fast
receiving since part of the work has been done by vhost_net.

This will avoid lots of indirect calls thus improves the icache
utilization and allows to do XDP batched flushing when doing XDP
redirection.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c