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
net/i40e/base: add VF offload flags
[dpdk.git]
/
examples
/
l3fwd-vf
/
main.c
diff --git
a/examples/l3fwd-vf/main.c
b/examples/l3fwd-vf/main.c
index
193c3ab
..
dc3d547
100644
(file)
--- a/
examples/l3fwd-vf/main.c
+++ b/
examples/l3fwd-vf/main.c
@@
-65,7
+65,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>
@@
-817,7
+816,7
@@
parse_args(int argc, char **argv)
argv[optind-1] = prgname;
ret = optind-1;
argv[optind-1] = prgname;
ret = optind-1;
- optind =
0
; /* reset getopt lib */
+ optind =
1
; /* reset getopt lib */
return ret;
}
return ret;
}
@@
-869,10
+868,16
@@
setup_lpm(int socketid)
int ret;
char s[64];
int ret;
char s[64];
+ struct rte_lpm_config lpm_ipv4_config;
+
+ lpm_ipv4_config.max_rules = L3FWD_LPM_MAX_RULES;
+ lpm_ipv4_config.number_tbl8s = 256;
+ lpm_ipv4_config.flags = 0;
+
/* create the LPM table */
snprintf(s, sizeof(s), "L3FWD_LPM_%d", socketid);
/* create the LPM table */
snprintf(s, sizeof(s), "L3FWD_LPM_%d", socketid);
- l3fwd_lookup_struct[socketid] =
rte_lpm_create(s, socketid,
-
L3FWD_LPM_MAX_RULES, 0
);
+ l3fwd_lookup_struct[socketid] =
+
rte_lpm_create(s, socketid, &lpm_ipv4_config
);
if (l3fwd_lookup_struct[socketid] == NULL)
rte_exit(EXIT_FAILURE, "Unable to create the l3fwd LPM table"
" on socket %d\n", socketid);
if (l3fwd_lookup_struct[socketid] == NULL)
rte_exit(EXIT_FAILURE, "Unable to create the l3fwd LPM table"
" on socket %d\n", socketid);
@@
-976,8
+981,6
@@
main(int argc, char **argv)
rte_exit(EXIT_FAILURE, "init_lcore_rx_queues failed\n");
nb_ports = rte_eth_dev_count();
rte_exit(EXIT_FAILURE, "init_lcore_rx_queues failed\n");
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");
if (check_port_config(nb_ports) < 0)
rte_exit(EXIT_FAILURE, "check_port_config failed\n");