DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v1] net/tap: report on supported RSS hash functions
@ 2018-05-08 16:51 Ophir Munk
  2018-05-08 17:07 ` [dpdk-dev] [PATCH v2] " Ophir Munk
  2018-05-10 17:27 ` Ophir Munk
  0 siblings, 2 replies; 7+ messages in thread
From: Ophir Munk @ 2018-05-08 16:51 UTC (permalink / raw)
  To: dev, Pascal Mazon; +Cc: Thomas Monjalon, Olga Shern, Ophir Munk, Shahaf Shuler

Report on TAP supported RSS functions as part of dev_infos_get
callback: ETH_RSS_IP, ETH_RSS_UDP and ETH_RSS_TCP.
Known limitation: TAP supports all of the above hash functions together
and not in partial combinations.
Previous to this commit RSS support was reported as none. Since the
introduction of [1] it is required that all RSS configurations will be
verified.

[1] commit 8863a1fbfc66 ("ethdev: add supported hash function check")

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
---
 doc/guides/nics/tap.rst           | 5 +++++
 drivers/net/tap/rte_eth_tap.c     | 8 ++++++++
 drivers/net/tap/tap_bpf_program.c | 2 +-
 drivers/net/tap/tap_rss.h         | 3 +++
 4 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/doc/guides/nics/tap.rst b/doc/guides/nics/tap.rst
index dca64c9..2714868 100644
--- a/doc/guides/nics/tap.rst
+++ b/doc/guides/nics/tap.rst
@@ -258,6 +258,11 @@ Please refer to ``iproute2`` package file ``lib/bpf.c`` function
 An example utility for eBPF instruction generation in the format of C arrays will
 be added in next releases
 
+TAP reports on supported RSS functions as part of dev_infos_get callback:
+``ETH_RSS_IP``, ``ETH_RSS_UDP`` and ``ETH_RSS_TCP``.
+**Known limitation:** TAP supports all of the above hash functions together
+and not in partial combinations.
+
 Systems supporting flow API
 ---------------------------
 
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index c535418..a9f63c4 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -36,6 +36,7 @@
 #include <linux/if_ether.h>
 #include <fcntl.h>
 
+#include <tap_rss.h>
 #include <rte_eth_tap.h>
 #include <tap_flow.h>
 #include <tap_netlink.h>
@@ -875,6 +876,13 @@ tap_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	dev_info->tx_queue_offload_capa = tap_tx_offload_get_queue_capa();
 	dev_info->tx_offload_capa = tap_tx_offload_get_port_capa() |
 				    dev_info->tx_queue_offload_capa;
+	dev_info->hash_key_size = TAP_RSS_HASH_KEY_SIZE;
+	/* 
+	 * limitation: TAP suppors all of the following hash
+	 * functions together and not in partial combinations 
+	 */
+	dev_info->flow_type_rss_offloads = 
+		ETH_RSS_IP | ETH_RSS_UDP | ETH_RSS_TCP;
 }
 
 static int
diff --git a/drivers/net/tap/tap_bpf_program.c b/drivers/net/tap/tap_bpf_program.c
index dabbf7c..1cb7382 100644
--- a/drivers/net/tap/tap_bpf_program.c
+++ b/drivers/net/tap/tap_bpf_program.c
@@ -84,7 +84,7 @@ struct ipv6_l3_l4_tuple {
 	__u16       sport;
 } __attribute__((packed));
 
