Re: [lng-odp] [API-NEXT/PATCH] fix: classification: add null check for pool assigned to CoS

2015-12-19 Thread Maxim Uvarov

Merged,
Maxim.

On 12/17/2015 17:54, Bala Manoharan wrote:

Ping.

On 11 December 2015 at 14:07, Maxim Uvarov  wrote:

Reviewed-and-Tested-by: Maxim Uvarov 

On 12/11/2015 11:34, Balasubramanian Manoharan wrote:

Fixes a crash caused by pool not assigned to CoS.

Signed-off-by: Balasubramanian Manoharan 
---
   platform/linux-generic/pktio/pktio_common.c | 5 +++--
   1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/platform/linux-generic/pktio/pktio_common.c
b/platform/linux-generic/pktio/pktio_common.c
index 1fb10a0..1ed3260 100644
--- a/platform/linux-generic/pktio/pktio_common.c
+++ b/platform/linux-generic/pktio/pktio_common.c
@@ -26,12 +26,13 @@ int _odp_packet_cls_enq(pktio_entry_t *pktio_entry,
 _odp_cls_parse(&pkt_hdr, base);
 cos = pktio_select_cos(pktio_entry, (uint8_t *)base, &pkt_hdr);
-   pool = cos->s.pool->s.pool_hdl;
 /* if No CoS found then drop the packet */
-   if (cos == NULL || cos->s.queue == NULL)
+   if (cos == NULL || cos->s.queue == NULL || cos->s.pool == NULL)
 return 0;
   + pool = cos->s.pool->s.pool_hdl;
+
 pkt = odp_packet_alloc(pool, buf_len);
 if (odp_unlikely(pkt == ODP_PACKET_INVALID))
 return 0;


___
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


Re: [lng-odp] [API-NEXT/PATCH] fix: classification: add null check for pool assigned to CoS

2015-12-17 Thread Bala Manoharan
Ping.

On 11 December 2015 at 14:07, Maxim Uvarov  wrote:
>
> Reviewed-and-Tested-by: Maxim Uvarov 
>
> On 12/11/2015 11:34, Balasubramanian Manoharan wrote:
>>
>> Fixes a crash caused by pool not assigned to CoS.
>>
>> Signed-off-by: Balasubramanian Manoharan 
>> ---
>>   platform/linux-generic/pktio/pktio_common.c | 5 +++--
>>   1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/platform/linux-generic/pktio/pktio_common.c
>> b/platform/linux-generic/pktio/pktio_common.c
>> index 1fb10a0..1ed3260 100644
>> --- a/platform/linux-generic/pktio/pktio_common.c
>> +++ b/platform/linux-generic/pktio/pktio_common.c
>> @@ -26,12 +26,13 @@ int _odp_packet_cls_enq(pktio_entry_t *pktio_entry,
>> _odp_cls_parse(&pkt_hdr, base);
>> cos = pktio_select_cos(pktio_entry, (uint8_t *)base, &pkt_hdr);
>> -   pool = cos->s.pool->s.pool_hdl;
>> /* if No CoS found then drop the packet */
>> -   if (cos == NULL || cos->s.queue == NULL)
>> +   if (cos == NULL || cos->s.queue == NULL || cos->s.pool == NULL)
>> return 0;
>>   + pool = cos->s.pool->s.pool_hdl;
>> +
>> pkt = odp_packet_alloc(pool, buf_len);
>> if (odp_unlikely(pkt == ODP_PACKET_INVALID))
>> return 0;
>
>
> ___
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp



-- 
Regards,
Bala
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


Re: [lng-odp] [API-NEXT/PATCH] fix: classification: add null check for pool assigned to CoS

2015-12-11 Thread Maxim Uvarov


Reviewed-and-Tested-by: Maxim Uvarov 

On 12/11/2015 11:34, Balasubramanian Manoharan wrote:

Fixes a crash caused by pool not assigned to CoS.

Signed-off-by: Balasubramanian Manoharan 
---
  platform/linux-generic/pktio/pktio_common.c | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/platform/linux-generic/pktio/pktio_common.c 
b/platform/linux-generic/pktio/pktio_common.c
index 1fb10a0..1ed3260 100644
--- a/platform/linux-generic/pktio/pktio_common.c
+++ b/platform/linux-generic/pktio/pktio_common.c
@@ -26,12 +26,13 @@ int _odp_packet_cls_enq(pktio_entry_t *pktio_entry,
  
  	_odp_cls_parse(&pkt_hdr, base);

cos = pktio_select_cos(pktio_entry, (uint8_t *)base, &pkt_hdr);
-   pool = cos->s.pool->s.pool_hdl;
  
  	/* if No CoS found then drop the packet */

-   if (cos == NULL || cos->s.queue == NULL)
+   if (cos == NULL || cos->s.queue == NULL || cos->s.pool == NULL)
return 0;
  
+	pool = cos->s.pool->s.pool_hdl;

+
pkt = odp_packet_alloc(pool, buf_len);
if (odp_unlikely(pkt == ODP_PACKET_INVALID))
return 0;


___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp