diff mbox

linux-generic: pool: use ODP_CONFIG_PACKET_SEG_LEN_MIN correctly

Message ID 1437132758-7098-1-git-send-email-bill.fischofer@linaro.org
State Accepted
Commit c9fca2c405b58421b83e362f49d848a2a6c589f0
Headers show

Commit Message

Bill Fischofer July 17, 2015, 11:32 a.m. UTC
Fix Bug https://bugs.linaro.org/show_bug.cgi?id=1696

Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
---
 platform/linux-generic/odp_pool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Maxim Uvarov July 20, 2015, 11:02 a.m. UTC | #1
Merged,
Maxim.

On 07/17/15 14:32, Bill Fischofer wrote:
> Fix Bug https://bugs.linaro.org/show_bug.cgi?id=1696
>
> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
> ---
>   platform/linux-generic/odp_pool.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c
> index dcbdf07..9a3ac16 100644
> --- a/platform/linux-generic/odp_pool.c
> +++ b/platform/linux-generic/odp_pool.c
> @@ -205,7 +205,7 @@ odp_pool_t odp_pool_create(const char *name,
>   		tailroom = ODP_CONFIG_PACKET_TAILROOM;
>   		buf_num = params->pkt.num;
>   
> -		seg_len = params->pkt.seg_len == 0 ?
> +		seg_len = params->pkt.seg_len <= ODP_CONFIG_PACKET_SEG_LEN_MIN ?
>   			ODP_CONFIG_PACKET_SEG_LEN_MIN :
>   			(params->pkt.seg_len <= ODP_CONFIG_PACKET_SEG_LEN_MAX ?
>   			 params->pkt.seg_len : ODP_CONFIG_PACKET_SEG_LEN_MAX);
diff mbox

Patch

diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c
index dcbdf07..9a3ac16 100644
--- a/platform/linux-generic/odp_pool.c
+++ b/platform/linux-generic/odp_pool.c
@@ -205,7 +205,7 @@  odp_pool_t odp_pool_create(const char *name,
 		tailroom = ODP_CONFIG_PACKET_TAILROOM;
 		buf_num = params->pkt.num;
 
-		seg_len = params->pkt.seg_len == 0 ?
+		seg_len = params->pkt.seg_len <= ODP_CONFIG_PACKET_SEG_LEN_MIN ?
 			ODP_CONFIG_PACKET_SEG_LEN_MIN :
 			(params->pkt.seg_len <= ODP_CONFIG_PACKET_SEG_LEN_MAX ?
 			 params->pkt.seg_len : ODP_CONFIG_PACKET_SEG_LEN_MAX);