[dpdk-dev] ethdev: fix eth_dev_last_created_port storage type

Message ID 20180518104110.64042-1-zhiyong.yang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Yang, Zhiyong May 18, 2018, 10:41 a.m. UTC
  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 <zhiyong.yang@intel.com>
---
 lib/librte_ethdev/rte_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Ferruh Yigit May 18, 2018, 10:22 a.m. UTC | #1
On 5/18/2018 11:41 AM, zhiyong.yang@intel.com wrote:
> 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 <zhiyong.yang@intel.com>

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
  
Ferruh Yigit May 18, 2018, 10:23 a.m. UTC | #2
On 5/18/2018 11:22 AM, Ferruh Yigit wrote:
> On 5/18/2018 11:41 AM, zhiyong.yang@intel.com wrote:
>> 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 <zhiyong.yang@intel.com>
> 
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/master, thanks.
  

Patch

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;