From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DB933A04B1; Wed, 4 Nov 2020 12:46:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 38DE7C908; Wed, 4 Nov 2020 12:46:31 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id D9629C8FA; Wed, 4 Nov 2020 12:46:27 +0100 (CET) IronPort-SDR: rOvsd4L2w/U/HrUgmUd3MQPxwFfPzchNxKf4FUic9+bU6TiANC/daL1HY4PeSnzdOjWku58mb/ cK8WcXAKPj2g== X-IronPort-AV: E=McAfee;i="6000,8403,9794"; a="169347457" X-IronPort-AV: E=Sophos;i="5.77,450,1596524400"; d="scan'208";a="169347457" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2020 03:46:25 -0800 IronPort-SDR: c2HE2mws1c1M+Avc94+ZAglMMbguBgiwk0frf2MNP1gXrrghdugHKI21gHxFwLVYK9dBsA6aCL XOLp1kFR/bHQ== X-IronPort-AV: E=Sophos;i="5.77,450,1596524400"; d="scan'208";a="353803868" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.228.199]) ([10.213.228.199]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Nov 2020 03:46:23 -0800 To: Ajit Khaparde , wangyunjian Cc: dpdk-dev , Thomas Monjalon , Andrew Rybchenko , Stephen Hemminger , "Lilijun (Jerry)" , xudingke , dpdk stable References: <1604308702-7744-1-git-send-email-wangyunjian@huawei.com> <1604458677-34696-1-git-send-email-wangyunjian@huawei.com> From: Ferruh Yigit Message-ID: <6e98ccb8-624a-12d0-3484-ca88cf096ef0@intel.com> Date: Wed, 4 Nov 2020 11:46:21 +0000 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4] ethdev: fix data type for port id 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 11/4/2020 3:26 AM, Ajit Khaparde wrote: > On Tue, Nov 3, 2020 at 6:58 PM wangyunjian wrote: >> >> From: Yunjian Wang >> >> The ethdev port id is 16 bits now. This patch fixes the data type >> of the variable for 'pid', which changing from uint32_t to uint16_t. >> >> RTE_MAX_ETHPORTS is the maximum number of ports, which customized by >> the user. To avoid 16-bit unsigned integer overflow, the valid value >> of RTE_MAX_ETHPORTS should be set from 0 to UINT16_MAX, and it is >> safer to cut one more port from space. >> >> So we use RTE_BUILD_BUG_ON() to ensure that RTE_MAX_ETHPORTS is less >> to UINT16_MAX. >> >> Fixes: 5b7ba31148a8 ("ethdev: add port ownership") >> Cc: stable@dpdk.org >> >> Signed-off-by: Yunjian Wang > > Acked-by: Ajit Khaparde > Reviewed-by: Ferruh Yigit