netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Alvaro Karsz <alvaro.karsz@solid-run.com>
Cc: mst@redhat.com, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com,
	virtualization@lists.linux-foundation.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	maxime.coquelin@redhat.com, eperezma@redhat.com
Subject: Re: [RFC PATCH 4/4] virtio-net: sleep instead of busy waiting for cvq command
Date: Mon, 26 Dec 2022 11:45:43 +0800	[thread overview]
Message-ID: <CACGkMEs=YrtP-GT_MKoZdORtYCD09QdmZGpgQUHMOMLG_eX-FA@mail.gmail.com> (raw)
In-Reply-To: <CAJs=3_BqDqEoXGiU9zCNfGNqEjd1eijqkE_8_mb3nC=GwQoxHA@mail.gmail.com>

On Fri, Dec 23, 2022 at 3:39 PM Alvaro Karsz <alvaro.karsz@solid-run.com> wrote:
>
> > This needs to be proposed to the virtio spec first. And actually we
> > need more than this:
> >
> > 1) we still need a way to deal with the device without this feature
> > 2) driver can't depend solely on what is advertised by the device (e.g
> > device can choose to advertise a very long timeout)
>
> I think that I wasn't clear, sorry.
> I'm not talking about a new virtio feature, I'm talking about a situation when:
> * virtio_net issues a control command.
> * the device gets the command, but somehow, completes the command
> after timeout.
> * virtio_net assumes that the command failed (timeout), and issues a
> different control command.
> * virtio_net will then call virtqueue_wait_for_used, and will
> immediately get the previous response (If I'm not wrong).
>
> So, this is not a new feature that I'm proposing, just a situation
> that may occur due to cvq timeouts.
>
> Anyhow, your solution calling BAD_RING if we reach a timeout should
> prevent this situation.

Right, that is the goal.

Thanks

>
> Thanks
>


  reply	other threads:[~2022-12-26  3:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-22  6:04 [RFC PATCH 0/4] virtio-net: don't busy poll for cvq command Jason Wang
2022-12-22  6:04 ` [RFC PATCH 1/4] virtio-net: convert rx mode setting to use workqueue Jason Wang
2022-12-22  6:04 ` [RFC PATCH 2/4] virtio_ring: switch to use BAD_RING() Jason Wang
2022-12-22  6:04 ` [RFC PATCH 3/4] virtio_ring: introduce a per virtqueue waitqueue Jason Wang
2022-12-22  6:04 ` [RFC PATCH 4/4] virtio-net: sleep instead of busy waiting for cvq command Jason Wang
2022-12-22  6:44   ` Alvaro Karsz
2022-12-22  8:43     ` Jason Wang
2022-12-22 15:54       ` Alvaro Karsz
2022-12-23  3:00         ` Jason Wang
2022-12-23  7:38           ` Alvaro Karsz
2022-12-26  3:45             ` Jason Wang [this message]
2022-12-22  9:19   ` Eugenio Perez Martin
2022-12-23  3:03     ` Jason Wang
2022-12-23  8:04       ` Eugenio Perez Martin
2022-12-26  3:44         ` Jason Wang

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='CACGkMEs=YrtP-GT_MKoZdORtYCD09QdmZGpgQUHMOMLG_eX-FA@mail.gmail.com' \
    --to=jasowang@redhat.com \
    --cc=alvaro.karsz@solid-run.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eperezma@redhat.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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).