On Sat, 10 Jan 2026 15:23:36 +0700 Bui Quang Minh wrote:
> >> @@ -3230,9 +3230,10 @@ static int virtnet_open(struct net_device *dev)
> >>   
> >>    for (i = 0; i < vi->max_queue_pairs; i++) {
> >>            if (i < vi->curr_queue_pairs)
> >> -                  /* Make sure we have some buffers: if oom use wq. */
> >> -                  if (!try_fill_recv(vi, &vi->rq[i], GFP_KERNEL))
> >> -                          schedule_delayed_work(&vi->refill, 0);
> >> +                  /* Pre-fill rq agressively, to make sure we are ready to
> >> +                   * get packets immediately.
> >> +                   */
> >> +                  try_fill_recv(vi, &vi->rq[i], GFP_KERNEL);  
> > We should enforce _some_ minimal fill level at the time of open().
> > If the ring is completely empty no traffic will ever flow, right?
> > Perhaps I missed scheduling the NAPI somewhere..  
> 
> The NAPI is enabled and scheduled in virtnet_napi_enable(). The code 
> path is like this
> 
> virtnet_enable_queue_pair
> -> virtnet_napi_enable  
>    -> virtnet_napi_do_enable
>      -> virtqueue_napi_schedule
> 
> The same happens in __virtnet_rx_resume().

I see. Alright, let me fix the nits while applying, no need to respin.
Kinda want this in the tree for a few days before shipping off to Linus.

Reply via email to