vhost/net: remove vhost_net_page_frag_refill()
authorYunsheng Lin <linyunsheng@huawei.com>
Wed, 28 Feb 2024 09:30:11 +0000 (17:30 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 5 Mar 2024 10:38:14 +0000 (11:38 +0100)
commit4051bd8129ac6c1faf447264aa7a8f91feb778b8
tree34284c7d54dd984e796ac9f869f9ce6492553934
parenta0727489ac22d6fbd2e390d38a51193bba61da83
vhost/net: remove vhost_net_page_frag_refill()

The page frag in vhost_net_page_frag_refill() uses the
'struct page_frag' from skb_page_frag_refill(), but it's
implementation is similar to page_frag_alloc_align() now.

This patch removes vhost_net_page_frag_refill() by using
'struct page_frag_cache' instead of 'struct page_frag',
and allocating frag using page_frag_alloc_align().

The added benefit is that not only unifying the page frag
implementation a little, but also having about 0.5% performance
boost testing by using the vhost_net_test introduced in the
last patch.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/vhost/net.c