From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 829FB1AF03 for ; Mon, 9 Oct 2017 06:16:25 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Oct 2017 21:16:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,498,1500966000"; d="scan'208";a="908026506" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.254.114.24]) ([10.254.114.24]) by FMSMGA003.fm.intel.com with ESMTP; 08 Oct 2017 21:16:23 -0700 To: Li Han , jingjing.wu@intel.com Cc: dev@dpdk.org References: <1503378222-23306-1-git-send-email-han.li1@zte.com.cn> From: Ferruh Yigit Message-ID: <961c9f96-1b02-1c89-9ec5-4c5f3e455b3f@intel.com> Date: Mon, 9 Oct 2017 05:16:23 +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: <1503378222-23306-1-git-send-email-han.li1@zte.com.cn> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH] app/testpmd:fix invalid port id parameters 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, 09 Oct 2017 04:16:27 -0000 On 8/22/2017 6:03 AM, Li Han wrote: > in parse_ringnuma_config/parse_portnuma_config functions,port_id > should less than RTE_MAX_ETHPORTS,but port_id_is_invalid check > assumes that port_id may be 255. testpmd using RTE_PORT_ALL [1], which is in valid port_id range, as special meaning [2] making things tricky. Only above 255 is no more valid since port_id is not 16bits, it should be 65535. Except from above detail, Reviewed-by: Ferruh Yigit And if you are familiar with this code, above a few lines there is a "int_fld[i] > 255" check, is the intention to check port_id limit there? If so this is no more valid check, and would you mind sending a patch to fix if you have time? Thanks, ferruh [1] #define RTE_PORT_ALL (~(portid_t)0x0) [2] Meaning all enabled ethdev ports, like: start_port(RTE_PORT_ALL); > > Signed-off-by: Li Han <...>