From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id E2D28322C; Fri, 18 May 2018 05:05:48 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 May 2018 20:05:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,413,1520924400"; d="scan'208";a="40290801" Received: from dpdk9.bj.intel.com ([172.16.182.183]) by fmsmga007.fm.intel.com with ESMTP; 17 May 2018 20:05:46 -0700 From: zhiyong.yang@intel.com To: dev@dpdk.org Cc: stable@dpdk.org, ferruh.yigit@intel.com, Zhiyong Yang Date: Fri, 18 May 2018 18:41:10 +0800 Message-Id: <20180518104110.64042-1-zhiyong.yang@intel.com> X-Mailer: git-send-email 2.14.3 Subject: [dpdk-dev] [PATCH] ethdev: fix eth_dev_last_created_port storage type 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: Fri, 18 May 2018 03:05:49 -0000 eth_dev_last_created_port is used to store port id type and should be extended to 16bits corresponding to ethdev port id range. Cc: stable@dpdk.org Cc: ferruh.yigit@intel.com Fixes: f8244c6399d9 ("ethdev: increase port id range") Signed-off-by: Zhiyong Yang --- lib/librte_ethdev/rte_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c index b3ed82105..cd4bfd3c6 100644 --- a/lib/librte_ethdev/rte_ethdev.c +++ b/lib/librte_ethdev/rte_ethdev.c @@ -49,7 +49,7 @@ static int ethdev_logtype; static const char *MZ_RTE_ETH_DEV_DATA = "rte_eth_dev_data"; struct rte_eth_dev rte_eth_devices[RTE_MAX_ETHPORTS]; -static uint8_t eth_dev_last_created_port; +static uint16_t eth_dev_last_created_port; /* spinlock for eth device callbacks */ static rte_spinlock_t rte_eth_dev_cb_lock = RTE_SPINLOCK_INITIALIZER; -- 2.14.3