[dpdk-dev] [PATCH v4 4/9] app/procinfo: add support for show port
Varghese, Vipin
vipin.varghese at intel.com
Thu Nov 22 15:21:19 CET 2018
>
> Minor observations which are things that checkpatch etc won't see but make
> the code easier to read/maintain.
>
> > +/* border variable to hold for show */ char bdr_str[MAX_STRING_LEN];
Done for v5
>
> Does this have to be global, could it just be static?
>
> > + memset(&link, 0, sizeof(link));
> > + memset(&dev_info, 0, sizeof(dev_info));
> > + memset(&queue_info, 0, sizeof(queue_info));
> > + memset(&stats, 0, sizeof(stats));
> > + memset(&rss_conf, 0, sizeof(rss_conf));
>
> These memset's should be unnecessary. For example, dev_info is always
> cleared already inside rte_eth_dev_info_get().
Done for v5 (link, dev_info, queue_info, stats)
>
> > + if ((ret) || (rss_conf.rss_key == NULL))
> > + continue;
>
> Unnecessary parenthesis hurt readability in this if statement.
done
More information about the dev
mailing list