On 2026/6/22 10:40 Xuan Zhuo <[email protected]> write: > On Tue, 16 Jun 2026 19:59:12 +0800, Menglong Dong <[email protected]> > wrote: > > For now, XDP_RING_NEED_WAKEUP is not supported properly by the virtio-net > > in 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. > > > > We 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. > > > > Race condition is considered for tx path. > > > > Fixes: 89f86675cb03 ("virtio_net: xsk: tx: support xmit xsk buffer") > > This is not a bug, so we do not need this. > And you post this to net-next.
Okay, I'll remove this tag in the V4. > > > > Signed-off-by: Menglong Dong <[email protected]> > > --- > > v3: [...] > > + > > + if (need_wakeup && vring_size == sq->vq->num_free) > > + xsk_set_tx_need_wakeup(pool); > > You need to comment this. Ack! > > > > + [...] > > + > > if (!is_xdp_raw_buffer_queue(vi, sq - vi->sq)) > > check_sq_full_and_disable(vi, vi->dev, sq); > > > After fixed above comments, you can add: > > Reviewed-by: Xuan Zhuo <[email protected]> OK! Thanks for the review :) > > Thanks. > > > > > > @@ -1470,9 +1488,6 @@ static bool virtnet_xsk_xmit(struct send_queue *sq, > > struct xsk_buff_pool *pool, > > u64_stats_add(&sq->stats.xdp_tx, sent); > > u64_stats_update_end(&sq->stats.syncp); > > > > - if (xsk_uses_need_wakeup(pool)) > > - xsk_set_tx_need_wakeup(pool); > > - > > return sent; > > } > > > > -- > > 2.54.0 > > > >

