[4/5] net/ixgbe: add missing stubs for ppc

Message ID 20200114112945.39375-5-reshma.pattan@intel.com (mailing list archive)
State Accepted, archived
Delegated to: xiaolong ye
Headers
Series net/ixgbe: improvements to ixgbe driver |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/Intel-compilation fail Compilation issues

Commit Message

Pattan, Reshma Jan. 14, 2020, 11:29 a.m. UTC
  add stubs for ixgbe_xmit_fixed_burst_vec,
ixgbe_rx_queue_release_mbufs_vec and
ixgbe_txq_vec_setup

CC: Vlad Zolotarov <vladz@cloudius-systems.com>

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
---
 drivers/net/ixgbe/ixgbe_rxtx.c | 25 +++++++++++++++++++------
 drivers/net/ixgbe/ixgbe_rxtx.h |  2 --
 2 files changed, 19 insertions(+), 8 deletions(-)
  

Comments

Ferruh Yigit Jan. 16, 2020, 3:25 p.m. UTC | #1
On 1/14/2020 11:29 AM, Reshma Pattan wrote:
> add stubs for ixgbe_xmit_fixed_burst_vec,
> ixgbe_rx_queue_release_mbufs_vec and
> ixgbe_txq_vec_setup
> 
> CC: Vlad Zolotarov <vladz@cloudius-systems.com>
> 
> Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>

<...>

> @@ -5834,4 +5828,23 @@ ixgbe_rxq_vec_setup(struct ixgbe_rx_queue __rte_unused *rxq)
>  {
>  	return -1;
>  }
> +
> +uint16_t
> +ixgbe_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
> +					uint16_t nb_pkts)
> +{
> +	return 0;
> +}
> +
> +int
> +ixgbe_txq_vec_setup(struct ixgbe_tx_queue *txq)
> +{
> +	return -1;
> +}
> +
> +void
> +ixgbe_rx_queue_release_mbufs_vec(struct ixgbe_rx_queue *rxq)
> +{
> +	return;
> +}
>  #endif


getting unused variable warnings for PPC [1], because of missing '__rte_unused'
attribute on arguments. I will add them while merging, please verify the commits
on next-net

[1]: error: unused parameter ‘tx_queue’
  

Patch

diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 2be32603c..795ba6bfb 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -339,7 +339,6 @@  ixgbe_xmit_pkts_simple(void *tx_queue, struct rte_mbuf **tx_pkts,
 	return nb_tx;
 }
 
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 static uint16_t
 ixgbe_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 		    uint16_t nb_pkts)
@@ -361,7 +360,6 @@  ixgbe_xmit_pkts_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 
 	return nb_tx;
 }
-#endif
 
 static inline void
 ixgbe_set_xmit_ctx(struct ixgbe_tx_queue *txq,
@@ -2387,14 +2385,12 @@  ixgbe_set_tx_function(struct rte_eth_dev *dev, struct ixgbe_tx_queue *txq)
 			(txq->tx_rs_thresh >= RTE_PMD_IXGBE_TX_MAX_BURST)) {
 		PMD_INIT_LOG(DEBUG, "Using simple tx code path");
 		dev->tx_pkt_prepare = NULL;
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 		if (txq->tx_rs_thresh <= RTE_IXGBE_TX_MAX_FREE_BUF_SZ &&
 				(rte_eal_process_type() != RTE_PROC_PRIMARY ||
 					ixgbe_txq_vec_setup(txq) == 0)) {
 			PMD_INIT_LOG(DEBUG, "Vector tx enabled.");
 			dev->tx_pkt_burst = ixgbe_xmit_pkts_vec;
 		} else
-#endif
 		dev->tx_pkt_burst = ixgbe_xmit_pkts_simple;
 	} else {
 		PMD_INIT_LOG(DEBUG, "Using full-featured tx code path");
@@ -2682,13 +2678,11 @@  ixgbe_rx_queue_release_mbufs(struct ixgbe_rx_queue *rxq)
 {
 	unsigned i;
 
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 	/* SSE Vector driver has a different way of releasing mbufs. */
 	if (rxq->rx_using_sse) {
 		ixgbe_rx_queue_release_mbufs_vec(rxq);
 		return;
 	}
-#endif
 
 	if (rxq->sw_ring != NULL) {
 		for (i = 0; i < rxq->nb_rx_desc; i++) {
@@ -5834,4 +5828,23 @@  ixgbe_rxq_vec_setup(struct ixgbe_rx_queue __rte_unused *rxq)
 {
 	return -1;
 }
+
+uint16_t
+ixgbe_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
+					uint16_t nb_pkts)
+{
+	return 0;
+}
+
+int
+ixgbe_txq_vec_setup(struct ixgbe_tx_queue *txq)
+{
+	return -1;
+}
+
+void
+ixgbe_rx_queue_release_mbufs_vec(struct ixgbe_rx_queue *rxq)
+{
+	return;
+}
 #endif
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.h b/drivers/net/ixgbe/ixgbe_rxtx.h
index 5c9aa0f9d..3e11630f7 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.h
+++ b/drivers/net/ixgbe/ixgbe_rxtx.h
@@ -288,11 +288,9 @@  void ixgbe_rx_queue_release_mbufs_vec(struct ixgbe_rx_queue *rxq);
 extern const uint32_t ptype_table[IXGBE_PACKET_TYPE_MAX];
 extern const uint32_t ptype_table_tn[IXGBE_PACKET_TYPE_TN_MAX];
 
-#if defined(RTE_ARCH_X86) || defined(RTE_ARCH_ARM64)
 uint16_t ixgbe_xmit_fixed_burst_vec(void *tx_queue, struct rte_mbuf **tx_pkts,
 				    uint16_t nb_pkts);
 int ixgbe_txq_vec_setup(struct ixgbe_tx_queue *txq);
-#endif
 
 uint64_t ixgbe_get_tx_port_offloads(struct rte_eth_dev *dev);
 uint64_t ixgbe_get_rx_queue_offloads(struct rte_eth_dev *dev);