]> git.baikalelectronics.ru Git - kernel.git/commit
tuntap: free XDP dropped packets in a batch
authorJason Wang <jasowang@redhat.com>
Thu, 15 Nov 2018 09:43:10 +0000 (17:43 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 Nov 2018 20:00:42 +0000 (12:00 -0800)
commit88129866f958fde0eee880afe03523289d0d24ab
tree79fab6c861635c5e1ce325de2e867481ad83a61c
parent2a5acb3ff3433db3be472c97e8f9ea43894e6d2f
tuntap: free XDP dropped packets in a batch

Thanks to the batched XDP buffs through msg_control. Instead of
calling put_page() for each page which involves a atomic operation,
let's batch them by record the last page that needs to be freed and
its refcnt count and free them in a batch.

Testpmd(virtio-user + vhost_net) + XDP_DROP shows 3.8% improvement.

Before: 4.71Mpps
After : 4.89Mpps

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