DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples: fix symmetric_mp, set NIC rx_drop_en bit
@ 2014-12-03 16:56 Bruce Richardson
  2014-12-04 13:37 ` Thomas Monjalon
  2014-12-05 16:21 ` Thomas Monjalon
  0 siblings, 2 replies; 6+ messages in thread
From: Bruce Richardson @ 2014-12-03 16:56 UTC (permalink / raw)
  To: dev

The symmetric_mp example app is set up to allow two processes to
share a NIC port, with each pulling packets from one queue. In order
to have the app continue working when one of the process dies, the
drop_en bit should be set in the NIC configuration. Without this bit
set, the NIC will stall once any queue fills. With the bit set, once
a queue fills, all subsequent packets for that queue are discarded
allowing other queues to continue operating as normal.

This setting was missed when converting to use standardised defaults
in commit 81f7ecd9.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/multi_process/symmetric_mp/main.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/examples/multi_process/symmetric_mp/main.c b/examples/multi_process/symmetric_mp/main.c
index 01faae9..2fc2acf 100644
--- a/examples/multi_process/symmetric_mp/main.c
+++ b/examples/multi_process/symmetric_mp/main.c
@@ -229,6 +229,7 @@ smp_port_init(uint8_t port, struct rte_mempool *mbuf_pool, uint16_t num_queues)
 			}
 	};
 	const uint16_t rx_rings = num_queues, tx_rings = num_queues;
+	struct rte_eth_dev_info info;
 	int retval;
 	uint16_t q;
 
@@ -241,6 +242,9 @@ smp_port_init(uint8_t port, struct rte_mempool *mbuf_pool, uint16_t num_queues)
 	printf("# Initialising port %u... ", (unsigned)port);
 	fflush(stdout);
 
+	rte_eth_dev_info_get(port, &info);
+	info.default_rxconf.rx_drop_en = 1;
+
 	retval = rte_eth_dev_configure(port, rx_rings, tx_rings, &port_conf);
 	if (retval < 0)
 		return retval;
@@ -248,7 +252,7 @@ smp_port_init(uint8_t port, struct rte_mempool *mbuf_pool, uint16_t num_queues)
 	for (q = 0; q < rx_rings; q ++) {
 		retval = rte_eth_rx_queue_setup(port, q, RX_RING_SIZE,
 				rte_eth_dev_socket_id(port),
-				NULL,
+				&info.default_rxconf,
 				mbuf_pool);
 		if (retval < 0)
 			return retval;
-- 
1.9.3

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

* Re: [dpdk-dev] [PATCH] examples: fix symmetric_mp, set NIC rx_drop_en bit
  2014-12-03 16:56 [dpdk-dev] [PATCH] examples: fix symmetric_mp, set NIC rx_drop_en bit Bruce Richardson
@ 2014-12-04 13:37 ` Thomas Monjalon
  2014-12-04 14:03   ` Bruce Richardson
  2014-12-05 16:21 ` Thomas Monjalon
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Monjalon @ 2014-12-04 13:37 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

2014-12-03 16:56, Bruce Richardson:
> The symmetric_mp example app is set up to allow two processes to
> share a NIC port, with each pulling packets from one queue. In order
> to have the app continue working when one of the process dies, the
> drop_en bit should be set in the NIC configuration. Without this bit
> set, the NIC will stall once any queue fills. With the bit set, once
> a queue fills, all subsequent packets for that queue are discarded
> allowing other queues to continue operating as normal.
> 
> This setting was missed when converting to use standardised defaults
> in commit 81f7ecd9.

I don't see rx_drop_en in commit 81f7ecd9.
Why do you say it was missed?

-- 
Thomas

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

* Re: [dpdk-dev] [PATCH] examples: fix symmetric_mp, set NIC rx_drop_en bit
  2014-12-04 13:37 ` Thomas Monjalon
@ 2014-12-04 14:03   ` Bruce Richardson
  2014-12-04 15:36     ` Thomas Monjalon
  0 siblings, 1 reply; 6+ messages in thread
From: Bruce Richardson @ 2014-12-04 14:03 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Thu, Dec 04, 2014 at 02:37:15PM +0100, Thomas Monjalon wrote:
> 2014-12-03 16:56, Bruce Richardson:
> > The symmetric_mp example app is set up to allow two processes to
> > share a NIC port, with each pulling packets from one queue. In order
> > to have the app continue working when one of the process dies, the
> > drop_en bit should be set in the NIC configuration. Without this bit
> > set, the NIC will stall once any queue fills. With the bit set, once
> > a queue fills, all subsequent packets for that queue are discarded
> > allowing other queues to continue operating as normal.
> > 
> > This setting was missed when converting to use standardised defaults
> > in commit 81f7ecd9.
> 
> I don't see rx_drop_en in commit 81f7ecd9.
> Why do you say it was missed?
>
This is the one app that needs the drop_en bit set, and the bit is not set in the
defaults. Therefore, when this app was converted to use the defaults from the
driver, the drop_en bit should have been explicitly set as in this patch. [The 
fact of there being no drop_en bit in the commit is proof of its absense :-)].