-static const __u8 def_rss_key[] = {
+static const __u8 def_rss_key[TAP_RSS_HASH_KEY_SIZE] = {
 	0xd1, 0x81, 0xc6, 0x2c,
 	0xf7, 0xf4, 0xdb, 0x5b,
 	0x19, 0x83, 0xa2, 0xfc,
diff --git a/drivers/net/tap/tap_rss.h b/drivers/net/tap/tap_rss.h
index 4ebb653..bd6b97b 100644
--- a/drivers/net/tap/tap_rss.h
+++ b/drivers/net/tap/tap_rss.h
@@ -9,6 +9,9 @@
 #define TAP_MAX_QUEUES 16
 #endif
 
+/* Fixed RSS hash key size in bytes. */
+#define TAP_RSS_HASH_KEY_SIZE 40
+
 /* hashed fields for RSS */
 enum hash_field {
 	HASH_FIELD_IPV4_L3,	/* IPv4 src/dst addr */
-- 
2.7.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH v2] net/tap: report on supported RSS hash functions
  2018-05-08 16:51 [dpdk-dev] [PATCH v1] net/tap: report on supported RSS hash functions Ophir Munk
@ 2018-05-08 17:07 ` Ophir Munk
  2018-05-09 22:19   ` Ferruh Yigit
  2018-05-10 17:27 ` Ophir Munk
  1 sibling, 1 reply; 7+ messages in thread
From: Ophir Munk @ 2018-05-08 17:07 UTC (permalink / raw)
  To: dev, Pascal Mazon; +Cc: Thomas Monjalon, Olga Shern, Ophir Munk, Shahaf Shuler

Report on TAP supported RSS functions as part of dev_infos_get
callback: ETH_RSS_IP, ETH_RSS_UDP and ETH_RSS_TCP.
Known limitation: TAP supports all of the above hash functions together
and not in partial combinations.
Previous to this commit RSS support was reported as none. Since the
introduction of [1] it is required that all RSS configurations will be
verified.

[1] commit 8863a1fbfc66 ("ethdev: add supported hash function check")

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
---
v1:
Initial release
v2: 
fix checkpach warnings

 doc/guides/nics/tap.rst           | 5 +++++
 drivers/net/tap/rte_eth_tap.c     | 8 ++++++++
 drivers/net/tap/tap_bpf_program.c | 2 +-
 drivers/net/tap/tap_rss.h         | 3 +++
 4 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/doc/guides/nics/tap.rst b/doc/guides/nics/tap.rst
index dca64c9..2714868 100644
--- a/doc/guides/nics/tap.rst
+++ b/doc/guides/nics/tap.rst
@@ -258,6 +258,11 @@ Please refer to ``iproute2`` package file ``lib/bpf.c`` function
 An example utility for eBPF instruction generation in the format of C arrays will
 be added in next releases
 
+TAP reports on supported RSS functions as part of dev_infos_get callback:
+``ETH_RSS_IP``, ``ETH_RSS_UDP`` and ``ETH_RSS_TCP``.
+**Known limitation:** TAP supports all of the above hash functions together
+and not in partial combinations.
+
 Systems supporting flow API
 ---------------------------
 
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index c535418..9ef511e 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -36,6 +36,7 @@
 #include <linux/if_ether.h>
 #include <fcntl.h>
 
+#include <tap_rss.h>
 #include <rte_eth_tap.h>
 #include <tap_flow.h>
 #include <tap_netlink.h>
@@ -875,6 +876,13 @@ tap_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	dev_info->tx_queue_offload_capa = tap_tx_offload_get_queue_capa();
 	dev_info->tx_offload_capa = tap_tx_offload_get_port_capa() |
 				    dev_info->tx_queue_offload_capa;
+	dev_info->hash_key_size = TAP_RSS_HASH_KEY_SIZE;
+	/*
+	 * limitation: TAP suppors all of the following hash
+	 * functions together and not in partial combinations
+	 */
+	dev_info->flow_type_rss_offloads =
+		ETH_RSS_IP | ETH_RSS_UDP | ETH_RSS_TCP;
 }
 
 static int
diff --git a/drivers/net/tap/tap_bpf_program.c b/drivers/net/tap/tap_bpf_program.c
index dabbf7c..1cb7382 100644
--- a/drivers/net/tap/tap_bpf_program.c
+++ b/drivers/net/tap/tap_bpf_program.c
@@ -84,7 +84,7 @@ struct ipv6_l3_l4_tuple {
 	__u16       sport;
 } __attribute__((packed));
 
-static const __u8 def_rss_key[] = {
+static const __u8 def_rss_key[TAP_RSS_HASH_KEY_SIZE] = {
 	0xd1, 0x81, 0xc6, 0x2c,
 	0xf7, 0xf4, 0xdb, 0x5b,
 	0x19, 0x83, 0xa2, 0xfc,
diff --git a/drivers/net/tap/tap_rss.h b/drivers/net/tap/tap_rss.h
index 4ebb653..bd6b97b 100644
--- a/drivers/net/tap/tap_rss.h
+++ b/drivers/net/tap/tap_rss.h
@@ -9,6 +9,9 @@
 #define TAP_MAX_QUEUES 16
 #endif
 
+/* Fixed RSS hash key size in bytes. */
+#define TAP_RSS_HASH_KEY_SIZE 40
+
 /* hashed fields for RSS */
 enum hash_field {
 	HASH_FIELD_IPV4_L3,	/* IPv4 src/dst addr */
-- 
2.7.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/tap: report on supported RSS hash functions
  2018-05-08 17:07 ` [dpdk-dev] [PATCH v2] " Ophir Munk
@ 2018-05-09 22:19   ` Ferruh Yigit
  2018-05-09 22:22     ` Ferruh Yigit
  0 siblings, 1 reply; 7+ messages in thread
From: Ferruh Yigit @ 2018-05-09 22:19 UTC (permalink / raw)
  To: Ophir Munk, dev, Pascal Mazon; +Cc: Thomas Monjalon, Olga Shern, Shahaf Shuler

On 5/8/2018 6:07 PM, Ophir Munk wrote:
> Report on TAP supported RSS functions as part of dev_infos_get
> callback: ETH_RSS_IP, ETH_RSS_UDP and ETH_RSS_TCP.
> Known limitation: TAP supports all of the above hash functions together
> and not in partial combinations.
> Previous to this commit RSS support was reported as none. Since the
> introduction of [1] it is required that all RSS configurations will be
> verified.
> 
> [1] commit 8863a1fbfc66 ("ethdev: add supported hash function check")
> 
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/tap: report on supported RSS hash functions
  2018-05-09 22:19   ` Ferruh Yigit
@ 2018-05-09 22:22     ` Ferruh Yigit
  0 siblings, 0 replies; 7+ messages in thread
From: Ferruh Yigit @ 2018-05-09 22:22 UTC (permalink / raw)
  To: Ophir Munk, dev, Pascal Mazon; +Cc: Thomas Monjalon, Olga Shern, Shahaf Shuler

On 5/9/2018 11:19 PM, Ferruh Yigit wrote:
> On 5/8/2018 6:07 PM, Ophir Munk wrote:
>> Report on TAP supported RSS functions as part of dev_infos_get
>> callback: ETH_RSS_IP, ETH_RSS_UDP and ETH_RSS_TCP.
>> Known limitation: TAP supports all of the above hash functions together
>> and not in partial combinations.
>> Previous to this commit RSS support was reported as none. Since the
>> introduction of [1] it is required that all RSS configurations will be
>> verified.
>>
>> [1] commit 8863a1fbfc66 ("ethdev: add supported hash function check")
>>
>> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH v2] net/tap: report on supported RSS hash functions
  2018-05-08 16:51 [dpdk-dev] [PATCH v1] net/tap: report on supported RSS hash functions Ophir Munk
  2018-05-08 17:07 ` [dpdk-dev] [PATCH v2] " Ophir Munk
@ 2018-05-10 17:27 ` Ophir Munk
  2018-05-10 20:13   ` Ferruh Yigit
  1 sibling, 1 reply; 7+ messages in thread
From: Ophir Munk @ 2018-05-10 17:27 UTC (permalink / raw)
  To: dev, Pascal Mazon; +Cc: Thomas Monjalon, Olga Shern, Ophir Munk, Shahaf Shuler

Report on TAP supported RSS functions as part of dev_infos_get
callback: ETH_RSS_IP, ETH_RSS_UDP and ETH_RSS_TCP.
Known limitation: TAP supports all of the above hash functions together
and not in partial combinations.
Previous to this commit RSS support was reported as none. Since the
introduction of [1] it is required that all RSS configurations will be
verified.

[1] commit 8863a1fbfc66 ("ethdev: add supported hash function check")

Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
---
v1:
Initial release
v2: 
fix checkpach warnings

 doc/guides/nics/tap.rst           | 5 +++++
 drivers/net/tap/rte_eth_tap.c     | 8 ++++++++
 drivers/net/tap/tap_bpf_program.c | 2 +-
 drivers/net/tap/tap_rss.h         | 3 +++
 4 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/doc/guides/nics/tap.rst b/doc/guides/nics/tap.rst
index dca64c9..2714868 100644
--- a/doc/guides/nics/tap.rst
+++ b/doc/guides/nics/tap.rst
@@ -258,6 +258,11 @@ Please refer to ``iproute2`` package file ``lib/bpf.c`` function
 An example utility for eBPF instruction generation in the format of C arrays will
 be added in next releases
 
+TAP reports on supported RSS functions as part of dev_infos_get callback:
+``ETH_RSS_IP``, ``ETH_RSS_UDP`` and ``ETH_RSS_TCP``.
+**Known limitation:** TAP supports all of the above hash functions together
+and not in partial combinations.
+
 Systems supporting flow API
 ---------------------------
 
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index c535418..9ef511e 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -36,6 +36,7 @@
 #include <linux/if_ether.h>
 #include <fcntl.h>
 
+#include <tap_rss.h>
 #include <rte_eth_tap.h>
 #include <tap_flow.h>
 #include <tap_netlink.h>
@@ -875,6 +876,13 @@ tap_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	dev_info->tx_queue_offload_capa = tap_tx_offload_get_queue_capa();
 	dev_info->tx_offload_capa = tap_tx_offload_get_port_capa() |
 				    dev_info->tx_queue_offload_capa;
+	dev_info->hash_key_size = TAP_RSS_HASH_KEY_SIZE;
+	/*
+	 * limitation: TAP suppors all of the following hash
+	 * functions together and not in partial combinations
+	 */
+	dev_info->flow_type_rss_offloads =
+		ETH_RSS_IP | ETH_RSS_UDP | ETH_RSS_TCP;
 }
 
 static int
diff --git a/drivers/net/tap/tap_bpf_program.c b/drivers/net/tap/tap_bpf_program.c
index dabbf7c..1cb7382 100644
--- a/drivers/net/tap/tap_bpf_program.c
+++ b/drivers/net/tap/tap_bpf_program.c
@@ -84,7 +84,7 @@ struct ipv6_l3_l4_tuple {
 	__u16       sport;
 } __attribute__((packed));
 
-static const __u8 def_rss_key[] = {
+static const __u8 def_rss_key[TAP_RSS_HASH_KEY_SIZE] = {
 	0xd1, 0x81, 0xc6, 0x2c,
 	0xf7, 0xf4, 0xdb, 0x5b,
 	0x19, 0x83, 0xa2, 0xfc,
diff --git a/drivers/net/tap/tap_rss.h b/drivers/net/tap/tap_rss.h
index 4ebb653..bd6b97b 100644
--- a/drivers/net/tap/tap_rss.h
+++ b/drivers/net/tap/tap_rss.h
@@ -9,6 +9,9 @@
 #define TAP_MAX_QUEUES 16
 #endif
 
+/* Fixed RSS hash key size in bytes. */
+#define TAP_RSS_HASH_KEY_SIZE 40
+
 /* hashed fields for RSS */
 enum hash_field {
 	HASH_FIELD_IPV4_L3,	/* IPv4 src/dst addr */
-- 
2.7.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/tap: report on supported RSS hash functions
  2018-05-10 17:27 ` Ophir Munk
@ 2018-05-10 20:13   ` Ferruh Yigit
  2018-05-10 22:05     ` Ophir Munk
  0 siblings, 1 reply; 7+ messages in thread
From: Ferruh Yigit @ 2018-05-10 20:13 UTC (permalink / raw)
  To: Ophir Munk, dev, Pascal Mazon; +Cc: Thomas Monjalon, Olga Shern, Shahaf Shuler

On 5/10/2018 6:27 PM, Ophir Munk wrote:
> Report on TAP supported RSS functions as part of dev_infos_get
> callback: ETH_RSS_IP, ETH_RSS_UDP and ETH_RSS_TCP.
> Known limitation: TAP supports all of the above hash functions together
> and not in partial combinations.
> Previous to this commit RSS support was reported as none. Since the
> introduction of [1] it is required that all RSS configurations will be
> verified.
> 
> [1] commit 8863a1fbfc66 ("ethdev: add supported hash function check")
> 
> Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> ---
> v1:
> Initial release
> v2: 
> fix checkpach warnings

Hi Ophir,

This patch has been sent after it has been applied. v2 was applied and this is
also v2, and as far as I can see there is no change so I assume this has been
sent by mistake, if not please shout.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH v2] net/tap: report on supported RSS hash functions
  2018-05-10 20:13   ` Ferruh Yigit
@ 2018-05-10 22:05     ` Ophir Munk
  0 siblings, 0 replies; 7+ messages in thread
