Re: [PATCH net 6/7] virtio_net: Use xdp_return_frame to free xdp_frames on destroying vqs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2019/1/17 下午7:20, Toshiaki Makita wrote:
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@xxxxxxxxxxxxx>
---
  drivers/net/virtio_net.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index ae93f0e..996de69 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -2668,7 +2668,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);
  		}
  	}


Acked-by: Jason Wang <jasowang@xxxxxxxxxx>


_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux