ethdev: fix port id type
authorZhiyong Yang <zhiyong.yang@intel.com>
Thu, 12 Oct 2017 09:32:47 +0000 (17:32 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 13 Oct 2017 00:17:49 +0000 (01:17 +0100)
Some features applied were still developed based on older version uint8_t
port_id, but port_id has been increased range to uint16_t. The patch fixes
the issue.

Fixes: f8244c6399d9 ("ethdev: increase port id range")

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
lib/librte_ether/ethdev_profile.c
lib/librte_ether/ethdev_profile.h
lib/librte_ether/rte_ethdev.c
lib/librte_ether/rte_ethdev.h

index 13c48a8..8792ed5 100644 (file)
@@ -82,7 +82,7 @@ struct itt_profile_rx_data itt_rx_data[RTE_MAX_ETHPORTS];
  * type declaration.
  */
 static uint16_t
-collect_itt_rx_burst_cb(uint8_t port_id, uint16_t queue_id,
+collect_itt_rx_burst_cb(uint16_t port_id, uint16_t queue_id,
        __rte_unused struct rte_mbuf *pkts[], uint16_t nb_pkts,
        __rte_unused uint16_t max_pkts, __rte_unused void *user_param)
 {
@@ -121,7 +121,7 @@ collect_itt_rx_burst_cb(uint8_t port_id, uint16_t queue_id,
  *  - On failure, a negative value.
  */
 static inline int
-itt_profile_rx_init(uint8_t port_id, char *port_name, uint8_t rx_queue_num)
+itt_profile_rx_init(uint16_t port_id, char *port_name, uint8_t rx_queue_num)
 {
        uint16_t q_id;
 
@@ -155,7 +155,7 @@ itt_profile_rx_init(uint8_t port_id, char *port_name, uint8_t rx_queue_num)
 #endif /* RTE_ETHDEV_PROFILE_ITT_WASTED_RX_ITERATIONS */
 
 int
-__rte_eth_profile_rx_init(__rte_unused uint8_t port_id,
+__rte_eth_profile_rx_init(__rte_unused uint16_t port_id,
        __rte_unused struct rte_eth_dev *dev)
 {
 #ifdef RTE_ETHDEV_PROFILE_ITT_WASTED_RX_ITERATIONS
index 32f103e..697facf 100644 (file)
@@ -51,6 +51,6 @@
  *  - On failure, a negative value.
  */
 int
-__rte_eth_profile_rx_init(uint8_t port_id, struct rte_eth_dev *dev);
+__rte_eth_profile_rx_init(uint16_t port_id, struct rte_eth_dev *dev);
 
 #endif
index 9460161..8f027c7 100644 (file)
@@ -3628,7 +3628,7 @@ rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t port_id,
 }
 
 int
-rte_eth_dev_pool_ops_supported(uint8_t port_id, const char *pool)
+rte_eth_dev_pool_ops_supported(uint16_t port_id, const char *pool)
 {
        struct rte_eth_dev *dev;
 
index 354d170..3f19117 100644 (file)
@@ -4583,7 +4583,7 @@ int rte_eth_dev_adjust_nb_rx_tx_desc(uint16_t port_id,
  *   - -EINVAL: Pool param is null.
  */
 int
-rte_eth_dev_pool_ops_supported(uint8_t port_id, const char *pool);
+rte_eth_dev_pool_ops_supported(uint16_t port_id, const char *pool);
 
 #ifdef __cplusplus
 }