ixgbe: fix build without builk alloc
authorKonstantin Ananyev <konstantin.ananyev@intel.com>
Fri, 20 Mar 2015 13:59:37 +0000 (13:59 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 20 Mar 2015 21:30:29 +0000 (22:30 +0100)
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 <konstantin.ananyev@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
lib/librte_pmd_ixgbe/ixgbe_rxtx.c
lib/librte_pmd_ixgbe/ixgbe_rxtx.h

index 42f0aa5..7b603d0 100644 (file)
@@ -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
index 3937cf6..0d549a0 100644 (file)
@@ -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