git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
app/testpmd: stop forwarding on exit
[dpdk.git]
/
app
/
test-pmd
/
testpmd.c
diff --git
a/app/test-pmd/testpmd.c
b/app/test-pmd/testpmd.c
index
fa6434c
..
60be416
100644
(file)
--- a/
app/test-pmd/testpmd.c
+++ b/
app/test-pmd/testpmd.c
@@
-1089,10
+1089,6
@@
stop_packet_forwarding(void)
#endif
static const char *acc_stats_border = "+++++++++++++++";
#endif
static const char *acc_stats_border = "+++++++++++++++";
- if (all_ports_started() == 0) {
- printf("Not all ports were started\n");
- return;
- }
if (test_done) {
printf("Packet forwarding not started\n");
return;
if (test_done) {
printf("Packet forwarding not started\n");
return;
@@
-1360,7
+1356,7
@@
start_port(portid_t pid)
if (mp == NULL) {
printf("Failed to setup RX queue:"
"No mempool allocation"
if (mp == NULL) {
printf("Failed to setup RX queue:"
"No mempool allocation"
- "on the socket %d\n",
+ "
on the socket %d\n",
rxring_numa[pi]);
return -1;
}
rxring_numa[pi]);
return -1;
}
@@
-1368,17
+1364,23
@@
start_port(portid_t pid)
diag = rte_eth_rx_queue_setup(pi, qi,
nb_rxd,rxring_numa[pi],
&(port->rx_conf),mp);
diag = rte_eth_rx_queue_setup(pi, qi,
nb_rxd,rxring_numa[pi],
&(port->rx_conf),mp);
- }
- else
+ } else {
+ struct rte_mempool *mp =
+ mbuf_pool_find(port->socket_id);
+ if (mp == NULL) {
+ printf("Failed to setup RX queue:"
+ "No mempool allocation"
+ " on the socket %d\n",
+ port->socket_id);
+ return -1;
+ }
diag = rte_eth_rx_queue_setup(pi, qi,
nb_rxd,port->socket_id,
diag = rte_eth_rx_queue_setup(pi, qi,
nb_rxd,port->socket_id,
- &(port->rx_conf),
- mbuf_pool_find(port->socket_id));
-
+ &(port->rx_conf), mp);
+ }
if (diag == 0)
continue;
if (diag == 0)
continue;
-
/* Fail to setup rx queue, return */
if (rte_atomic16_cmpset(&(port->port_status),
RTE_PORT_HANDLING,
/* Fail to setup rx queue, return */
if (rte_atomic16_cmpset(&(port->port_status),
RTE_PORT_HANDLING,