Return-Path: virtio-comment-return-1652-cohuck=redhat.com@lists.oasis-open.org Sender: List-Post: List-Help: List-Unsubscribe: List-Subscribe: Received: from lists.oasis-open.org (oasis-open.org [10.110.1.242]) by lists.oasis-open.org (Postfix) with ESMTP id ACDFA98655F for ; Fri, 22 Jan 2021 08:23:36 +0000 (UTC) From: Jason Wang Date: Fri, 22 Jan 2021 16:23:25 +0800 Message-Id: <20210122082325.17298-1-jasowang@redhat.com> MIME-Version: 1.0 Subject: [virtio-comment] [PATCH] virtio-net: introduce admin control virtqueue Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable To: virtio-comment@lists.oasis-open.org Cc: mst@redhat.com, Jason Wang List-ID: When implementing multiple (sub)functions virtio device like SRIOV or sub-function. We're suffering from several issues: - There's no management interface for management function (PF) to configure features, attributes for a (sub)function - Per (sub)function control virtqueue could be too expensive as the number of (sub)functions could be very large - Virtualize per (sub)function control virtqueue could be very challenge as we need the support of DMA isolation at queue level So this patch introduces the feature of VIRTIO_NET_CTRL_ADMIN_VQ. This allows the device to implement a single admin control virtqueue to manage per (sub)function features and attributes. The idea is simple, a new function id is introduced on top of the exist virtio_net_ctrl structure. This id is transport or device specific to uniquely identify a (sub)function. With this, we get a way of using management function (PF) to configure per (sub)function features and attributes. And since the admin control virtqueue belongs to management function (PF), the DMA is naturally isolated at (sub)function level instead of the queue level for per (sub)function control vq. Signed-off-by: Jason Wang --- content.tex | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/content.tex b/content.tex index 620c0e2..98592a4 100644 --- a/content.tex +++ b/content.tex @@ -2940,6 +2940,9 @@ \subsection{Feature bits}\label{sec:Device Types / Ne= twork Device / Feature bits \item[VIRTIO_NET_F_CTRL_MAC_ADDR(23)] Set MAC address through control channel. =20 +\item[VIRTIO_NET_F_ADMIN_CTRL_VQ(56)] Admin control channel is + available. + \item[VIRTIO_NET_F_HASH_REPORT(57)] Device can report per-packet hash value and a type of calculated hash. =20 @@ -3864,6 +3867,26 @@ \subsubsection{Control Virtqueue}\label{sec:Device T= ypes / Network Device / Devi do except issue a diagnostic if \field{ack} is not VIRTIO_NET_OK. =20 +\subsubsection{Admin Control Virtqueue}\label{sec:Device Types / Network D= evice / Device Operation / Control Virtqueue} + +When VIRTIO_NET_F_ADMIN_CTRL_VQ is negotiated, the driver can use the +control virtqueue to manipulate features of individual function where +the control virtqueues is not easily implemented in each function. + +All commands are of the following form: + +\begin{lstlisting} +struct virtio_net_admin_ctrl { + u32 function_id; + struct virtio_net_ctrl ctrl; +}; + +\end{lstlisting} + +The \field{function_id} is an unique transport or device specific +identifier for a function. E.g for the case of PCI SRIOV, it's the id +of PCI function. + \paragraph{Packet Receive Filtering}\label{sec:Device Types / Network Devi= ce / Device Operation / Control Virtqueue / Packet Receive Filtering} \label{sec:Device Types / Network Device / Device Operation / Control Virt= queue / Setting Promiscuous Mode}%old label for latexdiff =20 --=20 2.25.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-lis= ts Committee: https://www.oasis-open.org/committees/virtio/ Join OASIS: https://www.oasis-open.org/join/