Re: [virtio-dev] [PATCH v3 2/2] content: net: steering mode: Add RSS

2018-04-27 Thread Vijayabhaskar Balakrishna

Hi Sameeh,

See inline..

Thanks,
Vijay
On 4/18/2018 3:46 AM, Sameeh Jubran wrote:

From: Sameeh Jubran 

This commit introduces the RSS feature into virtio-net. It is introduced
as a sub mode for a general command which configures the steering mode.

Most modern high end network devices today support configurable hash functions,
this commit introduces RSS - Receive Side Scaling - [1] to virtio net device.

The RSS is a technology from Microsoft that boosts network device performance
by efficiently distributing the traffic among the CPUs in a multiprocessor
system.

This feature is supported in most of the modern network cards as well as most
modern OSes including Linux and Windows. It is worth mentioning that both DPDK
and Hyper-v support RSS too.

[1] 
https://docs.microsoft.com/en-us/windows-hardware/drivers/network/ndis-receive-side-scaling2

Signed-off-by: Sameeh Jubran 
---
  content.tex | 109 
  1 file changed, 109 insertions(+)

diff --git a/content.tex b/content.tex
index 6b1f7ca..3ea2b6a 100644
--- a/content.tex
+++ b/content.tex
@@ -4023,6 +4023,7 @@ according to the native endian of the guest rather than
  \begin{lstlisting}
  // steering mode flags
  #define STEERING_MODE_AUTO  0x1
+#define STEERING_MODE_RSS   0x2
  
  // Used by the devide for returning to the driver the supported steering modes

  struct virtio_net_steering_modes {
@@ -4035,6 +4036,7 @@ le32 command;
  
  // A union which can be used for passing structures to one of the sub modes

  union {
+struct virtio_net_rss rss_conf;
  }
  };
  
@@ -4074,6 +4076,113 @@ If this feature has been negotiated, the virtio header has an additional
  
  This is the default steering mode, please refer to the "Automatic receive steering in multiqueue" section.
  
+\subparagraph{Receive Side Scaling}{Device Types / Network Device / Device Operation / Control Virtqueue / Steering mode / Receive Side Scaling}

+
+\begin{lstlisting}
+#define RSS_HASH_FUNCTION_TOEPLITZ  0x1
+#define RSS_HASH_FUNCTION_SYMMETRIC 0x2
+
+// Hash function fields
+#define RSS_HASH_FIELDS_IPV4  0x0100
+#define RSS_HASH_FIELDS_TCP_IPV4  0x0200
+#define RSS_HASH_FIELDS_IPV6  0x0400
+#define RSS_HASH_FIELDS_IPV6_EX   0x0800
+#define RSS_HASH_FIELDS_TCP_IPV6  0x1000
+#define RSS_HASH_FIELDS_TCP_IPV6_EX   0x2000
+
+struct virtio_net_rss_supported_hash{
+le32 hash_function;
+}
+
+struct virtio_net_rss {
+le32 hash_function;
+le32 hash_function_flags;
+le32 hash_key_length;
+le32 indirection_table_length;
+   struct {
+   le32 hash_key[hash_key_length];
+   le32 indirection_table[indirection_table_length];
+   }
+};
+
+#define VIRTIO_NET_SM_CTRL_RSS_GET_SUPPORTED_FUNCTIONS   0
+#define VIRTIO_NET_SM_CTRL_RSS_SET   1
+\end{lstlisting}
+
+If the VIRTIO_NET_F_CTRL_STEERING_MODE is negotiated the driver can send 
control
+commands using the VIRTIO_NET_CTRL_SM_CONTROL command along with the 
STEERING_MODE_RSS
+flag for configuring RSS the virtio_net_steering_mode should be filled. The
+\field{steering_mode} field should be filled with the STEERING_MODE_RSS flag 
along
+with one of the VIRTIO_NET_SM_CTRL_RSS commands in the \field{command} field. 
The
+\field{rss_conf} field should be used.
May be reworded for clarify along the lines: If 
theVIRTIO_NET_F_CTRL_STEERING_MODE
feature bit is negotiated, the driver can send steering mode control 
command,
VIRTIO_NET_CTRL_SM_CONTROL, with the STEERING_MODE_RSSflag for 
configuring RSS provided
it is one of the supported modes.  The supported steering modes returned 
by device in
response to VIRTIO_NET_CTRL_SM_GET_SUPPORTED_MODES command issued by the 
driver.

