[dpdk-dev] [PATCH] net/e1000: do not error out if rx_drop_en is set

Zhao1, Wei wei.zhao1 at intel.com
Mon Oct 8 10:43:04 CEST 2018


Hi,  Luca Boccassi

> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Luca Boccassi
> Sent: Saturday, July 28, 2018 1:26 AM
> To: dev at dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu at intel.com>; Luca Boccassi
> <bluca at debian.org>; stable at 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 at dpdk.org
> 
> Signed-off-by: Luca Boccassi <bluca at 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



More information about the dev mailing list