Skip to contentSkip to conversation

net/bnxt: fix powerpc build

PATCH In review Lance Richardson 3 participants 4 messages Sep 15, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/bnxt: fix powerpc build

A previous commit broke compilation for builds other than x86 and aarch64. Fix by moving macro definitions to more appropriate header files.

Fixes 479387565605 ("net/bnxt: improve small ring sizes support")
---
 drivers/net/bnxt/bnxt_rxq.c             | 1 -
 drivers/net/bnxt/bnxt_rxq.h             | 3 +++
 drivers/net/bnxt/bnxt_rxr.c             | 1 -
 drivers/net/bnxt/bnxt_rxr.h             | 3 +++
 drivers/net/bnxt/bnxt_rxtx_vec_common.h | 4 ----
 drivers/net/bnxt/bnxt_txq.c             | 1 -
 drivers/net/bnxt/bnxt_txq.h             | 3 +++
 7 files changed, 9 insertions(+), 7 deletions(-)
drivers/net/bnxt/bnxt_rxq.c +0 -1
index 57ba9a157..793a47d11 100644
@@ -14,7 +14,6 @@
 #include "bnxt_rxq.h"
 #include "bnxt_rxr.h"
 #include "bnxt_vnic.h"
-#include "bnxt_rxtx_vec_common.h"
 #include "hsi_struct_def_dpdk.h"
 
 /*
drivers/net/bnxt/bnxt_rxq.h +3 -0
index 96c6e06a5..fae92ea45 100644
@@ -6,6 +6,9 @@
 #ifndef _BNXT_RQX_H_
 #define _BNXT_RQX_H_
 
+/* Maximum receive burst supported in vector mode. */
+#define RTE_BNXT_MAX_RX_BURST		64U
+
 struct bnxt;
 struct bnxt_rx_ring_info;
 struct bnxt_cp_ring_info;
drivers/net/bnxt/bnxt_rxr.c +0 -1
index 89a964a49..ca3e0a521 100644
@@ -20,7 +20,6 @@
 #ifdef RTE_LIBRTE_IEEE1588
 #include "bnxt_hwrm.h"
 #endif
-#include "bnxt_rxtx_vec_common.h"
 
 #include <bnxt_tf_common.h>
 #include <ulp_mark_mgr.h>
