On Wed, Jun 10, 2026 at 4:28 PM Eugenio Perez Martin <[email protected]> wrote: > > On Wed, Jun 10, 2026 at 10:17 AM Menglong Dong <[email protected]> > wrote: > > > > For now, XDP_RING_NEED_WAKEUP is not supported properly by the virtio-net. > > Take the tx path for example, we set xsk_set_tx_need_wakeup() in > > virtnet_xsk_xmit(), but we didn't call xsk_clear_tx_need_wakeup() > > anywhere, which means the user will call send() for every packet. > > > > For the tx path, we will call xsk_set_tx_need_wakeup() after > > virtnet_xsk_xmit_batch() if sq->vq is empty, as we can't be wakeup by the > > skb_xmit_done() in this case. Otherwise, we will clear the wakeup flag. > > > > For the rx path, we will call xsk_set_rx_need_wakeup() if we have free > > buffers in rq->vq. > > > > Race condition is considered for both rx and tx path. > > > > I didn't review the code itself, but the patch message lacks a Fixes:
Yeah, you are right, it's better to use the Fix tag here, and I'll add it in the next version. > tag. And the From and Signed-off-by emails don't match, which I'm not > sure is valid. Sorry about that. I use my company email in the SOB. I used my company email for the From too. However, my company email system can trigger "Delivery failure" messages sometimes, and Alexei said it is annoying. So I didn't use it for the From and removed it from the CC since then :/ Thanks! Menglong Dong > > > Signed-off-by: Menglong Dong <[email protected]> > > --- > > drivers/net/virtio_net.c | 52 ++++++++++++++++++++++++++++++++++------ > > 1 file changed, 45 insertions(+), 7 deletions(-) > > > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > > index 9b3da9f9786c..25e895b849a6 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio_net.c [...] > > > > -- > > 2.54.0 > > >

