summaryrefslogtreecommitdiffstats
path: root/app/test-pmd
diff options
context:
space:
mode:
Diffstat (limited to 'app/test-pmd')
-rw-r--r--app/test-pmd/cmdline.c2
-rw-r--r--app/test-pmd/config.c10
-rw-r--r--app/test-pmd/parameters.c18
-rw-r--r--app/test-pmd/testpmd.c4
4 files changed, 20 insertions, 14 deletions
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 315a252e..f4ff318d 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1568,7 +1568,7 @@ cmd_config_rss_parsed(void *parsed_result,
__attribute__((unused)) void *data)
{
struct cmd_config_rss *res = parsed_result;
- struct rte_eth_rss_conf rss_conf;
+ struct rte_eth_rss_conf rss_conf = { .rss_key_len = 0, };
int diag;
uint8_t i;
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 36c47ab5..c50b62ef 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -224,8 +224,10 @@ nic_stats_display(portid_t port_id)
if (diff_cycles > 0)
diff_cycles = prev_cycles[port_id] - diff_cycles;
- diff_pkts_rx = stats.ipackets - prev_pkts_rx[port_id];
- diff_pkts_tx = stats.opackets - prev_pkts_tx[port_id];
+ diff_pkts_rx = (stats.ipackets > prev_pkts_rx[port_id]) ?
+ (stats.ipackets - prev_pkts_rx[port_id]) : 0;
+ diff_pkts_tx = (stats.opackets > prev_pkts_tx[port_id]) ?
+ (stats.opackets - prev_pkts_tx[port_id]) : 0;
prev_pkts_rx[port_id] = stats.ipackets;
prev_pkts_tx[port_id] = stats.opackets;
mpps_rx = diff_cycles > 0 ?
@@ -1197,7 +1199,7 @@ simple_fwd_config_setup(void)
fwd_streams[i]->rx_queue = 0;
fwd_streams[i]->tx_port = fwd_ports_ids[j];
fwd_streams[i]->tx_queue = 0;
- fwd_streams[i]->peer_addr = j;
+ fwd_streams[i]->peer_addr = fwd_streams[i]->tx_port;
fwd_streams[i]->retry_enabled = retry_enabled;
if (port_topology == PORT_TOPOLOGY_PAIRED) {
@@ -1205,7 +1207,7 @@ simple_fwd_config_setup(void)
fwd_streams[j]->rx_queue = 0;
fwd_streams[j]->tx_port = fwd_ports_ids[i];
fwd_streams[j]->tx_queue = 0;
- fwd_streams[j]->peer_addr = i;
+ fwd_streams[j]->peer_addr = fwd_streams[j]->tx_port;
fwd_streams[j]->retry_enabled = retry_enabled;
}
}
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 2f969539..09233917 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -360,7 +360,8 @@ parse_portnuma_config(const char *q_arg)
char s[256];
const char *p, *p0 = q_arg;
char *end;
- uint8_t i,port_id,socket_id;
+ uint8_t i, socket_id;
+ portid_t port_id;
unsigned size;
enum fieldnames {
FLD_PORT = 0,
@@ -390,8 +391,9 @@ parse_portnuma_config(const char *q_arg)
if (errno != 0 || end == str_fld[i] || int_fld[i] > 255)
return -1;
}
- port_id = (uint8_t)int_fld[FLD_PORT];
- if (port_id_is_invalid(port_id, ENABLED_WARN)) {
+ port_id = (portid_t)int_fld[FLD_PORT];
+ if (port_id_is_invalid(port_id, ENABLED_WARN) ||
+ port_id == (portid_t)RTE_PORT_ALL) {
printf("Valid port range is [0");
FOREACH_PORT(pid, ports)
printf(", %d", pid);
@@ -416,7 +418,8 @@ parse_ringnuma_config(const char *q_arg)
char s[256];
const char *p, *p0 = q_arg;
char *end;
- uint8_t i,port_id,ring_flag,socket_id;
+ uint8_t i, ring_flag, socket_id;
+ portid_t port_id;
unsigned size;
enum fieldnames {
FLD_PORT = 0,
@@ -450,8 +453,9 @@ parse_ringnuma_config(const char *q_arg)
if (errno != 0 || end == str_fld[i] || int_fld[i] > 255)
return -1;
}
- port_id = (uint8_t)int_fld[FLD_PORT];
- if (port_id_is_invalid(port_id, ENABLED_WARN)) {
+ port_id = (portid_t)int_fld[FLD_PORT];
+ if (port_id_is_invalid(port_id, ENABLED_WARN) ||
+ port_id == (portid_t)RTE_PORT_ALL) {
printf("Valid port range is [0");
FOREACH_PORT(pid, ports)
printf(", %d", pid);
@@ -806,7 +810,7 @@ launch_args_parse(int argc, char** argv)
port_topology = PORT_TOPOLOGY_LOOP;
else
rte_exit(EXIT_FAILURE, "port-topology %s invalid -"
- " must be: paired or chained \n",
+ " must be: paired, chained or loop\n",
optarg);
}
if (!strcmp(lgopts[opt_idx].name, "forward-mode"))
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index ce48ca03..9de01fed 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -1900,8 +1900,8 @@ get_eth_dcb_conf(struct rte_eth_conf *eth_conf,
1 << (i % vmdq_rx_conf->nb_queue_pools);
}
for (i = 0; i < ETH_DCB_NUM_USER_PRIORITIES; i++) {
- vmdq_rx_conf->dcb_tc[i] = i;
- vmdq_tx_conf->dcb_tc[i] = i;
+ vmdq_rx_conf->dcb_tc[i] = i % num_tcs;
+ vmdq_tx_conf->dcb_tc[i] = i % num_tcs;
}
/* set DCB mode of RX and TX of multiple queues */