diff mbox

[dpdk-dev,PATCHv2] ixgbe: fix compilation issue when RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC is disabled

Message ID 1426859977-6559-1-git-send-email-konstantin.ananyev@intel.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Konstantin Ananyev March 20, 2015, 1:59 p.m. UTC
v2:
As per comments, reorder patch a bit, to avoid reintroducing extra ifdefs.

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
---
 lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 11 +++++++++++
 lib/librte_pmd_ixgbe/ixgbe_rxtx.h |  2 +-
 2 files changed, 12 insertions(+), 1 deletion(-)

Comments

De Lara Guarch, Pablo March 20, 2015, 2:17 p.m. UTC | #1
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Konstantin
> Ananyev
> Sent: Friday, March 20, 2015 2:00 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCHv2] ixgbe: fix compilation issue when
> RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC is disabled
> 
> v2:
> As per comments, reorder patch a bit, to avoid reintroducing extra ifdefs.
> 
> Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Thomas Monjalon March 20, 2015, 9:34 p.m. UTC | #2
> > v2:
> > As per comments, reorder patch a bit, to avoid reintroducing extra ifdefs.
> > 
> > Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
> 
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Fixes: 01fa1d6215fa ("ixgbe: unify Rx setup")

Applied, thanks
diff mbox

Patch

diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
index 42f0aa5..7b603d0 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 3937cf6..0d549a0 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