From patchwork Fri Oct 13 13:16:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Zhiyong" X-Patchwork-Id: 30365 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 101311B6EE; Fri, 13 Oct 2017 15:17:18 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id AD3531B6DE for ; Fri, 13 Oct 2017 15:17:13 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Oct 2017 06:17:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,371,1503385200"; d="scan'208";a="909624289" Received: from unknown (HELO dpdk5.bj.intel.com) ([172.16.182.182]) by FMSMGA003.fm.intel.com with ESMTP; 13 Oct 2017 06:17:12 -0700 From: Zhiyong Yang To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Zhiyong Yang Date: Fri, 13 Oct 2017 21:16:59 +0800 Message-Id: <20171013131701.38147-7-zhiyong.yang@intel.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20171013131701.38147-1-zhiyong.yang@intel.com> References: <20171013131701.38147-1-zhiyong.yang@intel.com> Subject: [dpdk-dev] [PATCH 6/8] test: 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" Fixes: f8244c6399d9 ("ethdev: increase port id range") Signed-off-by: Zhiyong Yang --- test/test-pipeline/init.c | 8 ++++---- test/test/test_link_bonding.c | 2 +- test/test/test_link_bonding_mode4.c | 4 ++-- test/test/test_link_bonding_rssconf.c | 7 ++++--- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/test/test-pipeline/init.c b/test/test-pipeline/init.c index 1457c7890..b1f8e93ea 100644 --- a/test/test-pipeline/init.c +++ b/test/test-pipeline/init.c @@ -194,9 +194,9 @@ app_ports_check_link(void) for (i = 0; i < app.n_ports; i++) { struct rte_eth_link link; - uint8_t port; + uint16_t port; - port = (uint8_t) app.ports[i]; + port = app.ports[i]; memset(&link, 0, sizeof(link)); rte_eth_link_get_nowait(port, &link); RTE_LOG(INFO, USER1, "Port %u (%u Gbps) %s\n", @@ -219,10 +219,10 @@ app_init_ports(void) /* Init NIC ports, then start the ports */ for (i = 0; i < app.n_ports; i++) { - uint8_t port; + uint16_t port; int ret; - port = (uint8_t) app.ports[i]; + port = app.ports[i]; RTE_LOG(INFO, USER1, "Initializing NIC port %u ...\n", port); /* Init port */ diff --git a/test/test/test_link_bonding.c b/test/test/test_link_bonding.c index e41ab60d2..c6e3a725b 100644 --- a/test/test/test_link_bonding.c +++ b/test/test/test_link_bonding.c @@ -226,7 +226,7 @@ static void free_virtualpmd_tx_queue(void); static int -configure_ethdev(uint8_t port_id, uint8_t start, uint8_t en_isr) +configure_ethdev(uint16_t port_id, uint8_t start, uint8_t en_isr) { int q_id; diff --git a/test/test/test_link_bonding_mode4.c b/test/test/test_link_bonding_mode4.c index 5deea6e16..a7a3f8e25 100644 --- a/test/test/test_link_bonding_mode4.c +++ b/test/test/test_link_bonding_mode4.c @@ -102,7 +102,7 @@ static const struct ether_addr slow_protocol_mac_addr = { struct slave_conf { struct rte_ring *rx_queue; struct rte_ring *tx_queue; - uint8_t port_id; + uint16_t port_id; uint8_t bonded : 1; uint8_t lacp_parnter_state; @@ -235,7 +235,7 @@ free_pkts(struct rte_mbuf **pkts, uint16_t count) } static int -configure_ethdev(uint8_t port_id, uint8_t start) +configure_ethdev(uint16_t port_id, uint8_t start) { TEST_ASSERT(rte_eth_dev_configure(port_id, 1, 1, &default_pmd_conf) == 0, "Failed to configure device %u", port_id); diff --git a/test/test/test_link_bonding_rssconf.c b/test/test/test_link_bonding_rssconf.c index f8cf1cabf..7dccc6e12 100644 --- a/test/test/test_link_bonding_rssconf.c +++ b/test/test/test_link_bonding_rssconf.c @@ -75,7 +75,7 @@ #define INVALID_BONDING_MODE (-1) struct slave_conf { - uint8_t port_id; + uint16_t port_id; struct rte_eth_dev_info dev_info; struct rte_eth_rss_conf rss_conf; @@ -159,7 +159,8 @@ static struct rte_eth_conf rss_pmd_conf = { RTE_DIM(test_params.slave_ports)) static int -configure_ethdev(uint8_t port_id, struct rte_eth_conf *eth_conf, uint8_t start) +configure_ethdev(uint16_t port_id, struct rte_eth_conf *eth_conf, + uint8_t start) { int rxq, txq; @@ -243,7 +244,7 @@ bond_slaves(void) * Set all RETA values in port_id to value */ static int -reta_set(uint8_t port_id, uint8_t value, int reta_size) +reta_set(uint16_t port_id, uint8_t value, int reta_size) { struct rte_eth_rss_reta_entry64 reta_conf[512/RTE_RETA_GROUP_SIZE]; int i, j;