• Jason Wang's avatar
    tuntap: accept an array of XDP buffs through sendmsg() · 043d222f
    Jason Wang authored
    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: default avatarJason Wang <jasowang@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    043d222f
tun.c 85.4 KB