Message ID | 1449822870-20147-1-git-send-email-bala.manoharan@linaro.org |
---|---|
State | Accepted |
Commit | 32198b0a76079c57e3bdd124a8b253d581c71127 |
Headers | show |
Reviewed-and-Tested-by: Maxim Uvarov <maxim.uvarov@linaro.org> On 12/11/2015 11:34, Balasubramanian Manoharan wrote: > Fixes a crash caused by pool not assigned to CoS. > > Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> > --- > 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;
Ping. On 11 December 2015 at 14:07, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: > > Reviewed-and-Tested-by: Maxim Uvarov <maxim.uvarov@linaro.org> > > On 12/11/2015 11:34, Balasubramanian Manoharan wrote: >> >> Fixes a crash caused by pool not assigned to CoS. >> >> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> >> --- >> 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
Merged, Maxim. On 12/17/2015 17:54, Bala Manoharan wrote: > Ping. > > On 11 December 2015 at 14:07, Maxim Uvarov <maxim.uvarov@linaro.org> wrote: >> Reviewed-and-Tested-by: Maxim Uvarov <maxim.uvarov@linaro.org> >> >> On 12/11/2015 11:34, Balasubramanian Manoharan wrote: >>> Fixes a crash caused by pool not assigned to CoS. >>> >>> Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> >>> --- >>> 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 > >
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;
Fixes a crash caused by pool not assigned to CoS. Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> --- platform/linux-generic/pktio/pktio_common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)