Skip to contentSkip to conversation

net/e1000: do not error out if rx_drop_en is set

PATCH Applied Luca Boccassi 3 participants 7 messages Jul 27, 2018 – Oct 10, 2018 Network drivers

lore
Share & tools
lore
#0 lore raw

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.

Fixes 805803445a02 ("e1000: support EM devices (also known as e1000/e1000e)")
---
 drivers/net/e1000/em_rxtx.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/net/e1000/em_rxtx.c +4 -3
index a6b3e92a6..81dc41efb 100644
@@ -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
#1 lore raw
Quoted 5 lines · Luca Boccassi

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.

Quoted 8 lines
Fixes 805803445a02 ("e1000: support EM devices (also known as

e1000/e1000e)")
Cc: [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
#2 lore raw
In reply to 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 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.

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 as

e1000/e1000e)")
Cc: [email protected]

---
 drivers/net/e1000/em_rxtx.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/net/e1000/em_rxtx.c +3 -2
index a6b3e92a6..81dc41efb 100644
@@ -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 "

drivers/net/e1000/em_rxtx.c +1 -0
+		PMD_INIT_LOG(NOTICE, "drop_en functionality not

supported by "

drivers/net/e1000/em_rxtx.c +0 -2
 			     "device");
-		return -EINVAL;
 	}
 
 	/* Free memory prior to re-allocation if needed. */
--

2.18.0

#3 lore raw
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 if rx_drop_en is set

Quoted 4 lines

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.

Quoted 2 lines

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

Quoted 7 lines

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.

Quoted 41 lines
Quoted 39 lines
Fixes 805803445a02 ("e1000: support EM devices (also known as

e1000/e1000e)")
Cc: [email protected]

---
 drivers/net/e1000/em_rxtx.c | 7 ++++---

 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/net/e1000/em_rxtx.c +3 -2
index a6b3e92a6..81dc41efb 100644
@@ -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 "

drivers/net/e1000/em_rxtx.c +1 -0
+		PMD_INIT_LOG(NOTICE, "drop_en functionality not

supported 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
Acked-by
#4 lore raw
Quoted 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 if rx_drop_en is set

Quoted 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 if rx_drop_en is set

Quoted 3 lines

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.

Quoted 1 line

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

Quoted 7 lines

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.

Quoted 10 lines
Quoted 10 lines
Fixes 805803445a02 ("e1000: support EM devices (also known as

e1000/e1000e)")
Cc: [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.c index a6b3e92a6..81dc41efb 100644

drivers/net/e1000/em_rxtx.c +0 -0
@@ -1416,12 +1416,13 @@ eth_em_rx_queue_setup(struct

rte_eth_dev

Quoted 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 not

supported
by "

drivers/net/e1000/em_rxtx.c +1 -0
+		PMD_INIT_LOG(NOTICE, "drop_en functionality not

supported 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

Applied
#5 lore raw
Quoted 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 if rx_drop_en is set

Quoted 1 line

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 if rx_drop_en is set

Quoted 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 if rx_drop_en is set

Quoted 3 lines

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.

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.

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 support rx_drop_en set, 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 application

developers.

Quoted 46 lines
Quoted 11 lines
Quoted 11 lines
Fixes 805803445a02 ("e1000: support EM devices (also known as

e1000/e1000e)")
Cc: [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.c index a6b3e92a6..81dc41efb 100644

drivers/net/e1000/em_rxtx.c +0 -0
@@ -1416,12 +1416,13 @@ eth_em_rx_queue_setup(struct

rte_eth_dev

Quoted 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 not

supported
by "

drivers/net/e1000/em_rxtx.c +1 -0
+		PMD_INIT_LOG(NOTICE, "drop_en functionality not

supported 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

#6 lore raw
In reply to Luca Boccassi

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 if rx_drop_en is set

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 if rx_drop_en is set

Quoted 3 lines

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.

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.

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 as

e1000/e1000e)")
Cc: [email protected]

---
 drivers/net/e1000/em_rxtx.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/net/e1000/em_rxtx.c +0 -0
index a6b3e92a6..81dc41efb 100644
@@ -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 supported

by "

drivers/net/e1000/em_rxtx.c +1 -0
+		PMD_INIT_LOG(NOTICE, "drop_en functionality not

supported by "

drivers/net/e1000/em_rxtx.c +0 -2
 			     "device");
-		return -EINVAL;
 	}
 
 	/* Free memory prior to re-allocation if needed. */
--

2.18.0