DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx5: fix compilation without tunnel RSS support
@ 2018-05-13  8:07 Shahaf Shuler
  2018-05-13 13:27 ` Xueming(Steven) Li
  0 siblings, 1 reply; 4+ messages in thread
From: Shahaf Shuler @ 2018-05-13  8:07 UTC (permalink / raw)
  To: nelio.laranjeiro, adrien.mazarguil, yskoh; +Cc: dev, xuemingl

IBV_RX_HASH_INNER should be referenced only when having tunnel support
in the Verbs headers.

Fixes: 80f2d0ed7ff9 ("net/mlx5: add hardware flow debug dump")
Cc: xuemingl@mellanox.com

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index ec6d00f21b..04ace3ee79 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -2188,7 +2188,12 @@ mlx5_flow_dump(struct rte_eth_dev *dev __rte_unused,
 	uint16_t j;
 	char buf[256];
 	uint8_t off;
+	uint64_t extra_hash_fields = 0;
 
+#ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT
+	if (flow->tunnel && flow->rss_conf.level > 1)
+		extra_hash_fields = (uint32_t)IBV_RX_HASH_INNER;
+#endif
 	spec_ptr = (uintptr_t)(flow->frxq[hrxq_idx].ibv_attr + 1);
 	for (j = 0, off = 0; j < flow->frxq[hrxq_idx].ibv_attr->num_of_specs;
 	     j++) {
@@ -2205,9 +2210,7 @@ mlx5_flow_dump(struct rte_eth_dev *dev __rte_unused,
 		(void *)flow->frxq[hrxq_idx].hrxq,
 		(void *)flow->frxq[hrxq_idx].hrxq->qp,
 		(void *)flow->frxq[hrxq_idx].hrxq->ind_table,
-		flow->frxq[hrxq_idx].hash_fields |
-		(flow->tunnel &&
-		 flow->rss_conf.level > 1 ? (uint32_t)IBV_RX_HASH_INNER : 0),
+		(flow->frxq[hrxq_idx].hash_fields | extra_hash_fields),
 		flow->rss_conf.queue_num,
 		flow->frxq[hrxq_idx].ibv_attr->num_of_specs,
 		flow->frxq[hrxq_idx].ibv_attr->size,
-- 
2.12.0

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

* Re: [dpdk-dev] [PATCH] net/mlx5: fix compilation without tunnel RSS support
  2018-05-13  8:07 [dpdk-dev] [PATCH] net/mlx5: fix compilation without tunnel RSS support Shahaf Shuler
@ 2018-05-13 13:27 ` Xueming(Steven) Li
  2018-05-14  6:00   ` Shahaf Shuler
  0 siblings, 1 reply; 4+ messages in thread
From: Xueming(Steven) Li @ 2018-05-13 13:27 UTC (permalink / raw)
  To: Shahaf Shuler, Nélio Laranjeiro, Adrien Mazarguil, Yongseok Koh; +Cc: dev

Thanks for fixing this, one minor issue below.

> -----Original Message-----
> From: Shahaf Shuler <shahafs@mellanox.com>
> Sent: Sunday, May 13, 2018 4:08 PM
> To: Nélio Laranjeiro <nelio.laranjeiro@6wind.com>; Adrien Mazarguil <adrien.mazarguil@6wind.com>;
> Yongseok Koh <yskoh@mellanox.com>
> Cc: dev@dpdk.org; Xueming(Steven) Li <xuemingl@mellanox.com>
> Subject: [PATCH] net/mlx5: fix compilation without tunnel RSS support
> 
> IBV_RX_HASH_INNER should be referenced only when having tunnel support in the Verbs headers.
> 
> Fixes: 80f2d0ed7ff9 ("net/mlx5: add hardware flow debug dump")
> Cc: xuemingl@mellanox.com
> 
> Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_flow.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index ec6d00f21b..04ace3ee79
> 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -2188,7 +2188,12 @@ mlx5_flow_dump(struct rte_eth_dev *dev __rte_unused,
>  	uint16_t j;
>  	char buf[256];
>  	uint8_t off;
> +	uint64_t extra_hash_fields = 0;
> 
> +#ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT
> +	if (flow->tunnel && flow->rss_conf.level > 1)
> +		extra_hash_fields = (uint32_t)IBV_RX_HASH_INNER; #endif

Should "#endif" start with a new line?

>  	spec_ptr = (uintptr_t)(flow->frxq[hrxq_idx].ibv_attr + 1);
>  	for (j = 0, off = 0; j < flow->frxq[hrxq_idx].ibv_attr->num_of_specs;
>  	     j++) {
> @@ -2205,9 +2210,7 @@ mlx5_flow_dump(struct rte_eth_dev *dev __rte_unused,
>  		(void *)flow->frxq[hrxq_idx].hrxq,
>  		(void *)flow->frxq[hrxq_idx].hrxq->qp,
>  		(void *)flow->frxq[hrxq_idx].hrxq->ind_table,
> -		flow->frxq[hrxq_idx].hash_fields |
> -		(flow->tunnel &&
> -		 flow->rss_conf.level > 1 ? (uint32_t)IBV_RX_HASH_INNER : 0),
> +		(flow->frxq[hrxq_idx].hash_fields | extra_hash_fields),
>  		flow->rss_conf.queue_num,
>  		flow->frxq[hrxq_idx].ibv_attr->num_of_specs,
>  		flow->frxq[hrxq_idx].ibv_attr->size,
> --
> 2.12.0


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

* Re: [dpdk-dev] [PATCH] net/mlx5: fix compilation without tunnel RSS support
  2018-05-13 13:27 ` Xueming(Steven) Li