For configuring particulars of RSS steering mode, the various fields of
virtio_net_steering_mode should be filled by the driver.  This includes
\field{steering_mode} with  STEERING_MODE_RSS flag along
with one of the VIRTIO_NET_SM_CTRL_RSS commands in the \field{command}
field in addition to union \field{rss_conf} field members.

+
+The class VIRTIO_NET_CTRL_RSS has two commands:
+
+\begin{enumerate}
+\item VIRTIO_NET_SM_CTRL_RSS_GET_SUPPORTED_FUNCTIONS returns the hash functions
+   supported by the device to the driver.
+\item VIRTIO_NET_SM_CTRL_RSS_SET applies the new RSS configuration. The 
command is
+   used by the driver for setting RSS hash function, hash key and
+   indirection table in the device.
+\end{enumerate}
+
+\devicenormative{\subparagraph}{Receive Side Scaling}{Device Types / Network 
Device / Device Operation / Control Virtqueue / Steering mode / Receive Side 
Scaling}
+
+The device MUST fill the virtio_net_rss_supported_hash structure with the hash
+functions it supports and return the structure to the driver. One or more
+flags of the RSS_HASH_FUNCTION flags MUST be used to fill the 
\field{hash_function}
+field.
+
+The 

Re: [virtio-dev] [PATCH v3 1/2] content: net: Add VIRTIO_NET_F_CTRL_STEERING_MODE feature

2018-04-27 Thread Vijayabhaskar Balakrishna

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_MODE7
+#define VIRTIO_NET_CTRL_SM_GET_SUPPORTED_MODES0
+#define VIRTIO_NET_CTRL_SM_CONTROL1
+\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

+   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

+\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".

+
  \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



-
To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org



[virtio-dev] Re: [PATCH v2 2/2] content: net: steering mode: Add RSS

2018-04-16 Thread Vijayabhaskar Balakrishna



On 4/16/2018 6:05 AM, Sameeh Jubran wrote:

From: Sameeh Jubran 

This commit introduces the RSS feature into virtio-net. It is introduced
as a sub mode for a general command which configures the steering mode.

Most modern high end network devices today support configurable hash functions,
this commit introduces RSS - Receive Side Scaling - [1] to virtio net device.

The RSS is a technology from Microsoft that boosts network device performance
by efficiently distributing the traffic among the CPUs in a multiprocessor
system.

This feature is supported in most of the modern network cards as well as most
modern OSes including Linux and Windows. It is worth mentioning that both DPDK
and Hyper-v support RSS too.

[1] 
https://docs.microsoft.com/en-us/windows-hardware/drivers/network/ndis-receive-side-scaling2

Signed-off-by: Sameeh Jubran 
---
  content.tex | 114 
  1 file changed, 114 insertions(+)

diff --git a/content.tex b/content.tex
index 3d538e8..8076147 100644
--- a/content.tex
+++ b/content.tex
@@ -4017,6 +4017,7 @@ The device MUST NOT queue packets on receive queues 
greater than
  \begin{lstlisting}
  // steering mode flags
  #define STEERING_MODE_AUTO  1
+#define STEERING_MODE_RSS   2
  
  struct virtio_net_steering_modes {

  le32 steering_modes;
@@ -4027,6 +4028,7 @@ le32 steering_mode;
  le32 command;
  
  union {

+struct virtio_net_rss rss_conf;
  }
  };
  
@@ -4066,6 +4068,118 @@ If this feature has been negotiated, the virtio header has an additional
  
  This is the default steering mode, please refer to the "Automatic receive steering in multiqueue" section.
  
+\subparagraph{Receive Side Scaling}{Device Types / Network Device / Device Operation / Control Virtqueue / Steering mode / Receive Side Scaling}

+
+\begin{lstlisting}
+#define RSS_HASH_FUNCTION_NONE  1
+#define RSS_HASH_FUNCTION_TOEPLITZ  2
+#define RSS_HASH_FUNCTION_SYMMETRIC 3

Above are bit fields?  Should it be 0x1, 0x2, 0x4 etc.,

