net/e1000: do not error out if rx_drop_en is set
PATCH 1/1 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 optimizations flags by returning an error, just log it and carry on.
--- drivers/net/e1000/em_rxtx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/net/e1000/em_rxtx.c +4 -3
@@ -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. */
Signature · 1 line
2.18.0
Quoted 5 lines · Luca Boccassi
rx_drop_enis 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.
Quoted 8 lines
Fixes 805803445a02 ("e1000: support EM devices (also known ase1000/e1000e)")
Cc: [email protected]Signed-off-by Luca Boccassi <[email protected]>---
drivers/net/e1000/em_rxtx.c | 7 ++++---1 file changed, 4 insertions(+), 3 deletions(-)
Ping. Any chance this could get a review? Thanks!
Signature · 2 lines
Kind regards, Luca Boccassi
Hi, Luca Boccassi
Quoted 10 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Luca Boccassi
Sent: Saturday, July 28, 2018 1:26 AM
To: [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Luca Boccassi <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH] net/e1000: do not error out ifrx_drop_enis set
rx_drop_enis 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.
Quoted 1 line
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.
Quoted 36 lines
Fixes 805803445a02 ("e1000: support EM devices (also known ase1000/e1000e)")
Cc: [email protected]Signed-off-by Luca Boccassi <[email protected]>--- drivers/net/e1000/em_rxtx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/net/e1000/em_rxtx.c +3
-2@@ -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 supportedby "
drivers/net/e1000/em_rxtx.c +1
-0+ PMD_INIT_LOG(NOTICE, "drop_en functionality notsupported by "
drivers/net/e1000/em_rxtx.c +0
-2"device"); -return -EINVAL ; }/* Free memory prior to re-allocation if needed. */ --2.18.0
Add Qi for discussion.
Quoted 72 lines
-----Original Message-----
From: Zhao1, Wei
Sent: Monday, October 8, 2018 4:43 PM
To: 'Luca Boccassi' <[email protected]>; [email protected]
Cc: Lu, Wenzhuo <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH] net/e1000: do not error out ifrx_drop_enis setHi, Luca Boccassi
Quoted 9 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Luca Boccassi
Sent: Saturday, July 28, 2018 1:26 AM
To: [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Luca Boccassi <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH] net/e1000: do not error out ifrx_drop_enis setQuoted 3 lines
rx_drop_enis an optimization that does nothing on single-queue devices like e1000. Do not force applications that do not care to select per-devicesAnd aslo,
eth_em_rx_queue_setupsupport set up of multiple queues for EM device.Quoted 1 line
optimizations flags by returning an error, just log it and carry on.
rx_drop_enis 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 functioneth_igb_rx_queue_setup(), igb device supportrx_drop_enset, so we do not have a such parameter check.drivers/net/e1000/em_rxtx.c eth_em_rx_queue_setup(struct rte_eth_dev
Quoted 15 lines
Fixes 805803445a02 ("e1000: support EM devices (also known ase1000/e1000e)")
Cc: [email protected]Signed-off-by Luca Boccassi <[email protected]>--- drivers/net/e1000/em_rxtx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/net/e1000/em_rxtx.c +0
-0@@ -1416,12 +1416,13 @@ eth_em_rx_queue_setup(struct rte_eth_dev*dev,
Quoted 20 lines
drivers/net/e1000/em_rxtx.c +3
-2}/* -* 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 supportedby "
drivers/net/e1000/em_rxtx.c +1
-0+ PMD_INIT_LOG(NOTICE, "drop_en functionality notsupported by "
drivers/net/e1000/em_rxtx.c +0
-2"device"); -return -EINVAL ; }/* Free memory prior to re-allocation if needed. */ --2.18.0
Quoted 22 lines · Wei
Hi, Luca Boccassi
Quoted 9 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Luca Boccassi
Sent: Saturday, July 28, 2018 1:26 AM
To: [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Luca Boccassi <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH] net/e1000: do not error out ifrx_drop_enis setQuoted 4 lines
rx_drop_enis an optimization that does nothing on single-queue devices like
e1000. Do not force applications that do not care to select per- devicesAnd aslo,
eth_em_rx_queue_setupsupport set up of multiple queues for EM device.Quoted 2 lines
optimizations flags by returning an error, just log it and carry on.
Quoted 7 lines
rx_drop_enis 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 functioneth_igb_rx_queue_setup(), igb device supportrx_drop_enset, 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.
Quoted 41 lines
Quoted 39 lines
Fixes 805803445a02 ("e1000: support EM devices (also known ase1000/e1000e)")
Cc: [email protected]Signed-off-by Luca Boccassi <[email protected]>---
drivers/net/e1000/em_rxtx.c | 7 ++++---1 file changed, 4 insertions(+), 3 deletions(-)drivers/net/e1000/em_rxtx.c +3
-2@@ -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 notsupported
by "drivers/net/e1000/em_rxtx.c +1
-0+ PMD_INIT_LOG(NOTICE, "drop_en functionality notsupported by "
"device");drivers/net/e1000/em_rxtx.c +0
-1-return -EINVAL ;}
/* Free memory prior to re-allocation if needed. */ --
2.18.0
Signature · 2 lines
Kind regards, Luca Boccassi
Zhao1, Wei
Acked-byQuoted 90 lines
-----Original Message-----
From: Luca Boccassi [mailto:[email protected]]
Sent: Monday, October 8, 2018 10:14 PM
To: Zhao1, Wei <[email protected]>; [email protected]
Cc: Lu, Wenzhuo <[email protected]>; [email protected]; Zhang, Qi Z <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH] net/e1000: do not error out ifrx_drop_enis setQuoted 20 lines · Wei
Hi, Luca Boccassi
Quoted 9 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Luca Boccassi
Sent: Saturday, July 28, 2018 1:26 AM
To: [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Luca Boccassi <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH] net/e1000: do not error out ifrx_drop_enis setQuoted 3 lines
rx_drop_enis an optimization that does nothing on single-queue devices like e1000. Do not force applications that do not care to select per- devicesAnd aslo,
eth_em_rx_queue_setupsupport set up of multiple queues for EM device.Quoted 1 line
optimizations flags by returning an error, just log it and carry on.
Quoted 7 lines
rx_drop_enis 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 functioneth_igb_rx_queue_setup(), igb device supportrx_drop_enset, 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.Quoted 10 lines
Quoted 10 lines
Fixes 805803445a02 ("e1000: support EM devices (also known ase1000/e1000e)")
Cc: [email protected]Signed-off-by Luca Boccassi <[email protected]>---
drivers/net/e1000/em_rxtx.c | 7 ++++---1 file changed, 4 insertions(+), 3 deletions(-)Quoted 5 lines
drivers/net/e1000/em_rxtx.c eth_em_rx_queue_setup(struct
Quoted 5 lines
(quoted diff) +0
-0
b/drivers/net/e1000/em_rxtx.cindexa6b3e92a6..81dc41efb100644drivers/net/e1000/em_rxtx.c +0
-0@@ -1416,12 +1416,13 @@ eth_em_rx_queue_setup(struct
rte_eth_devQuoted 20 lines
Quoted 20 lines
drivers/net/e1000/em_rxtx.c +3
-2*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 notsupported
by "drivers/net/e1000/em_rxtx.c +1
-0+ PMD_INIT_LOG(NOTICE, "drop_en functionality notsupported by "
"device");drivers/net/e1000/em_rxtx.c +0
-1-return -EINVAL ;}
Quoted 5 lines
Quoted 3 lines
/* Free memory prior to re-allocation if needed. */ --
2.18.0--
Kind regards,
Luca Boccassi
Zhang, Qi Z
AppliedQuoted 11 lines
-----Original Message-----
From: Zhao1, Wei
Sent: Wednesday, October 10, 2018 12:25 AM
To: Luca Boccassi <[email protected]>; [email protected]
Cc: Lu, Wenzhuo <[email protected]>; [email protected]; Zhang, Qi Z <[email protected]>; [email protected]
Subject: RE: [dpdk-dev] [PATCH] net/e1000: do not error out ifrx_drop_enis set
Quoted 1 line
Acked-by Wei Zhao <[email protected]>
Applied to dpdk-next-net-intel with minor change on the title to avoid check-git-log warning.
Thanks
Qi
Quoted 94 lines
Quoted 11 lines
-----Original Message-----
From: Luca Boccassi [mailto:[email protected]]
Sent: Monday, October 8, 2018 10:14 PM
To: Zhao1, Wei <[email protected]>; [email protected]
Cc: Lu, Wenzhuo <[email protected]>; [email protected]; Zhang, Qi Z <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH] net/e1000: do not error out ifrx_drop_enis setQuoted 23 lines
Quoted 22 lines · Wei
Hi, Luca Boccassi
Quoted 9 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Luca Boccassi
Sent: Saturday, July 28, 2018 1:26 AM
To: [email protected]
Cc: Lu, Wenzhuo <[email protected]>; Luca Boccassi <[email protected]>; [email protected]
Subject: [dpdk-dev] [PATCH] net/e1000: do not error out ifrx_drop_enis setQuoted 3 lines
rx_drop_enis an optimization that does nothing on single-queue devices like e1000. Do not force applications that do not care to select per- devicesAnd aslo,
eth_em_rx_queue_setupsupport set up of multiple queues for EM device.Quoted 1 line
optimizations flags by returning an error, just log it and carry on.
rx_drop_enis a flag to enable receive packets drop when insufficient receive descriptors exist to write the packet into systemmemory.
Quoted 6 lines
Quoted 5 lines
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 supportrx_drop_enset, so we do not have a such parameter check.Quoted 6 lines
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 applicationdevelopers.
Quoted 46 lines
Quoted 11 lines
Quoted 11 lines
Fixes 805803445a02 ("e1000: support EM devices (also known ase1000/e1000e)")
Cc: [email protected]Signed-off-by Luca Boccassi <[email protected]>---
drivers/net/e1000/em_rxtx.c | 7 ++++---1 file changed, 4 insertions(+), 3 deletions(-)Quoted 5 lines
drivers/net/e1000/em_rxtx.c eth_em_rx_queue_setup(struct
Quoted 5 lines
(quoted diff) +0
-0
b/drivers/net/e1000/em_rxtx.cindexa6b3e92a6..81dc41efb100644drivers/net/e1000/em_rxtx.c +0
-0@@ -1416,12 +1416,13 @@ eth_em_rx_queue_setup(struct
rte_eth_devQuoted 20 lines
Quoted 20 lines
drivers/net/e1000/em_rxtx.c +3
-2*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 notsupported
by "drivers/net/e1000/em_rxtx.c +1
-0+ PMD_INIT_LOG(NOTICE, "drop_en functionality notsupported by "
"device");drivers/net/e1000/em_rxtx.c +0
-1-return -EINVAL ;}
Quoted 5 lines
Quoted 3 lines
/* Free memory prior to re-allocation if needed. */ --
2.18.0--
Kind regards,
Luca Boccassi