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/dpaa2: add support for tail drop on queue
[dpdk.git]
/
examples
/
load_balancer
/
init.c
diff --git
a/examples/load_balancer/init.c
b/examples/load_balancer/init.c
index
aeff5ca
..
abd05a3
100644
(file)
--- a/
examples/load_balancer/init.c
+++ b/
examples/load_balancer/init.c
@@
-48,7
+48,6
@@
#include <rte_memory.h>
#include <rte_memcpy.h>
#include <rte_memzone.h>
#include <rte_memory.h>
#include <rte_memcpy.h>
#include <rte_memzone.h>
-#include <rte_tailq.h>
#include <rte_eal.h>
#include <rte_per_lcore.h>
#include <rte_launch.h>
#include <rte_eal.h>
#include <rte_per_lcore.h>
#include <rte_launch.h>
@@
-82,7
+81,7
@@
static struct rte_eth_conf port_conf = {
.hw_ip_checksum = 1, /**< IP checksum offload enabled */
.hw_vlan_filter = 0, /**< VLAN filtering disabled */
.jumbo_frame = 0, /**< Jumbo Frame Support disabled */
.hw_ip_checksum = 1, /**< IP checksum offload enabled */
.hw_vlan_filter = 0, /**< VLAN filtering disabled */
.jumbo_frame = 0, /**< Jumbo Frame Support disabled */
- .hw_strip_crc =
0
, /**< CRC stripped by hardware */
+ .hw_strip_crc =
1
, /**< CRC stripped by hardware */
},
.rx_adv_conf = {
.rss_conf = {
},
.rx_adv_conf = {
.rss_conf = {
@@
-128,16
+127,10
@@
app_init_mbuf_pools(void)
snprintf(name, sizeof(name), "mbuf_pool_%u", socket);
printf("Creating the mbuf pool for socket %u ...\n", socket);
snprintf(name, sizeof(name), "mbuf_pool_%u", socket);
printf("Creating the mbuf pool for socket %u ...\n", socket);
- app.pools[socket] = rte_mempool_create(
- name,
- APP_DEFAULT_MEMPOOL_BUFFERS,
- APP_DEFAULT_MBUF_SIZE,
+ app.pools[socket] = rte_pktmbuf_pool_create(
+ name, APP_DEFAULT_MEMPOOL_BUFFERS,
APP_DEFAULT_MEMPOOL_CACHE_SIZE,
APP_DEFAULT_MEMPOOL_CACHE_SIZE,
- sizeof(struct rte_pktmbuf_pool_private),
- rte_pktmbuf_pool_init, NULL,
- rte_pktmbuf_init, NULL,
- socket,
- 0);
+ 0, APP_DEFAULT_MBUF_DATA_SIZE, socket);
if (app.pools[socket] == NULL) {
rte_panic("Cannot create mbuf pool on socket %u\n", socket);
}
if (app.pools[socket] == NULL) {
rte_panic("Cannot create mbuf pool on socket %u\n", socket);
}
@@
-167,13
+160,17
@@
app_init_lpm_tables(void)
continue;
}
continue;
}
+ struct rte_lpm_config lpm_config;
+
+ lpm_config.max_rules = APP_MAX_LPM_RULES;
+ lpm_config.number_tbl8s = 256;
+ lpm_config.flags = 0;
snprintf(name, sizeof(name), "lpm_table_%u", socket);
printf("Creating the LPM table for socket %u ...\n", socket);
app.lpm_tables[socket] = rte_lpm_create(
name,
socket,
snprintf(name, sizeof(name), "lpm_table_%u", socket);
printf("Creating the LPM table for socket %u ...\n", socket);
app.lpm_tables[socket] = rte_lpm_create(
name,
socket,
- APP_MAX_LPM_RULES,
- 0);
+ &lpm_config);
if (app.lpm_tables[socket] == NULL) {
rte_panic("Unable to create LPM table on socket %u\n", socket);
}
if (app.lpm_tables[socket] == NULL) {
rte_panic("Unable to create LPM table on socket %u\n", socket);
}
@@
-398,7
+395,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;
}