OSDN Git Service

net: veth: add page_pool for page recycling
authorLorenzo Bianconi <lorenzo@kernel.org>
Sat, 22 Apr 2023 18:54:32 +0000 (20:54 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 25 Apr 2023 01:07:08 +0000 (18:07 -0700)
commit0ebab78cbcbfd698d40bd307b68337bdf1b47e9b
tree20eb18eff5feaf60035cbf5843cfdfb60d17d332
parentffcddcaed6e06255811a8204458e1f380a3c2b21
net: veth: add page_pool for page recycling

Introduce page_pool support in veth driver in order to recycle pages
in veth_convert_skb_to_xdp_buff routine and avoid reallocating the skb
through the page allocator.
The patch has been tested sending tcp traffic to a veth pair where the
remote peer is running a simple xdp program just returning xdp_pass:

veth upstream codebase:
MTU 1500B: ~ 8Gbps
MTU 8000B: ~ 13.9Gbps

veth upstream codebase + pp support:
MTU 1500B: ~ 9.2Gbps
MTU 8000B: ~ 16.2Gbps

Tested-by: Maryam Tahhan <mtahhan@redhat.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/Kconfig
drivers/net/veth.c