diff options
author | Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> | 2019-01-29 09:45:58 +0900 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-01-30 14:02:43 -0800 |
commit | 07b344f494ddda9f061b396407c96df8c46c82b5 (patch) | |
tree | 7e3fc00d705116e064ad19ade0e2ab55fe1cd0bb | |
parent | 03aa6d34868c07b2b1b8b2db080602d7ec528173 (diff) | |
download | linux-07b344f494ddda9f061b396407c96df8c46c82b5.tar.bz2 |
virtio_net: Use xdp_return_frame to free xdp_frames on destroying vqs
put_page() can work as a fallback for freeing xdp_frames, but the
appropriate way is to use xdp_return_frame().
Fixes: cac320c850ef ("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>
-rw-r--r-- | drivers/net/virtio_net.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index cea52e47dc65..1d454cee641c 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -2669,7 +2669,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); } } |