Re: [PATCH v2 net 7/7] virtio_net: Differentiate sk_buff and xdp_frame on freeing
From: Toshiaki Makita <hidden>
Date: 2019-01-29 02:35:48
From: Toshiaki Makita <hidden>
Date: 2019-01-29 02:35:48
On 2019/01/29 11:23, Jason Wang wrote:
On 2019/1/29 上午8:45, Toshiaki Makita wrote:
...
quoted
@@ -2666,10 +2696,10 @@ static void free_unused_bufs(structvirtnet_info *vi) for (i = 0; i < vi->max_queue_pairs; i++) { struct virtqueue *vq = vi->sq[i].vq; while ((buf = virtqueue_detach_unused_buf(vq)) != NULL) { - if (!is_xdp_raw_buffer_queue(vi, i)) + if (!is_xdp_frame(buf))I believe this is the last user of is_xdp_raw_buffer_queue(), maybe you can sent a patch on top to remove it.
Actually patch2 added new users of it ;)
quoted
dev_kfree_skb(buf); else - xdp_return_frame(buf); + xdp_return_frame(ptr_to_xdp(buf)); } }Acked-by: Jason Wang <jasowang@redhat.com>
Thanks! -- Toshiaki Makita