From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id E9ABE235 for ; Wed, 20 Sep 2017 13:19:14 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Sep 2017 04:19:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,421,1500966000"; d="scan'208";a="902177236" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.57]) ([10.237.220.57]) by FMSMGA003.fm.intel.com with ESMTP; 20 Sep 2017 04:19:11 -0700 To: Kirill Rybalchenko , dev@dpdk.org Cc: andrey.chilikin@intel.com, beilei.xing@intel.com, jingjing.wu@intel.com References: <1504283001-54863-1-git-send-email-kirill.rybalchenko@intel.com> From: Ferruh Yigit Message-ID: <4e0446b7-f372-41ca-1d13-dd1a5a881242@intel.com> Date: Wed, 20 Sep 2017 12:19:11 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <1504283001-54863-1-git-send-email-kirill.rybalchenko@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] app/testpmd: port info prints dynamically mapped flow types X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Sep 2017 11:19:15 -0000 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 > --- > 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); > } > } > >