From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: virtio-dev-return-4006-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 [66.179.20.138]) by lists.oasis-open.org (Postfix) with ESMTP id 59E705818F01 for ; Sun, 29 Apr 2018 03:16:29 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <5d19b913-7ab3-c69e-4882-09a4de961605@oracle.com> References: <20180418104656.1450-1-sameeh@daynix.com> <20180418104656.1450-2-sameeh@daynix.com> <5d19b913-7ab3-c69e-4882-09a4de961605@oracle.com> From: Sameeh Jubran Date: Sun, 29 Apr 2018 13:16:16 +0300 Message-ID: Content-Type: multipart/alternative; boundary="000000000000165f26056afa07f7" Subject: Re: [virtio-dev] [PATCH v3 1/2] content: net: Add VIRTIO_NET_F_CTRL_STEERING_MODE feature To: Vijayabhaskar Balakrishna Cc: virtio-dev , Amnon Ilan , Yan Vugenfirer List-ID: --000000000000165f26056afa07f7 Content-Type: text/plain; charset="UTF-8" On Fri, Apr 27, 2018 at 9:17 PM, Vijayabhaskar Balakrishna < vijay.balakrishna@oracle.com> wrote: > Hi Sameeh, > > See inline.. > > On 4/18/2018 3:46 AM, Sameeh Jubran wrote: > >> From: Sameeh Jubran >> >> This commit introduces steering mode into network device. Steering >> mode is a general infrastructure for various steering modes that can >> be implemented on top of it such as Automatic and RSS. >> >> Signed-off-by: Sameeh Jubran >> --- >> content.tex | 61 ++++++++++++++++++++++++++++++ >> +++++++++++++++++++++++++++++++ >> 1 file changed, 61 insertions(+) >> >> diff --git a/content.tex b/content.tex >> index c840588..6b1f7ca 100644 >> --- a/content.tex >> +++ b/content.tex >> @@ -3115,6 +3115,9 @@ features. >> \item[VIRTIO_NET_F_CTRL_MAC_ADDR(23)] Set MAC address through control >> channel. >> + >> +\item[VIRTIO_NET_F_CTRL_STEERING_MODE(60)] Device supports configurable >> steering >> + mode. >> \end{description} >> \subsubsection{Feature bit requirements}\label{sec:Device Types / >> Network Device / Feature bits / Feature bit requirements} >> @@ -3317,6 +3320,8 @@ struct virtio_net_hdr { >> le16 csum_start; >> le16 csum_offset; >> le16 num_buffers; >> +// Only if VIRTIO_NET_F_CTRL_STEERING_MODE has been negotiated >> + le64 hash; >> }; >> \end{lstlisting} >> @@ -4013,6 +4018,62 @@ MUST format \field{virtqueue_pairs} >> according to the native endian of the guest rather than >> (necessarily when not using the legacy interface) little-endian. >> +\paragraph{Steering mode}\label{sec:Device Types / Network Device / >> Device Operation / Control Virtqueue / Steering mode} >> + >> +\begin{lstlisting} >> +// steering mode flags >> +#define STEERING_MODE_AUTO 0x1 >> + >> +// Used by the devide for returning to the driver the supported steering >> modes >> +struct virtio_net_steering_modes { >> +le32 steering_modes; >> +}; >> + >> +struct virtio_net_steering_mode { >> +le32 steering_mode; >> +le32 command; >> + >> +// A union which can be used for passing structures to one of the sub >> modes >> + union { >> + } >> +}; >> + >> +#define VIRTIO_NET_F_CTRL_STEERING_MODE 27 >> + >> +#define VIRTIO_NET_CTRL_STEERING_MODE 7 >> +#define VIRTIO_NET_CTRL_SM_GET_SUPPORTED_MODES 0 >> +#define VIRTIO_NET_CTRL_SM_CONTROL 1 >> +\end{lstlisting} >> + >> +If the VIRTIO_NET_F_CTRL_STEERING_MODE is negotiated the driver can >> send control commands for the >> +configuring the steering mode. There are multiple steering modes and >> they can be configured using >> +the VIRTIO_NET_CTRL_SM_CONTROL command. Each mode has it's own set of >> commands. >> + >> +The auto steering mode is the default mode if nothing else has been >> configured by the driver >> +and the VIRTIO_NET_F_CTRL_STEERING_MODE feature is acked by the driver. >> + >> +The class VIRTIO_NET_CTRL_STEERING_MODE has two commands: >> + >> +\begin{enumerate} >> + >> +\item VIRTIO_NET_CTRL_SM_GET_SUPPORTED_MODES is used for getting the >> supported steering modes by the device. >> + The command should be executed by the driver before attempting to >> configure the steering mode. Once the device >> + receives this command it should fill the >> virtio_net_steering_modes structure with the supported steering mode >> + flags. >> + >> +\item The command VIRTIO_NET_CTRL_SM_CONTROL is used for controlling the >> different steering modes. Each steering mode >> + has its own set of commands. When executing this command the >> structure virtio_net_steering_mode should be used as follows: >> + the \field{steering_mode} should be filled with one of the >> steering mode flags along with an appropriate command from the chosen >> > should we say? should be filled with one of the supported steering mode since it is more accurate, we can do that > + steering mode. The union of virtio_net_steering_mode should be >> used and filled as the mode's command suggests. >> +\end{enumerate} >> + >> +If this feature has been negotiated, the virtio header has an additional >> > should say: > virtio net header has an additional True, I'll change that > > +\field{hash} field attached to it. >> + >> +\subparagraph{Automatic Receive Steering}{Device Types / Network Device >> / Device Operation / Control Virtqueue / Steering mode / Automatic Receive >> Steering} >> + >> +This is the default steering mode, please refer to the "Automatic >> receive steering in multiqueue" section. >> > I see referred section named in the spec as "Automatic receive steering in > multiqueue mode". I'll add "mode" to this, thanks for catching that > + >> \paragraph{Offloads State Configuration}\label{sec:Device Types / >> Network Device / Device Operation / Control Virtqueue / Offloads State >> Configuration} >> If the VIRTIO_NET_F_CTRL_GUEST_OFFLOADS feature is negotiated, the >> driver can >> > > -- Respectfully, *Sameeh Jubran* *Linkedin * *Software Engineer @ Daynix .* --000000000000165f26056afa07f7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Fri, Apr 27, 2018 at 9:17 PM, Vijayabhaskar Balakrishna <vijay.balakrishna@oracle.com> wrote:
Hi Sameeh,

See inline..

On 4/18/2018 3:46 AM, Sameeh Jubran wrote:
From: Sameeh Jubran <sameeh.j@gmail.com>

This commit introduces steering mode into network device. Steering
mode is a general infrastructure for various steering modes that can
be implemented on top of it such as Automatic and RSS.

Signed-off-by: Sameeh Jubran <sjubran@redhat.com>
---
=C2=A0 content.tex | 61 ++++++++++++++++++++++++++++++++++++++++++++++= +++++++++++++++
=C2=A0 1 file changed, 61 insertions(+)

diff --git a/content.tex b/content.tex
index c840588..6b1f7ca 100644
--- a/content.tex
+++ b/content.tex
@@ -3115,6 +3115,9 @@ features.
=C2=A0 =C2=A0 \item[VIRTIO_NET_F_CTRL_MAC_ADDR(23)] Set MAC address th= rough control
=C2=A0 =C2=A0 =C2=A0 channel.
+
+\item[VIRTIO_NET_F_CTRL_STEERING_MODE(60)] Device supports configurab= le steering
+=C2=A0 =C2=A0 mode.
=C2=A0 \end{description}
=C2=A0 =C2=A0 \subsubsection{Feature bit requirements}\label{sec:Device Typ= es / Network Device / Feature bits / Feature bit requirements}
@@ -3317,6 +3320,8 @@ struct virtio_net_hdr {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 le16 csum_start;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 le16 csum_offset;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 le16 num_buffers;
+// Only if VIRTIO_NET_F_CTRL_STEERING_MODE has been negotiated
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 le64 hash;
=C2=A0 };
=C2=A0 \end{lstlisting}
=C2=A0 @@ -4013,6 +4018,62 @@ MUST format \field{virtqueue_pairs}
=C2=A0 according to the native endian of the guest rather than
=C2=A0 (necessarily when not using the legacy interface) little-endian.
=C2=A0 +\paragraph{Steering mode}\label{sec:Device Types / Network Device /= Device Operation / Control Virtqueue / Steering mode}
+
+\begin{lstlisting}
+// steering mode flags
+#define STEERING_MODE_AUTO=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0x1
+
+// Used by the devide for returning to the driver the supported steering m= odes
+struct virtio_net_steering_modes {
+le32 steering_modes;
+};
+
+struct virtio_net_steering_mode {
+le32 steering_mode;
+le32 command;
+
+// A union which can be used for passing structures to one of the sub mode= s
+=C2=A0 =C2=A0 union {
+=C2=A0 =C2=A0 }
+};
+
+#define VIRTIO_NET_F_CTRL_STEERING_MODE=C2=A0 =C2=A0 =C2=A027
+
+#define VIRTIO_NET_CTRL_STEERING_MODE=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 7
+#define VIRTIO_NET_CTRL_SM_GET_SUPPORTED_MODES=C2=A0 =C2=A0 =C2=A0 = =C2=A0 0
+#define VIRTIO_NET_CTRL_SM_CONTROL=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 1
+\end{lstlisting}
+
+If the VIRTIO_NET_F_CTRL_STEERING_MODE is negotiated the driver can s= end control commands for the
+configuring the steering mode. There are multiple steering modes and they = can be configured using
+the VIRTIO_NET_CTRL_SM_CONTROL command. Each mode has it's own set of = commands.
+
+The auto steering mode is the default mode if nothing else has been config= ured by the driver
+and the VIRTIO_NET_F_CTRL_STEERING_MODE feature is acked by the drive= r.
+
+The class VIRTIO_NET_CTRL_STEERING_MODE has two commands:
+
+\begin{enumerate}
+
+\item VIRTIO_NET_CTRL_SM_GET_SUPPORTED_MODES is used for getting the = supported steering modes by the device.
+=C2=A0 =C2=A0 =C2=A0 =C2=A0The command should be executed by the driver be= fore attempting to configure the steering mode. Once the device
+=C2=A0 =C2=A0 =C2=A0 =C2=A0receives this command it should fill the virtio= _net_steering_modes structure with the supported steering mode
+=C2=A0 =C2=A0 =C2=A0 =C2=A0flags.
+
+\item The command VIRTIO_NET_CTRL_SM_CONTROL is used for controlling the d= ifferent steering modes. Each steering mode
+=C2=A0 =C2=A0 =C2=A0 =C2=A0has its own set of commands. When executing thi= s command the structure virtio_net_steering_mode should be used as follows:=
+=C2=A0 =C2=A0 =C2=A0 =C2=A0the \field{steering_mode} should be filled with= one of the steering mode flags along with an appropriate command from the = chosen
should we say? should be filled with one of the supported steering mode
since it is more accurate, we can do that=C2=A0
+=C2=A0 =C2=A0 =C2=A0 =C2=A0steering mode= . The union of virtio_net_steering_mode should be used and filled as the mo= de's command suggests.
+\end{enumerate}
+
+If this feature has been negotiated, the virtio header has an additional
should say:
virtio net header has an additional
True, I'll change = that=C2=A0

+\field{hash} field attached to it.
+
+\subparagraph{Automatic Receive Steering}{Device Types / Network Device / = Device Operation / Control Virtqueue / Steering mode / Automatic Receive St= eering}
+
+This is the default steering mode, please refer to the "Automatic rec= eive steering in multiqueue" section.
I see referred section named in the spec as "Automatic receive steerin= g in multiqueue mode".
I'll add "mode" = to this, thanks for catching that=C2=A0
+
=C2=A0 \paragraph{Offloads State Configuration}\label{sec:Device Types= / Network Device / Device Operation / Control Virtqueue / Offloads State C= onfiguration}
=C2=A0 =C2=A0 If the VIRTIO_NET_F_CTRL_GUEST_OFFLOADS feature is negot= iated, the driver can




--
=
= Respectf= ully,
Sameeh= Jubran
Software Engineer @ Daynix.
--000000000000165f26056afa07f7--