From: "Michael S. Tsirkin" <mst@redhat.com>
To: Heng Qi <hengqi@linux.alibaba.com>
Cc: netdev@vger.kernel.org, virtualization@lists.linux.dev,
Jason Wang <jasowang@redhat.com>,
Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Jiri Pirko <jiri@resnulli.us>,
Daniel Jurgens <danielj@nvidia.com>, Jiri Pirko <jiri@nvidia.com>
Subject: Re: [PATCH net v3 1/2] virtio_net: fix possible dim status unrecoverable
Date: Thu, 30 May 2024 05:17:11 -0400 [thread overview]
Message-ID: <20240530051705-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20240528134116.117426-2-hengqi@linux.alibaba.com>
On Tue, May 28, 2024 at 09:41:15PM +0800, Heng Qi wrote:
> 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>
> ---
> drivers/net/virtio_net.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index 4a802c0ea2cb..4f828a9e5889 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -4417,9 +4417,9 @@ static void virtnet_rx_dim_work(struct work_struct *work)
> if (err)
> pr_debug("%s: Failed to send dim parameters on rxq%d\n",
> dev->name, qnum);
> - dim->state = DIM_START_MEASURE;
> }
> out:
> + dim->state = DIM_START_MEASURE;
> mutex_unlock(&rq->dim_lock);
> }
>
> --
> 2.32.0.3.g01195cf9f
next prev parent reply other threads:[~2024-05-30 9:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-28 13:41 [PATCH net v3 0/2] virtio_net: fix lock warning and unrecoverable state Heng Qi
2024-05-28 13:41 ` [PATCH net v3 1/2] virtio_net: fix possible dim status unrecoverable Heng Qi
2024-05-30 9:17 ` Michael S. Tsirkin [this message]
2024-05-30 9:57 ` Xuan Zhuo
2024-05-28 13:41 ` [PATCH net v3 2/2] virtio_net: fix a spurious deadlock issue Heng Qi
2024-05-30 8:34 ` Paolo Abeni
2024-05-30 8:49 ` Heng Qi
2024-05-30 9:16 ` Michael S. Tsirkin
2024-05-30 10:34 ` Jason Wang
2024-05-30 9:57 ` Xuan Zhuo
2024-06-01 22:20 ` [PATCH net v3 0/2] virtio_net: fix lock warning and unrecoverable state patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240530051705-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=danielj@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hengqi@linux.alibaba.com \
--cc=jasowang@redhat.com \
--cc=jiri@nvidia.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).