On Thu, Feb 4, 2016 at 12:20 PM, Maxim Uvarov <[email protected]> wrote:
> 1. checkpatch.pl errors. > Yes, there is a whitespace error. Should be corrected in v2 > > 2. run 'make check' under root. pktio test will fail: > 1. pktio.c:502 - num_rx == num_pkts > Not sure why you'd see any difference here in an unrelated area. The pktio tests call odp_packet_alloc(), but never with a zero length. > > Thanks, > Maxim. > > On 02/04/2016 19:48, Bill Fischofer wrote: > >> This seems to be a legitimate issue. Thank you. >> >> On Mon, Feb 1, 2016 at 6:00 AM, Zaibo Xu <[email protected] <mailto: >> [email protected]>> wrote: >> >> As len=0 in function of packet_alloc, the packet head will be >> initiated with >> error params. pull_tail's result is replaced by packet_init.So we >> should do >> packet_init before pull_tail as the length equal zero. >> >> Signed-off-by: Zaibo Xu <[email protected] >> <mailto:[email protected]>> >> >> >> Reviewed-by: Bill Fischofer <[email protected] <mailto: >> [email protected]>> >> >> >> --- >> platform/linux-generic/odp_packet.c | 7 +++++-- >> 1 file changed, 5 insertions(+), 2 deletions(-) >> >> diff --git a/platform/linux-generic/odp_packet.c >> b/platform/linux-generic/odp_packet.c >> index db85b5e..567da81 100644 >> --- a/platform/linux-generic/odp_packet.c >> +++ b/platform/linux-generic/odp_packet.c >> @@ -104,8 +104,11 @@ odp_packet_t packet_alloc(odp_pool_t >> pool_hdl, uint32_t len, int parse) >> >> if (pkt == ODP_PACKET_INVALID) >> return ODP_PACKET_INVALID; >> - >> - pull_tail(odp_packet_hdr(pkt), len); >> + pkt_hdr = odp_packet_hdr(pkt); >> + packet_init(pool, pkt_hdr, len, parse); >> + pull_tail(pkt_hdr, len); >> + >> + return pkt; >> >> } else { >> pkt = (odp_packet_t)buffer_alloc(pool_hdl, len); >> -- >> 1.9.1 >> >> _______________________________________________ >> lng-odp mailing list >> [email protected] <mailto:[email protected]> >> https://lists.linaro.org/mailman/listinfo/lng-odp >> >> >> >> >> _______________________________________________ >> lng-odp mailing list >> [email protected] >> https://lists.linaro.org/mailman/listinfo/lng-odp >> > >
_______________________________________________ lng-odp mailing list [email protected] https://lists.linaro.org/mailman/listinfo/lng-odp
