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
ethdev: use constants for link state
[dpdk.git]
/
examples
/
l2fwd-ivshmem
/
host
/
host.c
diff --git
a/examples/l2fwd-ivshmem/host/host.c
b/examples/l2fwd-ivshmem/host/host.c
index
197f22b
..
4bd7c41
100644
(file)
--- a/
examples/l2fwd-ivshmem/host/host.c
+++ b/
examples/l2fwd-ivshmem/host/host.c
@@
-41,7
+41,6
@@
#include <signal.h>
#include <rte_eal.h>
#include <signal.h>
#include <rte_eal.h>
-#include <rte_config.h>
#include <rte_cycles.h>
#include <rte_eal_memconfig.h>
#include <rte_debug.h>
#include <rte_cycles.h>
#include <rte_eal_memconfig.h>
#include <rte_debug.h>
@@
-71,7
+70,6
@@
static uint32_t l2fwd_ivshmem_enabled_port_mask = 0;
static struct ether_addr l2fwd_ivshmem_ports_eth_addr[RTE_MAX_ETHPORTS];
#define NB_MBUF 8192
static struct ether_addr l2fwd_ivshmem_ports_eth_addr[RTE_MAX_ETHPORTS];
#define NB_MBUF 8192
-#define MBUF_DATA_SIZE (2048 + RTE_PKTMBUF_HEADROOM)
#define MAX_RX_QUEUE_PER_LCORE 16
#define MAX_TX_QUEUE_PER_PORT 16
#define MAX_RX_QUEUE_PER_LCORE 16
#define MAX_TX_QUEUE_PER_PORT 16
@@
-373,7
+371,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;
}
@@
-671,7
+669,7
@@
int main(int argc, char **argv)
/* create a shared mbuf pool */
l2fwd_ivshmem_pktmbuf_pool =
rte_pktmbuf_pool_create(MBUF_MP_NAME, NB_MBUF, 32,
/* create a shared mbuf pool */
l2fwd_ivshmem_pktmbuf_pool =
rte_pktmbuf_pool_create(MBUF_MP_NAME, NB_MBUF, 32,
- 0,
MBUF_DATA
_SIZE, rte_socket_id());
+ 0,
RTE_MBUF_DEFAULT_BUF
_SIZE, rte_socket_id());
if (l2fwd_ivshmem_pktmbuf_pool == NULL)
rte_exit(EXIT_FAILURE, "Cannot init mbuf pool\n");
if (l2fwd_ivshmem_pktmbuf_pool == NULL)
rte_exit(EXIT_FAILURE, "Cannot init mbuf pool\n");