diff options
author | nanger <zhenyinan@huawei.com> | 2018-08-20 11:23:31 +0800 |
---|---|---|
committer | nanger <zhenyinan@huawei.com> | 2018-08-22 09:52:09 +0800 |
commit | 2a0db471858d1143b12ace6a062d37ea509612f7 (patch) | |
tree | edf6b440822445577f4673de8a1bb4b95b1507cf /stacks/lwip_stack/src | |
parent | 9d488c4706a20a12554b9050d9b3313f8f67789d (diff) |
Feat: HAL decoupling with DPDK
Change-Id: I62c60117e63e75793c1348b6852eed6753915077
Signed-off-by: nanger <zhenyinan@huawei.com>
Diffstat (limited to 'stacks/lwip_stack/src')
-rw-r--r-- | stacks/lwip_stack/src/io_adpt/dpdk.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/stacks/lwip_stack/src/io_adpt/dpdk.c b/stacks/lwip_stack/src/io_adpt/dpdk.c index 63ffde1..da2cfb6 100644 --- a/stacks/lwip_stack/src/io_adpt/dpdk.c +++ b/stacks/lwip_stack/src/io_adpt/dpdk.c @@ -35,6 +35,9 @@ #include <rte_mbuf.h> #include <rte_eth_bond.h> #include "nsfw_init.h" +#include "common_mem_mbuf.h" +#include "common_mem_mempool.h" +#include "common_func.h" #include "hal.h" #include "nstack_securec.h" #include <rte_ethdev_driver.h> @@ -1524,7 +1527,8 @@ dpdk_setup_port (netif_inst_t * inst) struct rte_eth_txconf *tx_conf; uint8_t port_id = inst->data.dpdk_if.port_id; - struct rte_mempool **mp = inst->data.dpdk_if.rx_pool; + struct rte_mempool **mp = + (struct rte_mempool **) inst->data.dpdk_if.rx_pool; uint32_t *rx_ring_size = inst->data.dpdk_if.rx_ring_size; uint32_t *tx_ring_size = inst->data.dpdk_if.tx_ring_size; uint32_t rx_queue_num = inst->data.dpdk_if.rx_queue_num; @@ -1797,7 +1801,7 @@ dpdk_get_capability (netif_inst_t * inst, hal_netif_capa_t * capa) *****************************************************************************/ NSTACK_STATIC uint16_t dpdk_recv (netif_inst_t * inst, uint16_t queue_id, - struct common_mem_mbuf ** rx_pkts, uint16_t nb_pkts) + hal_mbuf_t ** rx_pkts, uint16_t nb_pkts) { return hal_rte_eth_rx_burst (inst->data.dpdk_if.port_id, queue_id, (struct rte_mbuf **) rx_pkts, nb_pkts); @@ -1818,7 +1822,7 @@ dpdk_recv (netif_inst_t * inst, uint16_t queue_id, *****************************************************************************/ NSTACK_STATIC uint16_t dpdk_send (netif_inst_t * inst, uint16_t queue_id, - struct common_mem_mbuf **tx_pkts, uint16_t nb_pkts) + hal_mbuf_t ** tx_pkts, uint16_t nb_pkts) { return hal_rte_eth_tx_burst (inst->data.dpdk_if.port_id, queue_id, (struct rte_mbuf **) tx_pkts, nb_pkts); |