[dpdk-dev] [PATCH] ixgbe: remove RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC option

2015-07-26 Thread Thomas Monjalon
2015-07-24 11:23, Ananyev, Konstantin:
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Pablo de Lara
> > RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC config option is not really
> > necessary, as bulk alloc rx function can be used anyway, as long as the
> > necessary conditions are satisfied, which are checked already
> > in the library.
> > 
> > Signed-off-by: Pablo de Lara 
> 
> Acked-by: Konstantin Ananyev 

Applied, thanks


[dpdk-dev] [PATCH] ixgbe: remove RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC option

2015-07-24 Thread Ananyev, Konstantin


> -Original Message-
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Pablo de Lara
> Sent: Thursday, July 23, 2015 3:30 PM
> To: dev at dpdk.org
> Subject: [dpdk-dev] [PATCH] ixgbe: remove 
> RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC option
> 
> RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC config option is not really
> necessary, as bulk alloc rx function can be used anyway, as long as the
> necessary conditions are satisfied, which are checked already
> in the library.
> 
> Signed-off-by: Pablo de Lara 
> ---

Acked-by: Konstantin Ananyev 

> --
> 2.4.2



[dpdk-dev] [PATCH] ixgbe: remove RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC option

2015-07-23 Thread Pablo de Lara
RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC config option is not really
necessary, as bulk alloc rx function can be used anyway, as long as the
necessary conditions are satisfied, which are checked already
in the library.

Signed-off-by: Pablo de Lara 
---
 config/common_bsdapp   |  1 -
 config/common_linuxapp |  1 -
 doc/guides/nics/ixgbe.rst  |  2 --
 drivers/net/ixgbe/Makefile |  4 
 drivers/net/ixgbe/ixgbe_rxtx.c | 38 ++
 drivers/net/ixgbe/ixgbe_rxtx.h | 12 +---
 6 files changed, 3 insertions(+), 55 deletions(-)

diff --git a/config/common_bsdapp b/config/common_bsdapp
index e96e4a5..6d49cc8 100644
--- a/config/common_bsdapp
+++ b/config/common_bsdapp
@@ -173,7 +173,6 @@ CONFIG_RTE_LIBRTE_IXGBE_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_IXGBE_DEBUG_TX_FREE=n
 CONFIG_RTE_LIBRTE_IXGBE_DEBUG_DRIVER=n
 CONFIG_RTE_LIBRTE_IXGBE_PF_DISABLE_STRIP_CRC=n
-CONFIG_RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC=y
 CONFIG_RTE_IXGBE_INC_VECTOR=n
 CONFIG_RTE_IXGBE_RX_OLFLAGS_DISABLE=n

diff --git a/config/common_linuxapp b/config/common_linuxapp
index 579a5d7..49dd8db 100644
--- a/config/common_linuxapp
+++ b/config/common_linuxapp
@@ -171,7 +171,6 @@ CONFIG_RTE_LIBRTE_IXGBE_DEBUG_TX=n
 CONFIG_RTE_LIBRTE_IXGBE_DEBUG_TX_FREE=n
 CONFIG_RTE_LIBRTE_IXGBE_DEBUG_DRIVER=n
 CONFIG_RTE_LIBRTE_IXGBE_PF_DISABLE_STRIP_CRC=n
-CONFIG_RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC=y
 CONFIG_RTE_IXGBE_INC_VECTOR=y
 CONFIG_RTE_IXGBE_RX_OLFLAGS_ENABLE=y

diff --git a/doc/guides/nics/ixgbe.rst b/doc/guides/nics/ixgbe.rst
index 70cd591..62cc0aa 100644
--- a/doc/guides/nics/ixgbe.rst
+++ b/doc/guides/nics/ixgbe.rst
@@ -57,8 +57,6 @@ The following prerequisites apply:

 *   To enable vPMD to work for RX, bulk allocation for Rx must be allowed.

-*   The RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC=y configuration MACRO must be set 
before compiling the code.
-
 Ensure that the following pre-conditions are satisfied:

 *   rxq->rx_free_thresh >= RTE_PMD_IXGBE_RX_MAX_BURST
diff --git a/drivers/net/ixgbe/Makefile b/drivers/net/ixgbe/Makefile
index 6095cc2..c032775 100644
--- a/drivers/net/ixgbe/Makefile
+++ b/drivers/net/ixgbe/Makefile
@@ -119,8 +119,4 @@ DEPDIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += lib/librte_eal 
lib/librte_ether
 DEPDIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += lib/librte_mempool lib/librte_mbuf
 DEPDIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += lib/librte_net

-ifeq 
($(CONFIG_RTE_IXGBE_INC_VECTOR)$(CONFIG_RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC),yn)
-$(error The ixgbe vpmd depends on Rx bulk alloc)
-endif
-
 include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index af7e222..457191f 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -1034,7 +1034,6 @@ rx_desc_error_to_pkt_flags(uint32_t rx_status)
IXGBE_RXDADV_ERR_CKSUM_BIT) & IXGBE_RXDADV_ERR_CKSUM_MSK];
 }

-#ifdef RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC
 /*
  * LOOK_AHEAD defines how many desc statuses to check beyond the
  * current descriptor.
@@ -1305,24 +1304,6 @@ 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;
-}
-
-static inline int
-ixgbe_rx_alloc_bufs(__rte_unused struct ixgbe_rx_queue *rxq,
-   __rte_unused bool reset_mbuf)
-{
-   return -ENOMEM;
-}
-#endif /* RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC */
-
 uint16_t
 ixgbe_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
uint16_t nb_pkts)
@@ -1708,7 +1689,6 @@ next_desc:
break;
}
}
-#ifdef RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC
else if (nb_hold > rxq->rx_free_thresh) {
uint16_t next_rdt = rxq->rx_free_trigger;

@@ -1727,7 +1707,6 @@ next_desc:
break;
}
}
-#endif

nb_hold++;
rxe = _ring[rx_id];
@@ -2278,7 +2257,6 @@ ixgbe_rx_queue_release_mbufs(struct ixgbe_rx_queue *rxq)
rxq->sw_ring[i].mbuf = NULL;
}
}
-#ifdef RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC
if (rxq->rx_nb_avail) {
for (i = 0; i < rxq->rx_nb_avail; ++i) {
struct rte_mbuf *mb;
@@ -2287,7 +2265,6 @@ ixgbe_rx_queue_release_mbufs(struct ixgbe_rx_queue *rxq)
}
rxq->rx_nb_avail = 0;
}
-#endif
}

if (rxq->sw_sc_ring)
@@ -2324,11 +2301,7 @@ ixgbe_dev_rx_queue_release(void *rxq)
  *   function must be used.
  */
 static inline int __attribute__((cold))
-#ifdef RTE_LIBRTE_IXGBE_RX_ALLOW_BULK_ALLOC