From: Konstantin Ananyev Date: Fri, 20 Mar 2015 13:59:37 +0000 (+0000) Subject: ixgbe: fix build without builk alloc X-Git-Tag: spdx-start~9402 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=79586d502a14eb3aeca96096a3f064365792d167;p=dpdk.git ixgbe: fix build without builk alloc If RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC is disabled in the config file, RTE_PMD_IXGBE_RX_MAX_BURST macro and ixgbe_recv_pkts_bulk_alloc function are not declared, and some parts of the ixgbe code were still trying to use them. Fixes: 01fa1d6215fa ("ixgbe: unify Rx setup") Signed-off-by: Konstantin Ananyev Acked-by: Pablo de Lara --- diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c index 42f0aa5e7c..7b603d0c2a 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c @@ -1170,6 +1170,17 @@ ixgbe_recv_pkts_bulk_alloc(void *rx_queue, struct rte_mbuf **rx_pkts, return nb_rx; } + +#else + +/* Stub to avoid extra ifdefs */ +static uint16_t +ixgbe_recv_pkts_bulk_alloc(__rte_unused void *rx_queue, + __rte_unused struct rte_mbuf **rx_pkts, __rte_unused uint16_t nb_pkts) +{ + return 0; +} + #endif /* RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC */ uint16_t diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.h b/lib/librte_pmd_ixgbe/ixgbe_rxtx.h index 3937cf670b..0d549a0697 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.h +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.h @@ -36,9 +36,9 @@ #define RTE_PMD_IXGBE_TX_MAX_BURST 32 +#define RTE_PMD_IXGBE_RX_MAX_BURST 32 #ifdef RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC -#define RTE_PMD_IXGBE_RX_MAX_BURST 32 #define RTE_IXGBE_DESCS_PER_LOOP 4 #elif defined(RTE_IXGBE_INC_VECTOR) #define RTE_IXGBE_DESCS_PER_LOOP 4