DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/e1000: do not error out if rx_drop_en is set
@ 2018-07-27 17:26 Luca Boccassi
  2018-09-26 10:22 ` Luca Boccassi
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Luca Boccassi @ 2018-07-27 17:26 UTC (permalink / raw)
  To: dev; +Cc: wenzhuo.lu, Luca Boccassi, stable

rx_drop_en is an optimization that does nothing on single-queue
devices like e1000. Do not force applications that do not care to
select per-devices optimizations flags by returning an error, just
log it and carry on.

Fixes: 805803445a02 ("e1000: support EM devices (also known as e1000/e1000e)")
Cc: stable@dpdk.org

Signed-off-by: Luca Boccassi <bluca@debian.org>
---
 drivers/net/e1000/em_rxtx.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
index a6b3e92a6..81dc41efb 100644
--- a/drivers/net/e1000/em_rxtx.c
+++ b/drivers/net/e1000/em_rxtx.c
@@ -1416,12 +1416,13 @@ eth_em_rx_queue_setup(struct rte_eth_dev *dev,
 	}
 
 	/*
-	 * EM devices don't support drop_en functionality
+	 * EM devices don't support drop_en functionality.
+	 * It's an optimization that does nothing on single-queue devices,
+	 * so just log the issue and carry on.
 	 */
 	if (rx_conf->rx_drop_en) {
-		PMD_INIT_LOG(ERR, "drop_en functionality not supported by "
+		PMD_INIT_LOG(NOTICE, "drop_en functionality not supported by "
 			     "device");
-		return -EINVAL;
 	}
 
 	/* Free memory prior to re-allocation if needed. */
-- 
2.18.0

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

* Re: [dpdk-dev] [PATCH] net/e1000: do not error out if rx_drop_en is set
  2018-07-27 17:26 [dpdk-dev] [PATCH] net/e1000: do not error out if rx_drop_en is set Luca Boccassi
@ 2018-09-26 10:22 ` Luca Boccassi
  2018-10-08  8:43 ` Zhao1, Wei
  2018-10-08  9:49 ` Zhao1, Wei
  2 siblings, 0 replies; 7+ messages in thread
From: Luca Boccassi @ 2018-09-26 10:22 UTC (permalink / raw)
  To: dev; +Cc: wenzhuo.lu, stable, ferruh.yigit

On Fri, 2018-07-27 at 18:26 +0100, Luca Boccassi wrote:
> rx_drop_en is an optimization that does nothing on single-queue
> devices like e1000. Do not force applications that do not care to
> select per-devices optimizations flags by returning an error, just
> log it and carry on.
> 
> Fixes: 805803445a02 ("e1000: support EM devices (also known as
> e1000/e1000e)")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> ---
>  drivers/net/e1000/em_rxtx.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

Ping. Any chance this could get a review? Thanks!

-- 
Kind regards,
Luca Boccassi

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

* Re: [dpdk-dev] [PATCH] net/e1000: do not error out if rx_drop_en is set
  2018-07-27 17:26 [dpdk-dev] [PATCH] net/e1000: do not error out if rx_drop_en is set Luca Boccassi
  2018-09-26 10:22 ` Luca Boccassi
@ 2018-10-08  8:43 ` Zhao1, Wei
  2018-10-08 14:14   ` Luca Boccassi
  2018-10-08  9:49 ` Zhao1, Wei
  2 siblings, 1 reply; 7+ messages in thread
From: Zhao1, Wei @ 2018-10-08  8:43 UTC (permalink / raw)
  To: Luca Boccassi, dev; +Cc: Lu, Wenzhuo, stable

Hi,  Luca Boccassi

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Luca Boccassi
> Sent: Saturday, July 28, 2018 1:26 AM
> To: dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Luca Boccassi
> <bluca@debian.org>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/e1000: do not error out if rx_drop_en is set
> 
> rx_drop_en is an optimization that does nothing on single-queue devices like
> e1000. Do not force applications that do not care to select per-devices

And aslo, eth_em_rx_queue_setup support set up of multiple queues for EM device.

> optimizations flags by returning an error, just log it and carry on.

rx_drop_en is a flag to enable receive packets drop when insufficient receive descriptors exist to write the packet into system memory.
if we delete this parameter check protection, it may be misleading some applications for this point, why does not give some requirement 
for proper usage of this? I do not suggest for this change.
You can also refer to function eth_igb_rx_queue_setup(), igb device support rx_drop_en set, so we do not have a such parameter check.

