From: Sameeh Jubran <sameeh@daynix.com>
To: virtio-dev@lists.oasis-open.org
Cc: Amnon Ilan <ailan@redhat.com>, Yan Vugenfirer <yan@daynix.com>
Subject: [virtio-dev] [PATCH v5 3/4] content: net: Add VIRTIO_NET_F_HASH_OFFLOAD feature
Date: Mon, 7 May 2018 14:24:56 +0300 [thread overview]
Message-ID: <20180507112457.14134-4-sameeh@daynix.com> (raw)
In-Reply-To: <20180507112457.14134-1-sameeh@daynix.com>
From: Sameeh Jubran <sjubran@redhat.com>
This commit introduces hash offload support into network device. The device
calculates hashes for packets all the time and especially when it uses
multiqueue, these hash values can be very useful for the driver and OS in some
cases.
This feature allows the delivery of the calculated hash to the driver.
Signed-off-by: Sameeh Jubran <sjubran@redhat.com>
---
content.tex | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/content.tex b/content.tex
index 850844e..c8add9b 100644
--- a/content.tex
+++ b/content.tex
@@ -3116,6 +3116,9 @@ features.
\item[VIRTIO_NET_F_CTRL_MAC_ADDR(23)] Set MAC address through control
channel.
+\item[VIRTIO_NET_F_HASH_OFFLOAD(61)] Device supports supplying packet's
+ hash value to the driver.
+
\item[VIRTIO_NET_F_CTRL_STEERING_MODE(60)] Device supports configurable steering
mode.
\end{description}
@@ -3320,6 +3323,7 @@ struct virtio_net_hdr {
le16 csum_start;
le16 csum_offset;
le16 num_buffers;
+// Only if VIRTIO_NET_F_HASH_OFFLOAD has been negotiated
le64 hash;
};
\end{lstlisting}
@@ -4017,6 +4021,25 @@ 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{Hash offload}\label{sec:Device Types / Network Device / Device Operation / Control Virtqueue / Hash offload}
+
+If the driver negotiates the feature bit VIRTIO_NET_F_HASH_OFFLOAD, the device
+MUST provide the driver with the hash values used for distributing the packets
+among the receive queues.
+
+If this feature has been negotiated, the virtio net header has an additional
+\field{hash} field attached to it.
+
+\drivernormative{\subparagraph}{Hash offload}{Device Types / Network Device / Device Operation / Control Virtqueue / Hash offload}
+
+If the VIRTIO_NET_F_HASH_OFFLOAD feature has been successfully negotiated the,
+driver can access and use the \field{hash} field in the virtio net header.
+
+\devicenormative{\subparagraph}{Hash offload}{Device Types / Network Device / Device Operation / Control Virtqueue / Hash offload}
+
+If the VIRTIO_NET_F_HASH_OFFLOAD feature has been successfully negotiated, the
+device MUST supply the hash value for each packet in the \field{hash} field.
+
\paragraph{Steering mode}\label{sec:Device Types / Network Device / Device Operation / Control Virtqueue / Steering mode}
\begin{lstlisting}
--
2.13.6
---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org
next prev parent reply other threads:[~2018-05-07 11:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-07 11:24 [virtio-dev] [PATCH v5 0/4] Introducing RSS to virtio-net Sameeh Jubran
2018-05-07 11:24 ` [virtio-dev] [PATCH v5 1/4] content: net: Add VIRTIO_NET_F_CTRL_STEERING_MODE feature Sameeh Jubran
2018-05-07 11:24 ` [virtio-dev] [PATCH v5 2/4] conformance: net: Add steering mode Sameeh Jubran
2018-05-07 11:24 ` Sameeh Jubran [this message]
2018-05-07 11:24 ` [virtio-dev] [PATCH v5 4/4] content: net: steering mode: Add RSS Sameeh Jubran
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=20180507112457.14134-4-sameeh@daynix.com \
--to=sameeh@daynix.com \
--cc=ailan@redhat.com \
--cc=virtio-dev@lists.oasis-open.org \
--cc=yan@daynix.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