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
remove unused ring includes
[dpdk.git]
/
examples
/
l3fwd-power
/
main.c
diff --git
a/examples/l3fwd-power/main.c
b/examples/l3fwd-power/main.c
index
e7ebe30
..
b65d683
100644
(file)
--- a/
examples/l3fwd-power/main.c
+++ b/
examples/l3fwd-power/main.c
@@
-66,7
+66,6
@@
#include <rte_debug.h>
#include <rte_ether.h>
#include <rte_ethdev.h>
#include <rte_debug.h>
#include <rte_ether.h>
#include <rte_ethdev.h>
-#include <rte_ring.h>
#include <rte_mempool.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
#include <rte_mempool.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
@@
-1509,7
+1508,7
@@
check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
continue;
}
/* clear all_ports_up flag if any link down */
continue;
}
/* clear all_ports_up flag if any link down */
- if (link.link_status ==
0
) {
+ if (link.link_status ==
ETH_LINK_DOWN
) {
all_ports_up = 0;
break;
}
all_ports_up = 0;
break;
}
@@
-1546,7
+1545,6
@@
main(int argc, char **argv)
uint32_t n_tx_queue, nb_lcores;
uint32_t dev_rxq_num, dev_txq_num;
uint8_t portid, nb_rx_queue, queue, socketid;
uint32_t n_tx_queue, nb_lcores;
uint32_t dev_rxq_num, dev_txq_num;
uint8_t portid, nb_rx_queue, queue, socketid;
- uint8_t nb_tx_port;
/* catch SIGINT and restore cpufreq governor to ondemand */
signal(SIGINT, signal_exit_now);
/* catch SIGINT and restore cpufreq governor to ondemand */
signal(SIGINT, signal_exit_now);
@@
-1573,16
+1571,12
@@
main(int argc, char **argv)
if (ret < 0)
rte_exit(EXIT_FAILURE, "init_lcore_rx_queues failed\n");
if (ret < 0)
rte_exit(EXIT_FAILURE, "init_lcore_rx_queues failed\n");
-
nb_ports = rte_eth_dev_count();
nb_ports = rte_eth_dev_count();
- if (nb_ports > RTE_MAX_ETHPORTS)
- nb_ports = RTE_MAX_ETHPORTS;
if (check_port_config(nb_ports) < 0)
rte_exit(EXIT_FAILURE, "check_port_config failed\n");
nb_lcores = rte_lcore_count();
if (check_port_config(nb_ports) < 0)
rte_exit(EXIT_FAILURE, "check_port_config failed\n");
nb_lcores = rte_lcore_count();
- nb_tx_port = 0;
/* initialize all ports */
for (portid = 0; portid < nb_ports; portid++) {
/* initialize all ports */
for (portid = 0; portid < nb_ports; portid++) {
@@
-1675,12
+1669,10
@@
main(int argc, char **argv)
qconf->tx_queue_id[portid] = queueid;
queueid++;
qconf->tx_queue_id[portid] = queueid;
queueid++;
- qconf->n_tx_port = nb_tx_port;
qconf->tx_port_id[qconf->n_tx_port] = portid;
qconf->tx_port_id[qconf->n_tx_port] = portid;
+ qconf->n_tx_port++;
}
printf("\n");
}
printf("\n");
-
- nb_tx_port++;
}
for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {
}
for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) {