DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx5: fix invalid count in xstats
@ 2018-05-20  8:13 David Marchand
  2018-05-21  6:52 ` Nélio Laranjeiro
  0 siblings, 1 reply; 3+ messages in thread
From: David Marchand @ 2018-05-20  8:13 UTC (permalink / raw)
  To: dev; +Cc: adrien.mazarguil, nelio.laranjeiro, yskoh

With the commit af4f09f28294 ("net/mlx5: prefix all functions with mlx5"),
mlx5_xstats_get() is not compliant any longer with the api.
It always returns the caller max entries count while it should return how
many entries it wrote/wanted to write.

Fixes: af4f09f28294 ("net/mlx5: prefix all functions with mlx5")

Signed-off-by: David Marchand <david.marchand@6wind.com>
---
 drivers/net/mlx5/mlx5_stats.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c
index 8e427e7..875dd10 100644
--- a/drivers/net/mlx5/mlx5_stats.c
+++ b/drivers/net/mlx5/mlx5_stats.c
@@ -325,7 +325,7 @@ mlx5_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *stats,
 			stats[i].value = (counters[i] - xstats_ctrl->base[i]);
 		}
 	}
-	return n;
+	return xstats_n;
 }
 
 /**
-- 
2.7.4

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

* Re: [dpdk-dev] [PATCH] net/mlx5: fix invalid count in xstats
  2018-05-20  8:13 [dpdk-dev] [PATCH] net/mlx5: fix invalid count in xstats David Marchand
@ 2018-05-21  6:52 ` Nélio Laranjeiro
  2018-05-21 10:25   ` Shahaf Shuler
  0 siblings, 1 reply; 3+ messages in thread
From: Nélio Laranjeiro @ 2018-05-21  6:52 UTC (permalink / raw)
  To: David Marchand; +Cc: dev, adrien.mazarguil, yskoh

On Sun, May 20, 2018 at 10:13:58AM +0200, David Marchand wrote:
> With the commit af4f09f28294 ("net/mlx5: prefix all functions with mlx5"),
> mlx5_xstats_get() is not compliant any longer with the api.
> It always returns the caller max entries count while it should return how
> many entries it wrote/wanted to write.
> 
> Fixes: af4f09f28294 ("net/mlx5: prefix all functions with mlx5")
>
> Signed-off-by: David Marchand <david.marchand@6wind.com>

Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

> ---
>  drivers/net/mlx5/mlx5_stats.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_stats.c b/drivers/net/mlx5/mlx5_stats.c
> index 8e427e7..875dd10 100644
> --- a/drivers/net/mlx5/mlx5_stats.c
> +++ b/drivers/net/mlx5/mlx5_stats.c
> @@ -325,7 +325,7 @@ mlx5_xstats_get(struct rte_eth_dev *dev, struct rte_eth_xstat *stats,
>  			stats[i].value = (counters[i] - xstats_ctrl->base[i]);
>  		}
>  	}
> -	return n;
> +	return xstats_n;
>  }
>  
>  /**
> -- 
> 2.7.4

Thanks,

-- 
Nélio Laranjeiro
6WIND

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

* Re: [dpdk-dev] [PATCH] net/mlx5: fix invalid count in xstats
  2018-05-21  6:52 ` Nélio Laranjeiro
@ 2018-05-21 10:25   ` Shahaf Shuler
  0 siblings, 0 replies; 3+ messages in thread
From: Shahaf Shuler @ 2018-05-21 10:25 UTC (permalink / raw)
  To: Nélio Laranjeiro, David Marchand; +Cc: dev, Adrien Mazarguil, Yongseok Koh

Monday, May 21, 2018 9:52 AM, Nélio Laranjeiro:
> Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix invalid count in xstats
> 
> On Sun, May 20, 2018 at 10:13:58AM +0200, David Marchand wrote:
> > With the commit af4f09f28294 ("net/mlx5: prefix all functions with
> > mlx5"),
> > mlx5_xstats_get() is not compliant any longer with the api.
> > It always returns the caller max entries count while it should return
> > how many entries it wrote/wanted to write.
> >
> > Fixes: af4f09f28294 ("net/mlx5: prefix all functions with mlx5")
> >
> > Signed-off-by: David Marchand <david.marchand@6wind.com>
> 
> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

Applied to next-net-mlx, thanks. 

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-20  8:13 [dpdk-dev] [PATCH] net/mlx5: fix invalid count in xstats David Marchand
2018-05-21  6:52 ` Nélio Laranjeiro
2018-05-21 10:25   ` 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).