diff mbox

[PATCHv5,6/6] api: config: simplify packet configuration

Message ID 1424371800-4249-6-git-send-email-bill.fischofer@linaro.org
State New
Headers show

Commit Message

Bill Fischofer Feb. 19, 2015, 6:50 p.m. UTC
Remove headroom/tailroom from ODP_CONFIG_PACKET_SEG_LEN_MIN and
clarify meaning of ODP_CONFIG_PACKET_SEG_LEN_MAX.

Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
---
 include/odp/api/config.h | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

Comments

Maxim Uvarov Feb. 20, 2015, 3:02 p.m. UTC | #1
In file included from ./include/odp_pool_internal.h:25:0,
                  from odp_buffer.c:8:
./include/odp_buffer_internal.h:56:1: error: static assertion failed: 
"ODP Segment size must be a multiple of cache line size"
make[2]: *** [odp_buffer.lo] Error 1


On 02/19/2015 09:50 PM, Bill Fischofer wrote:
> Remove headroom/tailroom from ODP_CONFIG_PACKET_SEG_LEN_MIN and
> clarify meaning of ODP_CONFIG_PACKET_SEG_LEN_MAX.
>
> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
> ---
>   include/odp/api/config.h | 12 ++----------
>   1 file changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/include/odp/api/config.h b/include/odp/api/config.h
> index ff9d5f2..8f1139d 100644
> --- a/include/odp/api/config.h
> +++ b/include/odp/api/config.h
> @@ -95,15 +95,8 @@ extern "C" {
>    * This defines the minimum packet segment buffer length in bytes. The user
>    * defined segment length (seg_len in odp_pool_param_t) will be rounded up into
>    * this value.
> - *
> - * @internal In linux-generic implementation:
> - * - The value MUST be a multiple of 8.
> - * - The value MUST be a multiple of ODP_CACHE_LINE_SIZE
> - * - The default value (1664) is large enough to support 1536-byte packets
> - *   with the default headroom shown above and is a multiple of both 64 and 128,
> - *   which are the most common cache line sizes.
>    */
> -#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1664)
> +#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1598)
>   
>   /**
>    * Maximum packet segment length
> @@ -111,9 +104,8 @@ extern "C" {
>    * This defines the maximum packet segment buffer length in bytes. The user
>    * defined segment length (seg_len in odp_pool_param_t) must not be larger than
>    * this.
> - *
>    */
> -#define ODP_CONFIG_PACKET_SEG_LEN_MAX ODP_CONFIG_PACKET_SEG_LEN_MIN
> +#define ODP_CONFIG_PACKET_SEG_LEN_MAX (64*1024)
>   
>   /**
>    * Maximum packet buffer length
Maxim Uvarov Feb. 20, 2015, 3:10 p.m. UTC | #2
On 02/20/2015 06:02 PM, Maxim Uvarov wrote:
> In file included from ./include/odp_pool_internal.h:25:0,
>                  from odp_buffer.c:8:
> ./include/odp_buffer_internal.h:56:1: error: static assertion failed: 
> "ODP Segment size must be a multiple of cache line size"
> make[2]: *** [odp_buffer.lo] Error 1
>

it has to be 1600?

-#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1598)
+#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1600)


Maxim.

>
> On 02/19/2015 09:50 PM, Bill Fischofer wrote:
>> Remove headroom/tailroom from ODP_CONFIG_PACKET_SEG_LEN_MIN and
>> clarify meaning of ODP_CONFIG_PACKET_SEG_LEN_MAX.
>>
>> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
>> ---
>>   include/odp/api/config.h | 12 ++----------
>>   1 file changed, 2 insertions(+), 10 deletions(-)
>>
>> diff --git a/include/odp/api/config.h b/include/odp/api/config.h
>> index ff9d5f2..8f1139d 100644
>> --- a/include/odp/api/config.h
>> +++ b/include/odp/api/config.h
>> @@ -95,15 +95,8 @@ extern "C" {
>>    * This defines the minimum packet segment buffer length in bytes. 
>> The user
>>    * defined segment length (seg_len in odp_pool_param_t) will be 
>> rounded up into
>>    * this value.
>> - *
>> - * @internal In linux-generic implementation:
>> - * - The value MUST be a multiple of 8.
>> - * - The value MUST be a multiple of ODP_CACHE_LINE_SIZE
>> - * - The default value (1664) is large enough to support 1536-byte 
>> packets
>> - *   with the default headroom shown above and is a multiple of both 
>> 64 and 128,
>> - *   which are the most common cache line sizes.
>>    */
>> -#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1664)
>> +#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1598)
>>     /**
>>    * Maximum packet segment length
>> @@ -111,9 +104,8 @@ extern "C" {
>>    * This defines the maximum packet segment buffer length in bytes. 
>> The user
>>    * defined segment length (seg_len in odp_pool_param_t) must not be 
>> larger than
>>    * this.
>> - *
>>    */
>> -#define ODP_CONFIG_PACKET_SEG_LEN_MAX ODP_CONFIG_PACKET_SEG_LEN_MIN
>> +#define ODP_CONFIG_PACKET_SEG_LEN_MAX (64*1024)
>>     /**
>>    * Maximum packet buffer length
>
Bill Fischofer Feb. 20, 2015, 3:15 p.m. UTC | #3
That check was deleted from odp_pool_internal.h.  Not sure why you're
seeing it.

On Fri, Feb 20, 2015 at 9:10 AM, Maxim Uvarov <maxim.uvarov@linaro.org>
wrote:

> On 02/20/2015 06:02 PM, Maxim Uvarov wrote:
>
>> In file included from ./include/odp_pool_internal.h:25:0,
>>                  from odp_buffer.c:8:
>> ./include/odp_buffer_internal.h:56:1: error: static assertion failed:
>> "ODP Segment size must be a multiple of cache line size"
>> make[2]: *** [odp_buffer.lo] Error 1
>>
>>
> it has to be 1600?
>
> -#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1598)
> +#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1600)
>
>
> Maxim.
>
>
>
>> On 02/19/2015 09:50 PM, Bill Fischofer wrote:
>>
>>> Remove headroom/tailroom from ODP_CONFIG_PACKET_SEG_LEN_MIN and
>>> clarify meaning of ODP_CONFIG_PACKET_SEG_LEN_MAX.
>>>
>>> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
>>> ---
>>>   include/odp/api/config.h | 12 ++----------
>>>   1 file changed, 2 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/include/odp/api/config.h b/include/odp/api/config.h
>>> index ff9d5f2..8f1139d 100644
>>> --- a/include/odp/api/config.h
>>> +++ b/include/odp/api/config.h
>>> @@ -95,15 +95,8 @@ extern "C" {
>>>    * This defines the minimum packet segment buffer length in bytes. The
>>> user
>>>    * defined segment length (seg_len in odp_pool_param_t) will be
>>> rounded up into
>>>    * this value.
>>> - *
>>> - * @internal In linux-generic implementation:
>>> - * - The value MUST be a multiple of 8.
>>> - * - The value MUST be a multiple of ODP_CACHE_LINE_SIZE
>>> - * - The default value (1664) is large enough to support 1536-byte
>>> packets
>>> - *   with the default headroom shown above and is a multiple of both 64
>>> and 128,
>>> - *   which are the most common cache line sizes.
>>>    */
>>> -#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1664)
>>> +#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1598)
>>>     /**
>>>    * Maximum packet segment length
>>> @@ -111,9 +104,8 @@ extern "C" {
>>>    * This defines the maximum packet segment buffer length in bytes. The
>>> user
>>>    * defined segment length (seg_len in odp_pool_param_t) must not be
>>> larger than
>>>    * this.
>>> - *
>>>    */
>>> -#define ODP_CONFIG_PACKET_SEG_LEN_MAX ODP_CONFIG_PACKET_SEG_LEN_MIN
>>> +#define ODP_CONFIG_PACKET_SEG_LEN_MAX (64*1024)
>>>     /**
>>>    * Maximum packet buffer length
>>>
>>
>>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
Bill Fischofer Feb. 20, 2015, 3:20 p.m. UTC | #4
Correction.  That check is deleted from odp_buffer_internal.h as part of
part 5 of the patch.  The value that it's complaining about is changed in
part 6, so unless you try to apply part 6 before 5 you shouldn't see this
issue.

On Fri, Feb 20, 2015 at 9:15 AM, Bill Fischofer <bill.fischofer@linaro.org>
wrote:

> That check was deleted from odp_pool_internal.h.  Not sure why you're
> seeing it.
>
> On Fri, Feb 20, 2015 at 9:10 AM, Maxim Uvarov <maxim.uvarov@linaro.org>
> wrote:
>
>> On 02/20/2015 06:02 PM, Maxim Uvarov wrote:
>>
>>> In file included from ./include/odp_pool_internal.h:25:0,
>>>                  from odp_buffer.c:8:
>>> ./include/odp_buffer_internal.h:56:1: error: static assertion failed:
>>> "ODP Segment size must be a multiple of cache line size"
>>> make[2]: *** [odp_buffer.lo] Error 1
>>>
>>>
>> it has to be 1600?
>>
>> -#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1598)
>> +#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1600)
>>
>>
>> Maxim.
>>
>>
>>
>>> On 02/19/2015 09:50 PM, Bill Fischofer wrote:
>>>
>>>> Remove headroom/tailroom from ODP_CONFIG_PACKET_SEG_LEN_MIN and
>>>> clarify meaning of ODP_CONFIG_PACKET_SEG_LEN_MAX.
>>>>
>>>> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
>>>> ---
>>>>   include/odp/api/config.h | 12 ++----------
>>>>   1 file changed, 2 insertions(+), 10 deletions(-)
>>>>
>>>> diff --git a/include/odp/api/config.h b/include/odp/api/config.h
>>>> index ff9d5f2..8f1139d 100644
>>>> --- a/include/odp/api/config.h
>>>> +++ b/include/odp/api/config.h
>>>> @@ -95,15 +95,8 @@ extern "C" {
>>>>    * This defines the minimum packet segment buffer length in bytes.
>>>> The user
>>>>    * defined segment length (seg_len in odp_pool_param_t) will be
>>>> rounded up into
>>>>    * this value.
>>>> - *
>>>> - * @internal In linux-generic implementation:
>>>> - * - The value MUST be a multiple of 8.
>>>> - * - The value MUST be a multiple of ODP_CACHE_LINE_SIZE
>>>> - * - The default value (1664) is large enough to support 1536-byte
>>>> packets
>>>> - *   with the default headroom shown above and is a multiple of both
>>>> 64 and 128,
>>>> - *   which are the most common cache line sizes.
>>>>    */
>>>> -#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1664)
>>>> +#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1598)
>>>>     /**
>>>>    * Maximum packet segment length
>>>> @@ -111,9 +104,8 @@ extern "C" {
>>>>    * This defines the maximum packet segment buffer length in bytes.
>>>> The user
>>>>    * defined segment length (seg_len in odp_pool_param_t) must not be
>>>> larger than
>>>>    * this.
>>>> - *
>>>>    */
>>>> -#define ODP_CONFIG_PACKET_SEG_LEN_MAX ODP_CONFIG_PACKET_SEG_LEN_MIN
>>>> +#define ODP_CONFIG_PACKET_SEG_LEN_MAX (64*1024)
>>>>     /**
>>>>    * Maximum packet buffer length
>>>>
>>>
>>>
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>
>
>
Maxim Uvarov Feb. 20, 2015, 3:27 p.m. UTC | #5
On 02/20/2015 06:20 PM, Bill Fischofer wrote:
> Correction.  That check is deleted from odp_buffer_internal.h as part 
> of part 5 of the patch.  The value that it's complaining about is 
> changed in part 6, so unless you try to apply part 6 before 5 you 
> shouldn't see this issue.
>
I applied all patches but not the latest:

74f6a07 (HEAD, master) linux-generic: pools: cleanup to reflect new pool 
parameters
285c967 api: config: increase buffer min align to 16
ffd2577 api: pools: normalize odp_pool_param_t layout
d358258 linux-generic: pools: rename odp_buffer_pool_init_global to 
odp_pool_init_global
0ff12ad linux-generic: pools: rename odp_buffer_pool files to odp_pool

Maxim.

> On Fri, Feb 20, 2015 at 9:15 AM, Bill Fischofer 
> <bill.fischofer@linaro.org <mailto:bill.fischofer@linaro.org>> wrote:
>
>     That check was deleted from odp_pool_internal.h.  Not sure why
>     you're seeing it.
>
>     On Fri, Feb 20, 2015 at 9:10 AM, Maxim Uvarov
>     <maxim.uvarov@linaro.org <mailto:maxim.uvarov@linaro.org>> wrote:
>
>         On 02/20/2015 06:02 PM, Maxim Uvarov wrote:
>
>             In file included from ./include/odp_pool_internal.h:25:0,
>                              from odp_buffer.c:8:
>             ./include/odp_buffer_internal.h:56:1: error: static
>             assertion failed: "ODP Segment size must be a multiple of
>             cache line size"
>             make[2]: *** [odp_buffer.lo] Error 1
>
>
>         it has to be 1600?
>
>         -#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1598)
>         +#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1600)
>
>
>         Maxim.
>
>
>
>             On 02/19/2015 09:50 PM, Bill Fischofer wrote:
>
>                 Remove headroom/tailroom from
>                 ODP_CONFIG_PACKET_SEG_LEN_MIN and
>                 clarify meaning of ODP_CONFIG_PACKET_SEG_LEN_MAX.
>
>                 Signed-off-by: Bill Fischofer
>                 <bill.fischofer@linaro.org
>                 <mailto:bill.fischofer@linaro.org>>
>                 ---
>                   include/odp/api/config.h | 12 ++----------
>                   1 file changed, 2 insertions(+), 10 deletions(-)
>
>                 diff --git a/include/odp/api/config.h
>                 b/include/odp/api/config.h
>                 index ff9d5f2..8f1139d 100644
>                 --- a/include/odp/api/config.h
>                 +++ b/include/odp/api/config.h
>                 @@ -95,15 +95,8 @@ extern "C" {
>                    * This defines the minimum packet segment buffer
>                 length in bytes. The user
>                    * defined segment length (seg_len in
>                 odp_pool_param_t) will be rounded up into
>                    * this value.
>                 - *
>                 - * @internal In linux-generic implementation:
>                 - * - The value MUST be a multiple of 8.
>                 - * - The value MUST be a multiple of ODP_CACHE_LINE_SIZE
>                 - * - The default value (1664) is large enough to
>                 support 1536-byte packets
>                 - *   with the default headroom shown above and is a
>                 multiple of both 64 and 128,
>                 - *   which are the most common cache line sizes.
>                    */
>                 -#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1664)
>                 +#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1598)
>                     /**
>                    * Maximum packet segment length
>                 @@ -111,9 +104,8 @@ extern "C" {
>                    * This defines the maximum packet segment buffer
>                 length in bytes. The user
>                    * defined segment length (seg_len in
>                 odp_pool_param_t) must not be larger than
>                    * this.
>                 - *
>                    */
>                 -#define ODP_CONFIG_PACKET_SEG_LEN_MAX
>                 ODP_CONFIG_PACKET_SEG_LEN_MIN
>                 +#define ODP_CONFIG_PACKET_SEG_LEN_MAX (64*1024)
>                     /**
>                    * Maximum packet buffer length
>
>
>
>
>         _______________________________________________
>         lng-odp mailing list
>         lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>         http://lists.linaro.org/mailman/listinfo/lng-odp
>
>
>
Maxim Uvarov Feb. 20, 2015, 3:33 p.m. UTC | #6
Maybe to merge patch 6 and patch 5?

Maxim.

On 02/20/2015 06:27 PM, Maxim Uvarov wrote:
> On 02/20/2015 06:20 PM, Bill Fischofer wrote:
>> Correction.  That check is deleted from odp_buffer_internal.h as part 
>> of part 5 of the patch.  The value that it's complaining about is 
>> changed in part 6, so unless you try to apply part 6 before 5 you 
>> shouldn't see this issue.
>>
> I applied all patches but not the latest:
>
> 74f6a07 (HEAD, master) linux-generic: pools: cleanup to reflect new 
> pool parameters
> 285c967 api: config: increase buffer min align to 16
> ffd2577 api: pools: normalize odp_pool_param_t layout
> d358258 linux-generic: pools: rename odp_buffer_pool_init_global to 
> odp_pool_init_global
> 0ff12ad linux-generic: pools: rename odp_buffer_pool files to odp_pool
>
> Maxim.
>
>> On Fri, Feb 20, 2015 at 9:15 AM, Bill Fischofer 
>> <bill.fischofer@linaro.org <mailto:bill.fischofer@linaro.org>> wrote:
>>
>>     That check was deleted from odp_pool_internal.h.  Not sure why
>>     you're seeing it.
>>
>>     On Fri, Feb 20, 2015 at 9:10 AM, Maxim Uvarov
>>     <maxim.uvarov@linaro.org <mailto:maxim.uvarov@linaro.org>> wrote:
>>
>>         On 02/20/2015 06:02 PM, Maxim Uvarov wrote:
>>
>>             In file included from ./include/odp_pool_internal.h:25:0,
>>                              from odp_buffer.c:8:
>>             ./include/odp_buffer_internal.h:56:1: error: static
>>             assertion failed: "ODP Segment size must be a multiple of
>>             cache line size"
>>             make[2]: *** [odp_buffer.lo] Error 1
>>
>>
>>         it has to be 1600?
>>
>>         -#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1598)
>>         +#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1600)
>>
>>
>>         Maxim.
>>
>>
>>
>>             On 02/19/2015 09:50 PM, Bill Fischofer wrote:
>>
>>                 Remove headroom/tailroom from
>>                 ODP_CONFIG_PACKET_SEG_LEN_MIN and
>>                 clarify meaning of ODP_CONFIG_PACKET_SEG_LEN_MAX.
>>
>>                 Signed-off-by: Bill Fischofer
>>                 <bill.fischofer@linaro.org
>>                 <mailto:bill.fischofer@linaro.org>>
>>                 ---
>>                   include/odp/api/config.h | 12 ++----------
>>                   1 file changed, 2 insertions(+), 10 deletions(-)
>>
>>                 diff --git a/include/odp/api/config.h
>>                 b/include/odp/api/config.h
>>                 index ff9d5f2..8f1139d 100644
>>                 --- a/include/odp/api/config.h
>>                 +++ b/include/odp/api/config.h
>>                 @@ -95,15 +95,8 @@ extern "C" {
>>                    * This defines the minimum packet segment buffer
>>                 length in bytes. The user
>>                    * defined segment length (seg_len in
>>                 odp_pool_param_t) will be rounded up into
>>                    * this value.
>>                 - *
>>                 - * @internal In linux-generic implementation:
>>                 - * - The value MUST be a multiple of 8.
>>                 - * - The value MUST be a multiple of 
>> ODP_CACHE_LINE_SIZE
>>                 - * - The default value (1664) is large enough to
>>                 support 1536-byte packets
>>                 - *   with the default headroom shown above and is a
>>                 multiple of both 64 and 128,
>>                 - *   which are the most common cache line sizes.
>>                    */
>>                 -#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1664)
>>                 +#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1598)
>>                     /**
>>                    * Maximum packet segment length
>>                 @@ -111,9 +104,8 @@ extern "C" {
>>                    * This defines the maximum packet segment buffer
>>                 length in bytes. The user
>>                    * defined segment length (seg_len in
>>                 odp_pool_param_t) must not be larger than
>>                    * this.
>>                 - *
>>                    */
>>                 -#define ODP_CONFIG_PACKET_SEG_LEN_MAX
>>                 ODP_CONFIG_PACKET_SEG_LEN_MIN
>>                 +#define ODP_CONFIG_PACKET_SEG_LEN_MAX (64*1024)
>>                     /**
>>                    * Maximum packet buffer length
>>
>>
>>
>>
>>         _______________________________________________
>>         lng-odp mailing list
>>         lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>>         http://lists.linaro.org/mailman/listinfo/lng-odp
>>
>>
>>
>
Bill Fischofer Feb. 20, 2015, 3:36 p.m. UTC | #7
I'm not sure what the problem is.  Available for a hangout?  I tried
calling but no answer.

On Fri, Feb 20, 2015 at 9:33 AM, Maxim Uvarov <maxim.uvarov@linaro.org>
wrote:

> Maybe to merge patch 6 and patch 5?
>
> Maxim.
>
>
> On 02/20/2015 06:27 PM, Maxim Uvarov wrote:
>
>> On 02/20/2015 06:20 PM, Bill Fischofer wrote:
>>
>>> Correction.  That check is deleted from odp_buffer_internal.h as part of
>>> part 5 of the patch.  The value that it's complaining about is changed in
>>> part 6, so unless you try to apply part 6 before 5 you shouldn't see this
>>> issue.
>>>
>>>  I applied all patches but not the latest:
>>
>> 74f6a07 (HEAD, master) linux-generic: pools: cleanup to reflect new pool
>> parameters
>> 285c967 api: config: increase buffer min align to 16
>> ffd2577 api: pools: normalize odp_pool_param_t layout
>> d358258 linux-generic: pools: rename odp_buffer_pool_init_global to
>> odp_pool_init_global
>> 0ff12ad linux-generic: pools: rename odp_buffer_pool files to odp_pool
>>
>> Maxim.
>>
>>  On Fri, Feb 20, 2015 at 9:15 AM, Bill Fischofer <
>>> bill.fischofer@linaro.org <mailto:bill.fischofer@linaro.org>> wrote:
>>>
>>>     That check was deleted from odp_pool_internal.h.  Not sure why
>>>     you're seeing it.
>>>
>>>     On Fri, Feb 20, 2015 at 9:10 AM, Maxim Uvarov
>>>     <maxim.uvarov@linaro.org <mailto:maxim.uvarov@linaro.org>> wrote:
>>>
>>>         On 02/20/2015 06:02 PM, Maxim Uvarov wrote:
>>>
>>>             In file included from ./include/odp_pool_internal.h:25:0,
>>>                              from odp_buffer.c:8:
>>>             ./include/odp_buffer_internal.h:56:1: error: static
>>>             assertion failed: "ODP Segment size must be a multiple of
>>>             cache line size"
>>>             make[2]: *** [odp_buffer.lo] Error 1
>>>
>>>
>>>         it has to be 1600?
>>>
>>>         -#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1598)
>>>         +#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1600)
>>>
>>>
>>>         Maxim.
>>>
>>>
>>>
>>>             On 02/19/2015 09:50 PM, Bill Fischofer wrote:
>>>
>>>                 Remove headroom/tailroom from
>>>                 ODP_CONFIG_PACKET_SEG_LEN_MIN and
>>>                 clarify meaning of ODP_CONFIG_PACKET_SEG_LEN_MAX.
>>>
>>>                 Signed-off-by: Bill Fischofer
>>>                 <bill.fischofer@linaro.org
>>>                 <mailto:bill.fischofer@linaro.org>>
>>>                 ---
>>>                   include/odp/api/config.h | 12 ++----------
>>>                   1 file changed, 2 insertions(+), 10 deletions(-)
>>>
>>>                 diff --git a/include/odp/api/config.h
>>>                 b/include/odp/api/config.h
>>>                 index ff9d5f2..8f1139d 100644
>>>                 --- a/include/odp/api/config.h
>>>                 +++ b/include/odp/api/config.h
>>>                 @@ -95,15 +95,8 @@ extern "C" {
>>>                    * This defines the minimum packet segment buffer
>>>                 length in bytes. The user
>>>                    * defined segment length (seg_len in
>>>                 odp_pool_param_t) will be rounded up into
>>>                    * this value.
>>>                 - *
>>>                 - * @internal In linux-generic implementation:
>>>                 - * - The value MUST be a multiple of 8.
>>>                 - * - The value MUST be a multiple of ODP_CACHE_LINE_SIZE
>>>                 - * - The default value (1664) is large enough to
>>>                 support 1536-byte packets
>>>                 - *   with the default headroom shown above and is a
>>>                 multiple of both 64 and 128,
>>>                 - *   which are the most common cache line sizes.
>>>                    */
>>>                 -#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1664)
>>>                 +#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1598)
>>>                     /**
>>>                    * Maximum packet segment length
>>>                 @@ -111,9 +104,8 @@ extern "C" {
>>>                    * This defines the maximum packet segment buffer
>>>                 length in bytes. The user
>>>                    * defined segment length (seg_len in
>>>                 odp_pool_param_t) must not be larger than
>>>                    * this.
>>>                 - *
>>>                    */
>>>                 -#define ODP_CONFIG_PACKET_SEG_LEN_MAX
>>>                 ODP_CONFIG_PACKET_SEG_LEN_MIN
>>>                 +#define ODP_CONFIG_PACKET_SEG_LEN_MAX (64*1024)
>>>                     /**
>>>                    * Maximum packet buffer length
>>>
>>>
>>>
>>>
>>>         _______________________________________________
>>>         lng-odp mailing list
>>>         lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>>>         http://lists.linaro.org/mailman/listinfo/lng-odp
>>>
>>>
>>>
>>>
>>
>
Mike Holmes Feb. 20, 2015, 4:26 p.m. UTC | #8
I tried twice with apply-and-build and I always see this

.....
Using patch:
lng-odp_PATCHv5_5-6_linux-generic_pools_cleanup_to_reflect_new_pool_parameters.mbox
....
FAIL: odp_crypto
....
Using patch:
lng-odp_PATCHv5_6-6_api_config_simplify_packet_configuration.mbox
.....
PASS: odp_crypto

So  I think patch 5 is broken, looks like it needs something from 6


On 20 February 2015 at 10:36, Bill Fischofer <bill.fischofer@linaro.org>
wrote:

> I'm not sure what the problem is.  Available for a hangout?  I tried
> calling but no answer.
>
> On Fri, Feb 20, 2015 at 9:33 AM, Maxim Uvarov <maxim.uvarov@linaro.org>
> wrote:
>
>> Maybe to merge patch 6 and patch 5?
>>
>> Maxim.
>>
>>
>> On 02/20/2015 06:27 PM, Maxim Uvarov wrote:
>>
>>> On 02/20/2015 06:20 PM, Bill Fischofer wrote:
>>>
>>>> Correction.  That check is deleted from odp_buffer_internal.h as part
>>>> of part 5 of the patch.  The value that it's complaining about is changed
>>>> in part 6, so unless you try to apply part 6 before 5 you shouldn't see
>>>> this issue.
>>>>
>>>>  I applied all patches but not the latest:
>>>
>>> 74f6a07 (HEAD, master) linux-generic: pools: cleanup to reflect new pool
>>> parameters
>>> 285c967 api: config: increase buffer min align to 16
>>> ffd2577 api: pools: normalize odp_pool_param_t layout
>>> d358258 linux-generic: pools: rename odp_buffer_pool_init_global to
>>> odp_pool_init_global
>>> 0ff12ad linux-generic: pools: rename odp_buffer_pool files to odp_pool
>>>
>>> Maxim.
>>>
>>>  On Fri, Feb 20, 2015 at 9:15 AM, Bill Fischofer <
>>>> bill.fischofer@linaro.org <mailto:bill.fischofer@linaro.org>> wrote:
>>>>
>>>>     That check was deleted from odp_pool_internal.h.  Not sure why
>>>>     you're seeing it.
>>>>
>>>>     On Fri, Feb 20, 2015 at 9:10 AM, Maxim Uvarov
>>>>     <maxim.uvarov@linaro.org <mailto:maxim.uvarov@linaro.org>> wrote:
>>>>
>>>>         On 02/20/2015 06:02 PM, Maxim Uvarov wrote:
>>>>
>>>>             In file included from ./include/odp_pool_internal.h:25:0,
>>>>                              from odp_buffer.c:8:
>>>>             ./include/odp_buffer_internal.h:56:1: error: static
>>>>             assertion failed: "ODP Segment size must be a multiple of
>>>>             cache line size"
>>>>             make[2]: *** [odp_buffer.lo] Error 1
>>>>
>>>>
>>>>         it has to be 1600?
>>>>
>>>>         -#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1598)
>>>>         +#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1600)
>>>>
>>>>
>>>>         Maxim.
>>>>
>>>>
>>>>
>>>>             On 02/19/2015 09:50 PM, Bill Fischofer wrote:
>>>>
>>>>                 Remove headroom/tailroom from
>>>>                 ODP_CONFIG_PACKET_SEG_LEN_MIN and
>>>>                 clarify meaning of ODP_CONFIG_PACKET_SEG_LEN_MAX.
>>>>
>>>>                 Signed-off-by: Bill Fischofer
>>>>                 <bill.fischofer@linaro.org
>>>>                 <mailto:bill.fischofer@linaro.org>>
>>>>                 ---
>>>>                   include/odp/api/config.h | 12 ++----------
>>>>                   1 file changed, 2 insertions(+), 10 deletions(-)
>>>>
>>>>                 diff --git a/include/odp/api/config.h
>>>>                 b/include/odp/api/config.h
>>>>                 index ff9d5f2..8f1139d 100644
>>>>                 --- a/include/odp/api/config.h
>>>>                 +++ b/include/odp/api/config.h
>>>>                 @@ -95,15 +95,8 @@ extern "C" {
>>>>                    * This defines the minimum packet segment buffer
>>>>                 length in bytes. The user
>>>>                    * defined segment length (seg_len in
>>>>                 odp_pool_param_t) will be rounded up into
>>>>                    * this value.
>>>>                 - *
>>>>                 - * @internal In linux-generic implementation:
>>>>                 - * - The value MUST be a multiple of 8.
>>>>                 - * - The value MUST be a multiple of
>>>> ODP_CACHE_LINE_SIZE
>>>>                 - * - The default value (1664) is large enough to
>>>>                 support 1536-byte packets
>>>>                 - *   with the default headroom shown above and is a
>>>>                 multiple of both 64 and 128,
>>>>                 - *   which are the most common cache line sizes.
>>>>                    */
>>>>                 -#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1664)
>>>>                 +#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1598)
>>>>                     /**
>>>>                    * Maximum packet segment length
>>>>                 @@ -111,9 +104,8 @@ extern "C" {
>>>>                    * This defines the maximum packet segment buffer
>>>>                 length in bytes. The user
>>>>                    * defined segment length (seg_len in
>>>>                 odp_pool_param_t) must not be larger than
>>>>                    * this.
>>>>                 - *
>>>>                    */
>>>>                 -#define ODP_CONFIG_PACKET_SEG_LEN_MAX
>>>>                 ODP_CONFIG_PACKET_SEG_LEN_MIN
>>>>                 +#define ODP_CONFIG_PACKET_SEG_LEN_MAX (64*1024)
>>>>                     /**
>>>>                    * Maximum packet buffer length
>>>>
>>>>
>>>>
>>>>
>>>>         _______________________________________________
>>>>         lng-odp mailing list
>>>>         lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>>>>         http://lists.linaro.org/mailman/listinfo/lng-odp
>>>>
>>>>
>>>>
>>>>
>>>
>>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
>
Bill Fischofer Feb. 20, 2015, 4:43 p.m. UTC | #9
OK, it looks like the odp_crypto test requires the larger
ODP_CONFIG_PACKET_SEG_LEN_MAX that's part of part 6.  We have three options:


   1. Ignore this, since all other tests pass with the first 5 applied and
   this test passes too with part 6
   2. Merge parts 5 and 6 together.  I separated them since the change to
   config.h is an "API" change while part 5 is a linux-generic implementation
   change
   3. Rework the patch to create a v6 that adds a part 7 so that the pool.c
   changes are bracketed around the config.h change introduced in part 6.
   This may take some time since part of the simplification was to eliminate
   the need for unsegmented packet pool support following Petri's suggestion
   and that's what's causing the crypto test failure in the absence of the
   increased SEG_MAX limit.

I'd vote for either 1 or 2 as you prefer.

Bill

On Fri, Feb 20, 2015 at 10:26 AM, Mike Holmes <mike.holmes@linaro.org>
wrote:

> I tried twice with apply-and-build and I always see this
>
> .....
> Using patch:
> lng-odp_PATCHv5_5-6_linux-generic_pools_cleanup_to_reflect_new_pool_parameters.mbox
> ....
> FAIL: odp_crypto
> ....
> Using patch:
> lng-odp_PATCHv5_6-6_api_config_simplify_packet_configuration.mbox
> .....
> PASS: odp_crypto
>
> So  I think patch 5 is broken, looks like it needs something from 6
>
>
> On 20 February 2015 at 10:36, Bill Fischofer <bill.fischofer@linaro.org>
> wrote:
>
>> I'm not sure what the problem is.  Available for a hangout?  I tried
>> calling but no answer.
>>
>> On Fri, Feb 20, 2015 at 9:33 AM, Maxim Uvarov <maxim.uvarov@linaro.org>
>> wrote:
>>
>>> Maybe to merge patch 6 and patch 5?
>>>
>>> Maxim.
>>>
>>>
>>> On 02/20/2015 06:27 PM, Maxim Uvarov wrote:
>>>
>>>> On 02/20/2015 06:20 PM, Bill Fischofer wrote:
>>>>
>>>>> Correction.  That check is deleted from odp_buffer_internal.h as part
>>>>> of part 5 of the patch.  The value that it's complaining about is changed
>>>>> in part 6, so unless you try to apply part 6 before 5 you shouldn't see
>>>>> this issue.
>>>>>
>>>>>  I applied all patches but not the latest:
>>>>
>>>> 74f6a07 (HEAD, master) linux-generic: pools: cleanup to reflect new
>>>> pool parameters
>>>> 285c967 api: config: increase buffer min align to 16
>>>> ffd2577 api: pools: normalize odp_pool_param_t layout
>>>> d358258 linux-generic: pools: rename odp_buffer_pool_init_global to
>>>> odp_pool_init_global
>>>> 0ff12ad linux-generic: pools: rename odp_buffer_pool files to odp_pool
>>>>
>>>> Maxim.
>>>>
>>>>  On Fri, Feb 20, 2015 at 9:15 AM, Bill Fischofer <
>>>>> bill.fischofer@linaro.org <mailto:bill.fischofer@linaro.org>> wrote:
>>>>>
>>>>>     That check was deleted from odp_pool_internal.h.  Not sure why
>>>>>     you're seeing it.
>>>>>
>>>>>     On Fri, Feb 20, 2015 at 9:10 AM, Maxim Uvarov
>>>>>     <maxim.uvarov@linaro.org <mailto:maxim.uvarov@linaro.org>> wrote:
>>>>>
>>>>>         On 02/20/2015 06:02 PM, Maxim Uvarov wrote:
>>>>>
>>>>>             In file included from ./include/odp_pool_internal.h:25:0,
>>>>>                              from odp_buffer.c:8:
>>>>>             ./include/odp_buffer_internal.h:56:1: error: static
>>>>>             assertion failed: "ODP Segment size must be a multiple of
>>>>>             cache line size"
>>>>>             make[2]: *** [odp_buffer.lo] Error 1
>>>>>
>>>>>
>>>>>         it has to be 1600?
>>>>>
>>>>>         -#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1598)
>>>>>         +#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1600)
>>>>>
>>>>>
>>>>>         Maxim.
>>>>>
>>>>>
>>>>>
>>>>>             On 02/19/2015 09:50 PM, Bill Fischofer wrote:
>>>>>
>>>>>                 Remove headroom/tailroom from
>>>>>                 ODP_CONFIG_PACKET_SEG_LEN_MIN and
>>>>>                 clarify meaning of ODP_CONFIG_PACKET_SEG_LEN_MAX.
>>>>>
>>>>>                 Signed-off-by: Bill Fischofer
>>>>>                 <bill.fischofer@linaro.org
>>>>>                 <mailto:bill.fischofer@linaro.org>>
>>>>>                 ---
>>>>>                   include/odp/api/config.h | 12 ++----------
>>>>>                   1 file changed, 2 insertions(+), 10 deletions(-)
>>>>>
>>>>>                 diff --git a/include/odp/api/config.h
>>>>>                 b/include/odp/api/config.h
>>>>>                 index ff9d5f2..8f1139d 100644
>>>>>                 --- a/include/odp/api/config.h
>>>>>                 +++ b/include/odp/api/config.h
>>>>>                 @@ -95,15 +95,8 @@ extern "C" {
>>>>>                    * This defines the minimum packet segment buffer
>>>>>                 length in bytes. The user
>>>>>                    * defined segment length (seg_len in
>>>>>                 odp_pool_param_t) will be rounded up into
>>>>>                    * this value.
>>>>>                 - *
>>>>>                 - * @internal In linux-generic implementation:
>>>>>                 - * - The value MUST be a multiple of 8.
>>>>>                 - * - The value MUST be a multiple of
>>>>> ODP_CACHE_LINE_SIZE
>>>>>                 - * - The default value (1664) is large enough to
>>>>>                 support 1536-byte packets
>>>>>                 - *   with the default headroom shown above and is a
>>>>>                 multiple of both 64 and 128,
>>>>>                 - *   which are the most common cache line sizes.
>>>>>                    */
>>>>>                 -#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1664)
>>>>>                 +#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1598)
>>>>>                     /**
>>>>>                    * Maximum packet segment length
>>>>>                 @@ -111,9 +104,8 @@ extern "C" {
>>>>>                    * This defines the maximum packet segment buffer
>>>>>                 length in bytes. The user
>>>>>                    * defined segment length (seg_len in
>>>>>                 odp_pool_param_t) must not be larger than
>>>>>                    * this.
>>>>>                 - *
>>>>>                    */
>>>>>                 -#define ODP_CONFIG_PACKET_SEG_LEN_MAX
>>>>>                 ODP_CONFIG_PACKET_SEG_LEN_MIN
>>>>>                 +#define ODP_CONFIG_PACKET_SEG_LEN_MAX (64*1024)
>>>>>                     /**
>>>>>                    * Maximum packet buffer length
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>         _______________________________________________
>>>>>         lng-odp mailing list
>>>>>         lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>>>>>         http://lists.linaro.org/mailman/listinfo/lng-odp
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>> _______________________________________________
>> lng-odp mailing list
>> lng-odp@lists.linaro.org
>> http://lists.linaro.org/mailman/listinfo/lng-odp
>>
>>
>
>
> --
> *Mike Holmes*
> Linaro  Sr Technical Manager
> LNG - ODP
>
diff mbox

Patch

diff --git a/include/odp/api/config.h b/include/odp/api/config.h
index ff9d5f2..8f1139d 100644
--- a/include/odp/api/config.h
+++ b/include/odp/api/config.h
@@ -95,15 +95,8 @@  extern "C" {
  * This defines the minimum packet segment buffer length in bytes. The user
  * defined segment length (seg_len in odp_pool_param_t) will be rounded up into
  * this value.
- *
- * @internal In linux-generic implementation:
- * - The value MUST be a multiple of 8.
- * - The value MUST be a multiple of ODP_CACHE_LINE_SIZE
- * - The default value (1664) is large enough to support 1536-byte packets
- *   with the default headroom shown above and is a multiple of both 64 and 128,
- *   which are the most common cache line sizes.
  */
-#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1664)
+#define ODP_CONFIG_PACKET_SEG_LEN_MIN (1598)
 
 /**
  * Maximum packet segment length
@@ -111,9 +104,8 @@  extern "C" {
  * This defines the maximum packet segment buffer length in bytes. The user
  * defined segment length (seg_len in odp_pool_param_t) must not be larger than
  * this.
- *
  */
-#define ODP_CONFIG_PACKET_SEG_LEN_MAX ODP_CONFIG_PACKET_SEG_LEN_MIN
+#define ODP_CONFIG_PACKET_SEG_LEN_MAX (64*1024)
 
 /**
  * Maximum packet buffer length