From: "Michael S. Tsirkin" <mst@redhat.com>
To: Max Gurtovoy <mgurtovoy@nvidia.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
Parav Pandit <parav@nvidia.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>,
"jasowang@redhat.com" <jasowang@redhat.com>,
"cohuck@redhat.com" <cohuck@redhat.com>,
"sgarzare@redhat.com" <sgarzare@redhat.com>,
"nrupal.jani@intel.com" <nrupal.jani@intel.com>,
"Piotr.Uminski@intel.com" <Piotr.Uminski@intel.com>,
"hang.yuan@intel.com" <hang.yuan@intel.com>,
"virtio@lists.oasis-open.org" <virtio@lists.oasis-open.org>,
Zhu Lingshan <lingshan.zhu@intel.com>,
"pasic@linux.ibm.com" <pasic@linux.ibm.com>,
Shahaf Shuler <shahafs@nvidia.com>
Subject: [virtio-comment] Re: [PATCH v10 03/10] admin: introduce group administration commands
Date: Tue, 7 Mar 2023 19:34:14 -0500 [thread overview]
Message-ID: <20230307192752-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <4f869944-4ccd-c51e-0f30-dc3ba15ffd52@nvidia.com>
On Mon, Mar 06, 2023 at 01:04:42PM +0200, Max Gurtovoy wrote:
>
>
> On 03/03/2023 15:19, Michael S. Tsirkin wrote:
> > On Fri, Mar 03, 2023 at 08:17:03AM -0500, Stefan Hajnoczi wrote:
> > > On Thu, Mar 02, 2023 at 07:01:56PM -0500, Michael S. Tsirkin wrote:
> > > > On Thu, Mar 02, 2023 at 03:19:12PM -0500, Stefan Hajnoczi wrote:
> > > > > On Thu, Mar 02, 2023 at 06:40:29PM +0000, Parav Pandit wrote:
> > > > > >
> > > > > > > From: Michael S. Tsirkin <mst@redhat.com>
> > > > > > > Sent: Thursday, March 2, 2023 8:05 AM
> > > > > >
> > > > > > > +When \field{status} is VIRTIO_ADMIN_STATUS_OK, \field{status_qialifier}
> > > > > > > +is reserved and set to zero by the device.
> > > > > > > +
> > > > > > s/status_qialifier/status_qualifier
> > > > > > Missed from v10 of Feb.
> > > > > >
> > > > > > > +When \field{status} is VIRTIO_ADMIN_STATUS_EINVAL, the following table
> > > > > > > +describes possible \field{status_qialifier} values:
> > > > > > s/status_qialifier/status_qualifier
> > > > > >
> > > > > > Can you please add other useful error codes in addition to the EINVAL?
> > > > > > Few that we are needed EAGAIN, ENOMEM, EBUSY, ENODEV.
> > > > >
> > > > > Please define a unique constant for each error condition that can occur
> > > > > instead of sharing catch-all errno constants between multiple error
> > > > > conditions. If a driver wants to squash them together into an errno,
> > > > > that's fine, but I think doing this at the hardware interface level is
> > > > > just propagating the mistakes of errnos.
> > > > >
> > > > > Only status_qualifier is needed and the vague status field can be
> > > > > dropped. It's not clear to me why adding EAGAIN, ENOMEM, EBUSY, and
> > > > > ENODEV is useful. They have no meaning to the driver, only the
> > > > > status_qualifier really indicates what is going on.
> > > >
> > > > At a high level at the moment we have only two cases:
> > > > - ok
> > > > - invalid input supplied by driver
> > > >
> > > > maybe we will have more reasons for a failure - remains to
> > > > be seen.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > >
> > > > > I'm sure you guys have discussed this previously, but please provide
> > > > > rationale in the spec because it looks weird to someone with fresh eyes.
> > > > >
> > > > > Stefan
> > > >
> > > > Really most drivers just want to propagate errno to userspace.
> > > > All the detailed reporting is for sure well intentional but
> > > > in the end it is at best printed into log - end to end
> > > > people just end up with a switch statement
> > > > converting these to errno codes.
> > > > So we are passing them from device and this way there will be
> > > > some uniformity.
> > >
> > > Please clarify the rationale in the spec. I don't agree with it, as
> > > explained in my earlier email, but as long as its documented, people can
> > > try to follow it.
> > >
> > > Stefan
> >
> > It's 2:2 for now, you are with Parav, me and Cornelia like it :)
> > Or I will try to document it better.
> I don't understand this status_qualifier as well and it wasn't included in
> my original patch set.
Sounds like you feel I should drop your S.O.B - is this the complaint?
I wanted to give attribution since I started with that but sure, no
problem.
> I vote for "status" that describe generic status codes and
> "command_specific_error" that should be inspected by the driver only if
> "status" is set to "VIRTIO_ADMIN_STATUS_COMMAND_SPECIFIC_ERR".
> We discussed this so many times before (and already agreed IIRC) and adding
> this new qualifiers mechanism sounds not right to me and not intuitive for
> device and driver developers.
>
> I suggest:
>
> 1. VIRTIO_ADMIN_STATUS_Q_INVALID_OPCODE
> 2. VIRTIO_ADMIN_STATUS_Q_INVALID_FIELD
> 3. VIRTIO_ADMIN_STATUS_Q_INVALID_GROUP
> 4. VIRTIO_ADMIN_STATUS_Q_INVALID_MEMBER
> 5. VIRTIO_ADMIN_STATUS_COMMAND_SPECIFIC_ERR (for more info read the
> command_specific_error field).
I don't think it's a good idea, we'll have to agree to disagree.
The point is simple. We can have a detailed virtio specific error.
Nice for debugging most drivers won't know what to do with it.
This is the status_qualifier.
Very detailed but
generally drivers will just have a giant switch statement translating
it to a simple error code for userspace.
So to save everyone work, we also added "status"
a generic kind of error class that is easy to pass to userspace
with a small switch statement.
COMMAND_SPECIFIC_ERR is just way too much detail - commands generally
just should not fail it's a quality of implementation issue.
>
>
> >
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-03-08 0:35 UTC|newest]
Thread overview: 142+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1677761896.git.mst@redhat.com>
2023-03-06 16:40 ` [virtio-comment] [PATCH v10 00/10] Introduce device group and device management Jiri Pirko
2023-03-06 22:48 ` Michael S. Tsirkin
2023-03-07 7:17 ` Jiri Pirko
2023-03-07 17:15 ` Michael S. Tsirkin
[not found] ` <2d232eba17d75c5dad2db17dc297f34a3612c33e.1677761896.git.mst@redhat.com>
2023-03-06 17:00 ` [virtio-comment] Re: [virtio] [PATCH v10 02/10] admin: introduce device group and related concepts David Edmondson
[not found] ` <0a784140387c2a592f7e1e7bbc5ae926ec5b45da.1677761896.git.mst@redhat.com>
[not found] ` <m2leka0yvl.fsf@oracle.com>
2023-03-06 22:00 ` [virtio-comment] Re: [virtio] [PATCH v10 01/10] virtio: document forward compatibility guarantees Michael S. Tsirkin
2023-03-07 10:04 ` David Edmondson
2023-03-08 14:16 ` Cornelia Huck
2023-03-08 15:04 ` Michael S. Tsirkin
[not found] ` <ZAXcqqdwfoLokT2l@nanopsycho>
2023-03-06 22:54 ` [virtio-comment] [PATCH v10 00/10] Introduce device group and device management Michael S. Tsirkin
2023-03-07 7:21 ` Jiri Pirko
2023-03-07 17:20 ` Michael S. Tsirkin
2023-03-07 19:31 ` Parav Pandit
2023-03-08 5:11 ` Jason Wang
2023-03-08 12:02 ` Parav Pandit
2023-03-10 8:32 ` Zhu, Lingshan
2023-03-08 9:49 ` [virtio-comment] Re: [virtio] " Jiri Pirko
2023-03-08 16:30 ` Cornelia Huck
2023-03-08 17:22 ` Michael S. Tsirkin
2023-03-08 18:15 ` Jiri Pirko
[not found] ` <910b3607a5f255134d30b3e1233e564f564eafb8.1677761896.git.mst@redhat.com>
[not found] ` <20230302201011.GB2554028@fedora>
[not found] ` <20230302185214-mutt-send-email-mst@kernel.org>
[not found] ` <20230303131337.GA2866370@fedora>
[not found] ` <20230303081515-mutt-send-email-mst@kernel.org>
2023-03-03 20:23 ` [virtio-comment] Re: [PATCH v10 03/10] admin: introduce group administration commands Stefan Hajnoczi
2023-03-07 11:31 ` [virtio-comment] Re: [virtio-dev] " Jiri Pirko
2023-03-08 12:03 ` Michael S. Tsirkin
2023-03-07 10:31 ` [virtio-comment] Re: [virtio] " David Edmondson
[not found] ` <PH0PR12MB548116853CAC23DF9CA7345EDCB29@PH0PR12MB5481.namprd12.prod.outlook.com>
[not found] ` <20230302184447-mutt-send-email-mst@kernel.org>
2023-03-07 18:26 ` [virtio-comment] " Parav Pandit
2023-03-15 10:44 ` [virtio-comment] " Max Gurtovoy
[not found] ` <20230302201912.GC2554028@fedora>
[not found] ` <20230302185803-mutt-send-email-mst@kernel.org>
[not found] ` <20230303131703.GB2866370@fedora>
[not found] ` <20230303081900-mutt-send-email-mst@kernel.org>
[not found] ` <4f869944-4ccd-c51e-0f30-dc3ba15ffd52@nvidia.com>
2023-03-07 18:33 ` [virtio-comment] " Parav Pandit
2023-03-08 0:34 ` Michael S. Tsirkin [this message]
2023-03-08 1:01 ` Parav Pandit
2023-03-08 1:06 ` [virtio-comment] " Michael S. Tsirkin
2023-03-08 1:14 ` [virtio-comment] " Parav Pandit
2023-03-08 10:55 ` [virtio-comment] " Max Gurtovoy
2023-03-08 12:07 ` Michael S. Tsirkin
2023-03-08 13:05 ` Max Gurtovoy
2023-03-08 14:43 ` Cornelia Huck
2023-03-08 14:54 ` Michael S. Tsirkin
2023-03-08 15:21 ` Michael S. Tsirkin
2023-03-09 0:29 ` Max Gurtovoy
2023-03-09 6:38 ` Michael S. Tsirkin
[not found] ` <20c81b66f0b21b5bd646c24840ac3f8462c86acf.1677761896.git.mst@redhat.com>
[not found] ` <ZAXfegxCfvfLwiJT@nanopsycho>
2023-03-06 15:37 ` [virtio-comment] Re: [virtio] [PATCH v10 04/10] admin: introduce virtio admin virtqueues Max Gurtovoy
2023-03-06 18:44 ` Michael S. Tsirkin
2023-03-06 18:40 ` Michael S. Tsirkin
2023-03-07 7:36 ` Jiri Pirko
2023-03-07 16:30 ` Michael S. Tsirkin
2023-03-08 10:05 ` Jiri Pirko
2023-03-08 11:50 ` Michael S. Tsirkin
2023-03-08 12:08 ` Jiri Pirko
2023-03-08 17:29 ` Max Gurtovoy
2023-03-08 18:01 ` David Edmondson
2023-03-08 18:19 ` Jiri Pirko
2023-03-08 21:25 ` Parav Pandit
2023-03-09 7:30 ` Jiri Pirko
2023-03-09 13:04 ` Parav Pandit
2023-03-09 13:57 ` Michael S. Tsirkin
2023-03-09 14:02 ` David Edmondson
2023-03-09 14:11 ` Parav Pandit
2023-03-09 14:22 ` Michael S. Tsirkin
2023-03-09 14:30 ` Parav Pandit
2023-03-09 14:43 ` Michael S. Tsirkin
2023-03-09 16:53 ` Parav Pandit
2023-03-09 17:14 ` Michael S. Tsirkin
2023-03-09 17:16 ` Parav Pandit
2023-03-08 21:45 ` Parav Pandit
2023-03-09 7:37 ` Jiri Pirko
2023-03-09 12:36 ` Parav Pandit
2023-03-09 16:32 ` Jiri Pirko
[not found] ` <20230302204007.GD2554028@fedora>
[not found] ` <20230302190230-mutt-send-email-mst@kernel.org>
[not found] ` <20230303132840.GC2866370@fedora>
2023-03-03 13:37 ` [virtio-comment] " Michael S. Tsirkin
2023-03-03 20:21 ` [virtio-comment] Re: [virtio] " Stefan Hajnoczi
2023-03-05 9:38 ` Michael S. Tsirkin
2023-03-06 0:03 ` Stefan Hajnoczi
2023-03-06 0:18 ` Michael S. Tsirkin
[not found] ` <20230306110340.GA35392@fedora>
2023-03-06 18:37 ` Michael S. Tsirkin
2023-03-06 20:17 ` Stefan Hajnoczi
2023-03-06 21:43 ` Michael S. Tsirkin
2023-03-31 11:07 ` Michael S. Tsirkin
2023-03-07 8:03 ` Jiri Pirko
2023-03-07 14:39 ` Stefan Hajnoczi
2023-03-07 15:07 ` Jiri Pirko
2023-03-07 19:03 ` Stefan Hajnoczi
2023-03-07 19:09 ` Parav Pandit
2023-03-08 5:17 ` [virtio-comment] Re: [virtio] " Jason Wang
2023-03-08 11:58 ` Stefan Hajnoczi
2023-03-08 11:59 ` Michael S. Tsirkin
2023-03-08 10:17 ` Jiri Pirko
2023-03-08 12:44 ` Stefan Hajnoczi
2023-03-08 12:57 ` [virtio-comment] Re: [virtio] " Jiri Pirko
2023-03-08 17:17 ` Stefan Hajnoczi
2023-03-07 16:13 ` Michael S. Tsirkin
2023-03-08 10:08 ` Jiri Pirko
2023-03-08 11:44 ` Michael S. Tsirkin
[not found] ` <7f63fa0a-7deb-5875-6c6b-bfc651681653@redhat.com>
[not found] ` <20230306112030.GB35392@fedora>
2023-03-06 15:28 ` Max Gurtovoy
2023-03-06 16:25 ` Stefan Hajnoczi
2023-03-07 19:04 ` [virtio-comment] " Parav Pandit
2023-03-08 11:17 ` [virtio-comment] " Max Gurtovoy
2023-03-08 14:13 ` Stefan Hajnoczi
2023-03-08 16:19 ` Max Gurtovoy
2023-03-08 17:15 ` Stefan Hajnoczi
2023-03-08 17:21 ` Michael S. Tsirkin
2023-03-09 12:35 ` Stefan Hajnoczi
2023-03-09 13:55 ` Michael S. Tsirkin
2023-03-09 15:56 ` Stefan Hajnoczi
2023-03-08 16:21 ` Parav Pandit
[not found] ` <e8d41902-b794-66e9-8f15-e8617435047c@redhat.com>
2023-03-06 16:22 ` Jiri Pirko
[not found] ` <027fff1b-8ed7-abc0-2331-b188b8822bf4@nvidia.com>
2023-03-06 22:49 ` [virtio-comment] " Michael S. Tsirkin
2023-03-08 20:58 ` Max Gurtovoy
2023-03-08 21:09 ` Michael S. Tsirkin
2023-03-08 21:17 ` Parav Pandit
2023-03-09 7:28 ` [virtio-comment] Re: [virtio-dev] " Jiri Pirko
2023-03-07 7:56 ` Jiri Pirko
2023-03-07 10:41 ` [virtio-comment] Re: [virtio] " David Edmondson
[not found] ` <80c4bc60c9119f68b66f5a003564cec719cc1487.1677761896.git.mst@redhat.com>
2023-03-07 10:54 ` [virtio-comment] Re: [virtio-dev] [PATCH v10 08/10] admin: command list discovery David Edmondson
[not found] ` <ZAXbBgN2jw8RhE/3@nanopsycho>
2023-03-08 11:54 ` Michael S. Tsirkin
2023-03-08 12:41 ` Jiri Pirko
2023-03-31 11:43 ` Michael S. Tsirkin
2023-03-08 12:38 ` Jiri Pirko
2023-03-10 8:14 ` [virtio-comment] " Zhu, Lingshan
[not found] ` <20230302210929.GH2554028@fedora>
2023-03-31 11:39 ` Michael S. Tsirkin
[not found] ` <dd9c34ed74ee296228562f6946d4ca3f2fbee1e1.1677761896.git.mst@redhat.com>
[not found] ` <PH0PR12MB5481595368C8F0C0E16B681BDCB29@PH0PR12MB5481.namprd12.prod.outlook.com>
[not found] ` <20230303032434-mutt-send-email-mst@kernel.org>
[not found] ` <ZAXB44F3MS9CxIiK@nanopsycho>
2023-03-06 18:46 ` [virtio-comment] Re: [virtio] Re: [PATCH v10 06/10] mmio: document ADMIN_VQ as reserved Michael S. Tsirkin
2023-03-07 7:40 ` Jiri Pirko
2023-03-07 18:52 ` [virtio-comment] " Parav Pandit
2023-03-08 16:24 ` Cornelia Huck
2023-03-08 16:37 ` Parav Pandit
2023-03-08 16:30 ` [virtio-comment] " Michael S. Tsirkin
2023-03-08 18:21 ` [virtio-comment] Re: [virtio] " Jiri Pirko
[not found] ` <6677477d48dfc234d3d1a339fb39d8fa2a3b983d.1677761896.git.mst@redhat.com>
2023-03-07 11:04 ` [virtio-comment] [PATCH v10 09/10] admin: conformance clauses David Edmondson
2023-03-08 11:58 ` Michael S. Tsirkin
2023-03-08 12:59 ` David Edmondson
2023-03-08 13:05 ` [virtio-comment] Re: [virtio] " Jiri Pirko
2023-03-08 13:22 ` Michael S. Tsirkin
2023-03-08 13:44 ` David Edmondson
2023-03-08 14:02 ` Jiri Pirko
2023-03-08 14:12 ` Michael S. Tsirkin
2023-03-10 9:10 ` [virtio-comment] " Zhu, Lingshan
2023-03-10 9:13 ` Michael S. Tsirkin
2023-03-10 18:00 ` Zhu Lingshan
2023-03-10 9:34 ` Michael S. Tsirkin
2023-02-09 12:13 [virtio-dev] [PATCH v10 00/10] Introduce device group and device management Michael S. Tsirkin
2023-02-09 12:13 ` [PATCH v10 03/10] admin: introduce group administration commands Michael S. Tsirkin
2023-02-11 18:50 ` Parav Pandit
2023-02-12 9:49 ` Michael S. Tsirkin
2023-02-13 0:54 ` Max Gurtovoy
2023-02-13 8:16 ` Michael S. Tsirkin
2023-02-13 10:35 ` [virtio-comment] " Max Gurtovoy
2023-02-13 12:42 ` Cornelia Huck
2023-02-13 13:11 ` Max Gurtovoy
2023-02-13 13:13 ` [virtio] " Cornelia Huck
2023-02-13 13:26 ` Max Gurtovoy
2023-02-13 13:36 ` [virtio] " Cornelia Huck
2023-02-13 15:07 ` Max Gurtovoy
2023-02-14 1:18 ` Parav Pandit
2023-02-14 7:46 ` Michael S. Tsirkin
2023-02-14 16:44 ` Parav Pandit
2023-02-14 21:57 ` Michael S. Tsirkin
2023-02-15 4:46 ` [virtio-comment] " 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=20230307192752-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=Piotr.Uminski@intel.com \
--cc=cohuck@redhat.com \
--cc=hang.yuan@intel.com \
--cc=jasowang@redhat.com \
--cc=lingshan.zhu@intel.com \
--cc=mgurtovoy@nvidia.com \
--cc=nrupal.jani@intel.com \
--cc=parav@nvidia.com \
--cc=pasic@linux.ibm.com \
--cc=sgarzare@redhat.com \
--cc=shahafs@nvidia.com \
--cc=stefanha@redhat.com \
--cc=virtio-comment@lists.oasis-open.org \
--cc=virtio-dev@lists.oasis-open.org \
--cc=virtio@lists.oasis-open.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