[dpdk-dev] [PATCH v6 1/6] ethdev: introduce Rx buffer split
Thomas Monjalon
thomas at monjalon.net
Thu Oct 15 12:19:52 CEST 2020
15/10/2020 12:11, Andrew Rybchenko:
> On 10/14/20 9:11 PM, Viacheslav Ovsiienko wrote:
> > + /* Single pool configuration check. */
> > + if (rx_conf->rx_seg || rx_conf->rx_nseg) {
>
> Please, compare vs NULL and 0. IMHO, rx_nsegs check is sufficient. If it
> is 0, nobody cares what is in rx_seg.
Yes the pointer should not be a criteria.
Having more than zero items is enough to check.
[...]
> > + RTE_ETHDEV_LOG(ERR,
> > + "%s mbuf_data_room_size %u < %u"
> > + " (RTE_PKTMBUF_HEADROOM=%u +"
> > + " min_rx_bufsize(dev)=%u)\n",
>
> Do not split format string. It is not a problem that it is long.
The benefit of keeping format string on the same line is for "grepping"
the source code. But after a format specifier, I think we can split.
Who is grepping "< %u (RTE_PKTMBUF_HEADROOM" ?
I would just change the split on the second line after the %u.
More information about the dev
mailing list