Skip to content

Commit 7e0b51e

Browse files
Heng QiNipaLocal
Heng Qi
authored and
NipaLocal
committed
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]> Signed-off-by: NipaLocal <nipa@local>
1 parent c875333 commit 7e0b51e

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
@@ -4417,9 +4417,9 @@ static void virtnet_rx_dim_work(struct work_struct *work)
44174417
if (err)
44184418
pr_debug("%s: Failed to send dim parameters on rxq%d\n",
44194419
dev->name, qnum);
4420-
dim->state = DIM_START_MEASURE;
44214420
}
44224421
out:
4422+
dim->state = DIM_START_MEASURE;
44234423
mutex_unlock(&rq->dim_lock);
44244424
}
44254425

0 commit comments

Comments
 (0)