DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/l3fwd-power: fix Rx descriptor size
@ 2017-04-26 11:29 Pablo de Lara
  2017-04-28  7:47 ` Yao, Lei A
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo de Lara @ 2017-04-26 11:29 UTC (permalink / raw)
  To: dev; +Cc: Pablo de Lara, stable

L3fwd power app monitors the RX queues to see if the polling frequency
should be adjusted (the busier the queue, the higher the frequency).
The app uses several thresholds in the ring to determine the frequency,
being 96 the highest one, when frequency should be highest.

The problem is that the difference between this value and the ring size
is not big enough (128 - 96 = 32 descriptors), which means that
if the descriptors are not replenished quick enough, queue might
not be busy, but the app would think that it is, because 96th descriptor
is set.

Therefore, by increasing this gap (increasing the RX ring size),
we make sure that this false measurement will not happen.

Fixes: b451aa39db31 ("examples/l3fwd-power: use DD bit rather than RX queue count")
Cc: stable@dpdk.org

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 examples/l3fwd-power/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index ec40a17..7a8e1cd 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -147,7 +147,7 @@
 /*
  * Configurable number of RX/TX ring descriptors
  */
-#define RTE_TEST_RX_DESC_DEFAULT 128
+#define RTE_TEST_RX_DESC_DEFAULT 512
 #define RTE_TEST_TX_DESC_DEFAULT 512
 static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
 static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
-- 
2.7.4

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

* Re: [dpdk-dev] [PATCH] examples/l3fwd-power: fix Rx descriptor size
  2017-04-26 11:29 [dpdk-dev] [PATCH] examples/l3fwd-power: fix Rx descriptor size Pablo de Lara
@ 2017-04-28  7:47 ` Yao, Lei A
  2017-05-01 16:01   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Yao, Lei A @ 2017-04-28  7:47 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, dev; +Cc: De Lara Guarch, Pablo, stable

I have test this patch based on 17.05-rc2 , issue is fixed. Host frequency can 
be changed according to the data throughput. 
Tested-by: Lei Yao (lei.a.yao@intel.com)

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Wednesday, April 26, 2017 7:30 PM
> To: dev@dpdk.org
> Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>;
> stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] examples/l3fwd-power: fix Rx descriptor size
> 
> L3fwd power app monitors the RX queues to see if the polling frequency
> should be adjusted (the busier the queue, the higher the frequency).
> The app uses several thresholds in the ring to determine the frequency,
> being 96 the highest one, when frequency should be highest.
> 
> The problem is that the difference between this value and the ring size
> is not big enough (128 - 96 = 32 descriptors), which means that
> if the descriptors are not replenished quick enough, queue might
> not be busy, but the app would think that it is, because 96th descriptor
> is set.
> 
> Therefore, by increasing this gap (increasing the RX ring size),
> we make sure that this false measurement will not happen.
> 
> Fixes: b451aa39db31 ("examples/l3fwd-power: use DD bit rather than RX
> queue count")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> ---
>  examples/l3fwd-power/main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
> index ec40a17..7a8e1cd 100644
> --- a/examples/l3fwd-power/main.c
> +++ b/examples/l3fwd-power/main.c
> @@ -147,7 +147,7 @@
>  /*
>   * Configurable number of RX/TX ring descriptors
>   */
> -#define RTE_TEST_RX_DESC_DEFAULT 128
> +#define RTE_TEST_RX_DESC_DEFAULT 512
>  #define RTE_TEST_TX_DESC_DEFAULT 512
>  static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
>  static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
> --
> 2.7.4

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

* Re: [dpdk-dev] [PATCH] examples/l3fwd-power: fix Rx descriptor size
  2017-04-28  7:47 ` Yao, Lei A
@ 2017-05-01 16:01   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2017-05-01 16:01 UTC (permalink / raw)
  To: De Lara Guarch, Pablo; +Cc: dev, Yao, Lei A, stable

28/04/2017 09:47, Yao, Lei A:
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> > 
> > L3fwd power app monitors the RX queues to see if the polling frequency
> > should be adjusted (the busier the queue, the higher the frequency).
> > The app uses several thresholds in the ring to determine the frequency,
> > being 96 the highest one, when frequency should be highest.
> > 
> > The problem is that the difference between this value and the ring size
> > is not big enough (128 - 96 = 32 descriptors), which means that
> > if the descriptors are not replenished quick enough, queue might
> > not be busy, but the app would think that it is, because 96th descriptor
> > is set.
> > 
> > Therefore, by increasing this gap (increasing the RX ring size),
> > we make sure that this false measurement will not happen.
> > 
> > Fixes: b451aa39db31 ("examples/l3fwd-power: use DD bit rather than RX
> > queue count")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

> I have test this patch based on 17.05-rc2 , issue is fixed. Host frequency can 
> be changed according to the data throughput. 
> Tested-by: Lei Yao (lei.a.yao@intel.com)

Applied, thanks

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

end of thread, other threads:[~2017-05-01 16:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-26 11:29 [dpdk-dev] [PATCH] examples/l3fwd-power: fix Rx descriptor size Pablo de Lara
2017-04-28  7:47 ` Yao, Lei A
2017-05-01 16:01   ` 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).