test: fix port id type

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

Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
This commit is contained in:
Zhiyong Yang 2017-10-13 21:16:59 +08:00 committed by Thomas Monjalon
parent f14a210a65
commit b526f05524
4 changed files with 11 additions and 10 deletions

View File

@ -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 */

View File

@ -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;

View File

@ -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);

View File

@ -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;