[dpdk-dev] [PATCH v2 3/5] szedata2: add handling of scattered packets in TX
Matej Vido
matejvido at gmail.com
Tue Oct 27 18:40:18 CET 2015
Hi Thomas,
2015-10-26 15:55 GMT+01:00 Thomas Monjalon <thomas.monjalon at 6wind.com>:
> Hi Matej,
>
> 2015-09-18 10:32, Matej Vido:
> > - rte_memcpy(tmp_dst,
> > - rte_pktmbuf_mtod(mbuf, const void *),
> > - pkt_len);
> > + if (likely(mbuf_segs == 1)) {
> > + /*
> > + * non-scattered packet,
> > + * transmit from one mbuf
> > + */
> > + rte_memcpy(tmp_dst,
> > + rte_pktmbuf_mtod(mbuf, const void
> *),
> > + pkt_len);
>
> You could avoid this change by keeping "if (likely(mbuf_segs == 1))"
> in the first patch.
> By the way, it seems to be an abusive use of "likely".
>
>
I will edit it in v3. Thanks.
Best regards,
Matej Vido
More information about the dev
mailing list