On 9/1/2017 5:23 PM, Kirill Rybalchenko wrote: > Port info command prints information about all supported flow types, > including dynamically mapped ones. > > Signed-off-by: Kirill Rybalchenko <kirill.rybalche...@intel.com> > --- > app/test-pmd/config.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c > index 3ae3e1c..bd5de92 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -498,12 +498,15 @@ port_infos_display(portid_t port_id) > char *p; > > printf("Supported flow types:\n"); > - for (i = RTE_ETH_FLOW_UNKNOWN + 1; i < RTE_ETH_FLOW_MAX; > - i++) { > + for (i = RTE_ETH_FLOW_UNKNOWN + 1; > + i < sizeof(dev_info.flow_type_rss_offloads) * 8; i++) {
What do you think using "CHAR_BIT" instead of "8" to stress the intention? If you are OK to send new version, please keep JingJing's Review tag. > if (!(dev_info.flow_type_rss_offloads & (1ULL << i))) > continue; > p = flowtype_to_str(i); > - printf(" %s\n", (p ? p : "unknown")); > + if (p) > + printf(" %s\n", p); > + else > + printf(" user defined %d\n", i); > } > } > >