From: Shahar Shitrit <shshitrit@nvidia.com>
To: netdev@vger.kernel.org, mst@redhat.com, jasowang@redhat.com,
pabeni@redhat.com
Cc: virtualization@lists.linux.dev, parav@nvidia.com,
shshitrit@nvidia.com, yohadt@nvidia.com,
xuanzhuo@linux.alibaba.com, eperezma@redhat.com, jgg@ziepe.ca,
kevin.tian@intel.com, kuba@kernel.org, andrew+netdev@lunn.ch,
edumazet@google.com, danielj@nvidia.com, gal@nvidia.com,
tariqt@nvidia.com
Subject: [PATCH net-next v22 03/14] virtio: Add config_op for admin commands
Date: Sun, 16 Aug 2026 15:21:00 +0300 [thread overview]
Message-ID: <20260816122111.2495240-4-shshitrit@nvidia.com> (raw)
In-Reply-To: <20260816122111.2495240-1-shshitrit@nvidia.com>
From: Daniel Jurgens <danielj@nvidia.com>
This will allow device drivers to issue administration commands.
Signed-off-by: Daniel Jurgens <danielj@nvidia.com>
Reviewed-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
---
drivers/virtio/virtio_pci_modern.c | 2 ++
include/linux/virtio_config.h | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c
index dab63b044a31..3b2515e29728 100644
--- a/drivers/virtio/virtio_pci_modern.c
+++ b/drivers/virtio/virtio_pci_modern.c
@@ -1248,6 +1248,7 @@ static const struct virtio_config_ops virtio_pci_config_nodev_ops = {
.get_shm_region = vp_get_shm_region,
.disable_vq_and_reset = vp_modern_disable_vq_and_reset,
.enable_vq_after_reset = vp_modern_enable_vq_after_reset,
+ .admin_cmd_exec = vp_modern_admin_cmd_exec,
};
static const struct virtio_config_ops virtio_pci_config_ops = {
@@ -1268,6 +1269,7 @@ static const struct virtio_config_ops virtio_pci_config_ops = {
.get_shm_region = vp_get_shm_region,
.disable_vq_and_reset = vp_modern_disable_vq_and_reset,
.enable_vq_after_reset = vp_modern_enable_vq_after_reset,
+ .admin_cmd_exec = vp_modern_admin_cmd_exec,
};
/* the PCI probing function */
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 69f84ea85d71..e36a32e0a20c 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -108,6 +108,10 @@ struct virtqueue_info {
* Returns 0 on success or error status
* If disable_vq_and_reset is set, then enable_vq_after_reset must also be
* set.
+ * @admin_cmd_exec: Execute an admin VQ command (optional).
+ * vdev: the virtio_device
+ * cmd: the command to execute
+ * Returns 0 on success or error status
*/
struct virtio_config_ops {
void (*get)(struct virtio_device *vdev, unsigned offset,
@@ -137,6 +141,8 @@ struct virtio_config_ops {
struct virtio_shm_region *region, u8 id);
int (*disable_vq_and_reset)(struct virtqueue *vq);
int (*enable_vq_after_reset)(struct virtqueue *vq);
+ int (*admin_cmd_exec)(struct virtio_device *vdev,
+ struct virtio_admin_cmd *cmd);
};
/**
--
2.49.0
next prev parent reply other threads:[~2026-08-16 12:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-16 12:20 [PATCH net-next v22 00/14] virtio_net: Add ethtool flow rules support Shahar Shitrit
2026-08-16 12:20 ` [PATCH net-next v22 01/14] virtio_pci: Remove supported_caps cache and build assert Shahar Shitrit
2026-08-16 12:20 ` [PATCH net-next v22 02/14] virtio_pci: Fix sleeping under spinlock in admin command path Shahar Shitrit
2026-08-16 12:21 ` Shahar Shitrit [this message]
2026-08-16 12:21 ` [PATCH net-next v22 04/14] virtio: Expose generic device capability operations Shahar Shitrit
2026-08-16 12:21 ` [PATCH net-next v22 05/14] virtio: Expose object create and destroy API Shahar Shitrit
2026-08-16 12:21 ` [PATCH net-next v22 06/14] virtio_net: Query and set flow filter caps Shahar Shitrit
2026-08-16 12:21 ` [PATCH net-next v22 07/14] virtio_net: Create a FF group for ethtool steering Shahar Shitrit
2026-08-16 12:21 ` [PATCH net-next v22 08/14] ethtool: Introduce ethtool_flow_type_mask() Shahar Shitrit
2026-08-16 12:21 ` [PATCH net-next v22 09/14] virtio_net: Implement layer 2 ethtool flow rules Shahar Shitrit
2026-08-16 12:21 ` [PATCH net-next v22 10/14] virtio_net: Use existing classifier if possible Shahar Shitrit
2026-08-16 12:21 ` [PATCH net-next v22 11/14] virtio_net: Implement IPv4 ethtool flow rules Shahar Shitrit
2026-08-16 12:21 ` [PATCH net-next v22 12/14] virtio_net: Add support for IPv6 ethtool steering Shahar Shitrit
2026-08-16 12:21 ` [PATCH net-next v22 13/14] virtio_net: Add support for TCP and UDP ethtool rules Shahar Shitrit
2026-08-16 12:21 ` [PATCH net-next v22 14/14] virtio_net: Add get ethtool flow rules ops Shahar Shitrit
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=20260816122111.2495240-4-shshitrit@nvidia.com \
--to=shshitrit@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=danielj@nvidia.com \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=gal@nvidia.com \
--cc=jasowang@redhat.com \
--cc=jgg@ziepe.ca \
--cc=kevin.tian@intel.com \
--cc=kuba@kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=parav@nvidia.com \
--cc=tariqt@nvidia.com \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.com \
--cc=yohadt@nvidia.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