mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
virtio_net: Use xdp_return_frame to free xdp_frames on destroying vqs
[ Upstream commit07b344f494] put_page() can work as a fallback for freeing xdp_frames, but the appropriate way is to use xdp_return_frame(). Fixes:cac320c850("virtio_net: convert to use generic xdp_frame and xdp_return_frame API") Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> Acked-by: Jason Wang <jasowang@redhat.com> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
05e260f9d0
commit
ed6a5fc89e
@@ -2593,7 +2593,7 @@ static void free_unused_bufs(struct virtnet_info *vi)
|
||||
if (!is_xdp_raw_buffer_queue(vi, i))
|
||||
dev_kfree_skb(buf);
|
||||
else
|
||||
put_page(virt_to_head_page(buf));
|
||||
xdp_return_frame(buf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user