From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) by dpdk.org (Postfix) with ESMTP id 9BD74532D for ; Mon, 10 Jul 2017 03:24:30 +0200 (CEST) Received: by mail-pg0-f68.google.com with SMTP id u62so10769828pgb.0 for ; Sun, 09 Jul 2017 18:24:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/XOi6WsMmA8qhmkGzUO27pMskHZ2/epXDyCsJDqDNHA=; b=Tnxa/pvvCVT+G3Db5pTebFNfOseOx3ae4lS7wgWEeJ8DY+24ZsgZAhE2P8jTeJEdDm vn//sK6qY58WeeOrXBst+LojsaDwheTudrij/yDtkRQqyJVbnssWklV9WtXpwxtUEdgD JuGtQuV2y4zV4YRLlTfzus1gGEvdbirDxtA4aKvnggHKpVooy9euSQLfdYJ6SwqfWXTf rM65yV7hu+cGZSu6Stw1QwadGBvH44eEfqfI12m653kHYqC69d0kg9xek0dtMxVqCOqy 3kRcu/Ah3Supb3MryKPuAuIHO5vKMP80kZy3RjwLTTn44KXMzt5H0sjydmUJuGTnEG3Z enbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/XOi6WsMmA8qhmkGzUO27pMskHZ2/epXDyCsJDqDNHA=; b=kwykmq+lLhMB7KuPoLVg6jEY+OVb2kQfxUtIJSomHWStuOW/PGDxZ6EIIrXShQ5CDO eniQC1OTdfMCsYMrXc+paWwLk0W+kv/ctZGto54m+ZHTqwfQrwptF4CIU01x0/Q0x21F j20PFOHwrN0O3PoG+LMNz5pesZPKbVJOOXdFzivZlaZmVtph7d+euiHnt9+YlJtU3xBJ +gowQH75E76Bbz8ywXWb538YAU2mv74GUpnbMYhc2WIyFqOuMIOrtBA88mQsH9J7bZ9x ZihpBPuQ5roTYMEoMHZrjoAOMX6fkuRpo9CdNwoowfQV6Vwq0kLwUtrVZfCEGRCjcGDs jiIA== X-Gm-Message-State: AIVw112PRTgfH9YTQ2nc3+cOPZSg5UAPpNe9zTk0VG72J4prljlCtoqs 8DoxY/IPk5tOTYQKdNTPZA== X-Received: by 10.98.178.15 with SMTP id x15mr41554764pfe.75.1499649869745; Sun, 09 Jul 2017 18:24:29 -0700 (PDT) Received: from yliu-home ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id v62sm20088470pfa.6.2017.07.09.18.24.27 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 09 Jul 2017 18:24:28 -0700 (PDT) Date: Mon, 10 Jul 2017 09:24:23 +0800 From: Yuanhan Liu To: "Wu, Jingjing" Cc: "dev@dpdk.org" Message-ID: <20170710012421.GD11626@yliu-home> References: <1499407333-1682-1-git-send-email-yliu@fridaylinux.org> <1499407333-1682-2-git-send-email-yliu@fridaylinux.org> <9BB6961774997848B5B42BEC655768F810DC0E08@SHSMSX103.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9BB6961774997848B5B42BEC655768F810DC0E08@SHSMSX103.ccr.corp.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) 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:24:31 -0000 On Mon, Jul 10, 2017 at 01:19:06AM +0000, Wu, Jingjing wrote: > > -----Original Message----- > > From: Yuanhan Liu [mailto:yliu@fridaylinux.org] > > Subject: [PATCH 2/2] testpmd: give more hint on invalid RETA size > > > > Print the valid RTE size range so that user knows what goes wrong. > > > > Signed-off-by: Yuanhan Liu > > --- > > app/test-pmd/cmdline.c | 8 +++++--- > > 1 file changed, 5 insertions(+), 3 deletions(-) > > > > 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 = parsed_result; > > struct rte_eth_rss_reta_entry64 reta_conf[8]; > > struct rte_eth_dev_info dev_info; > > + uint16_t max_reta_size; > > > > memset(&dev_info, 0, sizeof(dev_info)); > > rte_eth_dev_info_get(res->port_id, &dev_info); > > - if (dev_info.reta_size == 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 = RTE_MIN(dev_info.reta_size, ETH_RSS_RETA_SIZE_512); > > + if (res->size == 0 || res->size > max_reta_size) { > > + printf("Invalid redirection table size: %u (1-%u)\n", > > + res->size, max_reta_size); > > return; > > } > > > Why not merge this with previous one? Because they are two differnt things, even though each of them is really tiny. --yliu