DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] mlx5: fix overwritten RSS configuration
@ 2016-03-18 12:54 Nelio Laranjeiro
  2016-03-18 12:54 ` [dpdk-dev] [PATCH 2/2] mlx5: fix handling of NULL RSS key Nelio Laranjeiro
  2016-03-18 16:27 ` [dpdk-dev] [PATCH 1/2] mlx5: fix overwritten RSS configuration Adrien Mazarguil
  0 siblings, 2 replies; 5+ messages in thread
From: Nelio Laranjeiro @ 2016-03-18 12:54 UTC (permalink / raw)
  To: dev; +Cc: adrien.mazarguil

RSS configuration provided by the application should not be used as storage
by the PMD.

Fixes: 2f97422e7759 ("mlx5: support RSS hash update and get")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5.h        | 1 +
 drivers/net/mlx5/mlx5_ethdev.c | 1 +
 drivers/net/mlx5/mlx5_rss.c    | 7 ++-----
 drivers/net/mlx5/mlx5_rxq.c    | 2 +-
 4 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index d012f50..d6c08bb 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -122,6 +122,7 @@ struct priv {
 	unsigned int hash_rxqs_n; /* Hash RX QPs array size. */
 	/* RSS configuration array indexed by hash RX queue type. */
 	struct rte_eth_rss_conf *(*rss_conf)[];
+	uint64_t rss_hf; /* RSS DPDK bit field of active RSS. */
 	struct rte_intr_handle intr_handle; /* Interrupt handler. */
 	unsigned int (*reta_idx)[]; /* RETA index table. */
 	unsigned int reta_idx_n; /* RETA index size. */
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 66115d2..aa67623 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -447,6 +447,7 @@ dev_configure(struct rte_eth_dev *dev)
 	unsigned int j;
 	unsigned int reta_idx_n;
 
+	priv->rss_hf = dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf;
 	priv->rxqs = (void *)dev->data->rx_queues;
 	priv->txqs = (void *)dev->data->tx_queues;
 	if (txqs_n != priv->txqs_n) {
diff --git a/drivers/net/mlx5/mlx5_rss.c b/drivers/net/mlx5/mlx5_rss.c
index 7eb688a..e73cd9d 100644
--- a/drivers/net/mlx5/mlx5_rss.c
+++ b/drivers/net/mlx5/mlx5_rss.c
@@ -162,11 +162,8 @@ mlx5_rss_hash_update(struct rte_eth_dev *dev,
 						rss_hash_default_key_len,
 						ETH_RSS_PROTO_MASK);
 
-	/* Store the configuration set into port configure.
-	 * This will enable/disable hash RX queues associated to the protocols
-	 * enabled/disabled by this update. */
-	priv->dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf =
-		rss_conf->rss_hf;
+	/* Store protocols for which RSS is enabled. */
+	priv->rss_hf = rss_conf->rss_hf;
 	priv_unlock(priv);
 	assert(err >= 0);
 	return -err;
diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index c8af77f..cbb017b 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -312,7 +312,7 @@ priv_make_ind_table_init(struct priv *priv,
 	/* Mandatory to receive frames not handled by normal hash RX queues. */
 	unsigned int hash_types_sup = 1 << HASH_RXQ_ETH;
 
-	rss_hf = priv->dev->data->dev_conf.rx_adv_conf.rss_conf.rss_hf;
+	rss_hf = priv->rss_hf;
 	/* Process other protocols only if more than one queue. */
 	if (priv->rxqs_n > 1)
 		for (i = 0; (i != hash_rxq_init_n); ++i)
-- 
2.1.4

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

* [dpdk-dev] [PATCH 2/2] mlx5: fix handling of NULL RSS key
  2016-03-18 12:54 [dpdk-dev] [PATCH 1/2] mlx5: fix overwritten RSS configuration Nelio Laranjeiro
@ 2016-03-18 12:54 ` Nelio Laranjeiro
  2016-03-18 16:28   ` Adrien Mazarguil
  2016-03-18 16:27 ` [dpdk-dev] [PATCH 1/2] mlx5: fix overwritten RSS configuration Adrien Mazarguil
  1 sibling, 1 reply; 5+ messages in thread
From: Nelio Laranjeiro @ 2016-03-18 12:54 UTC (permalink / raw)
  To: dev; +Cc: adrien.mazarguil

Update function can be called with no key to enable or disable a RSS
protocol, or with a key to be applied to the desired protocols.

Fixes: 2f97422e7759 ("mlx5: support RSS hash update and get")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
 drivers/net/mlx5/mlx5_rss.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rss.c b/drivers/net/mlx5/mlx5_rss.c
index e73cd9d..639e935 100644
--- a/drivers/net/mlx5/mlx5_rss.c
+++ b/drivers/net/mlx5/mlx5_rss.c
@@ -156,12 +156,6 @@ mlx5_rss_hash_update(struct rte_eth_dev *dev,
 						rss_conf->rss_key,
 						rss_conf->rss_key_len,
 						rss_conf->rss_hf);
-	else
-		err = rss_hash_rss_conf_new_key(priv,
-						rss_hash_default_key,
-						rss_hash_default_key_len,
-						ETH_RSS_PROTO_MASK);
-
 	/* Store protocols for which RSS is enabled. */
 	priv->rss_hf = rss_conf->rss_hf;
 	priv_unlock(priv);
-- 
2.1.4

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

* Re: [dpdk-dev] [PATCH 1/2] mlx5: fix overwritten RSS configuration
  2016-03-18 12:54 [dpdk-dev] [PATCH 1/2] mlx5: fix overwritten RSS configuration Nelio Laranjeiro
  2016-03-18 12:54 ` [dpdk-dev] [PATCH 2/2] mlx5: fix handling of NULL RSS key Nelio Laranjeiro
@ 2016-03-18 16:27 ` Adrien Mazarguil
  2016-03-22 17:24   ` Bruce Richardson
  1 sibling, 1 reply; 5+ messages in thread
From: Adrien Mazarguil @ 2016-03-18 16:27 UTC (permalink / raw)
  To: Nelio Laranjeiro; +Cc: dev

On Fri, Mar 18, 2016 at 01:54:42PM +0100, Nelio Laranjeiro wrote:
> RSS configuration provided by the application should not be used as storage
> by the PMD.
> 
> Fixes: 2f97422e7759 ("mlx5: support RSS hash update and get")
> 
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> ---
>  drivers/net/mlx5/mlx5.h        | 1 +
>  drivers/net/mlx5/mlx5_ethdev.c | 1 +
>  drivers/net/mlx5/mlx5_rss.c    | 7 ++-----
>  drivers/net/mlx5/mlx5_rxq.c    | 2 +-
>  4 files changed, 5 insertions(+), 6 deletions(-)

Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>

-- 
Adrien Mazarguil
6WIND

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

* Re: [dpdk-dev] [PATCH 2/2] mlx5: fix handling of NULL RSS key
  2016-03-18 12:54 ` [dpdk-dev] [PATCH 2/2] mlx5: fix handling of NULL RSS key Nelio Laranjeiro
@ 2016-03-18 16:28   ` Adrien Mazarguil
  0 siblings, 0 replies; 5+ messages in thread
From: Adrien Mazarguil @ 2016-03-18 16:28 UTC (permalink / raw)
  To: Nelio Laranjeiro; +Cc: dev

On Fri, Mar 18, 2016 at 01:54:43PM +0100, Nelio Laranjeiro wrote:
> Update function can be called with no key to enable or disable a RSS
> protocol, or with a key to be applied to the desired protocols.
> 
> Fixes: 2f97422e7759 ("mlx5: support RSS hash update and get")
> 
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> ---
>  drivers/net/mlx5/mlx5_rss.c | 6 ------
>  1 file changed, 6 deletions(-)

Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>

-- 
Adrien Mazarguil
6WIND

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

* Re: [dpdk-dev] [PATCH 1/2] mlx5: fix overwritten RSS configuration
  2016-03-18 16:27 ` [dpdk-dev] [PATCH 1/2] mlx5: fix overwritten RSS configuration Adrien Mazarguil
@ 2016-03-22 17:24   ` Bruce Richardson
  0 siblings, 0 replies; 5+ messages in thread
From: Bruce Richardson @ 2016-03-22 17:24 UTC (permalink / raw)
  To: Nelio Laranjeiro, dev

On Fri, Mar 18, 2016 at 05:27:47PM +0100, Adrien Mazarguil wrote:
> On Fri, Mar 18, 2016 at 01:54:42PM +0100, Nelio Laranjeiro wrote:
> > RSS configuration provided by the application should not be used as storage
> > by the PMD.
> > 
> > Fixes: 2f97422e7759 ("mlx5: support RSS hash update and get")
> > 
> > Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> > ---
> >  drivers/net/mlx5/mlx5.h        | 1 +
> >  drivers/net/mlx5/mlx5_ethdev.c | 1 +
> >  drivers/net/mlx5/mlx5_rss.c    | 7 ++-----
> >  drivers/net/mlx5/mlx5_rxq.c    | 2 +-
> >  4 files changed, 5 insertions(+), 6 deletions(-)
> 
> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> 
> -- 
Patchset applied to dpdk-next-net/rel_16_04

/Bruce

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

end of thread, other threads:[~2016-03-22 17:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-18 12:54 [dpdk-dev] [PATCH 1/2] mlx5: fix overwritten RSS configuration Nelio Laranjeiro
2016-03-18 12:54 ` [dpdk-dev] [PATCH 2/2] mlx5: fix handling of NULL RSS key Nelio Laranjeiro
2016-03-18 16:28   ` Adrien Mazarguil
2016-03-18 16:27 ` [dpdk-dev] [PATCH 1/2] mlx5: fix overwritten RSS configuration Adrien Mazarguil
2016-03-22 17:24   ` Bruce Richardson

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).