diff mbox

test: change l2fwd pool size

Message ID 1452791531-25639-1-git-send-email-zoltan.kiss@linaro.org
State Accepted
Commit 4c823eb5161d4f1b51ee47e963a1a9b0575d3e1a
Headers show

Commit Message

Zoltan Kiss Jan. 14, 2016, 5:12 p.m. UTC
The current code looks awkward, it defines pkt.num as 564. Clean that up
and set it to 8k to make sure even several big descriptor rings could be
accomodated.

Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>

Comments

Bill Fischofer Jan. 15, 2016, 1:27 p.m. UTC | #1
On Thu, Jan 14, 2016 at 11:12 AM, Zoltan Kiss <zoltan.kiss@linaro.org>
wrote:

> The current code looks awkward, it defines pkt.num as 564. Clean that up

> and set it to 8k to make sure even several big descriptor rings could be

> accomodated.

>

> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>

>


Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>



>

> diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c

> index a85b830..a4c6e49 100644

> --- a/test/performance/odp_l2fwd.c

> +++ b/test/performance/odp_l2fwd.c

> @@ -33,7 +33,7 @@

>  /** @def SHM_PKT_POOL_SIZE

>   * @brief Size of the shared memory block

>   */

> -#define SHM_PKT_POOL_SIZE      (512*2048)

> +#define SHM_PKT_POOL_SIZE      8192

>

