Message ID | 1453916670-23975-1-git-send-email-zoltan.kiss@linaro.org |
---|---|
State | Accepted |
Commit | 57b32a2d3e3021f612482754905b5adea78f82ed |
Headers | show |
On Wed, Jan 27, 2016 at 11:44 AM, Zoltan Kiss <zoltan.kiss@linaro.org> wrote: > 'j' is incremented twice, therefore every second element of hdr_tbl is > garbage. Introduced in f3c1e77f "linux-generic: pktio: optimize > pktin_deq_multi". > > Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> > Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> > --- > diff --git a/platform/linux-generic/odp_packet_io.c > b/platform/linux-generic/odp_packet_io.c > index cda1900..540cdb8 100644 > --- a/platform/linux-generic/odp_packet_io.c > +++ b/platform/linux-generic/odp_packet_io.c > @@ -640,7 +640,7 @@ int pktin_deq_multi(queue_entry_t *qentry, > odp_buffer_hdr_t *buf_hdr[], int num) > /* Queue the rest for later */ > for (j = 0; i < pkts; i++, j++) { > buf = _odp_packet_to_buffer(pkt_tbl[i]); > - hdr_tbl[j++] = odp_buf_to_hdr(buf); > + hdr_tbl[j] = odp_buf_to_hdr(buf); > } > > if (j) > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp >
Merged, Maxim. On 01/28/2016 02:24, Bill Fischofer wrote: > > > On Wed, Jan 27, 2016 at 11:44 AM, Zoltan Kiss <zoltan.kiss@linaro.org > <mailto:zoltan.kiss@linaro.org>> wrote: > > 'j' is incremented twice, therefore every second element of hdr_tbl is > garbage. Introduced in f3c1e77f "linux-generic: pktio: optimize > pktin_deq_multi". > > Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org > <mailto:zoltan.kiss@linaro.org>> > > > Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org > <mailto:bill.fischofer@linaro.org>> > > --- > diff --git a/platform/linux-generic/odp_packet_io.c > b/platform/linux-generic/odp_packet_io.c > index cda1900..540cdb8 100644 > --- a/platform/linux-generic/odp_packet_io.c > +++ b/platform/linux-generic/odp_packet_io.c > @@ -640,7 +640,7 @@ int pktin_deq_multi(queue_entry_t *qentry, > odp_buffer_hdr_t *buf_hdr[], int num) > /* Queue the rest for later */ > for (j = 0; i < pkts; i++, j++) { > buf = _odp_packet_to_buffer(pkt_tbl[i]); > - hdr_tbl[j++] = odp_buf_to_hdr(buf); > + hdr_tbl[j] = odp_buf_to_hdr(buf); > } > > if (j) > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org <mailto: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
diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index cda1900..540cdb8 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -640,7 +640,7 @@ int pktin_deq_multi(queue_entry_t *qentry, odp_buffer_hdr_t *buf_hdr[], int num) /* Queue the rest for later */ for (j = 0; i < pkts; i++, j++) { buf = _odp_packet_to_buffer(pkt_tbl[i]); - hdr_tbl[j++] = odp_buf_to_hdr(buf); + hdr_tbl[j] = odp_buf_to_hdr(buf); } if (j)
'j' is incremented twice, therefore every second element of hdr_tbl is garbage. Introduced in f3c1e77f "linux-generic: pktio: optimize pktin_deq_multi". Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org> ---