From: Jesper Dangaard Brouer <brouer@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>,
"David S. Miller" <davem@davemloft.net>,
"Michael S. Tsirkin" <mst@redhat.com>,
netdev@vger.kernel.org,
virtualization@lists.linux-foundation.org, brouer@redhat.com
Subject: Re: [PATCH net 6/7] virtio_net: Use xdp_return_frame to free xdp_frames on destroying vqs
Date: Thu, 17 Jan 2019 14:39:13 +0100 [thread overview]
Message-ID: <20190117143913.7c178e2f@redhat.com> (raw)
In-Reply-To: <fce18995-52c8-dadd-bab5-4683686e46a8@redhat.com>
On Thu, 17 Jan 2019 20:56:39 +0800
Jason Wang <jasowang@redhat.com> wrote:
> 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@lab.ntt.co.jp>
> > ---
> > 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);
I assume the is_xdp_raw_buffer_queue() test assures that this void *buf
is a struct xdp_frame.
> > }
> > }
> >
>
>
> Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
next prev parent reply other threads:[~2019-01-17 13:39 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-17 11:20 [PATCH net 0/7] virtio_net: Fix problems around XDP tx and napi_tx Toshiaki Makita
2019-01-17 11:20 ` [PATCH net 1/7] virtio_net: Don't enable NAPI when interface is down Toshiaki Makita
2019-01-17 12:38 ` Jason Wang
2019-01-17 11:20 ` [PATCH net 2/7] virtio_net: Don't call free_old_xmit_skbs for xdp_frames Toshiaki Makita
2019-01-17 12:39 ` Jason Wang
2019-01-18 1:44 ` Toshiaki Makita
2019-01-18 3:50 ` Jason Wang
2019-01-17 11:20 ` [PATCH net 3/7] virtio_net: Fix not restoring real_num_rx_queues Toshiaki Makita
2019-01-17 12:39 ` Jason Wang
2019-01-17 11:20 ` [PATCH net 4/7] virtio_net: Fix out of bounds access of sq Toshiaki Makita
2019-01-17 12:42 ` Jason Wang
2019-01-17 11:20 ` [PATCH net 5/7] virtio_net: Don't process redirected XDP frames when XDP is disabled Toshiaki Makita
2019-01-17 12:53 ` Jason Wang
2019-01-17 13:05 ` Jason Wang
2019-01-18 1:56 ` Toshiaki Makita
2019-01-18 3:52 ` Jason Wang
2019-01-18 4:02 ` Toshiaki Makita
2019-01-17 11:20 ` [PATCH net 6/7] virtio_net: Use xdp_return_frame to free xdp_frames on destroying vqs Toshiaki Makita
2019-01-17 12:56 ` Jason Wang
2019-01-17 13:39 ` Jesper Dangaard Brouer [this message]
2019-01-17 11:20 ` [PATCH net 7/7] virtio_net: Differentiate sk_buff and xdp_frame on freeing Toshiaki Makita
2019-01-17 13:04 ` Jason Wang
2019-01-17 14:55 ` [PATCH net 0/7] virtio_net: Fix problems around XDP tx and napi_tx Michael S. Tsirkin
2019-01-18 2:01 ` Toshiaki Makita
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190117143913.7c178e2f@redhat.com \
--to=brouer@redhat.com \
--cc=davem@davemloft.net \
--cc=jasowang@redhat.com \
--cc=makita.toshiaki@lab.ntt.co.jp \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).