From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id E7BE1568A for ; Mon, 10 Jul 2017 03:19:10 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP; 09 Jul 2017 18:19:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,337,1496127600"; d="scan'208";a="1193383636" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga002.fm.intel.com with ESMTP; 09 Jul 2017 18:19:09 -0700 Received: from fmsmsx119.amr.corp.intel.com (10.18.124.207) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 9 Jul 2017 18:19:09 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX119.amr.corp.intel.com (10.18.124.207) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 9 Jul 2017 18:19:08 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.116]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.56]) with mapi id 14.03.0319.002; Mon, 10 Jul 2017 09:19:06 +0800 From: "Wu, Jingjing" To: Yuanhan Liu , "dev@dpdk.org" Thread-Topic: [PATCH 2/2] testpmd: give more hint on invalid RETA size Thread-Index: AQHS9ua4xpStoLna7UmJvsKoaHjT2aJMRxFA Date: Mon, 10 Jul 2017 01:19:06 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F810DC0E08@SHSMSX103.ccr.corp.intel.com> References: <1499407333-1682-1-git-send-email-yliu@fridaylinux.org> <1499407333-1682-2-git-send-email-yliu@fridaylinux.org> In-Reply-To: <1499407333-1682-2-git-send-email-yliu@fridaylinux.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 2/2] testpmd: give more hint on invalid RETA size 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: Mon, 10 Jul 2017 01:19:11 -0000 > -----Original Message----- > From: Yuanhan Liu [mailto:yliu@fridaylinux.org] > Sent: Friday, July 7, 2017 2:02 PM > To: dev@dpdk.org > Cc: Wu, Jingjing ; Yuanhan Liu > Subject: [PATCH 2/2] testpmd: give more hint on invalid RETA size >=20 > Print the valid RTE size range so that user knows what goes wrong. >=20 > Signed-off-by: Yuanhan Liu > --- > app/test-pmd/cmdline.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) >=20 > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index c8faef9..d32a1df 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > @@ -2140,12 +2140,14 @@ cmd_showport_reta_parsed(void *parsed_result, > struct cmd_showport_reta *res =3D parsed_result; > struct rte_eth_rss_reta_entry64 reta_conf[8]; > struct rte_eth_dev_info dev_info; > + uint16_t max_reta_size; >=20 > memset(&dev_info, 0, sizeof(dev_info)); > rte_eth_dev_info_get(res->port_id, &dev_info); > - if (dev_info.reta_size =3D=3D 0 || res->size > dev_info.reta_size || > - res->size > ETH_RSS_RETA_SIZE_512) { > - printf("Invalid redirection table size: %u\n", res->size); > + max_reta_size =3D RTE_MIN(dev_info.reta_size, ETH_RSS_RETA_SIZE_512); > + if (res->size =3D=3D 0 || res->size > max_reta_size) { > + printf("Invalid redirection table size: %u (1-%u)\n", > + res->size, max_reta_size); > return; > } >=20 Why not merge this with previous one? Thanks Jingjing