Discussion of the VIRTIO specification
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Parav Pandit <parav@nvidia.com>
Cc: Jason Wang <jasowang@redhat.com>,
	"virtio-comment@lists.oasis-open.org"
	<virtio-comment@lists.oasis-open.org>,
	"cohuck@redhat.com" <cohuck@redhat.com>,
	"sburla@marvell.com" <sburla@marvell.com>,
	Shahaf Shuler <shahafs@nvidia.com>,
	"si-wei.liu@oracle.com" <si-wei.liu@oracle.com>,
	"xuanzhuo@linux.alibaba.com" <xuanzhuo@linux.alibaba.com>,
	Heng Qi <hengqi@linux.alibaba.com>
Subject: Re: [virtio-comment] Re: [PATCH v6 2/5] virtio-net: Add flow filter capabilities read commands
Date: Mon, 27 Nov 2023 06:47:23 -0500	[thread overview]
Message-ID: <20231127064138-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <PH0PR12MB5481E0368B0B04D4B43CECD2DCBDA@PH0PR12MB5481.namprd12.prod.outlook.com>

On Mon, Nov 27, 2023 at 11:40:25AM +0000, Parav Pandit wrote:
> 
> > From: Michael S. Tsirkin <mst@redhat.com>
> > Sent: Monday, November 27, 2023 4:58 PM
> > 
> > On Mon, Nov 27, 2023 at 10:19:49AM +0000, Parav Pandit wrote:
> > >
> > > > From: Michael S. Tsirkin <mst@redhat.com>
> > > > Sent: Friday, November 24, 2023 5:04 PM
> > > >
> > > > On Fri, Nov 24, 2023 at 06:31:03AM +0000, Parav Pandit wrote:
> > > > >
> > > > > > From: Michael S. Tsirkin <mst@redhat.com>
> > > > > > Sent: Friday, November 24, 2023 11:48 AM
> > > > > >
> > > > > > On Fri, Nov 24, 2023 at 05:40:26AM +0000, Parav Pandit wrote:
> > > > > > > > we
> > > > > > > > strongly suggest that *drivers* support both old and new
> > > > > > > > mechanism, and then *devices* will only implement what's
> > required.
> > > > > > > There are other examples in the same document that makes
> > > > > > > things worst
> > > > > > with old and new.
> > > > > > >
> > > > > > > Also there is literally no way to enforce that driver supports
> > > > > > > both and new. It is just sounds like an excuse to force
> > > > > > > infinite config space.
> > > > > >
> > > > > > There is a very simple method though.  We allow devices to
> > > > > > expose a subset of features when DMA is not used. So drivers
> > > > > > that want maximum features will always opt for DMA. We can also
> > > > > > strongly recommend that all drivers support DMA if available.
> > > > > Yeah, don't see how this is elegant at all with all mixed bits.
> > > >
> > > > It's elegant because simple low end devices can cheaply implement
> > > > MMIO and not worry about DMA.
> > > >
> > > It is not of much help in this case because any low end cheap device which
> > want to support flow filter commands need to have CVQ anyway.
> > > And hence reusing the same CVQ is more elegant that already does the DMA.
> > >
> > > So CVQ is fulfilling all the below needs.
> > > 1. Single interface for the get/set config flow filters 2. DMA the
> > > data 3. Not have any partial issues
> > 
> > I don't know what these are.
> I mean partial writes for fields.

We don't allow these and in any case, writeble fields are best avoided.


> > 
> > > 4. provides consistent structures that provisioning side will be able
> > > to use
> > 
> > Problem for provisioning is extra definitions will be needed, in a device specific
> > way.
> In vdpa tool and other OS tools of iproute2 developed, setting and getting those device specific values are useful.
> It is ok.

It does not become ok just by saying so. You are taking a single RO
value and instead of it having an address there are now 2 other ways
to address it. And you fail to see the problem and the pain you are
inflicting on software developers. Just stick with an address if you
can.

