i40e: fix build without Rx bulk alloc
authorZhe Tao <zhe.tao@intel.com>
Wed, 16 Mar 2016 10:19:10 +0000 (18:19 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 25 Mar 2016 18:01:38 +0000 (19:01 +0100)
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 <zhe.tao@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
drivers/net/i40e/i40e_rxtx.c

index 80847ab..59909f3 100644 (file)
@@ -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