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
crypto/mrvl: add to meson build
[dpdk.git]
/
examples
/
ip_reassembly
/
main.c
diff --git
a/examples/ip_reassembly/main.c
b/examples/ip_reassembly/main.c
index
dc01ea4
..
3e8e79c
100644
(file)
--- a/
examples/ip_reassembly/main.c
+++ b/
examples/ip_reassembly/main.c
@@
-88,8
+88,8
@@
static uint32_t max_flow_ttl = DEF_FLOW_TTL;
/*
* Configurable number of RX/TX ring descriptors
*/
/*
* Configurable number of RX/TX ring descriptors
*/
-#define RTE_TEST_RX_DESC_DEFAULT 1
28
-#define RTE_TEST_TX_DESC_DEFAULT
512
+#define RTE_TEST_RX_DESC_DEFAULT 1
024
+#define RTE_TEST_TX_DESC_DEFAULT
1024
static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
@@
-702,7
+702,7
@@
print_ethaddr(const char *name, const struct ether_addr *eth_addr)
/* Check the link status of all ports in up to 9s, and print them finally */
static void
/* Check the link status of all ports in up to 9s, and print them finally */
static void
-check_all_ports_link_status(uint
16_t port_num, uint
32_t port_mask)
+check_all_ports_link_status(uint32_t port_mask)
{
#define CHECK_INTERVAL 100 /* 100ms */
#define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */
{
#define CHECK_INTERVAL 100 /* 100ms */
#define MAX_CHECK_TIME 90 /* 9s (90 * 100ms) in total */
@@
-714,7
+714,7
@@
check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)
fflush(stdout);
for (count = 0; count <= MAX_CHECK_TIME; count++) {
all_ports_up = 1;
fflush(stdout);
for (count = 0; count <= MAX_CHECK_TIME; count++) {
all_ports_up = 1;
-
for (portid = 0; portid < port_num; portid++
) {
+
RTE_ETH_FOREACH_DEV(portid
) {
if ((port_mask & (1 << portid)) == 0)
continue;
memset(&link, 0, sizeof(link));
if ((port_mask & (1 << portid)) == 0)
continue;
memset(&link, 0, sizeof(link));
@@
-1008,7
+1008,7
@@
main(int argc, char **argv)
if (ret < 0)
rte_exit(EXIT_FAILURE, "Invalid IP reassembly parameters\n");
if (ret < 0)
rte_exit(EXIT_FAILURE, "Invalid IP reassembly parameters\n");
- nb_ports = rte_eth_dev_count();
+ nb_ports = rte_eth_dev_count
_avail
();
if (nb_ports == 0)
rte_exit(EXIT_FAILURE, "No ports found!\n");
if (nb_ports == 0)
rte_exit(EXIT_FAILURE, "No ports found!\n");
@@
-1023,7
+1023,7
@@
main(int argc, char **argv)
rte_exit(EXIT_FAILURE, "Non-existent ports in portmask!\n");
/* initialize all ports */
rte_exit(EXIT_FAILURE, "Non-existent ports in portmask!\n");
/* initialize all ports */
-
for (portid = 0; portid < nb_ports; portid++
) {
+
RTE_ETH_FOREACH_DEV(portid
) {
struct rte_eth_rxconf rxq_conf;
struct rte_eth_conf local_port_conf = port_conf;
struct rte_eth_rxconf rxq_conf;
struct rte_eth_conf local_port_conf = port_conf;
@@
-1141,7
+1141,7
@@
main(int argc, char **argv)
printf("\n");
/* start ports */
printf("\n");
/* start ports */
-
for (portid = 0; portid < nb_ports; portid++
) {
+
RTE_ETH_FOREACH_DEV(portid
) {
if ((enabled_port_mask & (1 << portid)) == 0) {
continue;
}
if ((enabled_port_mask & (1 << portid)) == 0) {
continue;
}
@@
-1157,7
+1157,7
@@
main(int argc, char **argv)
if (init_routing_table() < 0)
rte_exit(EXIT_FAILURE, "Cannot init routing table\n");
if (init_routing_table() < 0)
rte_exit(EXIT_FAILURE, "Cannot init routing table\n");
- check_all_ports_link_status(
nb_ports,
enabled_port_mask);
+ check_all_ports_link_status(enabled_port_mask);
signal(SIGUSR1, signal_handler);
signal(SIGTERM, signal_handler);
signal(SIGUSR1, signal_handler);
signal(SIGTERM, signal_handler);