> > 
> > > > > Nor do I see any enforcement, single method via cvq still holds strong.
> > > >
> > > > You don't need to enforce things, if people want to put a lot of RAM
> > > > on device and put it in a register let them.
> > > >
> > > Not enforced. It uses the CVQ for flow group and flow filter life cycles and for
> > the sharing this config as well.
> > > Also aligns with stats that rest also agreed on.
> > 
> > I am talking about your attempt to generally say "no more config fields
> > everything must be in CVQ". 
> Config fields for initialization time is fine as the spec allows it today.
> Things which can differ, it is ok to use cvq interface.

I don't know what does "Things that can differ" means. Generally
device caps are perfect for config space. Accessed at init time only,
RO.

> > I think it's wrong definitiely for non network
> > devices must sometimes for network too and generally we need a solution for
> > config over DMA. This specific thing - whether it fits in CVQ is a separate
> > discussion.
> > 
> I explained it before, that 6 out of 19 devices has cvq which are complex enough doing things over cvq.
> These are non-network devices already.
> 
> If one of those remaining device becomes complex, it is likely it will need a cvq to suffice for the dma interface and it can just do with depth = 1.

Using generic caps and not net specific ones is a good idea.



> > 
> > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > > The method proposed here is elegant and clearly promote one
> > > > > > > way to do
> > > > > > things for driver and device with predictability.
> > > > > > >
> > > > > >
> > > > > > I don't see it as elegant at all. What is elegant is *a single
> > > > > > tag* that describes each property of the device. And this single
> > > > > > tag should be
> > > > good for everything:
> > > > > > driver, provisioning, migration. And config space offset serves as such.
> > > > > The single tag is the set of structures.
> > > >
> > > > I have no idea how this will work. If migration format i started
> > > > reviewing is anything to go by then there will be a huge elaborate
> > > > structure nothing single or simple. By comparison there's already a
> > > > proposal how provisioning can work by supplying config space.
> > > > it is just a clean model to grasp.
> > > >
> > > The provisioning model is simple is to supply all the configuration.
> > > To draw parallels to some sw side,
> > >
> > > There is per functionality socket option to set things, instead of one giant
> > structure.
> > > There is per functionality ethtool option/cmd instead of Set ALL/get ALL
> > enforcement.
> > 
> > I'm not sure how much of a parallel one can draw.
> > Do not see a lot of similarity.
> For lot of configuration they are similar that happens at slow pace.
> 
> > Devices commonly use register map. Everyone understands this paradigm.
> > 
> For initialization early device setup time, yes.
> 
> > 
> > I am not altogether happy with the way you are making migration generate
> > duplicate definitions for lots of things we already have definitions for.
> > Having a 3rd one for provisioning? Gimme a break.
> 
> For migration, we are not duplicating. Some structures are not well defined, it has some duplication.

And fyi it's already making people unhappy.

> But large part seems be able to utilized pre-defined structs.
> And here for flow filter also same structs will be used.

So if there's a 64 bit bitmap in config space, then provisioning
command which already gets config space can just use its offset.
Simpler, better.


