From: Zhe Tao Date: Wed, 16 Mar 2016 10:19:10 +0000 (+0800) Subject: i40e: fix build without Rx bulk alloc X-Git-Tag: spdx-start~7179 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=566f91c18b276b920903817e0b193e9ba5dde22b;p=dpdk.git i40e: fix build without Rx bulk alloc Issue: When CONFIG_RTE_LIBTRE_I40E_RX_ALLOW_BULK_ALLOC=n in config file, there will be a build error: 'i40e_recv_pkts_bulk_alloc' undeclared Now DPDK i40e PMD uses the preprocessor to choose whether or not to define the bulk recv functions, but for selection of the RX function, PMD only depends on a C variable. This causes the inconsistency and leads to the build error due to the bulk recv function not being defined. Fixes: 8e109464c022 ("i40e: allow vector Rx and Tx usage") Signed-off-by: Zhe Tao Acked-by: Bruce Richardson --- diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 80847abdae..59909f3d66 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -1178,6 +1178,14 @@ i40e_recv_pkts_bulk_alloc(void *rx_queue, return nb_rx; } +#else +static uint16_t +i40e_recv_pkts_bulk_alloc(void __rte_unused *rx_queue, + struct rte_mbuf __rte_unused **rx_pkts, + uint16_t __rte_unused nb_pkts) +{ + return 0; +} #endif /* RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC */ uint16_t