From: "Michael S. Tsirkin" <mst@redhat.com>
To: Parav Pandit <parav@nvidia.com>
Cc: "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: [virtio-comment] Re: [PATCH v7 2/5] virtio-net: Add flow filter capabilities read commands
Date: Fri, 24 Nov 2023 00:59:00 -0500 [thread overview]
Message-ID: <20231124004105-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <PH0PR12MB5481A6DFAEBD321707E31BDDDCB8A@PH0PR12MB5481.namprd12.prod.outlook.com>
On Fri, Nov 24, 2023 at 02:57:49AM +0000, Parav Pandit wrote:
>
>
> > From: Michael S. Tsirkin <mst@redhat.com>
> > Sent: Friday, November 24, 2023 4:28 AM
> >
> > On Thu, Nov 23, 2023 at 06:40:59PM +0000, Parav Pandit wrote:
> > >
> > >
> > > > From: Michael S. Tsirkin <mst@redhat.com>
> > > > Sent: Thursday, November 23, 2023 7:44 PM
> > > >
> > > > On Thu, Nov 23, 2023 at 11:21:16AM +0200, Parav Pandit wrote:
> > > > > The device responds flow filter capabilities using two commands.
> > > > > One command indicates generic flow filter device limits such as
> > > > > number of flow filters, number of flow filter groups, support or
> > > > > multiple transports etc.
> > > > >
> > > > > The second command indicates supported match types, and fields of
> > > > > the packet.
> > > > >
> > > > > Fixes: https://github.com/oasis-tcs/virtio-spec/issues/179
> > > > > Signed-off-by: Heng Qi <hengqi@linux.alibaba.com>
> > > > > Signed-off-by: Parav Pandit <parav@nvidia.com>
> > > >
> > > > So I am still unsure about these commands. What exactly is the point?
> > > >
> > > Two reasons.
> > > The device reports maximum capabilities that the driver knows upfront. So
> > that it does not need to come to device to know when to fail.
> >
> > But that requires driver to keep extra state which can easily get out of sync.
> Not sure what you mean by get out of sync from whom?
> Not from the device.
yes from the device. I can't say for sure how because I now see this
patch is implying driver requirements that you didn't document. I
thought the IDs can be any number. It appears that's not what you meant.
I can try and guess what you meant but I'd rather have you rewrite this
in a way that makes the meaning explicit.
> There are many capabilities here each with a different use.
And you are under the impression that dumping all kind of stuff in a
single place is good somehow?
> For many caps, it is to know what is supported/not to decide in the driver.
I can't parse this sentence.
> Certain caps are max to know what is the range of id that driver can use like flow filter id, group id.
Maybe then. But there's apparently no requirement for either device or
driver to put it in this range.
> > For what benefit?
> >
> For functional work.
You don't really explain what kind of work in this patchset, or in the
commit logs. Maybe it's obvious for you but not for everyone.
> > > In future one may want to provision certain max limits that device can have
> > as they eventually will consume certain device hardware resources.
> >
> > I don't exactly see how this helps provisioning.
> >
> Provisioning side will set parameters which will reflect these limits to be same on src and dst hypervisor when device migration is used.
But making provisioning depend on driver being fully loaded
and accessing the command is creating a chicken and egg problem.
Provisioning is much more likely to use some new admin commands
over an owner device. So this command is useless for it.
> >
> > > > Patch 5/5 mandates that device validates all fields already.
> > >
> > > > Are there guests that will actually look at these caps as opposed to
> > > > just sending commands and looking at the return status?
> > > When the device reaches the limit it would not even send the command.
> >
> >
> > That's more logic for the driver to implement. Why should it bother when it
> > can just send it?
> >
> It can just send it and fail and flood with error logs.
If the spec says device can fail and that is expected then it won't flood.
If you don't want driver to send some commands you should say that
instead of saying device should filter them.
> Also it cannot just send some random id based numbers that device does not support.
Aha. I think I'm beginning to guess. You wrote:
field{max_groups} indicates total number of flow filter groups supported
by the device whose group identifiers can be any value in the range from 0 to
\field{max_groups - 1}.
and you think this implies that it can't be out of that range.
That's not how logic works though ;)
> > > For example if the device supports only one group, it wont implement
> > ethtool ntuple and will chose only arfs as one example.
> >
> > Sounds like a contrived example why does device even expose flow steering
> > then?
> It is not contrived at all.
>
> A device may be support one or multiple groups. Each group in the OS has multiple users.
> One group is enough for either ARFS or ethool but not both.
> Two groups can allow ARFS and ethtool to co-exists.
> 3 groups will allow in future to expose some queues to user apps.
Oh I misunderstood.
Then why would driver decide to force a decision to ARFS
specifically?
It will likely leave this to the user.
--
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/
next prev parent reply other threads:[~2023-11-24 5:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-23 9:21 [virtio-comment] [PATCH v7 0/5] virtio-net: Support flow filter for receive packets Parav Pandit
2023-11-23 9:21 ` [virtio-comment] [PATCH v7 1/5] virtio-net: Add theory of operation for flow filter Parav Pandit
2023-11-23 9:21 ` [virtio-comment] [PATCH v7 2/5] virtio-net: Add flow filter capabilities read commands Parav Pandit
2023-11-23 14:13 ` [virtio-comment] " Michael S. Tsirkin
2023-11-23 18:40 ` [virtio-comment] " Parav Pandit
2023-11-23 22:57 ` [virtio-comment] " Michael S. Tsirkin
2023-11-24 2:57 ` [virtio-comment] " Parav Pandit
2023-11-24 5:59 ` Michael S. Tsirkin [this message]
2023-11-24 6:27 ` Parav Pandit
2023-11-24 10:14 ` [virtio-comment] " Michael S. Tsirkin
2023-11-27 10:19 ` [virtio-comment] " Parav Pandit
2023-11-27 11:22 ` [virtio-comment] " Michael S. Tsirkin
2023-11-27 11:33 ` [virtio-comment] " Parav Pandit
2023-11-27 11:40 ` [virtio-comment] " Michael S. Tsirkin
2023-11-27 11:50 ` [virtio-comment] " Parav Pandit
2023-11-27 12:33 ` [virtio-comment] " Michael S. Tsirkin
2023-11-27 12:49 ` [virtio-comment] " Parav Pandit
2023-11-27 13:00 ` [virtio-comment] " Michael S. Tsirkin
2023-11-23 9:21 ` [virtio-comment] [PATCH v7 3/5] virtio-net: Add flow filter group life cycle commands Parav Pandit
2023-11-23 9:21 ` [virtio-comment] [PATCH v7 4/5] virtio-net: Add flow filter match entry, action and requests Parav Pandit
2023-11-23 9:21 ` [virtio-comment] [PATCH v7 5/5] virtio-net: Add flow filter device and driver requirements 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=20231124004105-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=cohuck@redhat.com \
--cc=hengqi@linux.alibaba.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 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.