> 
> Fixes: 805803445a02 ("e1000: support EM devices (also known as
> e1000/e1000e)")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Luca Boccassi <bluca@debian.org>
> ---
>  drivers/net/e1000/em_rxtx.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
> index a6b3e92a6..81dc41efb 100644
> --- a/drivers/net/e1000/em_rxtx.c
> +++ b/drivers/net/e1000/em_rxtx.c
> @@ -1416,12 +1416,13 @@ eth_em_rx_queue_setup(struct rte_eth_dev
> *dev,
>  	}
> 
>  	/*
> -	 * EM devices don't support drop_en functionality
> +	 * EM devices don't support drop_en functionality.
> +	 * It's an optimization that does nothing on single-queue devices,
> +	 * so just log the issue and carry on.
>  	 */
>  	if (rx_conf->rx_drop_en) {
> -		PMD_INIT_LOG(ERR, "drop_en functionality not supported
> by "
> +		PMD_INIT_LOG(NOTICE, "drop_en functionality not
> supported by "
>  			     "device");
> -		return -EINVAL;
>  	}
> 
>  	/* Free memory prior to re-allocation if needed. */
> --
> 2.18.0

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

* Re: [dpdk-dev] [PATCH] net/e1000: do not error out if rx_drop_en is set
  2018-07-27 17:26 [dpdk-dev] [PATCH] net/e1000: do not error out if rx_drop_en is set Luca Boccassi
  2018-09-26 10:22 ` Luca Boccassi
  2018-10-08  8:43 ` Zhao1, Wei
@ 2018-10-08  9:49 ` Zhao1, Wei
  2 siblings, 0 replies; 7+ messages in thread
From: Zhao1, Wei @ 2018-10-08  9:49 UTC (permalink / raw)
  To: Luca Boccassi, dev; +Cc: Lu, Wenzhuo, stable, Zhang, Qi Z

Add Qi for discussion.

> -----Original Message-----
> From: Zhao1, Wei
> Sent: Monday, October 8, 2018 4:43 PM
> To: 'Luca Boccassi' <bluca@debian.org>; dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; stable@dpdk.org
> Subject: RE: [dpdk-dev] [PATCH] net/e1000: do not error out if rx_drop_en is
> set
> 
> Hi,  Luca Boccassi
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Luca Boccassi
> > Sent: Saturday, July 28, 2018 1:26 AM
> > To: dev@dpdk.org
> > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Luca Boccassi
> > <bluca@debian.org>; stable@dpdk.org
> > Subject: [dpdk-dev] [PATCH] net/e1000: do not error out if rx_drop_en
> > is set
> >
> > rx_drop_en is an optimization that does nothing on single-queue
> > devices like e1000. Do not force applications that do not care to
> > select per-devices
> 
> And aslo, eth_em_rx_queue_setup support set up of multiple queues for
> EM device.
> 
> > optimizations flags by returning an error, just log it and carry on.
> 
> rx_drop_en is a flag to enable receive packets drop when insufficient receive
> descriptors exist to write the packet into system memory.
> if we delete this parameter check protection, it may be misleading some
> applications for this point, why does not give some requirement for proper
> usage of this? I do not suggest for this change.
> You can also refer to function eth_igb_rx_queue_setup(), igb device support
> rx_drop_en set, so we do not have a such parameter check.
> 
> >
> > Fixes: 805803445a02 ("e1000: support EM devices (also known as
> > e1000/e1000e)")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Luca Boccassi <bluca@debian.org>
> > ---
> >  drivers/net/e1000/em_rxtx.c | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
> > index a6b3e92a6..81dc41efb 100644
> > --- a/drivers/net/e1000/em_rxtx.c
> > +++ b/drivers/net/e1000/em_rxtx.c
> > @@ -1416,12 +1416,13 @@ eth_em_rx_queue_setup(struct rte_eth_dev
> *dev,
> >  	}
> >
> >  	/*
> > -	 * EM devices don't support drop_en functionality
> > +	 * EM devices don't support drop_en functionality.
> > +	 * It's an optimization that does nothing on single-queue devices,
> > +	 * so just log the issue and carry on.
> >  	 */
> >  	if (rx_conf->rx_drop_en) {
> > -		PMD_INIT_LOG(ERR, "drop_en functionality not supported
> > by "
> > +		PMD_INIT_LOG(NOTICE, "drop_en functionality not
> > supported by "
> >  			     "device");
> > -		return -EINVAL;
> >  	}
> >
> >  	/* Free memory prior to re-allocation if needed. */
> > --
> > 2.18.0

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

* Re: [dpdk-dev] [PATCH] net/e1000: do not error out if rx_drop_en is set
  2018-10-08  8:43 ` Zhao1, Wei
@ 2018-10-08 14:14   ` Luca Boccassi
  2018-10-10  7:25     ` Zhao1, Wei
  0 siblings, 1 reply; 7+ messages in thread
From: Luca Boccassi @ 2018-10-08 14:14 UTC (permalink / raw)
  To: Zhao1, Wei, dev; +Cc: Lu, Wenzhuo, stable, qi.z.zhang, 3chas3

On Mon, 2018-10-08 at 08:43 +0000, Zhao1, Wei wrote:
> Hi,  Luca Boccassi
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Luca Boccassi
> > Sent: Saturday, July 28, 2018 1:26 AM
> > To: dev@dpdk.org
> > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Luca Boccassi
> > <bluca@debian.org>; stable@dpdk.org
> > Subject: [dpdk-dev] [PATCH] net/e1000: do not error out if
> > rx_drop_en is set
> > 
> > rx_drop_en is an optimization that does nothing on single-queue
> > devices like
> > e1000. Do not force applications that do not care to select per-
> > devices
> 
> And aslo, eth_em_rx_queue_setup support set up of multiple queues for
> EM device.
> 
> > optimizations flags by returning an error, just log it and carry
> > on.
> 
> rx_drop_en is a flag to enable receive packets drop when insufficient
> receive descriptors exist to write the packet into system memory.
> if we delete this parameter check protection, it may be misleading
> some applications for this point, why does not give some requirement 
> for proper usage of this? I do not suggest for this change.
> You can also refer to function eth_igb_rx_queue_setup(), igb device
> support rx_drop_en set, so we do not have a such parameter check.

Hi,

As mentioned, because given it does nothing it's not worth aborting the
program with an error. Logging a notice level message and carrying on
is sufficient.
We should try not make it harder than necessary for application
developers.

> > 
> > Fixes: 805803445a02 ("e1000: support EM devices (also known as
> > e1000/e1000e)")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Luca Boccassi <bluca@debian.org>
> > ---
> >  drivers/net/e1000/em_rxtx.c | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/drivers/net/e1000/em_rxtx.c
> > b/drivers/net/e1000/em_rxtx.c
> > index a6b3e92a6..81dc41efb 100644
> > --- a/drivers/net/e1000/em_rxtx.c
> > +++ b/drivers/net/e1000/em_rxtx.c
> > @@ -1416,12 +1416,13 @@ eth_em_rx_queue_setup(struct rte_eth_dev
> > *dev,
> >  	}
> > 
> >  	/*
> > -	 * EM devices don't support drop_en functionality
> > +	 * EM devices don't support drop_en functionality.
> > +	 * It's an optimization that does nothing on single-queue
> > devices,
> > +	 * so just log the issue and carry on.
> >  	 */
> >  	if (rx_conf->rx_drop_en) {
> > -		PMD_INIT_LOG(ERR, "drop_en functionality not
> > supported
> > by "
> > +		PMD_INIT_LOG(NOTICE, "drop_en functionality not
> > supported by "
> >  			     "device");
> > -		return -EINVAL;
> >  	}
> > 
> >  	/* Free memory prior to re-allocation if needed. */
> > --
> > 2.18.0
> 
> 

-- 
Kind regards,
Luca Boccassi

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

* Re: [dpdk-dev] [PATCH] net/e1000: do not error out if rx_drop_en is set
  2018-10-08 14:14   ` Luca Boccassi
@ 2018-10-10  7:25     ` Zhao1, Wei
  2018-10-10 17:57       ` Zhang, Qi Z
  0 siblings, 1 reply; 7+ messages in thread
From: Zhao1, Wei @ 2018-10-10  7:25 UTC (permalink / raw)
  To: Luca Boccassi, dev; +Cc: Lu, Wenzhuo, stable, Zhang, Qi Z, 3chas3

Acked-by: Wei Zhao <wei.zhao1@intel.com>


> -----Original Message-----
> From: Luca Boccassi [mailto:bluca@debian.org]
> Sent: Monday, October 8, 2018 10:14 PM
> To: Zhao1, Wei <wei.zhao1@intel.com>; dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; stable@dpdk.org; Zhang, Qi Z
> <qi.z.zhang@intel.com>; 3chas3@gmail.com
> Subject: Re: [dpdk-dev] [PATCH] net/e1000: do not error out if rx_drop_en is
> set
> 
> On Mon, 2018-10-08 at 08:43 +0000, Zhao1, Wei wrote:
> > Hi,  Luca Boccassi
> >
> > > -----Original Message-----
> > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Luca Boccassi
> > > Sent: Saturday, July 28, 2018 1:26 AM
> > > To: dev@dpdk.org
> > > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Luca Boccassi
> > > <bluca@debian.org>; stable@dpdk.org
> > > Subject: [dpdk-dev] [PATCH] net/e1000: do not error out if
> > > rx_drop_en is set
> > >
> > > rx_drop_en is an optimization that does nothing on single-queue
> > > devices like e1000. Do not force applications that do not care to
> > > select per- devices
> >
> > And aslo, eth_em_rx_queue_setup support set up of multiple queues for
> > EM device.
> >
> > > optimizations flags by returning an error, just log it and carry on.
> >
> > rx_drop_en is a flag to enable receive packets drop when insufficient
> > receive descriptors exist to write the packet into system memory.
> > if we delete this parameter check protection, it may be misleading
> > some applications for this point, why does not give some requirement
> > for proper usage of this? I do not suggest for this change.
> > You can also refer to function eth_igb_rx_queue_setup(), igb device
> > support rx_drop_en set, so we do not have a such parameter check.
> 
> Hi,
> 
> As mentioned, because given it does nothing it's not worth aborting the
> program with an error. Logging a notice level message and carrying on is
> sufficient.
> We should try not make it harder than necessary for application developers.
> 
> > >
> > > Fixes: 805803445a02 ("e1000: support EM devices (also known as
> > > e1000/e1000e)")
> > > Cc: stable@dpdk.org
> > >
> > > Signed-off-by: Luca Boccassi <bluca@debian.org>
> > > ---
> > >  drivers/net/e1000/em_rxtx.c | 7 ++++---
> > >  1 file changed, 4 insertions(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/net/e1000/em_rxtx.c
> > > b/drivers/net/e1000/em_rxtx.c index a6b3e92a6..81dc41efb 100644
> > > --- a/drivers/net/e1000/em_rxtx.c
> > > +++ b/drivers/net/e1000/em_rxtx.c
> > > @@ -1416,12 +1416,13 @@ eth_em_rx_queue_setup(struct
> rte_eth_dev
> > > *dev,
> > >  	}
> > >
> > >  	/*
> > > -	 * EM devices don't support drop_en functionality
> > > +	 * EM devices don't support drop_en functionality.
> > > +	 * It's an optimization that does nothing on single-queue
> > > devices,
> > > +	 * so just log the issue and carry on.
> > >  	 */
> > >  	if (rx_conf->rx_drop_en) {
> > > -		PMD_INIT_LOG(ERR, "drop_en functionality not
> > > supported
> > > by "
> > > +		PMD_INIT_LOG(NOTICE, "drop_en functionality not
> > > supported by "
> > >  			     "device");
> > > -		return -EINVAL;
> > >  	}
> > >
> > >  	/* Free memory prior to re-allocation if needed. */
> > > --
> > > 2.18.0
> >
> >
> 
> --
> Kind regards,
> Luca Boccassi

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

* Re: [dpdk-dev] [PATCH] net/e1000: do not error out if rx_drop_en is set
  2018-10-10  7:25     ` Zhao1, Wei
@ 2018-10-10 17:57       ` Zhang, Qi Z
  0 siblings, 0 replies; 7+ messages in thread
From: Zhang, Qi Z @ 2018-10-10 17:57 UTC (permalink / raw)
  To: Zhao1, Wei, Luca Boccassi, dev; +Cc: Lu, Wenzhuo, stable, 3chas3



> -----Original Message-----
> From: Zhao1, Wei
> Sent: Wednesday, October 10, 2018 12:25 AM
> To: Luca Boccassi <bluca@debian.org>; dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; stable@dpdk.org; Zhang, Qi Z
> <qi.z.zhang@intel.com>; 3chas3@gmail.com
> Subject: RE: [dpdk-dev] [PATCH] net/e1000: do not error out if rx_drop_en is
> set
> 
> Acked-by: Wei Zhao <wei.zhao1@intel.com>

Applied to dpdk-next-net-intel with minor change on the title to avoid check-git-log warning.

Thanks
Qi

> 
> 
> > -----Original Message-----
> > From: Luca Boccassi [mailto:bluca@debian.org]
> > Sent: Monday, October 8, 2018 10:14 PM
> > To: Zhao1, Wei <wei.zhao1@intel.com>; dev@dpdk.org
> > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; stable@dpdk.org; Zhang, Qi Z
> > <qi.z.zhang@intel.com>; 3chas3@gmail.com
> > Subject: Re: [dpdk-dev] [PATCH] net/e1000: do not error out if
> > rx_drop_en is set
> >
> > On Mon, 2018-10-08 at 08:43 +0000, Zhao1, Wei wrote:
> > > Hi,  Luca Boccassi
> > >
> > > > -----Original Message-----
> > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Luca Boccassi
> > > > Sent: Saturday, July 28, 2018 1:26 AM
> > > > To: dev@dpdk.org
> > > > Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Luca Boccassi
> > > > <bluca@debian.org>; stable@dpdk.org
> > > > Subject: [dpdk-dev] [PATCH] net/e1000: do not error out if
> > > > rx_drop_en is set
> > > >
> > > > rx_drop_en is an optimization that does nothing on single-queue
> > > > devices like e1000. Do not force applications that do not care to
> > > > select per- devices
> > >
> > > And aslo, eth_em_rx_queue_setup support set up of multiple queues
> > > for EM device.
> > >
> > > > optimizations flags by returning an error, just log it and carry on.
> > >
> > > rx_drop_en is a flag to enable receive packets drop when
> > > insufficient receive descriptors exist to write the packet into system
> memory.
> > > if we delete this parameter check protection, it may be misleading
> > > some applications for this point, why does not give some requirement
> > > for proper usage of this? I do not suggest for this change.
> > > You can also refer to function eth_igb_rx_queue_setup(), igb device
> > > support rx_drop_en set, so we do not have a such parameter check.
> >
> > Hi,
> >
> > As mentioned, because given it does nothing it's not worth aborting
> > the program with an error. Logging a notice level message and carrying
> > on is sufficient.
> > We should try not make it harder than necessary for application
> developers.
> >
> > > >
> > > > Fixes: 805803445a02 ("e1000: support EM devices (also known as
> > > > e1000/e1000e)")
> > > > Cc: stable@dpdk.org
> > > >
> > > > Signed-off-by: Luca Boccassi <bluca@debian.org>
> > > > ---
> > > >  drivers/net/e1000/em_rxtx.c | 7 ++++---
> > > >  1 file changed, 4 insertions(+), 3 deletions(-)
> > > >
> > > > diff --git a/drivers/net/e1000/em_rxtx.c
> > > > b/drivers/net/e1000/em_rxtx.c index a6b3e92a6..81dc41efb 100644
> > > > --- a/drivers/net/e1000/em_rxtx.c
> > > > +++ b/drivers/net/e1000/em_rxtx.c
> > > > @@ -1416,12 +1416,13 @@ eth_em_rx_queue_setup(struct
> > rte_eth_dev
> > > > *dev,
> > > >  	}
> > > >
> > > >  	/*
> > > > -	 * EM devices don't support drop_en functionality
> > > > +	 * EM devices don't support drop_en functionality.
> > > > +	 * It's an optimization that does nothing on single-queue
> > > > devices,
> > > > +	 * so just log the issue and carry on.
> > > >  	 */
> > > >  	if (rx_conf->rx_drop_en) {
> > > > -		PMD_INIT_LOG(ERR, "drop_en functionality not
> > > > supported
> > > > by "
> > > > +		PMD_INIT_LOG(NOTICE, "drop_en functionality not
> > > > supported by "
> > > >  			     "device");
> > > > -		return -EINVAL;
> > > >  	}
> > > >
> > > >  	/* Free memory prior to re-allocation if needed. */
> > > > --
> > > > 2.18.0
> > >
> > >
> >
> > --
> > Kind regards,
> > Luca Boccassi

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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-27 17:26 [dpdk-dev] [PATCH] net/e1000: do not error out if rx_drop_en is set Luca Boccassi
2018-09-26 10:22 ` Luca Boccassi
2018-10-08  8:43 ` Zhao1, Wei
2018-10-08 14:14   ` Luca Boccassi
2018-10-10  7:25     ` Zhao1, Wei
2018-10-10 17:57       ` Zhang, Qi Z
2018-10-08  9:49 ` Zhao1, Wei

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