virtio-comment.lists.oasis-open.org archive mirror
 help / color / mirror / Atom feed
From: Parav Pandit <parav@nvidia.com>
To: <virtio-comment@lists.oasis-open.org>, <mst@redhat.com>,
	<cohuck@redhat.com>
Cc: <hengqi@linux.alibaba.com>, <sburla@marvell.com>,
	<shahafs@nvidia.com>, <si-wei.liu@oracle.com>,
	<peter.hilber@opensynergy.com>, <jasowang@redhat.com>,
	<xuanzhuo@linux.alibaba.com>, Parav Pandit <parav@nvidia.com>
Subject: [virtio-comment] [PATCH v7 13/13] newdevice: Extend informative guidance on capabilities, resources
Date: Fri, 19 Jan 2024 21:24:52 +0200	[thread overview]
Message-ID: <20240119192452.3571467-14-parav@nvidia.com> (raw)
In-Reply-To: <20240119192452.3571467-1-parav@nvidia.com>

Add few informative guidance/notes about which use cases to use
device capabilities, and device resources.

Fixes: https://github.com/oasis-tcs/virtio-spec/issues/179
Signed-off-by: Parav Pandit <parav@nvidia.com>
---
 newdevice.tex | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/newdevice.tex b/newdevice.tex
index 93feb71..fc10632 100644
--- a/newdevice.tex
+++ b/newdevice.tex
@@ -26,6 +26,29 @@ \section{What Device Configuration Space Layout?}\label{sec:Creating New Device
 writable by the driver.  Therefore, no writeable field which triggers an
 action ought to be wider than 32 bits.
 
+\section{When to use Device Resource?}\label{sec:Creating New Device Types or Extending the Device / When to use Device Resource?}
+For a desired functionality if majority of fields are configured by the
+driver, or if device sets majority of fields which are changing often and
+driver wants to query them, in both of those cases, using a device
+resource is preferred.
+
+Even if such functionality is limited to small count as small as one,
+using a device resource can be helpful with large number of devices.
+
+\section{When to use the Capabilities?}\label{sec:Creating New Device Types or Extending the Device / When to use the Capabilities?}
+Any field which is more than a bit that a device want to expose to the
+driver, can be exposed as a device capability. Device and driver
+capabilities are not constantly changing fields during the life cycle
+of the driver and device; capabilities are rarely changing parameters
+used during the life time of driver possibly dynamically. Sometimes a
+system may have many similar devices, but each device may have different
+attributes, it is better to use capabilities for such attributes as well.
+
+\section{Read only attributes as capabilities?}\label{sec:Creating New Device Types or Extending the Device / Read only attributes as capabilities?}
+If there are one or more device attributes which are read only for the driver,
+they can also be used as device capabilities. They must be documented as
+read only so that driver do not try to change them.
+
 \section{What Device Number?}\label{sec:Creating New Device Types or Extending the Device / What Device Number?}
 
 Device numbers for the new devices can be reserved by the OASIS committee: email
-- 
2.34.1


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/


      parent reply	other threads:[~2024-01-19 19:26 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-19 19:24 [virtio-comment] [PATCH v7 00/13] flow filter using basic facilities of capabilities and resources Parav Pandit
2024-01-19 19:24 ` [virtio-comment] [PATCH v7 01/13] admin: Introduce self group Parav Pandit
2024-01-19 19:24 ` [virtio-comment] [PATCH v7 02/13] admin: Add more admin command status error codes Parav Pandit
2024-01-19 19:24 ` [virtio-comment] [PATCH v7 03/13] capabilities: Add theory of operation for capabilities Parav Pandit
2024-01-19 19:24 ` [virtio-comment] [PATCH v7 04/13] admin-cmds-capabilities: Add capabilities admin commands Parav Pandit
2024-01-19 19:24 ` [virtio-comment] [PATCH v7 05/13] resources: Add theory of operation for device resources Parav Pandit
2024-01-19 19:24 ` [virtio-comment] [PATCH v7 06/13] admin-cmds-resources: Add device resources admin commands Parav Pandit
2024-01-19 19:24 ` [virtio-comment] [PATCH v7 07/13] virtio-net: Add theory of operation for flow filter Parav Pandit
2024-01-19 19:24 ` [virtio-comment] [PATCH v7 08/13] virtio-net: Add flow filter capabilities Parav Pandit
2024-01-19 19:24 ` [virtio-comment] [PATCH v7 09/13] virtio-net: Add flow filter group resource Parav Pandit
2024-01-19 19:24 ` [virtio-comment] [PATCH v7 10/13] virtio-net: Add flow filter rule resource Parav Pandit
2024-01-19 19:24 ` [virtio-comment] [PATCH v7 11/13] virtio-net: Add flow filter device and driver requirements Parav Pandit
2024-01-19 19:24 ` [virtio-comment] [PATCH v7 12/13] newdevice: Improve the appendix chapter heading to reflect the content Parav Pandit
2024-01-19 19:24 ` Parav Pandit [this message]

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=20240119192452.3571467-14-parav@nvidia.com \
    --to=parav@nvidia.com \
    --cc=cohuck@redhat.com \
    --cc=hengqi@linux.alibaba.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.hilber@opensynergy.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).