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 <m...@redhat.com>
Cc: Heng Qi <hen...@linux.alibaba.com>; Xuan Zhuo <xuanz...@linux.alibaba.com>; 
virtio-comment @ lists . oasis-open . org 
<virtio-comm...@lists.oasis-open.org>; virtio-dev @ lists . oasis-open . org 
<virtio-dev@lists.oasis-open.org>; Jason Wang <jasow...@redhat.com>; Alvaro 
Karsz <alvaro.ka...@solid-run.com>
Subject: RE: [virtio-comment] [PATCH] virtio-net: support per-queue coalescing 
moderation


> From: Michael S. Tsirkin <m...@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;

>
> 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.

Reply via email to