All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Parav Pandit <parav@nvidia.com>
Cc: Heng Qi <hengqi@linux.alibaba.com>,
	Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
	"virtio-comment @ lists . oasis-open . org"
	<virtio-comment@lists.oasis-open.org>,
	"virtio-dev @ lists . oasis-open . org"
	<virtio-dev@lists.oasis-open.org>,
	Jason Wang <jasowang@redhat.com>,
	Alvaro Karsz <alvaro.karsz@solid-run.com>
Subject: Re: [virtio-comment] [PATCH] virtio-net: support per-queue coalescing moderation
Date: Wed, 8 Feb 2023 15:48:06 -0500	[thread overview]
Message-ID: <20230208154450-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <PH0PR12MB54810BD4404DAAEE873BF3EEDCD89@PH0PR12MB5481.namprd12.prod.outlook.com>

On Wed, Feb 08, 2023 at 07:23:12PM +0000, Parav Pandit wrote:
> You are right. Two commands are there.
> Regardless the ambiguity remains
> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
> From: Parav Pandit
> Sent: Wednesday, February 8, 2023 8:57 PM
> To: Michael S. Tsirkin <mst@redhat.com>
> Cc: Heng Qi <hengqi@linux.alibaba.com>; Xuan Zhuo <xuanzhuo@linux.alibaba.com>;
> virtio-comment @ lists . oasis-open . org
> <virtio-comment@lists.oasis-open.org>; virtio-dev @ lists . oasis-open . org
> <virtio-dev@lists.oasis-open.org>; Jason Wang <jasowang@redhat.com>; Alvaro
> Karsz <alvaro.karsz@solid-run.com>
> Subject: RE: [virtio-comment] [PATCH] virtio-net: support per-queue coalescing
> moderation
>  
> 
> > From: Michael S. Tsirkin <mst@redhat.com>
> > Sent: Wednesday, February 8, 2023 10:20 AM
> 
> [..]
> 
> > >
> > > Most performant data path wouldn't implement and read the extra mode.
> > > It is always fw that is going to program same value, or per queue valued or
> > disable value in each Q regardless whichever way we craft the CVQ cmd.
> > >
> > > The sequence that bothers me is below.
> > > 1. driver set global params
> > > 2. few minutes later, now driver set param for Q=1
> > >
> > > On this command, a device need to decide:
> > > Should Q = 2 to N
> > > (a) either work with previous globals, or
> > > (b) because per Q was set for one queue, they rest of the queues implicitly
> > disable it.
> > >
> > > If it is (b),
> > > When a command on Q object =1 is issued, it affects other Q objects. <-
> This I
> > want to avoid.
> > > A cmd that modifies the object, should only modify that object.
> > >
> > > If it is (a), it is mixed mode operation, which is ambiguous definition.
> > >
> > > A better semantic is to define such change at device level and no extra
> cost in
> > the data path.
> >
> > Ugh. Looks like I didn't explain it well, yet again :(.
> > Here is my proposal in pseudo-code:
> >
> >
> > if (cmd == VQ_SET)
> >                vq[cmd.index].param = cmd.param;
> >
> > if (cmd == TX_SET)
> >        for (i = 0; ++i; i < maxvqn / 2)
> >                vq[i * 2].param = cmd.param;
> >
> > if (cmd == RX_SET)
> >        for (i = 0; ++i; i < maxvqn / 2)
> >                vq[i * 2 + 1].param = cmd.param;
> >
> >
> Currently we have cmd = GLOBAL_SET the code is:
> 
>  if (cmd == GLOBAL_SET)
>         for (i = 0; i < maxvqn; i++)
>                 vq[i].param = cmd.param;

exactly.

> >
> > there's nothing to decide at all. No modes. TX_SET and RX_SET affect half
> vqs,
> > VQ_SET affects one vq.
> >
> I explained above that, when cmd=GLOBAL_SET and after that if driver issues cmd
> =VQ_SET, at that point, the device is in partial mode.
> One VQ is running with its own param, and rest are in global mode.


Because there's no "global mode" - it is always per queue and each queue
uses a set of parameters, that is all. No ambiguity. You can quickly set
them all with a special command, or you can set them one by one.

For example consider a driver that loops over all vqs
and does RX_SET(0). Are we in global mode, per queue mode or disabled
mode? The questions is pointless is it not?

-- 
MST


This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.

In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.