drivers/net/bnxt/bnxt_rxr.h +3 -0
index 4f5e23b85..250033690 100644
@@ -167,6 +167,9 @@ static inline uint16_t bnxt_tpa_start_agg_id(struct bnxt *bp,
 
 #define BNXT_RX_POST_THRESH	32
 
+/* Number of descriptors to process per inner loop in vector mode. */
+#define RTE_BNXT_DESCS_PER_LOOP		4U
+
 enum pkt_hash_types {
 	PKT_HASH_TYPE_NONE,	/* Undefined type */
 	PKT_HASH_TYPE_L2,	/* Input: src_MAC, dest_MAC */
drivers/net/bnxt/bnxt_rxtx_vec_common.h +0 -4
index 8c10fdfa1..4a48152fc 100644
@@ -9,10 +9,6 @@
 #include "bnxt_rxq.h"
 #include "bnxt_rxr.h"
 
-#define RTE_BNXT_MAX_RX_BURST		64U
-#define RTE_BNXT_MAX_TX_BURST		64U
-#define RTE_BNXT_DESCS_PER_LOOP		4U
-
 #define TX_BD_FLAGS_CMPL ((1 << TX_BD_LONG_FLAGS_BD_CNT_SFT) | \
 			  TX_BD_SHORT_FLAGS_COAL_NOW | \
 			  TX_BD_SHORT_TYPE_TX_BD_SHORT | \
drivers/net/bnxt/bnxt_txq.c +0 -1
index 42930abbf..bdc7ffaaa 100644
@@ -11,7 +11,6 @@
 #include "bnxt_ring.h"
 #include "bnxt_txq.h"
 #include "bnxt_txr.h"
-#include "bnxt_rxtx_vec_common.h"
 
 /*
  * TX Queues
drivers/net/bnxt/bnxt_txq.h +3 -0
index 83a98536d..9f849fc71 100644
@@ -6,6 +6,9 @@
 #ifndef _BNXT_TXQ_H_
 #define _BNXT_TXQ_H_
 
+/* Maximum transmit burst for vector mode.  */
+#define RTE_BNXT_MAX_TX_BURST		64U
+
 struct bnxt_tx_ring_info;
 struct bnxt_cp_ring_info;
 struct bnxt_tx_queue {
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Lance Richardson

A previous commit broke compilation for builds other than x86 and aarch64. Fix by moving macro definitions to more appropriate header files.

Fixes 479387565605 ("net/bnxt: improve small ring sizes support")

Ferruh,
Let me know if you can pick this directly or would like to pull through the subtree.

Also adding

---

Quoted 108 lines
 drivers/net/bnxt/bnxt_rxq.c             | 1 -
 drivers/net/bnxt/bnxt_rxq.h             | 3 +++
 drivers/net/bnxt/bnxt_rxr.c             | 1 -
 drivers/net/bnxt/bnxt_rxr.h             | 3 +++
 drivers/net/bnxt/bnxt_rxtx_vec_common.h | 4 ----
 drivers/net/bnxt/bnxt_txq.c             | 1 -
 drivers/net/bnxt/bnxt_txq.h             | 3 +++
 7 files changed, 9 insertions(+), 7 deletions(-)
drivers/net/bnxt/bnxt_rxq.c +0 -1
index 57ba9a157..793a47d11 100644
@@ -14,7 +14,6 @@
 #include "bnxt_rxq.h"
 #include "bnxt_rxr.h"
 #include "bnxt_vnic.h"
-#include "bnxt_rxtx_vec_common.h"
 #include "hsi_struct_def_dpdk.h"
 
 /*
drivers/net/bnxt/bnxt_rxq.h +3 -0
index 96c6e06a5..fae92ea45 100644
@@ -6,6 +6,9 @@
 #ifndef _BNXT_RQX_H_
 #define _BNXT_RQX_H_
 
+/* Maximum receive burst supported in vector mode. */
+#define RTE_BNXT_MAX_RX_BURST          64U
+
 struct bnxt;
 struct bnxt_rx_ring_info;
 struct bnxt_cp_ring_info;
drivers/net/bnxt/bnxt_rxr.c +0 -1
index 89a964a49..ca3e0a521 100644
@@ -20,7 +20,6 @@
 #ifdef RTE_LIBRTE_IEEE1588
 #include "bnxt_hwrm.h"
 #endif
-#include "bnxt_rxtx_vec_common.h"
 
 #include <bnxt_tf_common.h>
 #include <ulp_mark_mgr.h>
drivers/net/bnxt/bnxt_rxr.h +3 -0
index 4f5e23b85..250033690 100644
@@ -167,6 +167,9 @@ static inline uint16_t bnxt_tpa_start_agg_id(struct
 bnxt *bp,
 
 #define BNXT_RX_POST_THRESH    32
 
+/* Number of descriptors to process per inner loop in vector mode. */
+#define RTE_BNXT_DESCS_PER_LOOP                4U
+
 enum pkt_hash_types {
        PKT_HASH_TYPE_NONE,     /* Undefined type */

PKT_HASH_TYPE_L2, /* Input: src_MAC, dest_MAC */

drivers/net/bnxt/bnxt_rxtx_vec_common.h +0 -4
index 8c10fdfa1..4a48152fc 100644
@@ -9,10 +9,6 @@
 #include "bnxt_rxq.h"
 #include "bnxt_rxr.h"
 
-#define RTE_BNXT_MAX_RX_BURST          64U
-#define RTE_BNXT_MAX_TX_BURST          64U
-#define RTE_BNXT_DESCS_PER_LOOP                4U
-
 #define TX_BD_FLAGS_CMPL ((1 << TX_BD_LONG_FLAGS_BD_CNT_SFT) | \
                          TX_BD_SHORT_FLAGS_COAL_NOW | \
                          TX_BD_SHORT_TYPE_TX_BD_SHORT | \
drivers/net/bnxt/bnxt_txq.c +0 -1
index 42930abbf..bdc7ffaaa 100644
@@ -11,7 +11,6 @@
 #include "bnxt_ring.h"
 #include "bnxt_txq.h"
 #include "bnxt_txr.h"
-#include "bnxt_rxtx_vec_common.h"
 
 /*
  * TX Queues
drivers/net/bnxt/bnxt_txq.h +3 -1
index 83a98536d..9f849fc71 100644
@@ -6,6 +6,9 @@
 #ifndef _BNXT_TXQ_H_
 #define _BNXT_TXQ_H_
 
+/* Maximum transmit burst for vector mode.  */
+#define RTE_BNXT_MAX_TX_BURST          64U
+
 struct bnxt_tx_ring_info;
 struct bnxt_cp_ring_info;
 struct bnxt_tx_queue {
--

2.25.1

#2 lore raw
Quoted 10 lines · Ajit Khaparde

On Tue, Sep 15, 2020 at 7:07 AM Lance Richardson <[email protected] <mailto:[email protected]>> wrote:

A previous commit broke compilation for builds other than x86 and aarch64. Fix by moving macro definitions to more appropriate header files.

Quoted 7 lines
Fixes 479387565605 ("net/bnxt: improve small ring sizes support")

<mailto:[email protected]>>

Ferruh,
Let me know if you can pick this directly or would like to pull through the subtree.

Hi Ajit,

I will squash it in the next-net, to not leave any broken builds in the git history...

#3 lore raw
Quoted 15 lines · Ferruh Yigit
Quoted 14 lines · Ajit Khaparde

On Tue, Sep 15, 2020 at 7:07 AM Lance Richardson <[email protected] <mailto:[email protected]>> wrote:

A previous commit broke compilation for builds other than x86 and aarch64. Fix by moving macro definitions to more appropriate header files.

Fixes 479387565605 ("net/bnxt: improve small ring sizes support")

<mailto:[email protected]>>

Quoted 9 lines
Quoted 3 lines

Ferruh,
Let me know if you can pick this directly or would like to pull through the subtree.

Hi Ajit,

I will squash it in the next-net, to not leave any broken builds in the git history...

Squashed into relevant commit in next-net, thanks.