@ 2018-05-14  6:00   ` Shahaf Shuler
  2018-05-15 12:30     ` Shahaf Shuler
  0 siblings, 1 reply; 4+ messages in thread
From: Shahaf Shuler @ 2018-05-14  6:00 UTC (permalink / raw)
  To: Xueming(Steven) Li, Nélio Laranjeiro, Adrien Mazarguil,
	Yongseok Koh
  Cc: dev

Sunday, May 13, 2018 4:28 PM, Xueming(Steven) Li:
> Thanks for fixing this, one minor issue below.
> 
> > -----Original Message-----
> > From: Shahaf Shuler <shahafs@mellanox.com>
> > Sent: Sunday, May 13, 2018 4:08 PM
> > To: Nélio Laranjeiro <nelio.laranjeiro@6wind.com>; Adrien Mazarguil
> > <adrien.mazarguil@6wind.com>; Yongseok Koh <yskoh@mellanox.com>
> > Cc: dev@dpdk.org; Xueming(Steven) Li <xuemingl@mellanox.com>
> > Subject: [PATCH] net/mlx5: fix compilation without tunnel RSS support
> >
> > IBV_RX_HASH_INNER should be referenced only when having tunnel
> support in the Verbs headers.
> >
> > Fixes: 80f2d0ed7ff9 ("net/mlx5: add hardware flow debug dump")
> > Cc: xuemingl@mellanox.com
> >
> > Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
> > ---
> >  drivers/net/mlx5/mlx5_flow.c | 9 ++++++---
> >  1 file changed, 6 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/mlx5/mlx5_flow.c
> > b/drivers/net/mlx5/mlx5_flow.c index ec6d00f21b..04ace3ee79
> > 100644
> > --- a/drivers/net/mlx5/mlx5_flow.c
> > +++ b/drivers/net/mlx5/mlx5_flow.c
> > @@ -2188,7 +2188,12 @@ mlx5_flow_dump(struct rte_eth_dev *dev
> __rte_unused,
> >  	uint16_t j;
> >  	char buf[256];
> >  	uint8_t off;
> > +	uint64_t extra_hash_fields = 0;
> >
> > +#ifdef HAVE_IBV_DEVICE_TUNNEL_SUPPORT
> > +	if (flow->tunnel && flow->rss_conf.level > 1)
> > +		extra_hash_fields = (uint32_t)IBV_RX_HASH_INNER; #endif
> 
> Should "#endif" start with a new line?

It is in new line. You probably see it wrongly in outlook.

Have a look on the patch in patchwork:
http://dpdk.org/dev/patchwork/patch/39927/




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

* Re: [dpdk-dev] [PATCH] net/mlx5: fix compilation without tunnel RSS support
  2018-05-14  6:00   ` Shahaf Shuler
@ 2018-05-15 12:30     ` Shahaf Shuler
  0 siblings, 0 replies; 4+ messages in thread
From: Shahaf Shuler @ 2018-05-15 12:30 UTC (permalink / raw)
  To: Shahaf Shuler, Xueming(Steven) Li, Nélio Laranjeiro,
	Adrien Mazarguil, Yongseok Koh
  Cc: dev

Monday, May 14, 2018 9:00 AM, Shahaf Shuler:
> Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix compilation without tunnel
> RSS support
> 
> Sunday, May 13, 2018 4:28 PM, Xueming(Steven) Li:
> > Thanks for fixing this, one minor issue below.
> >
> > > -----Original Message-----
> > > From: Shahaf Shuler <shahafs@mellanox.com>
> > > Sent: Sunday, May 13, 2018 4:08 PM
> > > To: Nélio Laranjeiro <nelio.laranjeiro@6wind.com>; Adrien Mazarguil
> > > <adrien.mazarguil@6wind.com>; Yongseok Koh <yskoh@mellanox.com>
> > > Cc: dev@dpdk.org; Xueming(Steven) Li <xuemingl@mellanox.com>
> > > Subject: [PATCH] net/mlx5: fix compilation without tunnel RSS
> > > support
> > >
> > > IBV_RX_HASH_INNER should be referenced only when having tunnel
> > support in the Verbs headers.
> > >
> > > Fixes: 80f2d0ed7ff9 ("net/mlx5: add hardware flow debug dump")
> > > Cc: xuemingl@mellanox.com
> > >
> > > Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>

Applied to next-net-mlx, thanks. 

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

end of thread, other threads:[~2018-05-15 12:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-13  8:07 [dpdk-dev] [PATCH] net/mlx5: fix compilation without tunnel RSS support Shahaf Shuler
2018-05-13 13:27 ` Xueming(Steven) Li
2018-05-14  6:00   ` Shahaf Shuler
2018-05-15 12:30     ` Shahaf Shuler

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