Commit ed6a5fc8 authored by Toshiaki Makita's avatar Toshiaki Makita Committed by Greg Kroah-Hartman

virtio_net: Use xdp_return_frame to free xdp_frames on destroying vqs

[ Upstream commit 07b344f4 ]

put_page() can work as a fallback for freeing xdp_frames, but the
appropriate way is to use xdp_return_frame().

Fixes: cac320c8 ("virtio_net: convert to use generic xdp_frame and xdp_return_frame API")
Signed-off-by: default avatarToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Acked-by: default avatarJason Wang <jasowang@redhat.com>
Acked-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 05e260f9
...@@ -2593,7 +2593,7 @@ static void free_unused_bufs(struct virtnet_info *vi) ...@@ -2593,7 +2593,7 @@ static void free_unused_bufs(struct virtnet_info *vi)
if (!is_xdp_raw_buffer_queue(vi, i)) if (!is_xdp_raw_buffer_queue(vi, i))
dev_kfree_skb(buf); dev_kfree_skb(buf);
else else
put_page(virt_to_head_page(buf)); xdp_return_frame(buf);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment