]> www.infradead.org Git - users/jedix/linux-maple.git/commit
virtio_net: fix possible dim status unrecoverable
authorHeng Qi <hengqi@linux.alibaba.com>
Tue, 28 May 2024 13:41:15 +0000 (21:41 +0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 1 Jun 2024 22:14:06 +0000 (15:14 -0700)
commit9e0945b1901c9eed4fbee3b8a3870487b2bdc936
treef366ef3ed30cfb75bc5e4e8b7ae8cc76413157c8
parent89e281ebff72e6d37dce2df0e142b2909dafb267
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: 6208799553a8 ("virtio-net: support rx netdim")
Signed-off-by: Heng Qi <hengqi@linux.alibaba.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Link: https://lore.kernel.org/r/20240528134116.117426-2-hengqi@linux.alibaba.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/virtio_net.c