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
maintainers: fix responsibility of flow API bits
[dpdk.git]
/
examples
/
multi_process
/
symmetric_mp
/
main.c
diff --git
a/examples/multi_process/symmetric_mp/main.c
b/examples/multi_process/symmetric_mp/main.c
index
1c77205
..
16f21a1
100644
(file)
--- a/
examples/multi_process/symmetric_mp/main.c
+++ b/
examples/multi_process/symmetric_mp/main.c
@@
-48,8
+48,8
@@
#define NB_MBUFS 64*1024 /* use 64k mbufs */
#define MBUF_CACHE_SIZE 256
#define PKT_BURST 32
#define NB_MBUFS 64*1024 /* use 64k mbufs */
#define MBUF_CACHE_SIZE 256
#define PKT_BURST 32
-#define RX_RING_SIZE 1
28
-#define TX_RING_SIZE
512
+#define RX_RING_SIZE 1
024
+#define TX_RING_SIZE
1024
#define PARAM_PROC_ID "proc-id"
#define PARAM_NUM_PROCS "num-procs"
#define PARAM_PROC_ID "proc-id"
#define PARAM_NUM_PROCS "num-procs"
@@
-115,7
+115,7
@@
smp_parse_args(int argc, char **argv)
int opt, ret;
char **argvopt;
int option_index;
int opt, ret;
char **argvopt;
int option_index;
- u
nsigned
i, port_mask = 0;
+ u
int16_t
i, port_mask = 0;
char *prgname = argv[0];
static struct option lgopts[] = {
{PARAM_NUM_PROCS, 1, 0, 0},
char *prgname = argv[0];
static struct option lgopts[] = {
{PARAM_NUM_PROCS, 1, 0, 0},
@@
-156,7
+156,7
@@
smp_parse_args(int argc, char **argv)
smp_usage(prgname, "Invalid or missing port mask\n");
/* get the port numbers from the port mask */
smp_usage(prgname, "Invalid or missing port mask\n");
/* get the port numbers from the port mask */
-
for(i = 0; i < rte_eth_dev_count(); i++
)
+
RTE_ETH_FOREACH_DEV(i
)
if(port_mask & (1 << i))
ports[num_ports++] = (uint8_t)i;
if(port_mask & (1 << i))
ports[num_ports++] = (uint8_t)i;
@@
-204,7
+204,7
@@
smp_port_init(uint16_t port, struct rte_mempool *mbuf_pool,
if (rte_eal_process_type() == RTE_PROC_SECONDARY)
return 0;
if (rte_eal_process_type() == RTE_PROC_SECONDARY)
return 0;
- if (
port >= rte_eth_dev_count(
))
+ if (
!rte_eth_dev_is_valid_port(port
))
return -1;
printf("# Initialising port %u... ", port);
return -1;
printf("# Initialising port %u... ", port);
@@
-418,7
+418,7
@@
main(int argc, char **argv)
argv += ret;
/* determine the NIC devices available */
argv += ret;
/* determine the NIC devices available */
- if (rte_eth_dev_count() == 0)
+ if (rte_eth_dev_count
_avail
() == 0)
rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");
/* parse application arguments (those after the EAL ones) */
rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");
/* parse application arguments (those after the EAL ones) */