/Bruce

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

* Re: [dpdk-dev] [PATCH] examples: fix symmetric_mp, set NIC rx_drop_en bit
  2014-12-04 14:03   ` Bruce Richardson
@ 2014-12-04 15:36     ` Thomas Monjalon
  2014-12-04 16:06       ` Bruce Richardson
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Monjalon @ 2014-12-04 15:36 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

2014-12-04 14:03, Bruce Richardson:
> On Thu, Dec 04, 2014 at 02:37:15PM +0100, Thomas Monjalon wrote:
> > 2014-12-03 16:56, Bruce Richardson:
> > > The symmetric_mp example app is set up to allow two processes to
> > > share a NIC port, with each pulling packets from one queue. In order
> > > to have the app continue working when one of the process dies, the
> > > drop_en bit should be set in the NIC configuration. Without this bit
> > > set, the NIC will stall once any queue fills. With the bit set, once
> > > a queue fills, all subsequent packets for that queue are discarded
> > > allowing other queues to continue operating as normal.
> > > 
> > > This setting was missed when converting to use standardised defaults
> > > in commit 81f7ecd9.
> > 
> > I don't see rx_drop_en in commit 81f7ecd9.
> > Why do you say it was missed?
> >
> This is the one app that needs the drop_en bit set, and the bit is not set in the
> defaults. Therefore, when this app was converted to use the defaults from the
> driver, the drop_en bit should have been explicitly set as in this patch. [The 
> fact of there being no drop_en bit in the commit is proof of its absense :-)].

So you agree this bit was never been set for this app?
Therefore I should remove the last sentence of your commit log before applying?

-- 
Thomas

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

* Re: [dpdk-dev] [PATCH] examples: fix symmetric_mp, set NIC rx_drop_en bit
  2014-12-04 15:36     ` Thomas Monjalon
@ 2014-12-04 16:06       ` Bruce Richardson
  0 siblings, 0 replies; 6+ messages in thread
From: Bruce Richardson @ 2014-12-04 16:06 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

On Thu, Dec 04, 2014 at 04:36:42PM +0100, Thomas Monjalon wrote:
> 2014-12-04 14:03, Bruce Richardson:
> > On Thu, Dec 04, 2014 at 02:37:15PM +0100, Thomas Monjalon wrote:
> > > 2014-12-03 16:56, Bruce Richardson:
> > > > The symmetric_mp example app is set up to allow two processes to
> > > > share a NIC port, with each pulling packets from one queue. In order
> > > > to have the app continue working when one of the process dies, the
> > > > drop_en bit should be set in the NIC configuration. Without this bit
> > > > set, the NIC will stall once any queue fills. With the bit set, once
> > > > a queue fills, all subsequent packets for that queue are discarded
> > > > allowing other queues to continue operating as normal.
> > > > 
> > > > This setting was missed when converting to use standardised defaults
> > > > in commit 81f7ecd9.
> > > 
> > > I don't see rx_drop_en in commit 81f7ecd9.
> > > Why do you say it was missed?
> > >
> > This is the one app that needs the drop_en bit set, and the bit is not set in the
> > defaults. Therefore, when this app was converted to use the defaults from the
> > driver, the drop_en bit should have been explicitly set as in this patch. [The 
> > fact of there being no drop_en bit in the commit is proof of its absense :-)].
> 
> So you agree this bit was never been set for this app?
> Therefore I should remove the last sentence of your commit log before applying?
> 
>
Oh, now I get your point. Looking at 1.7 release, yes, this bit was never set
but should really have been set. Therefore, please remove the last line as you
suggest.

/Bruce

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

* Re: [dpdk-dev] [PATCH] examples: fix symmetric_mp, set NIC rx_drop_en bit
  2014-12-03 16:56 [dpdk-dev] [PATCH] examples: fix symmetric_mp, set NIC rx_drop_en bit Bruce Richardson
  2014-12-04 13:37 ` Thomas Monjalon
@ 2014-12-05 16:21 ` Thomas Monjalon
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2014-12-05 16:21 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

2014-12-03 16:56, Bruce Richardson:
> The symmetric_mp example app is set up to allow two processes to
> share a NIC port, with each pulling packets from one queue. In order
> to have the app continue working when one of the process dies, the
> drop_en bit should be set in the NIC configuration. Without this bit
> set, the NIC will stall once any queue fills. With the bit set, once
> a queue fills, all subsequent packets for that queue are discarded
> allowing other queues to continue operating as normal.
> 
[snip]
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>

Applied

Thanks
-- 
Thomas

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

end of thread, other threads:[~2014-12-05 16:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-03 16:56 [dpdk-dev] [PATCH] examples: fix symmetric_mp, set NIC rx_drop_en bit Bruce Richardson
2014-12-04 13:37 ` Thomas Monjalon
2014-12-04 14:03   ` Bruce Richardson
2014-12-04 15:36     ` Thomas Monjalon
2014-12-04 16:06       ` Bruce Richardson
2014-12-05 16:21 ` Thomas Monjalon

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