>  /** @def SHM_PKT_POOL_BUF_SIZE

>   * @brief Buffer size of the packet pool buffer

> @@ -535,7 +535,7 @@ int main(int argc, char *argv[])

>         odp_pool_param_init(&params);

>         params.pkt.seg_len = SHM_PKT_POOL_BUF_SIZE;

>         params.pkt.len     = SHM_PKT_POOL_BUF_SIZE;

> -       params.pkt.num     = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE;

> +       params.pkt.num     = SHM_PKT_POOL_SIZE;

>         params.type        = ODP_POOL_PACKET;

>

>         pool = odp_pool_create("packet pool", &params);

> _______________________________________________

> lng-odp mailing list

> lng-odp@lists.linaro.org

> https://lists.linaro.org/mailman/listinfo/lng-odp

>
Maxim Uvarov Jan. 18, 2016, 1:58 p.m. UTC | #2
strange that on make check l2fwd test fails due to small packet rate

1405 maximum packets per second.

without patch:
6475 maximum packets per second.

test consumes that less then 5000 is error.

Please check on your machine.

Maxim.


On 01/15/2016 16:27, Bill Fischofer wrote:
>
>
> On Thu, Jan 14, 2016 at 11:12 AM, Zoltan Kiss <zoltan.kiss@linaro.org 
> <mailto:zoltan.kiss@linaro.org>> wrote:
>
>     The current code looks awkward, it defines pkt.num as 564. Clean
>     that up
>     and set it to 8k to make sure even several big descriptor rings
>     could be
>     accomodated.
>
>     Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org
>     <mailto:zoltan.kiss@linaro.org>>
>
>
> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org 
> <mailto:bill.fischofer@linaro.org>>
>
>
>     diff --git a/test/performance/odp_l2fwd.c
>     b/test/performance/odp_l2fwd.c
>     index a85b830..a4c6e49 100644
>     --- a/test/performance/odp_l2fwd.c
>     +++ b/test/performance/odp_l2fwd.c
>     @@ -33,7 +33,7 @@
>      /** @def SHM_PKT_POOL_SIZE
>       * @brief Size of the shared memory block
>       */
>     -#define SHM_PKT_POOL_SIZE      (512*2048)
>     +#define SHM_PKT_POOL_SIZE      8192
>
>      /** @def SHM_PKT_POOL_BUF_SIZE
>       * @brief Buffer size of the packet pool buffer
>     @@ -535,7 +535,7 @@ int main(int argc, char *argv[])
>             odp_pool_param_init(&params);
>             params.pkt.seg_len = SHM_PKT_POOL_BUF_SIZE;
>             params.pkt.len     = SHM_PKT_POOL_BUF_SIZE;
>     -       params.pkt.num     = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE;
>     +       params.pkt.num     = SHM_PKT_POOL_SIZE;
>             params.type        = ODP_POOL_PACKET;
>
>             pool = odp_pool_create("packet pool", &params);
>     _______________________________________________
>     lng-odp mailing list
>     lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>     https://lists.linaro.org/mailman/listinfo/lng-odp
>
>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
Zoltan Kiss Jan. 19, 2016, 5:37 p.m. UTC | #3
It increased the performance from 80 kpps to 120. Are you sure it wasn't 
because something running in the background?

On 18/01/16 13:58, Maxim Uvarov wrote:
> strange that on make check l2fwd test fails due to small packet rate
>
> 1405 maximum packets per second.
>
> without patch:
> 6475 maximum packets per second.
>
> test consumes that less then 5000 is error.
>
> Please check on your machine.
>
> Maxim.
>
>
> On 01/15/2016 16:27, Bill Fischofer wrote:
>>
>>
>> On Thu, Jan 14, 2016 at 11:12 AM, Zoltan Kiss <zoltan.kiss@linaro.org
>> <mailto:zoltan.kiss@linaro.org>> wrote:
>>
>>     The current code looks awkward, it defines pkt.num as 564. Clean
>>     that up
>>     and set it to 8k to make sure even several big descriptor rings
>>     could be
>>     accomodated.
>>
>>     Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org
>>     <mailto:zoltan.kiss@linaro.org>>
>>
>>
>> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org
>> <mailto:bill.fischofer@linaro.org>>
>>
>>
>>     diff --git a/test/performance/odp_l2fwd.c
>>     b/test/performance/odp_l2fwd.c
>>     index a85b830..a4c6e49 100644
>>     --- a/test/performance/odp_l2fwd.c
>>     +++ b/test/performance/odp_l2fwd.c
>>     @@ -33,7 +33,7 @@
>>      /** @def SHM_PKT_POOL_SIZE
>>       * @brief Size of the shared memory block
>>       */
>>     -#define SHM_PKT_POOL_SIZE      (512*2048)
>>     +#define SHM_PKT_POOL_SIZE      8192
>>
>>      /** @def SHM_PKT_POOL_BUF_SIZE
>>       * @brief Buffer size of the packet pool buffer
>>     @@ -535,7 +535,7 @@ int main(int argc, char *argv[])
>>             odp_pool_param_init(&params);
>>             params.pkt.seg_len = SHM_PKT_POOL_BUF_SIZE;
>>             params.pkt.len     = SHM_PKT_POOL_BUF_SIZE;
>>     -       params.pkt.num     = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE;
>>     +       params.pkt.num     = SHM_PKT_POOL_SIZE;
>>             params.type        = ODP_POOL_PACKET;
>>
>>             pool = odp_pool_create("packet pool", &params);
>>     _______________________________________________
>>     lng-odp mailing list
>>     lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>>     https://lists.linaro.org/mailman/listinfo/lng-odp
>>
>>
>>
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> https://lists.linaro.org/mailman/listinfo/lng-odp
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c
index a85b830..a4c6e49 100644
--- a/test/performance/odp_l2fwd.c
+++ b/test/performance/odp_l2fwd.c
@@ -33,7 +33,7 @@ 
 /** @def SHM_PKT_POOL_SIZE
  * @brief Size of the shared memory block
  */
-#define SHM_PKT_POOL_SIZE      (512*2048)
+#define SHM_PKT_POOL_SIZE      8192
 
 /** @def SHM_PKT_POOL_BUF_SIZE
  * @brief Buffer size of the packet pool buffer
@@ -535,7 +535,7 @@  int main(int argc, char *argv[])
 	odp_pool_param_init(&params);
 	params.pkt.seg_len = SHM_PKT_POOL_BUF_SIZE;
 	params.pkt.len     = SHM_PKT_POOL_BUF_SIZE;
-	params.pkt.num     = SHM_PKT_POOL_SIZE/SHM_PKT_POOL_BUF_SIZE;
+	params.pkt.num     = SHM_PKT_POOL_SIZE;
 	params.type        = ODP_POOL_PACKET;
 
 	pool = odp_pool_create("packet pool", &params);