Subscribe: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/


  reply	other threads:[~2023-02-08 20:48 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-07 11:16 [virtio-comment] [PATCH] virtio-net: support per-queue coalescing moderation Heng Qi
2023-02-07 11:25 ` [virtio-comment] " Alvaro Karsz
2023-02-07 11:50   ` Xuan Zhuo
2023-02-07 12:51     ` Parav Pandit
2023-02-07 14:29       ` [virtio-dev] " Michael S. Tsirkin
2023-02-07 14:40         ` Alvaro Karsz
2023-02-07 14:48           ` Michael S. Tsirkin
2023-02-07 14:56             ` Alvaro Karsz
2023-02-07 15:09               ` Michael S. Tsirkin
2023-02-07 15:25                 ` Parav Pandit
2023-02-07 15:28                   ` [virtio-comment] " Michael S. Tsirkin
2023-02-07 15:30                     ` [virtio-comment] " Parav Pandit
2023-02-08  1:58                     ` [virtio-comment] " Xuan Zhuo
2023-02-08  2:20         ` Heng Qi
2023-02-08  9:56           ` Michael S. Tsirkin
2023-02-08 13:51             ` Parav Pandit
2023-02-07 14:06 ` [virtio-comment] " Michael S. Tsirkin
2023-02-07 14:22   ` Michael S. Tsirkin
2023-02-08  1:45   ` Xuan Zhuo
2023-02-08  2:20     ` Parav Pandit
2023-02-08  2:24       ` Xuan Zhuo
2023-02-08  2:43         ` Parav Pandit
2023-02-08 10:07           ` Michael S. Tsirkin
2023-02-08 13:52             ` [virtio-dev] " Parav Pandit
2023-02-08 11:30           ` Heng Qi
2023-02-08 14:17             ` [virtio-dev] " Michael S. Tsirkin
2023-02-08 14:37               ` Parav Pandit
2023-02-08 14:42                 ` [virtio-dev] " Michael S. Tsirkin
2023-02-08 14:44                   ` Parav Pandit
2023-02-08 14:48                     ` Michael S. Tsirkin
2023-02-08 15:04                       ` Parav Pandit
2023-02-08 15:20                         ` Michael S. Tsirkin
2023-02-08 15:27                           ` Parav Pandit
2023-02-08 19:23                             ` [virtio-dev] " Parav Pandit
2023-02-08 20:48                               ` Michael S. Tsirkin [this message]
2023-02-08 17:53                         ` Alvaro Karsz
2023-02-08 20:52                           ` Michael S. Tsirkin
2023-02-08 21:05                             ` Parav Pandit
2023-02-08 21:55                               ` [virtio-dev] " Alvaro Karsz
2023-02-08 22:08                                 ` Parav Pandit
2023-02-08 22:15                                   ` [virtio-dev] " Michael S. Tsirkin
2023-02-08 22:23                                     ` Parav Pandit
2023-02-08 22:29                                       ` [virtio-dev] " Michael S. Tsirkin
2023-02-08 22:33                                         ` Parav Pandit
2023-02-08 22:45                                           ` Alvaro Karsz
2023-02-08 22:53                                             ` Michael S. Tsirkin
2023-02-08 22:35                                   ` [virtio-dev] " Alvaro Karsz
2023-02-08 22:57                                     ` Michael S. Tsirkin
2023-02-09  0:06                                     ` Parav Pandit
2023-02-09  3:16                                     ` [virtio-comment] Re: [virtio-dev] " Heng Qi
2023-02-08 22:13                               ` Michael S. Tsirkin
2023-02-08 21:22                             ` Alvaro Karsz
2023-02-09  3:25                             ` Heng Qi
2023-02-09  3:12                           ` [virtio-comment] Re: [virtio-dev] " Heng Qi
2023-02-09  3:28                         ` [virtio-comment] Re: [virtio-dev] " Heng Qi
2023-02-08 14:44                 ` Michael S. Tsirkin
2023-02-08  2:27       ` Xuan Zhuo
2023-02-08  2:35       ` [virtio-comment] Re: [virtio-dev] " Heng Qi
2023-02-08  2:47         ` [virtio-comment] " Parav Pandit
2023-02-08  1:57   ` [virtio-comment] Re: [virtio-dev] " Heng Qi
2023-02-08 10:04     ` Michael S. Tsirkin
2023-02-08 11:23       ` Heng Qi
2023-02-08 13:39         ` [virtio-dev] " Michael S. Tsirkin
2023-02-08 10:10     ` Michael S. Tsirkin
2023-02-08 11:24       ` Heng Qi

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=20230208154450-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=alvaro.karsz@solid-run.com \
    --cc=hengqi@linux.alibaba.com \
    --cc=jasowang@redhat.com \
    --cc=parav@nvidia.com \
    --cc=virtio-comment@lists.oasis-open.org \
    --cc=virtio-dev@lists.oasis-open.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.