+
+// Hash function fields
+#define RSS_HASH_FIELDS_IPV4  0x0100
+#define RSS_HASH_FIELDS_TCP_IPV4  0x0200
+#define RSS_HASH_FIELDS_IPV6  0x0400
+#define RSS_HASH_FIELDS_IPV6_EX   0x0800
+#define RSS_HASH_FIELDS_TCP_IPV6  0x1000
+#define RSS_HASH_FIELDS_TCP_IPV6_EX   0x2000
+
+struct virtio_net_rss_supported_hash{
+le32 hash_function;
+}
+
+struct virtio_net_rss {
+le32 hash_function;
+le32 hash_function_flags;
+le32 hash_key_length;
+le32 indirection_table_length;
+   struct {
+   le32 hash_key[hash_key_length];
+   le32 indirection_table[indirection_table_length];
+   }
+};
+
+#define VIRTIO_NET_SM_CTRL_RSS_GET_SUPPORTED_FUNCTIONS   0
+#define VIRTIO_NET_SM_CTRL_RSS_SET   1
+\end{lstlisting}
+
+If the VIRTIO_NET_F_CTRL_STEERING_MODE is negotiated the driver can send 
control
+commands for the RSS configuration. For configuring RSS the 
virtio_net_steering_mode
+should be filled. The \field{steering_mode} field should be filled with the 
STEERING_MODE_RSS
+flag along with one of the VIRTIO_NET_SM_CTRL_RSS commands in the 
\field{command} field. The
+\field{rss_conf} field should be used.
+
+The class VIRTIO_NET_CTRL_RSS has two commands:
+
+\begin{enumerate}
+\item VIRTIO_NET_SM_CTRL_RSS_GET_SUPPORTED_FUNCTIONS returns the hash functions
+   supported by the device to the driver.
+\item VIRTIO_NET_SM_CTRL_RSS_SET applies the new RSS configuration. The 
command is
+   used by the driver for setting RSS hash function, hash key and
+   indirection table in the device.
+\end{enumerate}
+
+\devicenormative{\subparagraph}{Receive Side Scaling}{Device Types / Network 
Device / Device Operation / Control Virtqueue / Steering mode / Receive Side 
Scaling}
+
+The device MUST fill the virtio_net_rss_supported_hash structure with the hash
+functions it supports and return the structure to the driver. Zero or more
+flags of the RSS_HASH_FUNCTION flags MUST be used to fill the 
\field{hash_function}
+field.
+
+The device MUST drop all previous RSS configuration upon receiving
+VIRTIO_NET_SM_CTRL_RSS_SET command.
+
+The device MUST set the RSS configuration according to the settings provided as
+follows, once the configuration process is completed the device SHOULD apply
+the hash function to each of the incoming packets and distribute the packets
+through the virqueues using the calculated hash and the indirection table
+that were earlier provided by the driver.
+
+Setting RSS configuration
+\begin{enumerate}
+\item The driver fills all of the fields and passes them through the control
+   queue to the device.
+
+\item The device sets the RSS configuration as provided by the driver.
+
+\item If the device successfully applied the configuration, on each packet
+   received the device MUST calculate the hashing for the packet and

calculate the hash for the 

[virtio-dev] Re: [PATCH v2 1/2] content: net: Add VIRTIO_NET_F_CTRL_STEERING_MODE feature

2018-04-16 Thread Vijayabhaskar Balakrishna

On 4/16/2018 6:05 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 | 59 +++
  1 file changed, 59 insertions(+)

diff --git a/content.tex b/content.tex
index c840588..3d538e8 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(27)] 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}
  
@@ -4007,6 +4012,60 @@ VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET command.

  The device MUST NOT queue packets on receive queues greater than
  \field{virtqueue_pairs} once it has placed the 
VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET command in the used ring.
  
+\paragraph{Steering mode}\label{sec:Device Types / Network Device / Device Operation / Control Virtqueue / Steering mode}

+
+\begin{lstlisting}
+// steering mode flags
+#define STEERING_MODE_AUTO  1

As steering mode flags is a bit field, should it be 0x1?

+
+struct virtio_net_steering_modes {
+le32 steering_modes;
+};
+
+struct virtio_net_steering_mode {
+le32 steering_mode;
+le32 command;
+
+union {
+}
+};
+
+#define VIRTIO_NET_F_CTRL_STEERING_MODE 27
+
+#define VIRTIO_NET_CTRL_STEERING_MODE7
+#define VIRTIO_NET_CTRL_SM_GET_SUPPORTED_MODES0
+#define VIRTIO_NET_CTRL_SM_CONTROL1
+\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
+   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
+\field{hash} field attached to it.

may be say: ..virtio net header has additional field{hash}

+
+\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.
+
  \subparagraph{Legacy Interface: Automatic receive steering in multiqueue 
mode}\label{sec:Device Types / Network Device / Device Operation / Control 
Virtqueue / Automatic receive steering in multiqueue mode / Legacy Interface: 
Automatic receive steering in multiqueue mode}
  When using the legacy interface, transitional devices and drivers
  MUST format \field{virtqueue_pairs}



-
To unsubscribe, e-mail: virtio-dev-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-h...@lists.oasis-open.org



