From patchwork Thu Oct 12 09:32:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Zhiyong" X-Patchwork-Id: 30220 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 598EA1B1C4; Thu, 12 Oct 2017 11:33:01 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 9DE7323A for ; Thu, 12 Oct 2017 11:32:58 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP; 12 Oct 2017 02:32:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,365,1503385200"; d="scan'208";a="137746904" Received: from unknown (HELO dpdk5.bj.intel.com) ([172.16.182.182]) by orsmga004.jf.intel.com with ESMTP; 12 Oct 2017 02:32:56 -0700 From: Zhiyong Yang To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Zhiyong Yang Date: Thu, 12 Oct 2017 17:32:47 +0800 Message-Id: <20171012093252.53100-2-zhiyong.yang@intel.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20171012093252.53100-1-zhiyong.yang@intel.com> References: <20171012093252.53100-1-zhiyong.yang@intel.com> Subject: [dpdk-dev] [PATCH 1/6] lib/librte_ether: fix port id 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- lib/librte_ether/ethdev_profile.c | 6 +++--- lib/librte_ether/ethdev_profile.h | 2 +- lib/librte_ether/rte_ethdev.c | 2 +- lib/librte_ether/rte_ethdev.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/librte_ether/ethdev_profile.c b/lib/librte_ether/ethdev_profile.c index 13c48a8f3..8792ed56e 100644 --- a/lib/librte_ether/ethdev_profile.c +++ b/lib/librte_ether/ethdev_profile.c @@ -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 diff --git a/lib/librte_ether/ethdev_profile.h b/lib/librte_ether/ethdev_profile.h index 32f103ec1..697facff7 100644 --- a/lib/librte_ether/ethdev_profile.h +++ b/lib/librte_ether/ethdev_profile.h @@ -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 diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 9460161eb..8f027c71b 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -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; diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 354d170ef..3f19117b2 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -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 }