> > 
> > 
> > > > > Provisioning access them via owner device.
> > > > > Member driver access them via CVQ or 1.2 legacy config space.
> > > >


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-11-27 11:47 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-10 12:38 [virtio-comment] [PATCH v6 0/5] virtio-net: Support flow filter for receive packets Parav Pandit
2023-11-10 12:38 ` [virtio-comment] [PATCH v6 1/5] virtio-net: Add theory of operation for flow filter Parav Pandit
2023-11-22 13:22   ` [virtio-comment] " Cornelia Huck
2023-11-22 13:30     ` [virtio-comment] " Parav Pandit
2023-11-10 12:38 ` [virtio-comment] [PATCH v6 2/5] virtio-net: Add flow filter capabilities read commands Parav Pandit
2023-11-22 13:38   ` [virtio-comment] " Cornelia Huck
2023-11-22 13:44     ` [virtio-comment] " Parav Pandit
2023-11-22 14:02   ` [virtio-comment] " Michael S. Tsirkin
2023-11-22 14:10     ` [virtio-comment] " Parav Pandit
2023-11-22 14:51       ` [virtio-comment] " Michael S. Tsirkin
2023-11-22 15:00         ` [virtio-comment] " Parav Pandit
2023-11-24  4:02         ` [virtio-comment] " Jason Wang
2023-11-24  4:13           ` Parav Pandit
2023-11-24  5:31             ` Michael S. Tsirkin
2023-11-24  5:40               ` Parav Pandit
2023-11-24  6:02                 ` Jason Wang
2023-11-24  6:41                   ` Parav Pandit
2023-11-24  9:13                     ` Michael S. Tsirkin
2023-11-27 10:19                       ` Parav Pandit
2023-11-27 11:10                         ` Michael S. Tsirkin
2023-11-27 11:12                           ` Parav Pandit
2023-11-27 12:52                             ` Michael S. Tsirkin
2023-11-27 12:58                               ` Parav Pandit
2023-11-27 13:05                                 ` Michael S. Tsirkin
2023-11-24  6:18                 ` Michael S. Tsirkin
2023-11-24  6:31                   ` Parav Pandit
2023-11-24 11:33                     ` Michael S. Tsirkin
2023-11-27 10:19                       ` Parav Pandit
2023-11-27 11:28                         ` Michael S. Tsirkin
2023-11-27 11:40                           ` Parav Pandit
2023-11-27 11:47                             ` Michael S. Tsirkin [this message]
2023-11-27 11:54                               ` Parav Pandit
2023-11-27 12:42                                 ` Michael S. Tsirkin
2023-11-27 13:05                                   ` Parav Pandit
2023-11-27 13:12                                     ` Michael S. Tsirkin
2023-11-27 13:06                                 ` Cornelia Huck
2023-11-27 13:14                                   ` Michael S. Tsirkin
2023-11-24  6:03             ` Jason Wang
2023-11-24  5:32           ` Michael S. Tsirkin
2023-11-24  5:53             ` Parav Pandit
2023-11-24  6:06               ` Michael S. Tsirkin
2023-11-24  6:27                 ` Parav Pandit
2023-11-24 10:27                   ` Michael S. Tsirkin
2023-11-27 10:19                     ` Parav Pandit
2023-11-27 11:37                       ` Michael S. Tsirkin
2023-11-27 11:47                         ` Parav Pandit
2023-12-12 15:52           ` Michael S. Tsirkin
2023-12-13  4:48             ` Jason Wang
2023-11-10 12:38 ` [virtio-comment] [PATCH v6 3/5] virtio-net: Add flow filter group life cycle commands Parav Pandit
2023-11-22 13:42   ` [virtio-comment] " Cornelia Huck
2023-11-10 12:38 ` [virtio-comment] [PATCH v6 4/5] virtio-net: Add flow filter match entry, action and requests Parav Pandit
2023-11-22 13:52   ` [virtio-comment] " Cornelia Huck
2023-11-10 12:38 ` [virtio-comment] [PATCH v6 5/5] virtio-net: Add flow filter device and driver requirements Parav Pandit
2023-11-20  6:47 ` [virtio-comment] RE: [PATCH v6 0/5] virtio-net: Support flow filter for receive packets Parav Pandit
2023-11-21 12:54   ` Parav Pandit
2023-11-22 11:26   ` Cornelia Huck
2023-11-22 12:03     ` Parav Pandit
2023-11-23 10:22     ` Parav Pandit

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=20231127064138-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=hengqi@linux.alibaba.com \
    --cc=jasowang@redhat.com \
    --cc=parav@nvidia.com \
    --cc=sburla@marvell.com \
    --cc=shahafs@nvidia.com \
    --cc=si-wei.liu@oracle.com \
    --cc=virtio-comment@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox