[dpdk-dev] net/mlx5: dump flow create error message

Message ID 20180206125253.91036-1-xuemingl@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Shahaf Shuler
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Xueming Li Feb. 6, 2018, 12:52 p.m. UTC
  Add error message dump when flow create error happened.

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Nélio Laranjeiro Feb. 6, 2018, 1:22 p.m. UTC | #1
On Tue, Feb 06, 2018 at 08:52:53PM +0800, Xueming Li wrote:
> Add error message dump when flow create error happened.
> 
> Signed-off-by: Xueming Li <xuemingl@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_flow.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index e38452ef3..ea90556d0 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -1890,6 +1890,7 @@ priv_flow_create(struct priv *priv,
>  	DEBUG("Flow created %p", (void *)flow);
>  	return flow;
>  exit:
> +	ERROR("Flow create error: %s", error->message);
>  	for (i = 0; i != hash_rxq_init_n; ++i) {
>  		if (parser.queue[i].ibv_attr)
>  			rte_free(parser.queue[i].ibv_attr);
> -- 
> 2.13.3
 
Hi Xueming,

Can you move this debug message to mlx5_flow_create().

Thanks,
  
Xueming Li Feb. 6, 2018, 2:20 p.m. UTC | #2
Hi Nelio,

> -----Original Message-----

> From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]

> Sent: Tuesday, February 6, 2018 9:22 PM

> To: Xueming(Steven) Li <xuemingl@mellanox.com>

> Cc: Nelio Laranjeiro <notifications@github.com>; dev@dpdk.org; Shahaf

> Shuler <shahafs@mellanox.com>

> Subject: Re: [dpdk-dev] [PATCH] net/mlx5: dump flow create error message

> 

> On Tue, Feb 06, 2018 at 08:52:53PM +0800, Xueming Li wrote:

> > Add error message dump when flow create error happened.

> >

> > Signed-off-by: Xueming Li <xuemingl@mellanox.com>

> > ---

> >  drivers/net/mlx5/mlx5_flow.c | 1 +

> >  1 file changed, 1 insertion(+)

> >

> > diff --git a/drivers/net/mlx5/mlx5_flow.c

> > b/drivers/net/mlx5/mlx5_flow.c index e38452ef3..ea90556d0 100644

> > --- a/drivers/net/mlx5/mlx5_flow.c

> > +++ b/drivers/net/mlx5/mlx5_flow.c

> > @@ -1890,6 +1890,7 @@ priv_flow_create(struct priv *priv,

> >  	DEBUG("Flow created %p", (void *)flow);

> >  	return flow;

> >  exit:

> > +	ERROR("Flow create error: %s", error->message);

> >  	for (i = 0; i != hash_rxq_init_n; ++i) {

> >  		if (parser.queue[i].ibv_attr)

> >  			rte_free(parser.queue[i].ibv_attr);

> > --

> > 2.13.3

> 

> Hi Xueming,

> 

> Can you move this debug message to mlx5_flow_create().


This function also called by control flow and fdir functions, 
here should be the best place.

> 

> Thanks,

> 

> --

> Nélio Laranjeiro

> 6WIND
  
Nélio Laranjeiro Feb. 7, 2018, 6:50 a.m. UTC | #3
On Tue, Feb 06, 2018 at 02:20:28PM +0000, Xueming(Steven) Li wrote:
> Hi Nelio,
> 
> > -----Original Message-----
> > From: Nélio Laranjeiro [mailto:nelio.laranjeiro@6wind.com]
> > Sent: Tuesday, February 6, 2018 9:22 PM
> > To: Xueming(Steven) Li <xuemingl@mellanox.com>
> > Cc: Nelio Laranjeiro <notifications@github.com>; dev@dpdk.org; Shahaf
> > Shuler <shahafs@mellanox.com>
> > Subject: Re: [dpdk-dev] [PATCH] net/mlx5: dump flow create error message
> > 
> > On Tue, Feb 06, 2018 at 08:52:53PM +0800, Xueming Li wrote:
> > > Add error message dump when flow create error happened.
> > >
> > > Signed-off-by: Xueming Li <xuemingl@mellanox.com>
> > > ---
> > >  drivers/net/mlx5/mlx5_flow.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/net/mlx5/mlx5_flow.c
> > > b/drivers/net/mlx5/mlx5_flow.c index e38452ef3..ea90556d0 100644
> > > --- a/drivers/net/mlx5/mlx5_flow.c
> > > +++ b/drivers/net/mlx5/mlx5_flow.c
> > > @@ -1890,6 +1890,7 @@ priv_flow_create(struct priv *priv,
> > >  	DEBUG("Flow created %p", (void *)flow);
> > >  	return flow;
> > >  exit:
> > > +	ERROR("Flow create error: %s", error->message);
> > >  	for (i = 0; i != hash_rxq_init_n; ++i) {
> > >  		if (parser.queue[i].ibv_attr)
> > >  			rte_free(parser.queue[i].ibv_attr);
> > > --
> > > 2.13.3
> > 
> > Hi Xueming,
> > 
> > Can you move this debug message to mlx5_flow_create().
> 
> This function also called by control flow and fdir functions, 
> here should be the best place.

Make sense,

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

Thanks,
  
Thomas Monjalon Feb. 13, 2018, 5:11 p.m. UTC | #4
> > > > Add error message dump when flow create error happened.
> > > >
> > > > Signed-off-by: Xueming Li <xuemingl@mellanox.com>
> 
> Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>

Applied, thanks
  

Patch

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index e38452ef3..ea90556d0 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -1890,6 +1890,7 @@  priv_flow_create(struct priv *priv,
 	DEBUG("Flow created %p", (void *)flow);
 	return flow;
 exit:
+	ERROR("Flow create error: %s", error->message);
 	for (i = 0; i != hash_rxq_init_n; ++i) {
 		if (parser.queue[i].ibv_attr)
 			rte_free(parser.queue[i].ibv_attr);