From: Ophir Munk @ 2018-05-10 22:05 UTC (permalink / raw)
  To: Ferruh Yigit, dev, Pascal Mazon
  Cc: Thomas Monjalon, Olga Shern, Shahaf Shuler

Hi Ferruh,
Indeed was sent by mistake, then immediately  was superseded, therefore to be ignored.
Thank you.

> -----Original Message-----
> From: Ferruh Yigit [mailto:ferruh.yigit@intel.com]
> Sent: Thursday, May 10, 2018 11:13 PM
> To: Ophir Munk <ophirmu@mellanox.com>; dev@dpdk.org; Pascal Mazon
> <pascal.mazon@6wind.com>
> Cc: Thomas Monjalon <thomas@monjalon.net>; Olga Shern
> <olgas@mellanox.com>; Shahaf Shuler <shahafs@mellanox.com>
> Subject: Re: [dpdk-dev] [PATCH v2] net/tap: report on supported RSS hash
> functions
> 
> On 5/10/2018 6:27 PM, Ophir Munk wrote:
> > Report on TAP supported RSS functions as part of dev_infos_get
> > callback: ETH_RSS_IP, ETH_RSS_UDP and ETH_RSS_TCP.
> > Known limitation: TAP supports all of the above hash functions
> > together and not in partial combinations.
> > Previous to this commit RSS support was reported as none. Since the
> > introduction of [1] it is required that all RSS configurations will be
> > verified.
> >
> > [1] commit 8863a1fbfc66 ("ethdev: add supported hash function check")
> >
> > Signed-off-by: Ophir Munk <ophirmu@mellanox.com>
> > ---
> > v1:
> > Initial release
> > v2:
> > fix checkpach warnings
> 
> Hi Ophir,
> 
> This patch has been sent after it has been applied. v2 was applied and this is
> also v2, and as far as I can see there is no change so I assume this has been
> sent by mistake, if not please shout.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-05-10 22:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-08 16:51 [dpdk-dev] [PATCH v1] net/tap: report on supported RSS hash functions Ophir Munk
2018-05-08 17:07 ` [dpdk-dev] [PATCH v2] " Ophir Munk
2018-05-09 22:19   ` Ferruh Yigit
2018-05-09 22:22     ` Ferruh Yigit
2018-05-10 17:27 ` Ophir Munk
2018-05-10 20:13   ` Ferruh Yigit
2018-05-10 22:05     ` Ophir Munk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).