Re: [PATCH net 1/3] virtio-net: make refill work a per receive queue work
From: Michael S. Tsirkin
Date: Tue Dec 23 2025 - 20:35:05 EST
> static void virtnet_rx_pause(struct virtnet_info *vi, struct receive_queue *rq)
> @@ -3463,8 +3444,8 @@ static void virtnet_rx_pause(struct virtnet_info *vi, struct receive_queue *rq)
> * Make sure refill_work does not run concurrently to
> * avoid napi_disable race which leads to deadlock.
> */
> - disable_delayed_refill(vi);
> - cancel_delayed_work_sync(&vi->refill);
> + disable_delayed_refill(rq);
> + cancel_delayed_work_sync(&rq->refill);
> __virtnet_rx_pause(vi, rq);
> }
>
disable_delayed_refill is always followed by cancel_delayed_work_sync.
Just put cancel into disable, and reduce code duplication.
--
MST