Re: [virtio-dev] [RFC virtio-net 1/1] content: net: Add VIRTIO_NET_F_CTRL_RSS feature

2018-03-19 Thread Vijayabhaskar Balakrishna

On 3/19/2018 6:33 AM, Sameeh Jubran wrote:



On Thu, Mar 15, 2018 at 4:19 AM, Jason Wang > wrote:




On 2018年01月26日 00:27, Sameeh Jubran wrote:

From: Sameeh Jubran >

Most modern high end network devices today support
configurable hash functions,
this commit introduces RSS - Receive Side Scaling - [1] to
virtio net device.

The RSS is a technology from Microsoft that boosts network
device performance
by efficiently distributing the traffic among the CPUs in a
multiprocessor
system.

This feature is supported in most of the modern network cards
as well as most
modern OSes including Linux and Windows. It is worth
mentioning that both DPDK
and Hyper-v support RSS too.

[1]

https://docs.microsoft.com/en-us/windows-hardware/drivers/network/ndis-receive-side-scaling2



Signed-off-by: Sameeh Jubran >
---
  content.tex | 133

  1 file changed, 133 insertions(+)

diff --git a/content.tex b/content.tex
index c840588..5969b28 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_RSS(24)] Device supports configurable
RSS hash
+    functions.
  \end{description}
    \subsubsection{Feature bit requirements}\label{sec:Device
Types / Network Device / Feature bits / Feature bit requirements}
@@ -3138,6 +3141,8 @@ Some networking feature bits require
other networking feature bits
  \item[VIRTIO_NET_F_GUEST_ANNOUNCE] Requires
VIRTIO_NET_F_CTRL_VQ.
  \item[VIRTIO_NET_F_MQ] Requires VIRTIO_NET_F_CTRL_VQ.
  \item[VIRTIO_NET_F_CTRL_MAC_ADDR] Requires VIRTIO_NET_F_CTRL_VQ.
+
+\item[VIRTIO_NET_F_CTRL_RSS] Requires VIRTIO_NET_F_MQ.
  \end{description}


Is this a requirement of RSSv2? Looks like at least RSS can work
without multiqueue in V1.

You are right this is not a requirement and should be dropped. More on 
RSS with single hardware queue:
 https://docs.microsoft.com/en-us/windows-hardware/drivers/network/rss-with-a-single-hardware-receive-queue 

Do we still expect efficiency (distribution of traffic among CPUs) in 
case of single queue by having RSS (in host software)?




    \subsubsection{Legacy Interface: Feature
bits}\label{sec:Device Types / Network Device / Feature bits /
Legacy Interface: Feature bits}
@@ -3308,6 +3313,7 @@ struct virtio_net_hdr {
          u8 flags;
  #define VIRTIO_NET_HDR_GSO_NONE        0
  #define VIRTIO_NET_HDR_GSO_TCPV4       1
+#define VIRTIO_NET_HDR_GSO_RSS         2


What's the reason of introducing a new GSO type here? RSS should
be independent for a specific offloading type I think.

This was the straight forward option as there is no need to extend the 
virtio header but it can be moved to a specific offload.




  #define VIRTIO_NET_HDR_GSO_UDP         3
  #define VIRTIO_NET_HDR_GSO_TCPV6       4
  #define VIRTIO_NET_HDR_GSO_ECN      0x80
@@ -3317,6 +3323,8 @@ struct virtio_net_hdr {
          le16 csum_start;
          le16 csum_offset;
          le16 num_buffers;
+// Only if RSS hash offload has been negotiated
+        le64 rss_hash_value;

I asked Sameeh privately and asking here again.   Is compatibility 
maintained if we introduce a new field to virtio_net_hdr?



Not a native English speaker, but "rss_hash" should be sufficient.

will do



  };
  \end{lstlisting}
  @@ -4007,6 +4015,131 @@ VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET command.
  The device MUST NOT queue packets on receive queues greater than
  \field{virtqueue_pairs} once it has placed the
VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET command in the used ring.
  +\paragraph{RSS hash offload}\label{sec:Device Types /
Network Device / Device Operation / Control Virtqueue / RSS
hash offload}
+
+\begin{lstlisting}
+#define RSS_HASH_FUNCTION_NONE      1
+#define RSS_HASH_FUNCTION_TOEPLITZ  2
+#define RSS_HASH_FUNCTION_SYMMETRIC 3

Should above be bit field?  I mean first two are fine, should 
..SYMMETRIC should be 4 (0x4)    Otherwise description "Zero