From: Zhiyong Yang <zhiyong.yang@intel.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, Zhiyong Yang <zhiyong.yang@intel.com>
Subject: [dpdk-dev] [PATCH 6/8] test: fix port id type
Date: Fri, 13 Oct 2017 21:16:59 +0800 [thread overview]
Message-ID: <20171013131701.38147-7-zhiyong.yang@intel.com> (raw)
In-Reply-To: <20171013131701.38147-1-zhiyong.yang@intel.com>
Fixes: f8244c6399d9 ("ethdev: increase port id range")
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
---
test/test-pipeline/init.c | 8 ++++----
test/test/test_link_bonding.c | 2 +-
test/test/test_link_bonding_mode4.c | 4 ++--
| 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);
--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;
--
2.13.3
next prev parent reply other threads:[~2017-10-13 13:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-13 13:16 [dpdk-dev] [PATCH 0/8] " Zhiyong Yang
2017-10-13 13:16 ` [dpdk-dev] [PATCH 1/8] net/bonding: " Zhiyong Yang
2017-10-13 13:16 ` [dpdk-dev] [PATCH 2/8] net/i40e: " Zhiyong Yang
2017-10-13 13:16 ` [dpdk-dev] [PATCH 3/8] net/fm10k: " Zhiyong Yang
2017-10-13 13:16 ` [dpdk-dev] [PATCH 4/8] net/mrvl: " Zhiyong Yang
2017-10-13 13:16 ` [dpdk-dev] [PATCH 5/8] app: " Zhiyong Yang
2017-10-13 13:16 ` Zhiyong Yang [this message]
2017-10-13 13:17 ` [dpdk-dev] [PATCH 7/8] examples: " Zhiyong Yang
2017-10-13 13:17 ` [dpdk-dev] [PATCH 8/8] doc: update " Zhiyong Yang
2017-10-13 15:41 ` Mcnamara, John
2017-10-16 1:32 ` Yang, Zhiyong
2017-10-18 9:13 ` Van Haaren, Harry
2017-10-13 18:25 ` [dpdk-dev] [PATCH 0/8] fix " Ferruh Yigit
2017-10-13 18:26 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171013131701.38147-7-zhiyong.yang@intel.com \
--to=zhiyong.yang@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).