Skip to content

Commit 9e0945b

Browse files
Heng Qikuba-moo
authored andcommitted
virtio_net: fix possible dim status unrecoverable
When the dim worker is scheduled, if it no longer needs to issue commands, dim may not be able to return to the working state later. For example, the following single queue scenario: 1. The dim worker of rxq0 is scheduled, and the dim status is changed to DIM_APPLY_NEW_PROFILE; 2. dim is disabled or parameters have not been modified; 3. virtnet_rx_dim_work exits directly; Then, even if net_dim is invoked again, it cannot work because the state is not restored to DIM_START_MEASURE. Fixes: 6208799 ("virtio-net: support rx netdim") Signed-off-by: Heng Qi <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Xuan Zhuo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 89e281e commit 9e0945b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/virtio_net.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4419,9 +4419,9 @@ static void virtnet_rx_dim_work(struct work_struct *work)
44194419
if (err)
44204420
pr_debug("%s: Failed to send dim parameters on rxq%d\n",
44214421
dev->name, qnum);
4422-
dim->state = DIM_START_MEASURE;
44234422
}
44244423
out:
4424+
dim->state = DIM_START_MEASURE;
44254425
mutex_unlock(&rq->dim_lock);
44264426
}
44274427

0 commit comments

Comments
 (0)