net/bnx2x: update to latest FW
cover net/bnx2x: update to latest FW
Hi,
Currently, BNX2X PMD uses a very old firmware 7.2.51. This patch series updated the base driver to use to latest firmware 7.13.11. The latest firmware comprises of enhancements and fixes.
Thanks!
-Rasesh
Rasesh Mody (5):
net/bnx2x: update and reorganize HW registers net/bnx2x: update HSI code
net/bnx2x: update to latest FW 7.13.11
doc: cleanup SPDX license id usage in bnx2x guide net/bnx2x: change PMD version to 1.1.0.1
doc/guides/nics/bnx2x.rst | 26 - drivers/net/bnx2x/bnx2x.c | 62 +- drivers/net/bnx2x/bnx2x.h | 95 +- drivers/net/bnx2x/bnx2x_osal.h | 27 + drivers/net/bnx2x/bnx2x_rxtx.c | 10 +- drivers/net/bnx2x/ecore_fw_defs.h | 252 +- drivers/net/bnx2x/ecore_hsi.h | 3507 +++++++++------- drivers/net/bnx2x/ecore_init.h | 212 +- drivers/net/bnx2x/ecore_init_ops.h | 224 +- drivers/net/bnx2x/ecore_mfw_req.h | 10 +- drivers/net/bnx2x/ecore_reg.h | 6246 ++++++++++++++++++---------- drivers/net/bnx2x/ecore_sp.c | 48 +- drivers/net/bnx2x/ecore_sp.h | 319 +- 13 files changed, 6852 insertions(+), 4186 deletions(-) create mode 100644 drivers/net/bnx2x/bnx2x_osal.h
Signature · 1 line
2.18.0
PATCH 1/5 net/bnx2x: update and reorganize HW registers
Update and reorganize HW registers in preparation to update the firmware to version 7.13.11.
Move HW_INTERRUT_ASSERT_SET_0 out from ecore_reg.h to bnx2x.h.
--- drivers/net/bnx2x/bnx2x.c | 3 +- drivers/net/bnx2x/bnx2x.h | 67 + drivers/net/bnx2x/ecore_reg.h | 6246 ++++++++++++++++++++++----------- 3 files changed, 4183 insertions(+), 2133 deletions(-)
drivers/net/bnx2x/bnx2x.c +1 -2
@@ -4095,7 +4095,7 @@ static void bnx2x_attn_int_deasserted0(struct bnx2x_softc *sc, uint32_t attn)REG_WR (sc, reg_offset, val);rte_panic ("FATAL HW block attention set0 0x%lx" , - (attn &HW_INTERRUT_ASSERT_SET_0 )); + (attn & (long unsigned )HW_INTERRUT_ASSERT_SET_0 )); } }
@@ -10394,7 +10394,6 @@ static int bnx2x_init_hw_common(struct bnx2x_softc *sc)ecore_init_block (sc,BLOCK_TM ,PHASE_COMMON );ecore_init_block (sc,BLOCK_DORQ ,PHASE_COMMON ); -REG_WR (sc,DORQ_REG_DPM_CID_OFST ,BNX2X_DB_SHIFT );if (!CHIP_REV_IS_SLOW (sc)) {/* enable hw interrupt from doorbell Q */
drivers/net/bnx2x/bnx2x.h +67 -0
73 lines not on this page · raw message
drivers/net/bnx2x/ecore_reg.h +4115 -2131
2,912 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.18.0
Part of the diff is not shown here. View the raw message.
Re: [dpdk-dev] [PATCH 1/5] net/bnx2x: update and reorganize HW registers
Quoted 5 lines · Rasesh Mody
Update and reorganize HW registers in preparation to update the firmware to version 7.13.11.
MoveHW_INTERRUT_ASSERT_SET_0out fromecore_reg.htobnx2x.h.
Quoted 7 lines
Signed-off-by Rasesh Mody <[email protected]>--- drivers/net/bnx2x/bnx2x.c | 3 +- drivers/net/bnx2x/bnx2x.h | 67 + drivers/net/bnx2x/ecore_reg.h | 6246 ++++++++++++++++++++++----------- 3 files changed, 4183 insertions(+), 2133 deletions(-)
+/******************************************************************************
Quoted 3 lines
+ * Description:
+ * Calculates crc 8 on a word value: polynomial 0-1-2-8
+ * Code was translated from Verilog.
Not relevant comment.
drivers/net/bnx2x/ecore_reg.h Theotherbitsarereservedandshouldbezero*/ · line 5576
Quoted 4 lines
+ * Return:
+ *****************************************************************************/drivers/net/bnx2x/ecore_reg.h +2
-0+static inline uint8_t calc_crc8 (uint32_t data,uint8_t crc) +{
If is used in slow-path code then move to .c file.
If it is standard crc function then please think about reusing dpdk;s CRC lib.
Quoted 54 lines
drivers/net/bnx2x/ecore_reg.h +50
-1+uint8_t D [32 ]; +uint8_t NewCRC[8 ]; +uint8_t C [8 ]; +uint8_t crc_res; +uint8_t i; + +/* split the data into 31 bits */ +for (i =0 ; i <32 ; i++) { +D [i] = (uint8_t )(data &1 ); + data = data >>1 ; + } + +/* split the crc into 8 bits */ +for (i =0 ; i <8 ; i++) { +C [i] = crc &1 ; + crc = crc >>1 ; + } + + NewCRC[0 ] =D [31 ] ^D [30 ] ^D [28 ] ^D [23 ] ^D [21 ] ^D [19 ] ^D [18 ] ^ +D [16 ] ^D [14 ] ^D [12 ] ^D [8 ] ^D [7 ] ^D [6 ] ^D [0 ] ^C [4 ] ^ +C [6 ] ^C [7 ]; + NewCRC[1 ] =D [30 ] ^D [29 ] ^D [28 ] ^D [24 ] ^D [23 ] ^D [22 ] ^D [21 ] ^ +D [20 ] ^D [18 ] ^D [17 ] ^D [16 ] ^D [15 ] ^D [14 ] ^D [13 ] ^ +D [12 ] ^D [9 ] ^D [6 ] ^D [1 ] ^D [0 ] ^C [0 ] ^C [4 ] ^C [5 ] ^C [6 ]; + NewCRC[2 ] =D [29 ] ^D [28 ] ^D [25 ] ^D [24 ] ^D [22 ] ^D [17 ] ^D [15 ] ^ +D [13 ] ^D [12 ] ^D [10 ] ^D [8 ] ^D [6 ] ^D [2 ] ^D [1 ] ^D [0 ] ^ +C [0 ] ^C [1 ] ^C [4 ] ^C [5 ]; + NewCRC[3 ] =D [30 ] ^D [29 ] ^D [26 ] ^D [25 ] ^D [23 ] ^D [18 ] ^D [16 ] ^ +D [14 ] ^D [13 ] ^D [11 ] ^D [9 ] ^D [7 ] ^D [3 ] ^D [2 ] ^D [1 ] ^ +C [1 ] ^C [2 ] ^C [5 ] ^C [6 ]; + NewCRC[4 ] =D [31 ] ^D [30 ] ^D [27 ] ^D [26 ] ^D [24 ] ^D [19 ] ^D [17 ] ^ +D [15 ] ^D [14 ] ^D [12 ] ^D [10 ] ^D [8 ] ^D [4 ] ^D [3 ] ^D [2 ] ^ +C [0 ] ^C [2 ] ^C [3 ] ^C [6 ] ^C [7 ]; + NewCRC[5 ] =D [31 ] ^D [28 ] ^D [27 ] ^D [25 ] ^D [20 ] ^D [18 ] ^D [16 ] ^ +D [15 ] ^D [13 ] ^D [11 ] ^D [9 ] ^D [5 ] ^D [4 ] ^D [3 ] ^C [1 ] ^ +C [3 ] ^C [4 ] ^C [7 ]; + NewCRC[6 ] =D [29 ] ^D [28 ] ^D [26 ] ^D [21 ] ^D [19 ] ^D [17 ] ^D [16 ] ^ +D [14 ] ^D [12 ] ^D [10 ] ^D [6 ] ^D [5 ] ^D [4 ] ^C [2 ] ^C [4 ] ^C [5 ]; + NewCRC[7 ] =D [30 ] ^D [29 ] ^D [27 ] ^D [22 ] ^D [20 ] ^D [18 ] ^D [17 ] ^ +D [15 ] ^D [13 ] ^D [11 ] ^D [7 ] ^D [6 ] ^D [5 ] ^C [3 ] ^C [5 ] ^C [6 ]; + + crc_res =0 ; +for (i =0 ; i <8 ; i++) { + crc_res |= (NewCRC[i] << i); + } + + return crc_res; +} + +#endif /* ECORE_REG_H */ --2.18.0
Re: [dpdk-dev] [EXT] Re: [PATCH 1/5] net/bnx2x: update and reorganize HW registers
Hi Jerin,
>From: Jerin Jacob <[email protected]>
Quoted 29 lines
Sent: Thursday, September 12, 2019 5:18 AM
----------------------------------------------------------------------
Quoted 5 lines · Rasesh Mody
Update and reorganize HW registers in preparation to update the firmware to version 7.13.11.
MoveHW_INTERRUT_ASSERT_SET_0out fromecore_reg.htobnx2x.h.Quoted 8 lines
Signed-off-by Rasesh Mody <[email protected]>--- drivers/net/bnx2x/bnx2x.c | 3 +- drivers/net/bnx2x/bnx2x.h | 67 + drivers/net/bnx2x/ecore_reg.h | 6246 ++++++++++++++++++++++----------- 3 files changed, 4183 insertions(+), 2133 deletions(-)+/*********************************************************
*********************Quoted 3 lines
+ * Description:
+ * Calculates crc 8 on a word value: polynomial 0-1-2-8
+ * Code was translated from Verilog.Not relevant comment.
Quoted 3 lines
+ * Return:
+
Quoted 8 lines
+**********************************************************
***********Review
Quoted 2 lines
(quoted diff) +2
-0+********/ static inline uint8_t calc_crc8(uint32_t data, uint8_t crc) +{If is used in slow-path code then move to .c file.
If it is standard crc function then please think about reusing dpdk;s CRC lib.
Removed calc_crc8() from this patch in v2 series, we use ecore_calc_crc8(). It's non-standard crc function, unavailable in dpdk's CRC lib.
Thanks!
-Rasesh
Quoted 56 lines
Quoted 56 lines
drivers/net/bnx2x/ecore_reg.h +51
-1+uint8_t D [32 ]; +uint8_t NewCRC[8 ]; +uint8_t C [8 ]; +uint8_t crc_res; +uint8_t i; + +/* split the data into 31 bits */ +for (i =0 ; i <32 ; i++) { +D [i] = (uint8_t )(data &1 ); + data = data >>1 ; + } + +/* split the crc into 8 bits */ +for (i =0 ; i <8 ; i++) { +C [i] = crc &1 ; + crc = crc >>1 ; + } + + NewCRC[0 ] =D [31 ] ^D [30 ] ^D [28 ] ^D [23 ] ^D [21 ] ^D [19 ] ^D [18 ] ^ +D [16 ] ^D [14 ] ^D [12 ] ^D [8 ] ^D [7 ] ^D [6 ] ^D [0 ] ^C [4 ] ^ +C [6 ] ^C [7 ]; + NewCRC[1 ] =D [30 ] ^D [29 ] ^D [28 ] ^D [24 ] ^D [23 ] ^D [22 ] ^D [21 ] ^ +D [20 ] ^D [18 ] ^D [17 ] ^D [16 ] ^D [15 ] ^D [14 ] ^D [13 ] ^ +D [12 ] ^D [9 ] ^D [6 ] ^D [1 ] ^D [0 ] ^C [0 ] ^C [4 ] ^C [5 ] ^C [6 ]; + NewCRC[2 ] =D [29 ] ^D [28 ] ^D [25 ] ^D [24 ] ^D [22 ] ^D [17 ] ^D [15 ] ^ +D [13 ] ^D [12 ] ^D [10 ] ^D [8 ] ^D [6 ] ^D [2 ] ^D [1 ] ^D [0 ] ^ +C [0 ] ^C [1 ] ^C [4 ] ^C [5 ]; + NewCRC[3 ] =D [30 ] ^D [29 ] ^D [26 ] ^D [25 ] ^D [23 ] ^D [18 ] ^D [16 ] ^ +D [14 ] ^D [13 ] ^D [11 ] ^D [9 ] ^D [7 ] ^D [3 ] ^D [2 ] ^D [1 ] ^ +C [1 ] ^C [2 ] ^C [5 ] ^C [6 ]; + NewCRC[4 ] =D [31 ] ^D [30 ] ^D [27 ] ^D [26 ] ^D [24 ] ^D [19 ] ^D [17 ] ^ +D [15 ] ^D [14 ] ^D [12 ] ^D [10 ] ^D [8 ] ^D [4 ] ^D [3 ] ^D [2 ] ^ +C [0 ] ^C [2 ] ^C [3 ] ^C [6 ] ^C [7 ]; + NewCRC[5 ] =D [31 ] ^D [28 ] ^D [27 ] ^D [25 ] ^D [20 ] ^D [18 ] ^D [16 ] ^ +D [15 ] ^D [13 ] ^D [11 ] ^D [9 ] ^D [5 ] ^D [4 ] ^D [3 ] ^C [1 ] ^ +C [3 ] ^C [4 ] ^C [7 ]; + NewCRC[6 ] =D [29 ] ^D [28 ] ^D [26 ] ^D [21 ] ^D [19 ] ^D [17 ] ^D [16 ] ^ +D [14 ] ^D [12 ] ^D [10 ] ^D [6 ] ^D [5 ] ^D [4 ] ^C [2 ] ^C [4 ] ^C [5 ]; + NewCRC[7 ] =D [30 ] ^D [29 ] ^D [27 ] ^D [22 ] ^D [20 ] ^D [18 ] ^D [17 ] ^ +D [15 ] ^D [13 ] ^D [11 ] ^D [7 ] ^D [6 ] ^D [5 ] ^C [3 ] ^C [5 ] ^ +C [6 ]; + + crc_res =0 ; +for (i =0 ; i <8 ; i++) { + crc_res |= (NewCRC[i] << i); + } + + return crc_res; +} + +#endif /* ECORE_REG_H */ --2.18.0
Re: [dpdk-dev] [PATCH 1/5] net/bnx2x: update and reorganize HW registers
In reply to Rasesh ModyQuoted 11 lines · Rasesh Mody
Update and reorganize HW registers in preparation to update the firmware to version 7.13.11.
MoveHW_INTERRUT_ASSERT_SET_0out fromecore_reg.htobnx2x.h.Signed-off-by Rasesh Mody <[email protected]>--- drivers/net/bnx2x/bnx2x.c | 3 +- drivers/net/bnx2x/bnx2x.h | 67 + drivers/net/bnx2x/ecore_reg.h | 6246 ++++++++++++++++++++++----------- 3 files changed, 4183 insertions(+), 2133 deletions(-)
Series applied to dpdk-next-net-mrvl/master. Thanks.
Note:
There are checkpatch errors with base code. I guess, we can not do much about it.
PATCH 2/5 net/bnx2x: update HSI code
In reply to Rasesh ModyUpdate hardware software common base driver code in preparation to update the firmware to version 7.13.11.
--- drivers/net/bnx2x/bnx2x.c | 19 +- drivers/net/bnx2x/bnx2x.h | 23 +- drivers/net/bnx2x/bnx2x_osal.h | 27 + drivers/net/bnx2x/bnx2x_rxtx.c | 10 +- drivers/net/bnx2x/ecore_hsi.h | 3507 ++++++++++++++++++-------------- drivers/net/bnx2x/ecore_sp.c | 11 +- 6 files changed, 1989 insertions(+), 1608 deletions(-) create mode 100644 drivers/net/bnx2x/bnx2x_osal.h
drivers/net/bnx2x/bnx2x.c +10 -9
@@ -2182,8 +2182,10 @@ int bnx2x_tx_encap(struct bnx2x_tx_queue *txq, struct rte_mbuf *m0) tx_start_bd = &txq->tx_ring[TX_BD (bd_prod, txq)].start_bd; - tx_start_bd->addr = -rte_cpu_to_le_64 (rte_mbuf_data_iova (m0)); + tx_start_bd->addr_lo = +rte_cpu_to_le_32 (U64_LO (rte_mbuf_data_iova (m0))); + tx_start_bd->addr_hi = +rte_cpu_to_le_32 (U64_HI (rte_mbuf_data_iova (m0))); tx_start_bd->nbytes =rte_cpu_to_le_16 (m0->data_len); tx_start_bd->bd_flags.as_bitfield =ETH_TX_BD_FLAGS_START_BD ; tx_start_bd->general_data =
@@ -5015,13 +5017,13 @@ static void bnx2x_update_rx_prod(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp, uint16_t rx_bd_prod, uint16_t rx_cq_prod) { - union ustorm_eth_rx_producers rx_prods; + struct ustorm_eth_rx_producers rx_prods = { 0 };uint32_t i;/* update producers */ - rx_prods.prod.bd_prod = rx_bd_prod; - rx_prods.prod.cqe_prod = rx_cq_prod; - rx_prods.prod.reserved =0 ; + rx_prods.bd_prod = rx_bd_prod; + rx_prods.cqe_prod = rx_cq_prod; + rx_prods.reserved =0 ;/* * Make sure that the BD and SGE data is updated before updating the
@@ -5034,9 +5036,8 @@ bnx2x_update_rx_prod(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp,wmb ();for (i =0 ; i < (sizeof (rx_prods) /4 ); i++) { -REG_WR (sc, - (fp->ustorm_rx_prods_offset + (i *4 )), - rx_prods.raw_data[i]); +REG_WR (sc, (fp->ustorm_rx_prods_offset + (i *4 )), + ((uint32_t *)&rx_prods)[i]); }wmb ();/* keep prod updates ordered */
drivers/net/bnx2x/bnx2x.h +7 -16
@@ -19,18 +19,7 @@#include <rte_bus_pci.h> #include <rte_io.h> -#if RTE_BYTE_ORDER ==RTE_LITTLE_ENDIAN -#ifndef __LITTLE_ENDIAN -#define __LITTLE_ENDIAN RTE_LITTLE_ENDIAN -#endif -#undef __BIG_ENDIAN -#elif RTE_BYTE_ORDER ==RTE_BIG_ENDIAN -#ifndef __BIG_ENDIAN -#define __BIG_ENDIAN RTE_BIG_ENDIAN -#endif -#undef __LITTLE_ENDIAN -#endif - +#include "bnx2x_osal.h" #include "bnx2x_ethdev.h" #include "ecore_mfw_req.h" #include "ecore_fw_defs.h"
@@ -1911,16 +1900,18 @@ bnx2x_hc_ack_sb(struct bnx2x_softc *sc, uint8_t sb_id, uint8_t storm, {uint32_t hc_addr = (HC_REG_COMMAND_REG +SC_PORT (sc) *32 +COMMAND_REG_INT_ACK ); -union igu_ack_register igu_ack; +struct igu_ack_register igu_ack; +uint32_t *val =NULL ; - igu_ack.sb.status_block_index = index; - igu_ack.sb.sb_id_and_flags = + igu_ack.status_block_index = index; + igu_ack.sb_id_and_flags = ((sb_id <<IGU_ACK_REGISTER_STATUS_BLOCK_ID_SHIFT ) | (storm <<IGU_ACK_REGISTER_STORM_ID_SHIFT ) | (update <<IGU_ACK_REGISTER_UPDATE_INDEX_SHIFT ) | (op <<IGU_ACK_REGISTER_INTERRUPT_MODE_SHIFT )); -REG_WR (sc, hc_addr, igu_ack.raw_data); + val = (uint32_t *)&igu_ack; +REG_WR (sc, hc_addr, *val);/* Make sure that ACK is written */ mb ();
drivers/net/bnx2x/bnx2x_osal.h new file +27 -0
@@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright (c) 2019 Cavium Inc. +* +* All rights reserved. +* www.cavium.com +*/ + +#ifndef BNX2X_OSAL_H +#define BNX2X_OSAL_H + +#if RTE_BYTE_ORDER ==RTE_LITTLE_ENDIAN +#ifndef __LITTLE_ENDIAN +#define __LITTLE_ENDIAN RTE_LITTLE_ENDIAN +#endif +#undef __BIG_ENDIAN +#elif RTE_BYTE_ORDER ==RTE_BIG_ENDIAN +#ifndef __BIG_ENDIAN +#define __BIG_ENDIAN RTE_BIG_ENDIAN +#endif +#undef __LITTLE_ENDIAN +#endif + +#define __le16 uint16_t +#define __le32 uint32_t +#define __le64 uint64_t + +#endif /* BNX2X_OSAL_H */
drivers/net/bnx2x/bnx2x_rxtx.c +6 -4
@@ -321,12 +321,14 @@ static inline void bnx2x_upd_rx_prod_fast(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp, uint16_t rx_bd_prod, uint16_t rx_cq_prod) { - union ustorm_eth_rx_producers rx_prods; + struct ustorm_eth_rx_producers rx_prods = { 0 }; +uint32_t *val =NULL ; - rx_prods.prod.bd_prod = rx_bd_prod; - rx_prods.prod.cqe_prod = rx_cq_prod; + rx_prods.bd_prod = rx_bd_prod; + rx_prods.cqe_prod = rx_cq_prod; -REG_WR (sc, fp->ustorm_rx_prods_offset, rx_prods.raw_data[0 ]); + val = (uint32_t *)&rx_prods; +REG_WR (sc, fp->ustorm_rx_prods_offset, val[0 ]); } static uint16_t
drivers/net/bnx2x/ecore_hsi.h +1938 -1569
2,874 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.18.0
Part of the diff is not shown here. View the raw message.
PATCH 3/5 net/bnx2x: update to latest FW 7.13.11
In reply to Rasesh ModyUse latest firmware 7.13.11.
Some of the fixes included with this FW are as following:
- Packets from a VF with pvid configured which were sent with a different vlan were transmitted instead of being discarded.
- In some multi-function configurations, inter-PF and inter-VF Tx switching is incorrectly enabled.
- Wrong assert code in FLR final cleanup in case it is sent not after FLR.
- Chip may stall in very rare cases under heavy traffic with FW GRO enabled.
- VF malicious notification error fixes.
- Default gre tunnel to IPGRE which allows proper RSS for IPGRE packets, L2GRE traffic will reach single queue.
- Removes unnecessary internal mem config, latest FW performs this autonomously.
--- drivers/net/bnx2x/bnx2x.c | 36 +--- drivers/net/bnx2x/bnx2x.h | 5 +- drivers/net/bnx2x/ecore_fw_defs.h | 252 ++++++++++++----------- drivers/net/bnx2x/ecore_hsi.h | 2 +- drivers/net/bnx2x/ecore_init.h | 212 +++++++++---------- drivers/net/bnx2x/ecore_init_ops.h | 224 ++++++++++---------- drivers/net/bnx2x/ecore_mfw_req.h | 10 +- drivers/net/bnx2x/ecore_sp.c | 39 ++-- drivers/net/bnx2x/ecore_sp.h | 319 ++++++++++++++++++++++++----- 9 files changed, 680 insertions(+), 419 deletions(-)
drivers/net/bnx2x/bnx2x.c +8 -28
@@ -5230,20 +5230,6 @@ static void bnx2x_init_internal_common(struct bnx2x_softc *sc) {int i; -if (IS_MF_SI (sc)) { -/* -* In switch independent mode, the TSTORM needs to accept -* packets that failed classification, since approximate match -* mac addresses aren't written to NIG LLH. -*/ -REG_WR8 (sc, - (BAR_TSTRORM_INTMEM + -TSTORM_ACCEPT_CLASSIFY_FAILED_OFFSET ),2 ); - }else -REG_WR8 (sc, - (BAR_TSTRORM_INTMEM + -TSTORM_ACCEPT_CLASSIFY_FAILED_OFFSET ),0 ); -/* * Zero this manually as its initialization is currently missing * in the initTool.
@@ -5797,15 +5783,12 @@ static void bnx2x_init_objs(struct bnx2x_softc *sc) VNICS_PER_PATH(sc));/* RSS configuration object */ -ecore_init_rss_config_obj (&sc->rss_conf_obj, - sc->fp[0 ].cl_id, - sc->fp[0 ].index, -SC_FUNC (sc), -SC_FUNC (sc), +ecore_init_rss_config_obj (sc, &sc->rss_conf_obj, sc->fp->cl_id, + sc->fp->index,SC_FUNC (sc),SC_FUNC (sc),BNX2X_SP (sc, rss_rdata), (rte_iova_t )BNX2X_SP_MAPPING (sc, rss_rdata), -ECORE_FILTER_RSS_CONF_PENDING , - &sc->sp_state,ECORE_OBJ_TYPE_RX ); +ECORE_FILTER_RSS_CONF_PENDING , &sc->sp_state, +ECORE_OBJ_TYPE_RX ); }/*
@@ -5834,9 +5817,6 @@ static int bnx2x_func_start(struct bnx2x_softc *sc) start_params->network_cos_mode =FW_WRR ; } - start_params->gre_tunnel_mode =0 ; - start_params->gre_tunnel_rss =0 ; -return ecore_func_state_change (sc, &func_params); }
@@ -9650,8 +9630,8 @@ static void bnx2x_init_rte(struct bnx2x_softc *sc) }#define FW_HEADER_LEN 104 -#define FW_NAME_57711 "/lib/firmware/bnx2x/bnx2x-e1h-7.2.51.0.fw" -#define FW_NAME_57810 "/lib/firmware/bnx2x/bnx2x-e2-7.2.51.0.fw" +#define FW_NAME_57711 "/lib/firmware/bnx2x/bnx2x-e1h-7.13.11.0.fw" +#define FW_NAME_57810 "/lib/firmware/bnx2x/bnx2x-e2-7.13.11.0.fw"void bnx2x_load_firmware (struct bnx2x_softc *sc) {
@@ -10367,7 +10347,7 @@ static int bnx2x_init_hw_common(struct bnx2x_softc *sc)/* clean the DMAE memory */ sc->dmae_ready =1 ; -ecore_init_fill (sc,TSEM_REG_PRAM ,0 ,8 ); +ecore_init_fill (sc,TSEM_REG_PRAM ,0 ,8 ,1 );ecore_init_block (sc,BLOCK_TCM ,PHASE_COMMON );
@@ -11579,7 +11559,7 @@ static void bnx2x_reset_func(struct bnx2x_softc *sc) ilt_cli.end =ILT_NUM_PAGE_ENTRIES -1 ; ilt_cli.client_num =ILT_CLIENT_TM ; -ecore_ilt_boundry_init_op (sc, &ilt_cli,0 ); +ecore_ilt_boundry_init_op (sc, &ilt_cli,0 ,INITOP_CLEAR ); }/* this assumes that reset_port() called before reset_func() */
drivers/net/bnx2x/bnx2x.h +2 -3
@@ -83,9 +83,6 @@#ifndef ARRAY_SIZE #define ARRAY_SIZE (arr) (sizeof(arr) / sizeof((arr)[0]))#endif -#ifndef ARRSIZE -#define ARRSIZE (arr) (sizeof(arr) / sizeof((arr)[0])) -#endif #ifndef DIV_ROUND_UP #define DIV_ROUND_UP (n, d) (((n) + (d) - 1) / (d))#endif
@@ -1020,6 +1017,8 @@ struct bnx2x_pci_cap {uint16_t addr; }; +struct ecore_ilt ; +struct bnx2x_vfdb ;/* Top level device private data structure. */
drivers/net/bnx2x/ecore_fw_defs.h +135 -117
422 lines not on this page · raw message
drivers/net/bnx2x/ecore_hsi.h +1 -1
@@ -5505,7 +5505,7 @@ struct afex_vif_list_ramrod_data {* */ struct c2s_pri_trans_table_entry { -uint8_t val[8 ]; +uint8_t val[MAX_VLAN_PRIORITIES ]; };
drivers/net/bnx2x/ecore_init.h +107 -105
388 lines not on this page · raw message
drivers/net/bnx2x/ecore_init_ops.h +121 -103
372 lines not on this page · raw message
drivers/net/bnx2x/ecore_mfw_req.h +8 -2
@@ -14,7 +14,6 @@#define ECORE_MFW_REQ_H -#define PORT_0 0#define PORT_1 1#define PORT_MAX 2
@@ -143,6 +142,14 @@ struct iscsi_stats_info {uint8_t mac_add1[8 ];/* Additional Programmed MAC Addr 1. */ /* QoS Priority (per 802.1p). 0-7255 */ uint32_t qos_priority; +#define ISCSI_QOS_PRIORITY_OFFSET 0 +#define ISCSI_QOS_PRIORITY_MASK (0xffff) + +#define ISCSI_IP_ADDRESS_TYPE_OFFSET 30 +#define ISCSI_IP_ADDRESS_TYPE_MASK (3 << 30) +#define ISCSI_IP_ADDRESS_TYPE_NOT_SET (0 << 30)/* Driver does not have the IP address and type populated */ +#define ISCSI_IP_ADDRESS_TYPE_IPV4 (1 << 30)/* IPV4 IP address set */ +#define ISCSI_IP_ADDRESS_TYPE_IPV6 (2 << 30)/* IPV6 IP address set */ uint8_t initiator_name[64 ];/* iSCSI Boot Initiator Node name. */
@@ -181,5 +188,4 @@ union drv_info_to_mcp { struct iscsi_stats_info iscsi_stat; }; -#endif /* ECORE_MFW_REQ_H */
drivers/net/bnx2x/ecore_sp.c +26 -13
@@ -501,7 +501,7 @@ static int __ecore_vlan_mac_h_read_lock(struct bnx2x_softc *sc __rte_unused,* * @details May sleep. Claims and releases execution queue lock during its run. */ -static int ecore_vlan_mac_h_read_lock (struct bnx2x_softc *sc, +int ecore_vlan_mac_h_read_lock (struct bnx2x_softc *sc,struct ecore_vlan_mac_obj *o) {int rc;
@@ -712,7 +712,7 @@ static uint8_t ecore_vlan_mac_get_rx_tx_flag(struct ecore_vlan_mac_objreturn rx_tx_flag; } -static void ecore_set_mac_in_nig (struct bnx2x_softc *sc, +void ecore_set_mac_in_nig (struct bnx2x_softc *sc,int add,unsigned char *dev_addr,int index) {uint32_t wb_data[2 ];
@@ -2764,12 +2764,16 @@ static int ecore_mcast_validate_e2(__rte_unused struct bnx2x_softc *sc, static void ecore_mcast_revert_e2(__rte_unused struct bnx2x_softc *sc,struct ecore_mcast_ramrod_params *p, -int old_num_bins) +int old_num_bins, +enum ecore_mcast_cmd cmd) {struct ecore_mcast_obj *o = p->mcast_obj; o->set_registry_size (o, old_num_bins); o->total_pending_num -= p->mcast_list_len; + +if (cmd ==ECORE_MCAST_CMD_SET ) + o->total_pending_num -= o->max_cmd_len; }/**
@@ -2915,7 +2919,8 @@ static int ecore_mcast_validate_e1h(__rte_unused struct bnx2x_softc *sc, static void ecore_mcast_revert_e1h(__rte_unused struct bnx2x_softc *sc, __rte_unused struct ecore_mcast_ramrod_params - *p, __rte_unused int old_num_bins) + *p, __rte_unused int old_num_bins, + __rte_unused enum ecore_mcast_cmd cmd) {/* Do nothing */ }
@@ -3093,7 +3098,7 @@ int ecore_config_mcast(struct bnx2x_softc *sc, r->clear_pending (r); error_exit1: - o->revert (sc, p, old_reg_size); + o->revert (sc, p, old_reg_size, cmd);return rc; }
@@ -3350,7 +3355,7 @@ static int ecore_credit_pool_get_entry_always_TRUE(__rte_unused struct* If credit is negative pool operations will always succeed (unlimited pool). * */ -static void ecore_init_credit_pool (struct ecore_credit_pool_obj *p, +void ecore_init_credit_pool (struct ecore_credit_pool_obj *p,int base,int credit) {/* Zero the object first */
@@ -3588,11 +3593,13 @@ int ecore_config_rss(struct bnx2x_softc *sc, struct ecore_config_rss_params *p)return rc; } -void ecore_init_rss_config_obj (struct ecore_rss_config_obj *rss_obj, +void ecore_init_rss_config_obj(struct bnx2x_softc *sc __rte_unused, +struct ecore_rss_config_obj *rss_obj,uint8_t cl_id,uint32_t cid,uint8_t func_id, -uint8_t engine_id,void *rdata, -ecore_dma_addr_t rdata_mapping,int state, -unsigned long *pstate,ecore_obj_type type) +uint8_t engine_id, +void *rdata,ecore_dma_addr_t rdata_mapping, +int state,unsigned long *pstate, +ecore_obj_type type) {ecore_init_raw_obj (&rss_obj->raw, cl_id, cid, func_id, rdata, rdata_mapping, state, pstate, type);
@@ -5107,8 +5114,14 @@ static int ecore_func_send_switch_update(struct bnx2x_softc *sc, struct ecore_fuECORE_MEMSET (rdata,0 ,sizeof (*rdata));/* Fill the ramrod data with provided parameters */ - rdata->tx_switch_suspend_change_flg =1 ; - rdata->tx_switch_suspend = switch_update_params->suspend; +if (ECORE_TEST_BIT (ECORE_F_UPDATE_TX_SWITCH_SUSPEND_CHNG , + &switch_update_params->changes)) { + rdata->tx_switch_suspend_change_flg =1 ; + rdata->tx_switch_suspend = +ECORE_TEST_BIT (ECORE_F_UPDATE_TX_SWITCH_SUSPEND , + &switch_update_params->changes); + } + rdata->echo =SWITCH_UPDATE ; return ecore_sp_post(sc, RAMROD_CMD_ID_COMMON_FUNCTION_UPDATE, 0,
@@ -5220,7 +5233,7 @@ static int ecore_func_send_tx_start(struct bnx2x_softc *sc, struct ecore_func_st rdata->dcb_enabled = tx_start_params->dcb_enabled; rdata->dcb_version = tx_start_params->dcb_version; - rdata->dont_add_pri_0_en = tx_start_params->dont_add_pri_0; + rdata->dont_add_pri_0_en = tx_start_params->dont_add_pri_0_en;for (i =0 ; i <ARRAY_SIZE (rdata->traffic_type_to_priority_cos); i++) rdata->traffic_type_to_priority_cos[i] =
drivers/net/bnx2x/ecore_sp.h +272 -47
644 lines not on this page · raw message
Signature · 1 line
2.18.0
Re: [dpdk-dev] [PATCH 3/5] net/bnx2x: update to latest FW 7.13.11
Quoted 19 lines · Rasesh Mody
Use latest firmware 7.13.11.
Some of the fixes included with this FW are as following:
- Packets from a VF with pvid configured which were sent with a different vlan were transmitted instead of being discarded.
- In some multi-function configurations, inter-PF and inter-VF Tx switching is incorrectly enabled.
- Wrong assert code in FLR final cleanup in case it is sent not after FLR.
- Chip may stall in very rare cases under heavy traffic with FW GRO enabled.
- VF malicious notification error fixes.
- Default gre tunnel to IPGRE which allows proper RSS for IPGRE packets, L2GRE traffic will reach single queue.
- Removes unnecessary internal mem config, latest FW performs this autonomously.Signed-off-by Rasesh Mody <[email protected]>
Quoted 11 lines
--- drivers/net/bnx2x/bnx2x.c | 36 +--- drivers/net/bnx2x/bnx2x.h | 5 +- drivers/net/bnx2x/ecore_fw_defs.h | 252 ++++++++++++----------- drivers/net/bnx2x/ecore_hsi.h | 2 +- drivers/net/bnx2x/ecore_init.h | 212 +++++++++---------- drivers/net/bnx2x/ecore_init_ops.h | 224 ++++++++++---------- drivers/net/bnx2x/ecore_mfw_req.h | 10 +- drivers/net/bnx2x/ecore_sp.c | 39 ++-- drivers/net/bnx2x/ecore_sp.h | 319 ++++++++++++++++++++++++----- 9 files changed, 680 insertions(+), 419 deletions(-)
Please update the release note as well.
drivers/net/bnx2x/ecore_sp.h typedef rte_spinlock_t ECORE_MUTEX_SPIN; · line 138
Quoted 9 lines
drivers/net/bnx2x/ecore_sp.h
Quoted 1 line
drivers/net/bnx2x/ecore_sp.h +0
-0index
fce715b6d..11b9f77fb100644drivers/net/bnx2x/ecore_sp.h +1
-0@@ -135,6 +135,7 @@ typedef rte_spinlock_t ECORE_MUTEX_SPIN;#define SC_ILT (sc) ((sc)->ilt)#define ILOG2 (x) bnx2x_ilog2(x) +#if 0
Found dead code.
Don't just copy-paste code from some SDK code. Please clean the code properly and submit the next version.
Quoted 8 lines
drivers/net/bnx2x/ecore_sp.h +1
-0#define ECORE_ILT_ZALLOC (x, y, size, str) \ do { \ x = rte_malloc("", sizeof(struct bnx2x_dma), RTE_CACHE_LINE_SIZE); \@@ -150,6 +151,23 @@ typedef rte_spinlock_t ECORE_MUTEX_SPIN; } \ } \ }while (0 ) +#else
PATCH 4/5 doc: cleanup SPDX license id usage in bnx2x guide
In reply to Rasesh ModyRemoved redundant BSD boilerplate text from bnx2ix guide.
--- doc/guides/nics/bnx2x.rst | 26 -------------------------- 1 file changed, 26 deletions(-)
doc/guides/nics/bnx2x.rst +0 -26
@@ -1,32 +1,6 @@ .. SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2015 QLogic Corporation - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - * Neither the name of QLogic Corporation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - BNX2X Poll Mode Driver ======================
Signature · 1 line
2.18.0
PATCH 5/5 net/bnx2x: change PMD version to 1.1.0.1
In reply to Rasesh Mody--- drivers/net/bnx2x/bnx2x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/bnx2x/bnx2x.c +2 -2
@@ -29,8 +29,8 @@#define BNX2X_PMD_VER_PREFIX "BNX2X PMD"#define BNX2X_PMD_VERSION_MAJOR 1 -#define BNX2X_PMD_VERSION_MINOR 0 -#define BNX2X_PMD_VERSION_REVISION 7 +#define BNX2X_PMD_VERSION_MINOR 1 +#define BNX2X_PMD_VERSION_REVISION 0#define BNX2X_PMD_VERSION_PATCH 1 static inline const char *
Signature · 1 line
2.18.0
Quoted 11 lines · Rasesh Mody
Hi,
Currently, BNX2X PMD uses a very old firmware 7.2.51. This patch series updated the base driver to use to latest firmware 7.13.11. The latest firmware comprises of enhancements and fixes.
Thanks!
-Rasesh
Quoted 6 lines
Rasesh Mody (5):
net/bnx2x: update and reorganize HW registers net/bnx2x: update HSI code
net/bnx2x: update to latest FW 7.13.11
doc: cleanup SPDX license id usage in bnx2x guide net/bnx2x: change PMD version to 1.1.0.1
I think, The last patch can be squashed to "net/bnx2x: update to latest FW 7.13.11" patch.
There are tons of checkpatch errors with this patch series. Please fix as much as possible and send v2.
http://mails.dpdk.org/archives/test-report/2019-September/096011.html
http://mails.dpdk.org/archives/test-report/2019-September/096013.html
http://mails.dpdk.org/archives/test-report/2019-September/096012.html
Hi Jerin,
Quoted 25 lines
From: Jerin Jacob <[email protected]>
Sent: Thursday, September 12, 2019 5:12 AM----------------------------------------------------------------------
Quoted 10 lines · Rasesh Mody
Hi,
Currently, BNX2X PMD uses a very old firmware 7.2.51. This patch series updated the base driver to use to latest firmware 7.13.11. The latest firmware comprises of enhancements and fixes.
Thanks!
-RaseshQuoted 6 lines
Rasesh Mody (5):
net/bnx2x: update and reorganize HW registers net/bnx2x: update HSI code
net/bnx2x: update to latest FW 7.13.11
doc: cleanup SPDX license id usage in bnx2x guide net/bnx2x: change PMD version to 1.1.0.1I think, The last patch can be squashed to "net/bnx2x: update to latest FW 7.13.11" patch.
Quoted 6 lines
There are tons of checkpatch errors with this patch series. Please fix as much as possible and send v2.
http://mails.dpdk.org/archives/test-report/2019-September/096011.html
http://mails.dpdk.org/archives/test-report/2019-September/096013.html
http://mails.dpdk.org/archives/test-report/2019-September/096012.html
I will send a v2 addressing the review comments.
Thanks!
-Rasesh
v2 cover net/bnx2x: update to latest FW
In reply to Rasesh ModyHi,
Currently, BNX2X PMD uses a very old firmware 7.2.51. This patch series updated the base driver to use to latest firmware 7.13.11. The latest firmware comprises of enhancements and fixes.
v2:
- Squashed pmd version patch into "net/bnx2x: update to latest FW 7.13.11"
- Addressed most of checkpatch issues
Thanks!
-Rasesh
Rasesh Mody (4):
net/bnx2x: update and reorganize HW registers net/bnx2x: update HSI code
net/bnx2x: update to latest FW 7.13.11
doc: cleanup SPDX license id usage in bnx2x guide
doc/guides/nics/bnx2x.rst | 30 +- drivers/net/bnx2x/bnx2x.c | 62 +- drivers/net/bnx2x/bnx2x.h | 95 +- drivers/net/bnx2x/bnx2x_osal.h | 27 + drivers/net/bnx2x/bnx2x_rxtx.c | 10 +- drivers/net/bnx2x/ecore_fw_defs.h | 252 +- drivers/net/bnx2x/ecore_hsi.h | 3508 ++++++++------- drivers/net/bnx2x/ecore_init.h | 214 +- drivers/net/bnx2x/ecore_init_ops.h | 192 +- drivers/net/bnx2x/ecore_mfw_req.h | 11 +- drivers/net/bnx2x/ecore_reg.h | 6617 +++++++++++++++++++--------- drivers/net/bnx2x/ecore_sp.c | 48 +- drivers/net/bnx2x/ecore_sp.h | 308 +- 13 files changed, 7182 insertions(+), 4192 deletions(-) create mode 100644 drivers/net/bnx2x/bnx2x_osal.h
Signature · 1 line
2.18.0
Quoted 11 lines · Rasesh Mody
Hi,
Currently, BNX2X PMD uses a very old firmware 7.2.51. This patch series updated the base driver to use to latest firmware 7.13.11. The latest firmware comprises of enhancements and fixes.
v2:
- Squashed pmd version patch into "net/bnx2x: update to latest FW 7.13.11"
- Addressed most of checkpatch issues
Quoted 9 lines
Thanks!
-RaseshRasesh Mody (4):
net/bnx2x: update and reorganize HW registers net/bnx2x: update HSI code
net/bnx2x: update to latest FW 7.13.11
doc: cleanup SPDX license id usage in bnx2x guide
I am getting build errors with this patchset [1], since it is merged into next-net-mrvl, I only pulled the doc patch, 4/4, but not others, can you please check the patchset?
[1]
In file included from .../dpdk/drivers/net/bnx2x/bnx2x.h:22,
from .../dpdk/drivers/net/bnx2x/bnx2x_rxtx.c:8:
.../dpdk/drivers/net/bnx2x/bnx2x_osal.h:25:17: error: conflicting types for
‘uint64_t’
25 | #define __le64 uint64_t
| ^~~~~~~~
In file included from /usr/include/stdint.h:37,
from /usr/lib/gcc/x86_64-redhat-linux/9/include/stdint.h:9,
from
.../dpdk/x86_64-native-linuxapp-gcc/include/rte_byteorder.h:12,
from .../dpdk/drivers/net/bnx2x/bnx2x.h:17,
from .../dpdk/drivers/net/bnx2x/bnx2x_rxtx.c:8:
/usr/include/bits/stdint-uintn.h:27:20: note: previous declaration of ‘uint64_t’
was here
27 | typedef __uint64_t uint64_t;
| ^~~~~~~~
In file included from .../dpdk/drivers/net/bnx2x/bnx2x_ethdev.h:33,
from .../dpdk/drivers/net/bnx2x/bnx2x.h:23,
from .../dpdk/drivers/net/bnx2x/bnx2x_rxtx.c:8:.../dpdk/x86_64-native-linuxapp-gcc/include/rte_ethdev_driver.h: In function ‘rte_eth_linkstatus_set’:.../dpdk/x86_64-native-linuxapp-gcc/include/rte_ethdev_driver.h:176:37: error:
passing argument 1 of ‘rte_atomic64_exchange’ from incompatible pointer type [-Werror=incompatible-pointer-types]
176 | orig.val64 = rte_atomic64_exchange(dev_link,
| ^~~~~~~~
| |
| volatile uint64_t * {aka volatilelong long unsigned int *}
In file included from .../dpdk/x86_64-native-linuxapp-gcc/include/rte_atomic.h:263,
from.../dpdk/x86_64-native-linuxapp-gcc/include/generic/rte_cycles.h:18,
from .../dpdk/x86_64-native-linuxapp-gcc/include/rte_cycles.h:13,
from .../dpdk/x86_64-native-linuxapp-gcc/include/rte_spinlock.h:18,
from .../dpdk/drivers/net/bnx2x/bnx2x.h:18,
from .../dpdk/drivers/net/bnx2x/bnx2x_rxtx.c:8:.../dpdk/x86_64-native-linuxapp-gcc/include/rte_atomic_64.h:48:42: note:
expected ‘volatile uint64_t *’ {aka ‘volatile long unsigned int *’} but argument is of type ‘volatile uint64_t *’ {aka ‘volatile long long unsigned int *’}
48 | rte_atomic64_exchange(volatile uint64_t *dst, uint64_t val)
| ~~~~~~~~~~~~~~~~~~~^~~
cc1: all warnings being treated as errors
In file included from .../dpdk/drivers/net/bnx2x/bnx2x.h:22,
from .../dpdk/drivers/net/bnx2x/bnx2x_vfpf.c:8:
.../dpdk/drivers/net/bnx2x/bnx2x_osal.h:25:17: error: conflicting types for
‘uint64_t’
25 | #define __le64 uint64_t
| ^~~~~~~~
In file included from /usr/include/stdint.h:37,
from /usr/lib/gcc/x86_64-redhat-linux/9/include/stdint.h:9,
from
.../dpdk/x86_64-native-linuxapp-gcc/include/rte_byteorder.h:12,
from .../dpdk/drivers/net/bnx2x/bnx2x.h:17,
from .../dpdk/drivers/net/bnx2x/bnx2x_vfpf.c:8:
/usr/include/bits/stdint-uintn.h:27:20: note: previous declaration of ‘uint64_t’
was here
27 | typedef __uint64_t uint64_t;
| ^~~~~~~~
In file included from .../dpdk/drivers/net/bnx2x/bnx2x_ethdev.h:33,
from .../dpdk/drivers/net/bnx2x/bnx2x.h:23,
from .../dpdk/drivers/net/bnx2x/bnx2x_vfpf.c:8:.../dpdk/x86_64-native-linuxapp-gcc/include/rte_ethdev_driver.h: In function ‘rte_eth_linkstatus_set’:.../dpdk/x86_64-native-linuxapp-gcc/include/rte_ethdev_driver.h:176:37: error:
passing argument 1 of ‘rte_atomic64_exchange’ from incompatible pointer type [-Werror=incompatible-pointer-types]
176 | orig.val64 = rte_atomic64_exchange(dev_link,
| ^~~~~~~~
| |
| volatile uint64_t * {aka volatilelong long unsigned int *}
In file included from .../dpdk/x86_64-native-linuxapp-gcc/include/rte_atomic.h:263,
from.../dpdk/x86_64-native-linuxapp-gcc/include/generic/rte_cycles.h:18,
from .../dpdk/x86_64-native-linuxapp-gcc/include/rte_cycles.h:13,
from .../dpdk/x86_64-native-linuxapp-gcc/include/rte_spinlock.h:18,
from .../dpdk/drivers/net/bnx2x/bnx2x.h:18,
from .../dpdk/drivers/net/bnx2x/bnx2x_vfpf.c:8:.../dpdk/x86_64-native-linuxapp-gcc/include/rte_atomic_64.h:48:42: note:
expected ‘volatile uint64_t *’ {aka ‘volatile long unsigned int *’} but argument is of type ‘volatile uint64_t *’ {aka ‘volatile long long unsigned int *’}
48 | rte_atomic64_exchange(volatile uint64_t *dst, uint64_t val)
| ~~~~~~~~~~~~~~~~~~~^~~
cc1: all warnings being treated as errors
make[7]: *** [.../dpdk/mk/internal/rte.compile-pre.mk:116: ecore_sp.o] Error 1 In file included from .../dpdk/drivers/net/bnx2x/bnx2x.h:22,
from .../dpdk/drivers/net/bnx2x/bnx2x_ethdev.c:8:
.../dpdk/drivers/net/bnx2x/bnx2x_osal.h:25:17: error: conflicting types for
‘uint64_t’
25 | #define __le64 uint64_t
| ^~~~~~~~
In file included from /usr/include/stdint.h:37,
from /usr/lib/gcc/x86_64-redhat-linux/9/include/stdint.h:9,
from
.../dpdk/x86_64-native-linuxapp-gcc/include/rte_byteorder.h:12,
from .../dpdk/drivers/net/bnx2x/bnx2x.h:17,
from .../dpdk/drivers/net/bnx2x/bnx2x_ethdev.c:8:
/usr/include/bits/stdint-uintn.h:27:20: note: previous declaration of ‘uint64_t’
was here
27 | typedef __uint64_t uint64_t;
| ^~~~~~~~
In file included from .../dpdk/drivers/net/bnx2x/bnx2x_ethdev.h:33,
from .../dpdk/drivers/net/bnx2x/bnx2x.h:23,
from .../dpdk/drivers/net/bnx2x/bnx2x_ethdev.c:8:.../dpdk/x86_64-native-linuxapp-gcc/include/rte_ethdev_driver.h: In function ‘rte_eth_linkstatus_set’:.../dpdk/x86_64-native-linuxapp-gcc/include/rte_ethdev_driver.h:176:37: error:
passing argument 1 of ‘rte_atomic64_exchange’ from incompatible pointer type [-Werror=incompatible-pointer-types]
176 | orig.val64 = rte_atomic64_exchange(dev_link,
| ^~~~~~~~
| |
| volatile uint64_t * {aka volatilelong long unsigned int *}
In file included from .../dpdk/x86_64-native-linuxapp-gcc/include/rte_atomic.h:263,
from.../dpdk/x86_64-native-linuxapp-gcc/include/generic/rte_cycles.h:18,
from .../dpdk/x86_64-native-linuxapp-gcc/include/rte_cycles.h:13,
from .../dpdk/x86_64-native-linuxapp-gcc/include/rte_spinlock.h:18,
from .../dpdk/drivers/net/bnx2x/bnx2x.h:18,
from .../dpdk/drivers/net/bnx2x/bnx2x_ethdev.c:8:.../dpdk/x86_64-native-linuxapp-gcc/include/rte_atomic_64.h:48:42: note:
expected ‘volatile uint64_t *’ {aka ‘volatile long unsigned int *’} but argument is of type ‘volatile uint64_t *’ {aka ‘volatile long long unsigned int *’}
48 | rte_atomic64_exchange(volatile uint64_t *dst, uint64_t val)
| ~~~~~~~~~~~~~~~~~~~^~~
cc1: all warnings being treated as errors
In file included from .../dpdk/drivers/net/bnx2x/bnx2x_ethdev.h:40,
from .../dpdk/drivers/net/bnx2x/bnx2x.h:23,
from .../dpdk/drivers/net/bnx2x/bnx2x.c:16:.../dpdk/drivers/net/bnx2x/bnx2x.c: In function ‘bnx2x_dma_alloc’:.../dpdk/drivers/net/bnx2x/bnx2x_logs.h:21:3: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 9 has type ‘rte_iova_t’ {aka ‘long long unsigned int’} [-Werror=format=]
21 | "[%s:%d(%s)] " fmt, __func__, __LINE__, \
| ^~~~~~~~~~~~~~
.../dpdk/drivers/net/bnx2x/bnx2x_logs.h:25:2: note: in expansion of macro
‘PMD_DRV_LOG_RAW’
25 | PMD_DRV_LOG_RAW(level, sc, fmt "\n", ## args)
| ^~~~~~~~~~~~~~~
.../dpdk/drivers/net/bnx2x/bnx2x.c:190:2: note: in expansion of macro ‘PMD_DRV_LOG’
190 | PMD_DRV_LOG(DEBUG, sc,
| ^~~~~~~~~~~
In file included from .../dpdk/x86_64-native-linuxapp-gcc/include/rte_bus_pci.h:25,
from .../dpdk/drivers/net/bnx2x/bnx2x.h:19,
from .../dpdk/drivers/net/bnx2x/bnx2x.c:16:
/usr/include/inttypes.h:121:34: note: format string is defined here
121 | # define PRIx64 __PRI64_PREFIX "x"
In file included from .../dpdk/drivers/net/bnx2x/bnx2x_ethdev.h:40,
from .../dpdk/drivers/net/bnx2x/bnx2x.h:23,
from .../dpdk/drivers/net/bnx2x/bnx2x.c:16:.../dpdk/drivers/net/bnx2x/bnx2x.c: In function ‘bnx2x_load_firmware’:.../dpdk/drivers/net/bnx2x/bnx2x_logs.h:21:3: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 7 has type ‘uint64_t’ {aka ‘long long unsigned int’} [-Werror=format=]
21 | "[%s:%d(%s)] " fmt, __func__, __LINE__, \
| ^~~~~~~~~~~~~~
.../dpdk/drivers/net/bnx2x/bnx2x_logs.h:25:2: note: in expansion of macro
‘PMD_DRV_LOG_RAW’
25 | PMD_DRV_LOG_RAW(level, sc, fmt "\n", ## args)
| ^~~~~~~~~~~~~~~
.../dpdk/drivers/net/bnx2x/bnx2x.c:9672:3: note: in expansion of macro ‘PMD_DRV_LOG’
9672 | PMD_DRV_LOG(NOTICE, sc,
| ^~~~~~~~~~~Quoted 23 lines · Ferruh Yigit
Quoted 11 lines · Rasesh Mody
Hi,
Currently, BNX2X PMD uses a very old firmware 7.2.51. This patch series updated the base driver to use to latest firmware 7.13.11. The latest firmware comprises of enhancements and fixes.
v2:
- Squashed pmd version patch into "net/bnx2x: update to latest FW 7.13.11"
- Addressed most of checkpatch issuesQuoted 9 lines
Thanks!
-RaseshRasesh Mody (4):
net/bnx2x: update and reorganize HW registers net/bnx2x: update HSI code
net/bnx2x: update to latest FW 7.13.11
doc: cleanup SPDX license id usage in bnx2x guide
Quoted 3 lines
I am getting build errors with this patchset [1], since it is merged into next-net-mrvl, I only pulled the doc patch, 4/4, but not others, can you please check the patchset?
OK. We will for Rasesh input.
For some reason, it is passing with gcc 9.1.0. My build environment is based on gcc 9.1.0, So I could not catch this.
test command:
make -j config T=x86_64-native-linux-gcc && sed -ri 's,(CONFIG_RTE_LIBRTE_BNX2X_PMD=)n,\1y,' build/.config && make -j
[master][dpdk-next-net-mrvl] $ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++
--enable-shared --enable-threads=posix --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-cl ocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --e nable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp --enable-cet=auto
Thread model: posix
gcc version 9.1.0 (GCC)
Quoted 50 lines · Jerin Jacob
Quoted 23 lines · Ferruh Yigit
Quoted 11 lines · Rasesh Mody
Hi,
Currently, BNX2X PMD uses a very old firmware 7.2.51. This patch series updated the base driver to use to latest firmware 7.13.11. The latest firmware comprises of enhancements and fixes.
v2:
- Squashed pmd version patch into "net/bnx2x: update to latest FW 7.13.11"
- Addressed most of checkpatch issuesQuoted 9 lines
Thanks!
-RaseshRasesh Mody (4):
net/bnx2x: update and reorganize HW registers net/bnx2x: update HSI code
net/bnx2x: update to latest FW 7.13.11
doc: cleanup SPDX license id usage in bnx2x guideQuoted 3 lines
I am getting build errors with this patchset [1], since it is merged into next-net-mrvl, I only pulled the doc patch, 4/4, but not others, can you please check the patchset?
OK. We will for Rasesh input.
For some reason, it is passing with gcc 9.1.0. My build environment is based on gcc 9.1.0, So I could not catch this.
test command:
make -j config T=x86_64-native-linux-gcc && sed -ri 's,(CONFIG_RTE_LIBRTE_BNX2X_PMD=)n,\1y,' build/.config && make -j
[master][dpdk-next-net-mrvl] $ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++
--enable-shared --enable-threads=posix --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-cl ocale=gnu --disable-libstdcxx-pch --disable-libssp
Quoted 9 lines
--enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --e nable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp --enable-cet=auto
Thread model: posix
gcc version 9.1.0 (GCC)
I have slightly newer one, not sure if that is the reason:
gcc version 9.2.1 20190827 (Red Hat 9.2.1-1) (GCC)
Quoted 63 lines · Ferruh Yigit
Quoted 50 lines · Jerin Jacob
Quoted 23 lines · Ferruh Yigit
Quoted 11 lines · Rasesh Mody
Hi,
Currently, BNX2X PMD uses a very old firmware 7.2.51. This patch series updated the base driver to use to latest firmware 7.13.11. The latest firmware comprises of enhancements and fixes.
v2:
- Squashed pmd version patch into "net/bnx2x: update to latest FW 7.13.11"
- Addressed most of checkpatch issuesQuoted 9 lines
Thanks!
-RaseshRasesh Mody (4):
net/bnx2x: update and reorganize HW registers net/bnx2x: update HSI code
net/bnx2x: update to latest FW 7.13.11
doc: cleanup SPDX license id usage in bnx2x guideQuoted 3 lines
I am getting build errors with this patchset [1], since it is merged into next-net-mrvl, I only pulled the doc patch, 4/4, but not others, can you please check the patchset?
OK. We will for Rasesh input.
For some reason, it is passing with gcc 9.1.0. My build environment is based on gcc 9.1.0, So I could not catch this.
test command:
make -j config T=x86_64-native-linux-gcc && sed -ri 's,(CONFIG_RTE_LIBRTE_BNX2X_PMD=)n,\1y,' build/.config && make -j
[master][dpdk-next-net-mrvl] $ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++
--enable-shared --enable-threads=posix --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-cl ocale=gnu --disable-libstdcxx-pch --disable-libsspQuoted 9 lines
--enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --e nable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp --enable-cet=auto
Thread model: posix
gcc version 9.1.0 (GCC)
Quoted 2 lines
I have slightly newer one, not sure if that is the reason:
gcc version 9.2.1 20190827 (Red Hat 9.2.1-1) (GCC)
OK, I could reproduce the issue with gcc 9.2.0. Something changed between gcc 9.1.0 and gcc 9.2.0.
Rasesh,
Please fix check with gcc 9.2.1 or 9.2.0 and send the new patch.
[master][dpdk-next-net-mrvl] $ aarch64-linux-gnu-gcc -v Using built-in specs.
COLLECT_GCC=aarch64-linux-gnu-gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/9.2.0/lto-wrapper
Target: aarch64-linux-gnu
Configured with: /build/aarch64-linux-gnu-gcc/src/gcc-9.2.0/configure --prefix=/usr --program-prefix=aarch64-linux-gnu- --with-local-prefix=/usr/aarch64-linux-gnu --with-sysroot=/usr/aarch64-
linux-gnu --with-build-sysroot=/usr/aarch64-linux-gnu --with-native-system-header-dir=/include --libdir=/usr/lib --libexecdir=/usr/lib --target=aarch64-linux-gnu --host=x86_64-pc-linux-gnu --
build=x86_64-pc-linux-gnu --disable-nls --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-excepti
ons --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-has h-style=gnu --enable-gnu-indirect-function --disable-multilib --disable-werror --enable-checking=release
Thread model: posix
gcc version 9.2.0 (GCC)
[master]dell[dpdk-next-net-mrvl] $
Quoted 72 lines
From: Jerin Jacob <[email protected]>
Sent: Tuesday, September 24, 2019 9:30 AMQuoted 3 lines · Ferruh Yigit
Quoted 1 line · Jerin Jacob
On Mon, Sep 23, 2019 at 10:03 PM Ferruh Yigit <[email protected]>
Quoted 11 lines · wrote:
Quoted 11 lines
Quoted 11 lines · Rasesh Mody
Quoted 9 lines
Hi,
Currently, BNX2X PMD uses a very old firmware 7.2.51. This patch series updated the base driver to use to latest firmware 7.13.11. The latest firmware comprises of enhancements and fixes.
v2:
- Squashed pmd version patch into "net/bnx2x: update to latest FW7.13.11"
Quoted 21 lines
Quoted 21 lines
Quoted 12 lines
Quoted 11 lines
- Addressed most of checkpatch issues
Thanks!
-RaseshRasesh Mody (4):
net/bnx2x: update and reorganize HW registers net/bnx2x: update HSI code
net/bnx2x: update to latest FW 7.13.11
doc: cleanup SPDX license id usage in bnx2x guideQuoted 3 lines
I am getting build errors with this patchset [1], since it is merged into next-net-mrvl, I only pulled the doc patch, 4/4, but not others, can you please check the patchset?
OK. We will for Rasesh input.
For some reason, it is passing with gcc 9.1.0. My build environment is based on gcc 9.1.0, So I could not catch this.
Quoted 8 lines
Quoted 8 lines
test command:
make -j config T=x86_64-native-linux-gcc && sed -ri 's,(CONFIG_RTE_LIBRTE_BNX2X_PMD=)n,\1y,' build/.config && make -j
[master][dpdk-next-net-mrvl] $ gcc -v Using built-in specs. COLLECT_GCC=/usr/bin/gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/lto-
wrapp
Quoted 18 lines
Quoted 7 lines
er
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++
--enable-shared --enable-threads=posix --with-system-zlib --with-islQuoted 9 lines
--enable-__cxa_atexit --disable-libunwind-exceptions --enable-cl ocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --e nable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp --enable-cet=auto Thread
model: posix gcc version 9.1.0 (GCC)Quoted 2 lines
I have slightly newer one, not sure if that is the reason:
gcc version 9.2.1 20190827 (Red Hat 9.2.1-1) (GCC)
Quoted 6 lines
OK, I could reproduce the issue with gcc 9.2.0. Something changed between gcc 9.1.0 and gcc 9.2.0.
Rasesh,
Please fix check with gcc 9.2.1 or 9.2.0 and send the new patch.
Sure, we didn't test with 9.2 gcc, I'll re-spin the series.
Thanks!
-Rasesh
Quoted 20 lines
[master][dpdk-next-net-mrvl] $ aarch64-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=aarch64-linux-gnu-gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/9.2.0/lto-wrapper
Target: aarch64-linux-gnu
Configured with: /build/aarch64-linux-gnu-gcc/src/gcc-9.2.0/configure --prefix=/usr --program-prefix=aarch64-linux-gnu- --with-local-prefix=/usr/aarch64-linux-gnu --with-sysroot=/usr/aarch64-
linux-gnu --with-build-sysroot=/usr/aarch64-linux-gnu --with-native-system-header-dir=/include --libdir=/usr/lib -- libexecdir=/usr/lib --target=aarch64-linux-gnu --host=x86_64-pc-linux-gnu -- build=x86_64-pc-linux-gnu --disable-nls --enable-languages=c,c++,fortran -- enable-shared --enable-threads=posix --with-system-zlib --with-isl --enable-__cxa_atexit--disable-libunwind-excepti ons --enable-clocale=gnu --disable- libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker- build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-has h-style=gnu --enable-gnu-indirect-function --disable-multilib --disable-werror --enable-checking=release Thread model: posix gcc version 9.2.0 (GCC) [master]dell[dpdk-next-net-mrvl] $
PATCH v2 1/4 net/bnx2x: update and reorganize HW registers
In reply to Rasesh ModyUpdate and reorganize HW registers in preparation to update the firmware to version 7.13.11.
Move HW_INTERRUT_ASSERT_SET_0 out from ecore_reg.h to bnx2x.h.
--- drivers/net/bnx2x/bnx2x.c | 3 +- drivers/net/bnx2x/bnx2x.h | 67 + drivers/net/bnx2x/ecore_reg.h | 6617 ++++++++++++++++++++++----------- 3 files changed, 4553 insertions(+), 2134 deletions(-)
drivers/net/bnx2x/bnx2x.c +1 -2
@@ -4095,7 +4095,7 @@ static void bnx2x_attn_int_deasserted0(struct bnx2x_softc *sc, uint32_t attn)REG_WR (sc, reg_offset, val);rte_panic ("FATAL HW block attention set0 0x%lx" , - (attn &HW_INTERRUT_ASSERT_SET_0 )); + (attn & (unsigned long )HW_INTERRUT_ASSERT_SET_0 )); } }
@@ -10394,7 +10394,6 @@ static int bnx2x_init_hw_common(struct bnx2x_softc *sc)ecore_init_block (sc,BLOCK_TM ,PHASE_COMMON );ecore_init_block (sc,BLOCK_DORQ ,PHASE_COMMON ); -REG_WR (sc,DORQ_REG_DPM_CID_OFST ,BNX2X_DB_SHIFT );if (!CHIP_REV_IS_SLOW (sc)) {/* enable hw interrupt from doorbell Q */
drivers/net/bnx2x/bnx2x.h +67 -0
73 lines not on this page · raw message
drivers/net/bnx2x/ecore_reg.h +4485 -2132
2,912 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.18.0
Part of the diff is not shown here. View the raw message.
PATCH v2 2/4 net/bnx2x: update HSI code
In reply to Rasesh ModyUpdate hardware software common base driver code in preparation to update the firmware to version 7.13.11.
--- drivers/net/bnx2x/bnx2x.c | 19 +- drivers/net/bnx2x/bnx2x.h | 23 +- drivers/net/bnx2x/bnx2x_osal.h | 27 + drivers/net/bnx2x/bnx2x_rxtx.c | 10 +- drivers/net/bnx2x/ecore_hsi.h | 3508 ++++++++++++++++++-------------- drivers/net/bnx2x/ecore_sp.c | 11 +- 6 files changed, 1991 insertions(+), 1607 deletions(-) create mode 100644 drivers/net/bnx2x/bnx2x_osal.h
drivers/net/bnx2x/bnx2x.c +10 -9
@@ -2182,8 +2182,10 @@ int bnx2x_tx_encap(struct bnx2x_tx_queue *txq, struct rte_mbuf *m0) tx_start_bd = &txq->tx_ring[TX_BD (bd_prod, txq)].start_bd; - tx_start_bd->addr = -rte_cpu_to_le_64 (rte_mbuf_data_iova (m0)); + tx_start_bd->addr_lo = +rte_cpu_to_le_32 (U64_LO (rte_mbuf_data_iova (m0))); + tx_start_bd->addr_hi = +rte_cpu_to_le_32 (U64_HI (rte_mbuf_data_iova (m0))); tx_start_bd->nbytes =rte_cpu_to_le_16 (m0->data_len); tx_start_bd->bd_flags.as_bitfield =ETH_TX_BD_FLAGS_START_BD ; tx_start_bd->general_data =
@@ -5015,13 +5017,13 @@ static void bnx2x_update_rx_prod(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp, uint16_t rx_bd_prod, uint16_t rx_cq_prod) { - union ustorm_eth_rx_producers rx_prods; + struct ustorm_eth_rx_producers rx_prods = { 0 };uint32_t i;/* update producers */ - rx_prods.prod.bd_prod = rx_bd_prod; - rx_prods.prod.cqe_prod = rx_cq_prod; - rx_prods.prod.reserved =0 ; + rx_prods.bd_prod = rx_bd_prod; + rx_prods.cqe_prod = rx_cq_prod; + rx_prods.reserved =0 ;/* * Make sure that the BD and SGE data is updated before updating the
@@ -5034,9 +5036,8 @@ bnx2x_update_rx_prod(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp,wmb ();for (i =0 ; i < (sizeof (rx_prods) /4 ); i++) { -REG_WR (sc, - (fp->ustorm_rx_prods_offset + (i *4 )), - rx_prods.raw_data[i]); +REG_WR (sc, (fp->ustorm_rx_prods_offset + (i *4 )), + ((uint32_t *)&rx_prods)[i]); }wmb ();/* keep prod updates ordered */
drivers/net/bnx2x/bnx2x.h +7 -16
@@ -19,18 +19,7 @@#include <rte_bus_pci.h> #include <rte_io.h> -#if RTE_BYTE_ORDER ==RTE_LITTLE_ENDIAN -#ifndef __LITTLE_ENDIAN -#define __LITTLE_ENDIAN RTE_LITTLE_ENDIAN -#endif -#undef __BIG_ENDIAN -#elif RTE_BYTE_ORDER ==RTE_BIG_ENDIAN -#ifndef __BIG_ENDIAN -#define __BIG_ENDIAN RTE_BIG_ENDIAN -#endif -#undef __LITTLE_ENDIAN -#endif - +#include "bnx2x_osal.h" #include "bnx2x_ethdev.h" #include "ecore_mfw_req.h" #include "ecore_fw_defs.h"
@@ -1911,16 +1900,18 @@ bnx2x_hc_ack_sb(struct bnx2x_softc *sc, uint8_t sb_id, uint8_t storm, {uint32_t hc_addr = (HC_REG_COMMAND_REG +SC_PORT (sc) *32 +COMMAND_REG_INT_ACK ); -union igu_ack_register igu_ack; +struct igu_ack_register igu_ack; +uint32_t *val =NULL ; - igu_ack.sb.status_block_index = index; - igu_ack.sb.sb_id_and_flags = + igu_ack.status_block_index = index; + igu_ack.sb_id_and_flags = ((sb_id <<IGU_ACK_REGISTER_STATUS_BLOCK_ID_SHIFT ) | (storm <<IGU_ACK_REGISTER_STORM_ID_SHIFT ) | (update <<IGU_ACK_REGISTER_UPDATE_INDEX_SHIFT ) | (op <<IGU_ACK_REGISTER_INTERRUPT_MODE_SHIFT )); -REG_WR (sc, hc_addr, igu_ack.raw_data); + val = (uint32_t *)&igu_ack; +REG_WR (sc, hc_addr, *val);/* Make sure that ACK is written */ mb ();
drivers/net/bnx2x/bnx2x_osal.h new file +27 -0
@@ -0,0 +1,27 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright (c) 2019 Cavium Inc. +* +* All rights reserved. +* www.cavium.com +*/ + +#ifndef BNX2X_OSAL_H +#define BNX2X_OSAL_H + +#if RTE_BYTE_ORDER ==RTE_LITTLE_ENDIAN +#ifndef __LITTLE_ENDIAN +#define __LITTLE_ENDIAN RTE_LITTLE_ENDIAN +#endif +#undef __BIG_ENDIAN +#elif RTE_BYTE_ORDER ==RTE_BIG_ENDIAN +#ifndef __BIG_ENDIAN +#define __BIG_ENDIAN RTE_BIG_ENDIAN +#endif +#undef __LITTLE_ENDIAN +#endif + +#define __le16 uint16_t +#define __le32 uint32_t +#define __le64 uint64_t + +#endif /* BNX2X_OSAL_H */
drivers/net/bnx2x/bnx2x_rxtx.c +6 -4
@@ -321,12 +321,14 @@ static inline void bnx2x_upd_rx_prod_fast(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp, uint16_t rx_bd_prod, uint16_t rx_cq_prod) { - union ustorm_eth_rx_producers rx_prods; + struct ustorm_eth_rx_producers rx_prods = { 0 }; +uint32_t *val =NULL ; - rx_prods.prod.bd_prod = rx_bd_prod; - rx_prods.prod.cqe_prod = rx_cq_prod; + rx_prods.bd_prod = rx_bd_prod; + rx_prods.cqe_prod = rx_cq_prod; -REG_WR (sc, fp->ustorm_rx_prods_offset, rx_prods.raw_data[0 ]); + val = (uint32_t *)&rx_prods; +REG_WR (sc, fp->ustorm_rx_prods_offset, val[0 ]); } static uint16_t
drivers/net/bnx2x/ecore_hsi.h +1940 -1568
2,874 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.18.0
Part of the diff is not shown here. View the raw message.
PATCH v2 3/4 net/bnx2x: update to latest FW 7.13.11
In reply to Rasesh ModyUse latest firmware 7.13.11.
Some of the fixes included with this FW are as following:
- Packets from a VF with pvid configured which were sent with a different vlan were transmitted instead of being discarded.
- In some multi-function configurations, inter-PF and inter-VF Tx switching is incorrectly enabled.
- Wrong assert code in FLR final cleanup in case it is sent not after FLR.
- Chip may stall in very rare cases under heavy traffic with FW GRO enabled.
- VF malicious notification error fixes.
- Default gre tunnel to IPGRE which allows proper RSS for IPGRE packets, L2GRE traffic will reach single queue.
- Removes unnecessary internal mem config, latest FW performs this autonomously.
Update the PMD version to 1.1.0.1.
--- doc/guides/nics/bnx2x.rst | 4 +- drivers/net/bnx2x/bnx2x.c | 40 +--- drivers/net/bnx2x/bnx2x.h | 5 +- drivers/net/bnx2x/ecore_fw_defs.h | 252 ++++++++++++----------- drivers/net/bnx2x/ecore_hsi.h | 2 +- drivers/net/bnx2x/ecore_init.h | 214 ++++++++++---------- drivers/net/bnx2x/ecore_init_ops.h | 192 ++++++++---------- drivers/net/bnx2x/ecore_mfw_req.h | 11 +- drivers/net/bnx2x/ecore_sp.c | 39 ++-- drivers/net/bnx2x/ecore_sp.h | 308 ++++++++++++++++++++++++----- 10 files changed, 640 insertions(+), 427 deletions(-)
doc/guides/nics/bnx2x.rst +2 -2
@@ -93,9 +93,9 @@ Supported QLogic NICs Prerequisites ------------- -- Requires firmware version **7.2.51.0**. It is included in most of the +- Requires firmware version **7.13.11.0**. It is included in most of the standard Linux distros. If it is not available visit - `linux-firmware git repository <https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/bnx2x/bnx2x-e2-7.2.51.0.fw>`_ + `linux-firmware git repository <https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/bnx2x/bnx2x-e2-7.13.11.0.fw>`_ to get the required firmware. Pre-Installation Configuration
drivers/net/bnx2x/bnx2x.c +10 -30
@@ -29,8 +29,8 @@#define BNX2X_PMD_VER_PREFIX "BNX2X PMD"#define BNX2X_PMD_VERSION_MAJOR 1 -#define BNX2X_PMD_VERSION_MINOR 0 -#define BNX2X_PMD_VERSION_REVISION 7 +#define BNX2X_PMD_VERSION_MINOR 1 +#define BNX2X_PMD_VERSION_REVISION 0#define BNX2X_PMD_VERSION_PATCH 1 static inline const char *
@@ -5230,20 +5230,6 @@ static void bnx2x_init_internal_common(struct bnx2x_softc *sc) {int i; -if (IS_MF_SI (sc)) { -/* -* In switch independent mode, the TSTORM needs to accept -* packets that failed classification, since approximate match -* mac addresses aren't written to NIG LLH. -*/ -REG_WR8 (sc, - (BAR_TSTRORM_INTMEM + -TSTORM_ACCEPT_CLASSIFY_FAILED_OFFSET ),2 ); - }else -REG_WR8 (sc, - (BAR_TSTRORM_INTMEM + -TSTORM_ACCEPT_CLASSIFY_FAILED_OFFSET ),0 ); -/* * Zero this manually as its initialization is currently missing * in the initTool.
@@ -5797,15 +5783,12 @@ static void bnx2x_init_objs(struct bnx2x_softc *sc) VNICS_PER_PATH(sc));/* RSS configuration object */ -ecore_init_rss_config_obj (&sc->rss_conf_obj, - sc->fp[0 ].cl_id, - sc->fp[0 ].index, -SC_FUNC (sc), -SC_FUNC (sc), +ecore_init_rss_config_obj (sc, &sc->rss_conf_obj, sc->fp->cl_id, + sc->fp->index,SC_FUNC (sc),SC_FUNC (sc),BNX2X_SP (sc, rss_rdata), (rte_iova_t )BNX2X_SP_MAPPING (sc, rss_rdata), -ECORE_FILTER_RSS_CONF_PENDING , - &sc->sp_state,ECORE_OBJ_TYPE_RX ); +ECORE_FILTER_RSS_CONF_PENDING , &sc->sp_state, +ECORE_OBJ_TYPE_RX ); }/*
@@ -5834,9 +5817,6 @@ static int bnx2x_func_start(struct bnx2x_softc *sc) start_params->network_cos_mode =FW_WRR ; } - start_params->gre_tunnel_mode =0 ; - start_params->gre_tunnel_rss =0 ; -return ecore_func_state_change (sc, &func_params); }
@@ -9650,8 +9630,8 @@ static void bnx2x_init_rte(struct bnx2x_softc *sc) }#define FW_HEADER_LEN 104 -#define FW_NAME_57711 "/lib/firmware/bnx2x/bnx2x-e1h-7.2.51.0.fw" -#define FW_NAME_57810 "/lib/firmware/bnx2x/bnx2x-e2-7.2.51.0.fw" +#define FW_NAME_57711 "/lib/firmware/bnx2x/bnx2x-e1h-7.13.11.0.fw" +#define FW_NAME_57810 "/lib/firmware/bnx2x/bnx2x-e2-7.13.11.0.fw"void bnx2x_load_firmware (struct bnx2x_softc *sc) {
@@ -10367,7 +10347,7 @@ static int bnx2x_init_hw_common(struct bnx2x_softc *sc)/* clean the DMAE memory */ sc->dmae_ready =1 ; -ecore_init_fill (sc,TSEM_REG_PRAM ,0 ,8 ); +ecore_init_fill (sc,TSEM_REG_PRAM ,0 ,8 ,1 );ecore_init_block (sc,BLOCK_TCM ,PHASE_COMMON );
@@ -11579,7 +11559,7 @@ static void bnx2x_reset_func(struct bnx2x_softc *sc) ilt_cli.end =ILT_NUM_PAGE_ENTRIES -1 ; ilt_cli.client_num =ILT_CLIENT_TM ; -ecore_ilt_boundry_init_op (sc, &ilt_cli,0 ); +ecore_ilt_boundary_init_op (sc, &ilt_cli,0 ,INITOP_CLEAR ); }/* this assumes that reset_port() called before reset_func() */
drivers/net/bnx2x/bnx2x.h +2 -3
@@ -83,9 +83,6 @@#ifndef ARRAY_SIZE #define ARRAY_SIZE (arr) (sizeof(arr) / sizeof((arr)[0]))#endif -#ifndef ARRSIZE -#define ARRSIZE (arr) (sizeof(arr) / sizeof((arr)[0])) -#endif #ifndef DIV_ROUND_UP #define DIV_ROUND_UP (n, d) (((n) + (d) - 1) / (d))#endif
@@ -1020,6 +1017,8 @@ struct bnx2x_pci_cap {uint16_t addr; }; +struct ecore_ilt ; +struct bnx2x_vfdb ;/* Top level device private data structure. */
drivers/net/bnx2x/ecore_fw_defs.h +135 -117
422 lines not on this page · raw message
drivers/net/bnx2x/ecore_hsi.h +1 -1
@@ -5508,7 +5508,7 @@ struct afex_vif_list_ramrod_data {* */ struct c2s_pri_trans_table_entry { -uint8_t val[8 ]; +uint8_t val[MAX_VLAN_PRIORITIES ]; };
drivers/net/bnx2x/ecore_init.h +109 -105
390 lines not on this page · raw message
drivers/net/bnx2x/ecore_init_ops.h +87 -105
334 lines not on this page · raw message
drivers/net/bnx2x/ecore_mfw_req.h +9 -2
@@ -14,7 +14,6 @@#define ECORE_MFW_REQ_H -#define PORT_0 0#define PORT_1 1#define PORT_MAX 2
@@ -143,6 +142,15 @@ struct iscsi_stats_info {uint8_t mac_add1[8 ];/* Additional Programmed MAC Addr 1. */ /* QoS Priority (per 802.1p). 0-7255 */ uint32_t qos_priority; +#define ISCSI_QOS_PRIORITY_OFFSET 0 +#define ISCSI_QOS_PRIORITY_MASK (0xffff) + +#define ISCSI_IP_ADDRESS_TYPE_OFFSET 30 +#define ISCSI_IP_ADDRESS_TYPE_MASK (3 << 30) +/* Driver does not have the IP address and type populated */ +#define ISCSI_IP_ADDRESS_TYPE_NOT_SET (0 << 30) +#define ISCSI_IP_ADDRESS_TYPE_IPV4 (1 << 30)/* IPV4 IP address set */ +#define ISCSI_IP_ADDRESS_TYPE_IPV6 (2 << 30)/* IPV6 IP address set */ uint8_t initiator_name[64 ];/* iSCSI Boot Initiator Node name. */
@@ -181,5 +189,4 @@ union drv_info_to_mcp { struct iscsi_stats_info iscsi_stat; }; -#endif /* ECORE_MFW_REQ_H */
drivers/net/bnx2x/ecore_sp.c +26 -13
@@ -501,7 +501,7 @@ static int __ecore_vlan_mac_h_read_lock(struct bnx2x_softc *sc __rte_unused,* * @details May sleep. Claims and releases execution queue lock during its run. */ -static int ecore_vlan_mac_h_read_lock (struct bnx2x_softc *sc, +int ecore_vlan_mac_h_read_lock (struct bnx2x_softc *sc,struct ecore_vlan_mac_obj *o) {int rc;
@@ -712,7 +712,7 @@ static uint8_t ecore_vlan_mac_get_rx_tx_flag(struct ecore_vlan_mac_objreturn rx_tx_flag; } -static void ecore_set_mac_in_nig (struct bnx2x_softc *sc, +void ecore_set_mac_in_nig (struct bnx2x_softc *sc,int add,unsigned char *dev_addr,int index) {uint32_t wb_data[2 ];
@@ -2764,12 +2764,16 @@ static int ecore_mcast_validate_e2(__rte_unused struct bnx2x_softc *sc, static void ecore_mcast_revert_e2(__rte_unused struct bnx2x_softc *sc,struct ecore_mcast_ramrod_params *p, -int old_num_bins) +int old_num_bins, +enum ecore_mcast_cmd cmd) {struct ecore_mcast_obj *o = p->mcast_obj; o->set_registry_size (o, old_num_bins); o->total_pending_num -= p->mcast_list_len; + +if (cmd ==ECORE_MCAST_CMD_SET ) + o->total_pending_num -= o->max_cmd_len; }/**
@@ -2915,7 +2919,8 @@ static int ecore_mcast_validate_e1h(__rte_unused struct bnx2x_softc *sc, static void ecore_mcast_revert_e1h(__rte_unused struct bnx2x_softc *sc, __rte_unused struct ecore_mcast_ramrod_params - *p, __rte_unused int old_num_bins) + *p, __rte_unused int old_num_bins, + __rte_unused enum ecore_mcast_cmd cmd) {/* Do nothing */ }
@@ -3093,7 +3098,7 @@ int ecore_config_mcast(struct bnx2x_softc *sc, r->clear_pending (r); error_exit1: - o->revert (sc, p, old_reg_size); + o->revert (sc, p, old_reg_size, cmd);return rc; }
@@ -3350,7 +3355,7 @@ static int ecore_credit_pool_get_entry_always_TRUE(__rte_unused struct* If credit is negative pool operations will always succeed (unlimited pool). * */ -static void ecore_init_credit_pool (struct ecore_credit_pool_obj *p, +void ecore_init_credit_pool (struct ecore_credit_pool_obj *p,int base,int credit) {/* Zero the object first */
@@ -3588,11 +3593,13 @@ int ecore_config_rss(struct bnx2x_softc *sc, struct ecore_config_rss_params *p)return rc; } -void ecore_init_rss_config_obj (struct ecore_rss_config_obj *rss_obj, +void ecore_init_rss_config_obj(struct bnx2x_softc *sc __rte_unused, +struct ecore_rss_config_obj *rss_obj,uint8_t cl_id,uint32_t cid,uint8_t func_id, -uint8_t engine_id,void *rdata, -ecore_dma_addr_t rdata_mapping,int state, -unsigned long *pstate,ecore_obj_type type) +uint8_t engine_id, +void *rdata,ecore_dma_addr_t rdata_mapping, +int state,unsigned long *pstate, +ecore_obj_type type) {ecore_init_raw_obj (&rss_obj->raw, cl_id, cid, func_id, rdata, rdata_mapping, state, pstate, type);
@@ -5107,8 +5114,14 @@ static int ecore_func_send_switch_update(struct bnx2x_softc *sc, struct ecore_fuECORE_MEMSET (rdata,0 ,sizeof (*rdata));/* Fill the ramrod data with provided parameters */ - rdata->tx_switch_suspend_change_flg =1 ; - rdata->tx_switch_suspend = switch_update_params->suspend; +if (ECORE_TEST_BIT (ECORE_F_UPDATE_TX_SWITCH_SUSPEND_CHNG , + &switch_update_params->changes)) { + rdata->tx_switch_suspend_change_flg =1 ; + rdata->tx_switch_suspend = +ECORE_TEST_BIT (ECORE_F_UPDATE_TX_SWITCH_SUSPEND , + &switch_update_params->changes); + } + rdata->echo =SWITCH_UPDATE ; return ecore_sp_post(sc, RAMROD_CMD_ID_COMMON_FUNCTION_UPDATE, 0,
@@ -5220,7 +5233,7 @@ static int ecore_func_send_tx_start(struct bnx2x_softc *sc, struct ecore_func_st rdata->dcb_enabled = tx_start_params->dcb_enabled; rdata->dcb_version = tx_start_params->dcb_version; - rdata->dont_add_pri_0_en = tx_start_params->dont_add_pri_0; + rdata->dont_add_pri_0_en = tx_start_params->dont_add_pri_0_en;for (i =0 ; i <ARRAY_SIZE (rdata->traffic_type_to_priority_cos); i++) rdata->traffic_type_to_priority_cos[i] =
drivers/net/bnx2x/ecore_sp.h +259 -49
628 lines not on this page · raw message
Signature · 1 line
2.18.0
PATCH v2 4/4 doc: cleanup SPDX license id usage in bnx2x guide
In reply to Rasesh ModyRemoved redundant BSD boilerplate text from bnx2x guide.
--- doc/guides/nics/bnx2x.rst | 26 -------------------------- 1 file changed, 26 deletions(-)
doc/guides/nics/bnx2x.rst +0 -26
@@ -1,32 +1,6 @@ .. SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2015 QLogic Corporation - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - * Neither the name of QLogic Corporation nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - BNX2X Poll Mode Driver ======================
Signature · 1 line
2.18.0
v3 cover net/bnx2x: update to latest FW
In reply to Rasesh ModyHi,
Currently, BNX2X PMD uses a very old firmware 7.2.51. This patch series updated the base driver to use to latest firmware 7.13.11. The latest firmware comprises of enhancements and fixes.
v3:
- Addressed gcc 9.2 build issues
v2:
- Squashed pmd version patch into "net/bnx2x: update to latest FW 7.13.11"
- Addressed most of checkpatch issues
Thanks!
-Rasesh
Rasesh Mody (3):
net/bnx2x: update and reorganize HW registers
net/bnx2x: update HSI code
net/bnx2x: update to latest FW 7.13.11
doc/guides/nics/bnx2x.rst | 4 +- drivers/net/bnx2x/bnx2x.c | 63 +- drivers/net/bnx2x/bnx2x.h | 95 +- drivers/net/bnx2x/bnx2x_osal.h | 29 + drivers/net/bnx2x/bnx2x_rxtx.c | 10 +- drivers/net/bnx2x/ecore_fw_defs.h | 252 +- drivers/net/bnx2x/ecore_hsi.h | 3508 ++++++++------- drivers/net/bnx2x/ecore_init.h | 214 +- drivers/net/bnx2x/ecore_init_ops.h | 192 +- drivers/net/bnx2x/ecore_mfw_req.h | 11 +- drivers/net/bnx2x/ecore_reg.h | 6617 +++++++++++++++++++--------- drivers/net/bnx2x/ecore_sp.c | 48 +- drivers/net/bnx2x/ecore_sp.h | 308 +- 13 files changed, 7185 insertions(+), 4166 deletions(-) create mode 100644 drivers/net/bnx2x/bnx2x_osal.h
Signature · 1 line
2.18.0
Quoted 14 lines · Rasesh Mody
Hi,
Currently, BNX2X PMD uses a very old firmware 7.2.51. This patch series updated the base driver to use to latest firmware 7.13.11. The latest firmware comprises of enhancements and fixes.
v3:
- Addressed gcc 9.2 build issues
v2:
- Squashed pmd version patch into "net/bnx2x: update to latest FW 7.13.11"
- Addressed most of checkpatch issues
Quoted 7 lines
Thanks!
-RaseshRasesh Mody (3):
net/bnx2x: update and reorganize HW registers
net/bnx2x: update HSI code
net/bnx2x: update to latest FW 7.13.11
I don't think this patch comes as _base_ code, Please fix the trivial and genuine check path errors.
[master][dpdk-next-net-mrvl] $ ./devtools/checkpatches.sh
### net/bnx2x: update HSI code
WARNING:TYPO_SPELLING: 'entires' may be misspelled - perhaps 'entries'? #863: FILE: drivers/net/bnx2x/ecore_hsi.h:2844:
+ /* 9 entires for the C2S PCP map for each inner VLAN PCP + 1 default */
total: 0 errors, 1 warnings, 0 checks, 5425 lines checked
### net/bnx2x: update to latest FW 7.13.11
CHECK:CAMELCASE: Avoid CamelCase: <assertListEntry> #174: FILE: drivers/net/bnx2x/ecore_fw_defs.h:18:
+ (IRO[151].base + ((assertListEntry) * IRO[151].m1))
CHECK:SPACING: spaces preferred around that '>>' (ctx:VxV) #178: FILE: drivers/net/bnx2x/ecore_fw_defs.h:20:
+ (IRO[157].base + (((pfId)>>1) * IRO[157].m1) + (((pfId)&1) * \
^CHECK:SPACING: spaces preferred around that '&' (ctx:VxV) #178: FILE: drivers/net/bnx2x/ecore_fw_defs.h:20:
+ (IRO[157].base + (((pfId)>>1) * IRO[157].m1) + (((pfId)&1) * \
^CHECK:CAMELCASE: Avoid CamelCase: <pfId>
#178: FILE: drivers/net/bnx2x/ecore_fw_defs.h:20:
+ (IRO[157].base + (((pfId)>>1) * IRO[157].m1) + (((pfId)&1) * \
CHECK:SPACING: spaces preferred around that '>>' (ctx:VxV) #189: FILE: drivers/net/bnx2x/ecore_fw_defs.h:23:
+ (IRO[158].base + (((pfId)>>1) * IRO[158].m1) + (((pfId)&1) * \
^CHECK:SPACING: spaces preferred around that '&' (ctx:VxV) #189: FILE: drivers/net/bnx2x/ecore_fw_defs.h:23:
+ (IRO[158].base + (((pfId)>>1) * IRO[158].m1) + (((pfId)&1) * \
^CHECK:CAMELCASE: Avoid CamelCase: <funcId>
#193: FILE: drivers/net/bnx2x/ecore_fw_defs.h:26:
+ (IRO[163].base + ((funcId) * IRO[163].m1))
CHECK:CAMELCASE: Avoid CamelCase: <hcIndex>
#199: FILE: drivers/net/bnx2x/ecore_fw_defs.h:30:
+ (IRO[143].base + ((hcIndex) * IRO[143].m1) + ((sbId) * IRO[143].m2))
CHECK:CAMELCASE: Avoid CamelCase: <sbId>
#199: FILE: drivers/net/bnx2x/ecore_fw_defs.h:30:
+ (IRO[143].base + ((hcIndex) * IRO[143].m1) + ((sbId) * IRO[143].m2))
CHECK:SPACING: spaces preferred around that '>>' (ctx:VxV) #204: FILE: drivers/net/bnx2x/ecore_fw_defs.h:32:
+ (IRO[142].base + (((hcIndex)>>2) * IRO[142].m1) + (((hcIndex)&3) \
^CHECK:SPACING: spaces preferred around that '&' (ctx:VxV) #204: FILE: drivers/net/bnx2x/ecore_fw_defs.h:32:
+ (IRO[142].base + (((hcIndex)>>2) * IRO[142].m1) + (((hcIndex)&3) \
CHECK:CAMELCASE: Avoid CamelCase: <iscsiEqId>
[65/1889]
#215: FILE: drivers/net/bnx2x/ecore_fw_defs.h:40:
+ (IRO[316].base + ((pfId) * IRO[316].m1) + ((iscsiEqId) * IRO[316].m2))
CHECK:CAMELCASE: Avoid CamelCase: <vfId> #287: FILE: drivers/net/bnx2x/ecore_fw_defs.h:87:
+#define CSTORM_VF_PF_CHANNEL_STATE_OFFSET(vfId) \
CHECK:CAMELCASE: Avoid CamelCase: <portId> #368: FILE: drivers/net/bnx2x/ecore_fw_defs.h:142:
+ (IRO[187].base + ((portId) * IRO[187].m1))
CHECK:CAMELCASE: Avoid CamelCase: <clientId> #414: FILE: drivers/net/bnx2x/ecore_fw_defs.h:172:
+ (IRO[215].base + ((portId) * IRO[215].m1) + ((clientId) * \
CHECK:CAMELCASE: Avoid CamelCase: <qzoneId> #420: FILE: drivers/net/bnx2x/ecore_fw_defs.h:175:
+ (IRO[216].base + ((qzoneId) * IRO[216].m1))
CHECK:SPACING: spaces preferred around that '>>' (ctx:VxV) #498: FILE: drivers/net/bnx2x/ecore_fw_defs.h:241:
+ (IRO[220].base + (((pfId)>>1) * IRO[220].m1) + (((pfId)&1) * \
^CHECK:SPACING: spaces preferred around that '&' (ctx:VxV) #498: FILE: drivers/net/bnx2x/ecore_fw_defs.h:241:
+ (IRO[220].base + (((pfId)>>1) * IRO[220].m1) + (((pfId)&1) * \
^CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #526: FILE: drivers/net/bnx2x/ecore_fw_defs.h:268:
+ (0xFFFF - ((PAGE_SIZE/((STRUCT_SIZE(eth_rx_sge))/8))-1))
^
CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #526: FILE: drivers/net/bnx2x/ecore_fw_defs.h:268:
+ (0xFFFF - ((PAGE_SIZE/((STRUCT_SIZE(eth_rx_sge))/8))-1))
^
CHECK:SPACING: spaces preferred around that '-' (ctx:VxV) #526: FILE: drivers/net/bnx2x/ecore_fw_defs.h:268:
+ (0xFFFF - ((PAGE_SIZE/((STRUCT_SIZE(eth_rx_sge))/8))-1))
^
CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #530: FILE: drivers/net/bnx2x/ecore_fw_defs.h:272:
+#define U_ETH_SGES_PER_PAGE (PAGE_SIZE/(STRUCT_SIZE(eth_rx_sge)/8))
^
CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #530: FILE: drivers/net/bnx2x/ecore_fw_defs.h:272:
+#define U_ETH_SGES_PER_PAGE (PAGE_SIZE/(STRUCT_SIZE(eth_rx_sge)/8))
^
CHECK:SPACING: spaces preferred around that '-' (ctx:VxV) #534: FILE: drivers/net/bnx2x/ecore_fw_defs.h:276:
+#define U_ETH_SGES_PER_PAGE_MASK (U_ETH_SGES_PER_PAGE-1)
[16/1889]
CHECK:SPACING: spaces preferred around that '/' (ctx:VxV)
#530: FILE: drivers/net/bnx2x/ecore_fw_defs.h:272:
+#define U_ETH_SGES_PER_PAGE (PAGE_SIZE/(STRUCT_SIZE(eth_rx_sge)/8))
^CHECK:SPACING: spaces preferred around that '-' (ctx:VxV) #534: FILE: drivers/net/bnx2x/ecore_fw_defs.h:276:
+#define U_ETH_SGES_PER_PAGE_MASK (U_ETH_SGES_PER_PAGE-1)
^
CHECK:SPACING: spaces preferred around that '-' (ctx:VxV) #577: FILE: drivers/net/bnx2x/ecore_fw_defs.h:378:
+#define TSDM_TIMER_TICK_RESUL_CHIP (1 * (1e-6))
^
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'r_order == MAX_RD_ORD'
#1119: FILE: drivers/net/bnx2x/ecore_init_ops.h:499:
+ if ((CHIP_IS_E1(sc) || CHIP_IS_E1H(sc)) && (r_order == MAX_RD_ORD))
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side-effects? #1537: FILE: drivers/net/bnx2x/ecore_sp.h:138:
+#define ECORE_ILT_ZALLOC(x, y, size) \
do { \
x = rte_malloc("", sizeof(struct bnx2x_dma),
RTE_CACHE_LINE_SIZE); \
if (x) { \
if (bnx2x_dma_alloc((struct bnx2x_softc *)sc, \
size, (struct bnx2x_dma *)x, \
+ "ILT", RTE_CACHE_LINE_SIZE) != 0) { \
rte_free(x); \
x = NULL; \
+ *(y) = 0; \
} else { \
*y = ((struct bnx2x_dma *)x)->paddr; \
} \CHECK:MACRO_ARG_REUSE: Macro argument reuse 'y' - possible side-effects? #1537: FILE: drivers/net/bnx2x/ecore_sp.h:138:
+#define ECORE_ILT_ZALLOC(x, y, size) \
do { \
x = rte_malloc("", sizeof(struct bnx2x_dma),
RTE_CACHE_LINE_SIZE); \
if (x) { \
if (bnx2x_dma_alloc((struct bnx2x_softc *)sc, \
size, (struct bnx2x_dma *)x, \
+ "ILT", RTE_CACHE_LINE_SIZE) != 0) { \
rte_free(x); \
x = NULL; \
+ *(y) = 0; \
} else { \
*y = ((struct bnx2x_dma *)x)->paddr; \
} \CHECK:MACRO_ARG_REUSE: Macro argument reuse 'sc' - possible side-effects? #2191: FILE: drivers/net/bnx2x/ecore_sp.h:1967:
+#define PF_MAC_CREDIT_E2(sc, func_num) \
+ ((MAX_MAC_CREDIT_E2 - GET_NUM_VFS_PER_PATH(sc) * VF_MAC_CREDIT_CNT) / \
+ (func_num) + GET_NUM_VFS_PER_PF(sc) * VF_MAC_CREDIT_CNT)
CHECK:MACRO_ARG_REUSE: Macro argument reuse 'sc' - possible side-effects?
Quoted 20 lines
doc/guides/nics/bnx2x.rst | 4 +- drivers/net/bnx2x/bnx2x.c | 63 +- drivers/net/bnx2x/bnx2x.h | 95 +- drivers/net/bnx2x/bnx2x_osal.h | 29 + drivers/net/bnx2x/bnx2x_rxtx.c | 10 +- drivers/net/bnx2x/ecore_fw_defs.h | 252 +- drivers/net/bnx2x/ecore_hsi.h | 3508 ++++++++------- drivers/net/bnx2x/ecore_init.h | 214 +- drivers/net/bnx2x/ecore_init_ops.h | 192 +- drivers/net/bnx2x/ecore_mfw_req.h | 11 +- drivers/net/bnx2x/ecore_reg.h | 6617 +++++++++++++++++++--------- drivers/net/bnx2x/ecore_sp.c | 48 +- drivers/net/bnx2x/ecore_sp.h | 308 +- 13 files changed, 7185 insertions(+), 4166 deletions(-) create mode 100644 drivers/net/bnx2x/bnx2x_osal.h--
2.18.0
Quoted 20 lines
From: Jerin Jacob <[email protected]>
Sent: Wednesday, October 02, 2019 10:57 PMQuoted 16 lines · Rasesh Mody
Hi,
Currently, BNX2X PMD uses a very old firmware 7.2.51. This patch series updated the base driver to use to latest firmware 7.13.11. The latest firmware comprises of enhancements and fixes.
v3:
- Addressed gcc 9.2 build issues
v2:
- Squashed pmd version patch into "net/bnx2x: update to latest FW 7.13.11"
- Addressed most of checkpatch issuesThanks!
-Rasesh
Quoted 7 lines
Quoted 4 lines
Rasesh Mody (3):
net/bnx2x: update and reorganize HW registers
net/bnx2x: update HSI code
net/bnx2x: update to latest FW 7.13.11I don't think this patch comes as _base_ code, Please fix the trivial and genuine check path errors.
These are base driver changes for updating the FW to latest. The remaining checkpatch issues in this patch set are to keep uniformity and readability of the base code.
Cleaning up base code to remove these and other checkpatch issues in same context would be a separate activity(as it would result in lot more changes), independent of this patch set. Next when there is such a checkpatch code cleanup, we'll try to address the issues.
Please apply these changes or let me know if v4 is needed.
Thanks!
-Rasesh
Quoted 228 lines
[master][dpdk-next-net-mrvl] $
./devtools/checkpatches.sh### net/bnx2x: update HSI code
WARNING:TYPO_SPELLING: 'entires' may be misspelled - perhaps 'entries'? #863: FILE:
drivers/net/bnx2x/ecore_hsi.h:2844:
+ /* 9 entires for the C2S PCP map for each inner VLAN PCP + 1
+ default */total: 0 errors, 1 warnings, 0 checks, 5425 lines checked
### net/bnx2x: update to latest FW 7.13.11
CHECK:CAMELCASE: Avoid CamelCase: <assertListEntry> #174: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:18:
+ (IRO[151].base + ((assertListEntry) * IRO[151].m1))CHECK:SPACING: spaces preferred around that '>>' (ctx:VxV) #178: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:20:+ (IRO[157].base + (((pfId)>>1) * IRO[157].m1) + (((pfId)&1) * \ ^CHECK:SPACING: spaces preferred around that '&' (ctx:VxV) #178: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:20:+ (IRO[157].base + (((pfId)>>1) * IRO[157].m1) + (((pfId)&1) * \ ^CHECK:CAMELCASE: Avoid CamelCase: <pfId>
#178: FILE:drivers/net/bnx2x/ecore_fw_defs.h:20:
+ (IRO[157].base + (((pfId)>>1) * IRO[157].m1) + (((pfId)&1) * \CHECK:SPACING: spaces preferred around that '>>' (ctx:VxV) #189: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:23:+ (IRO[158].base + (((pfId)>>1) * IRO[158].m1) + (((pfId)&1) * \ ^CHECK:SPACING: spaces preferred around that '&' (ctx:VxV) #189: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:23:+ (IRO[158].base + (((pfId)>>1) * IRO[158].m1) + (((pfId)&1) * \ ^CHECK:CAMELCASE: Avoid CamelCase: <funcId>
#193: FILE:drivers/net/bnx2x/ecore_fw_defs.h:26:
+ (IRO[163].base + ((funcId) * IRO[163].m1))CHECK:CAMELCASE: Avoid CamelCase: <hcIndex>
#199: FILE:drivers/net/bnx2x/ecore_fw_defs.h:30:
+ (IRO[143].base + ((hcIndex) * IRO[143].m1) + ((sbId) *
+ IRO[143].m2))CHECK:CAMELCASE: Avoid CamelCase: <sbId>
#199: FILE:drivers/net/bnx2x/ecore_fw_defs.h:30:
+ (IRO[143].base + ((hcIndex) * IRO[143].m1) + ((sbId) *
+ IRO[143].m2))CHECK:SPACING: spaces preferred around that '>>' (ctx:VxV) #204: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:32:
+ (IRO[142].base + (((hcIndex)>>2) * IRO[142].m1) + (((hcIndex)&3)+ \ ^CHECK:SPACING: spaces preferred around that '&' (ctx:VxV) #204: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:32:
+ (IRO[142].base + (((hcIndex)>>2) * IRO[142].m1) + (((hcIndex)&3)
+ \CHECK:CAMELCASE: Avoid CamelCase: <iscsiEqId>
[65/1889]#215: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:40:
+ (IRO[316].base + ((pfId) * IRO[316].m1) + ((iscsiEqId) *
+ IRO[316].m2))CHECK:CAMELCASE: Avoid CamelCase: <vfId> #287: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:87:
+#defineCSTORM_VF_PF_CHANNEL_STATE_OFFSET(vfId)\CHECK:CAMELCASE: Avoid CamelCase: <portId> #368: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:142:
+ (IRO[187].base + ((portId) * IRO[187].m1))CHECK:CAMELCASE: Avoid CamelCase: <clientId> #414: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:172:
+ (IRO[215].base + ((portId) * IRO[215].m1) + ((clientId) * \CHECK:CAMELCASE: Avoid CamelCase: <qzoneId> #420: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:175:
+ (IRO[216].base + ((qzoneId) * IRO[216].m1))CHECK:SPACING: spaces preferred around that '>>' (ctx:VxV) #498: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:241:+ (IRO[220].base + (((pfId)>>1) * IRO[220].m1) + (((pfId)&1) * \ ^CHECK:SPACING: spaces preferred around that '&' (ctx:VxV) #498: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:241:+ (IRO[220].base + (((pfId)>>1) * IRO[220].m1) + (((pfId)&1) * \ ^CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #526: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:268:
+ (0xFFFF- ((PAGE_SIZE/((STRUCT_SIZE(eth_rx_sge))/8))-1))^CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #526: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:268:
+ (0xFFFF- ((PAGE_SIZE/((STRUCT_SIZE(eth_rx_sge))/8))-1))^CHECK:SPACING: spaces preferred around that '-' (ctx:VxV) #526: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:268:
+ (0xFFFF- ((PAGE_SIZE/((STRUCT_SIZE(eth_rx_sge))/8))-1))^CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #530: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:272:
+#defineU_ETH_SGES_PER_PAGE(PAGE_SIZE/(STRUCT_SIZE(eth_rx_sge)/8))^CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #530: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:272:
+#defineU_ETH_SGES_PER_PAGE(PAGE_SIZE/(STRUCT_SIZE(eth_rx_sge)/8))^CHECK:SPACING: spaces preferred around that '-' (ctx:VxV) #534: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:276:
+#defineU_ETH_SGES_PER_PAGE_MASK(U_ETH_SGES_PER_PAGE-1)[16/1889]CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) #530: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:272:
+#defineU_ETH_SGES_PER_PAGE(PAGE_SIZE/(STRUCT_SIZE(eth_rx_sge)/8))^CHECK:SPACING: spaces preferred around that '-' (ctx:VxV) #534: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:276:
+#defineU_ETH_SGES_PER_PAGE_MASK(U_ETH_SGES_PER_PAGE-1)^CHECK:SPACING: spaces preferred around that '-' (ctx:VxV) #577: FILE:
drivers/net/bnx2x/ecore_fw_defs.h:378:
+#defineTSDM_TIMER_TICK_RESUL_CHIP(1 * (1e-6))^CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around '
r_order==MAX_RD_ORD'
#1119: FILE:drivers/net/bnx2x/ecore_init_ops.h:499:
+ if ((CHIP_IS_E1(sc)||CHIP_IS_E1H(sc)) && (r_order==
+MAX_RD_ORD))CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side- effects?
#1537: FILE:drivers/net/bnx2x/ecore_sp.h:138:+#define ECORE_ILT_ZALLOC(x, y, size) \ do { \ x = rte_malloc("", sizeof(struct bnx2x_dma), RTE_CACHE_LINE_SIZE); \ if (x) { \ if (bnx2x_dma_alloc((struct bnx2x_softc *)sc, \ size, (struct bnx2x_dma *)x, \(quoted diff) +3
-0+ "ILT", RTE_CACHE_LINE_SIZE) != + 0) { \ rte_free(x); \ x = NULL; \ + *(y) = 0; \ } else { \ *y = ((struct bnx2x_dma *)x)->paddr; \ } \CHECK:MACRO_ARG_REUSE: Macro argument reuse 'y' - possible side- effects?
#1537: FILE:drivers/net/bnx2x/ecore_sp.h:138:+#define ECORE_ILT_ZALLOC(x, y, size) \ do { \ x = rte_malloc("", sizeof(struct bnx2x_dma), RTE_CACHE_LINE_SIZE); \ if (x) { \ if (bnx2x_dma_alloc((struct bnx2x_softc *)sc, \ size, (struct bnx2x_dma *)x, \(quoted diff) +3
-0+ "ILT", RTE_CACHE_LINE_SIZE) != + 0) { \ rte_free(x); \ x = NULL; \ + *(y) = 0; \ } else { \ *y = ((struct bnx2x_dma *)x)->paddr; \ } \CHECK:MACRO_ARG_REUSE: Macro argument reuse 'sc' - possible side- effects?
#2191: FILE:drivers/net/bnx2x/ecore_sp.h:1967:(quoted diff) +2
-0+#define PF_MAC_CREDIT_E2(sc, func_num) \ + ((MAX_MAC_CREDIT_E2 - GET_NUM_VFS_PER_PATH(sc) *
VF_MAC_CREDIT_CNT) / \
+ (func_num) +GET_NUM_VFS_PER_PF(sc)*VF_MAC_CREDIT_CNT)CHECK:MACRO_ARG_REUSE: Macro argument reuse 'sc' - possible side- effects?
Quoted 20 lines
doc/guides/nics/bnx2x.rst | 4 +- drivers/net/bnx2x/bnx2x.c | 63 +- drivers/net/bnx2x/bnx2x.h | 95 +- drivers/net/bnx2x/bnx2x_osal.h | 29 + drivers/net/bnx2x/bnx2x_rxtx.c | 10 +- drivers/net/bnx2x/ecore_fw_defs.h | 252 +- drivers/net/bnx2x/ecore_hsi.h | 3508 ++++++++------- drivers/net/bnx2x/ecore_init.h | 214 +- drivers/net/bnx2x/ecore_init_ops.h | 192 +- drivers/net/bnx2x/ecore_mfw_req.h | 11 +- drivers/net/bnx2x/ecore_reg.h | 6617 +++++++++++++++++++--------- drivers/net/bnx2x/ecore_sp.c | 48 +- drivers/net/bnx2x/ecore_sp.h | 308 +- 13 files changed, 7185 insertions(+), 4166 deletions(-) create mode100644
drivers/net/bnx2x/bnx2x_osal.h--
2.18.0
Quoted 26 lines · Rasesh Mody
Quoted 26 lines
From: Jerin Jacob <[email protected]>
Sent: Wednesday, October 02, 2019 10:57 PMQuoted 20 lines · Rasesh Mody
Hi,
Currently, BNX2X PMD uses a very old firmware 7.2.51. This patch series updated the base driver to use to latest firmware 7.13.11. The latest firmware comprises of enhancements and fixes.
v3:
- Addressed gcc 9.2 build issues
v2:
- Squashed pmd version patch into "net/bnx2x: update to latest FW 7.13.11"
- Addressed most of checkpatch issuesThanks!
-RaseshRasesh Mody (3):
net/bnx2x: update and reorganize HW registers
net/bnx2x: update HSI code
net/bnx2x: update to latest FW 7.13.11
Quoted 7 lines
Quoted 2 lines
I don't think this patch comes as _base_ code, Please fix the trivial and genuine check path errors.
These are base driver changes for updating the FW to latest. The remaining checkpatch issues in this patch set are to keep uniformity and readability of the base code.
Cleaning up base code to remove these and other checkpatch issues in same context would be a separate activity(as it would result in lot more changes), independent of this patch set. Next when there is such a checkpatch code cleanup, we'll try to address the issues.Please apply these changes or let me know if v4 is needed.
Fixed WARNING:TYPO_SPELLING warning.
Series applied to dpdk-next-net-mrvl/master. Thanks.
PATCH v3 1/3 net/bnx2x: update and reorganize HW registers
In reply to Rasesh ModyUpdate and reorganize HW registers in preparation to update the firmware to version 7.13.11.
Move HW_INTERRUT_ASSERT_SET_0 out from ecore_reg.h to bnx2x.h.
--- drivers/net/bnx2x/bnx2x.c | 3 +- drivers/net/bnx2x/bnx2x.h | 67 + drivers/net/bnx2x/ecore_reg.h | 6617 ++++++++++++++++++++++----------- 3 files changed, 4553 insertions(+), 2134 deletions(-)
drivers/net/bnx2x/bnx2x.c +1 -2
@@ -4095,7 +4095,7 @@ static void bnx2x_attn_int_deasserted0(struct bnx2x_softc *sc, uint32_t attn)REG_WR (sc, reg_offset, val);rte_panic ("FATAL HW block attention set0 0x%lx" , - (attn &HW_INTERRUT_ASSERT_SET_0 )); + (attn & (unsigned long )HW_INTERRUT_ASSERT_SET_0 )); } }
@@ -10394,7 +10394,6 @@ static int bnx2x_init_hw_common(struct bnx2x_softc *sc)ecore_init_block (sc,BLOCK_TM ,PHASE_COMMON );ecore_init_block (sc,BLOCK_DORQ ,PHASE_COMMON ); -REG_WR (sc,DORQ_REG_DPM_CID_OFST ,BNX2X_DB_SHIFT );if (!CHIP_REV_IS_SLOW (sc)) {/* enable hw interrupt from doorbell Q */
drivers/net/bnx2x/bnx2x.h +67 -0
73 lines not on this page · raw message
drivers/net/bnx2x/ecore_reg.h +4485 -2132
2,912 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.18.0
Part of the diff is not shown here. View the raw message.
PATCH v3 2/3 net/bnx2x: update HSI code
In reply to Rasesh ModyUpdate hardware software common base driver code in preparation to update the firmware to version 7.13.11.
--- drivers/net/bnx2x/bnx2x.c | 20 +- drivers/net/bnx2x/bnx2x.h | 23 +- drivers/net/bnx2x/bnx2x_osal.h | 29 + drivers/net/bnx2x/bnx2x_rxtx.c | 10 +- drivers/net/bnx2x/ecore_hsi.h | 3508 ++++++++++++++++++-------------- drivers/net/bnx2x/ecore_sp.c | 11 +- 6 files changed, 1994 insertions(+), 1607 deletions(-) create mode 100644 drivers/net/bnx2x/bnx2x_osal.h
drivers/net/bnx2x/bnx2x.c +11 -9
@@ -2182,8 +2182,10 @@ int bnx2x_tx_encap(struct bnx2x_tx_queue *txq, struct rte_mbuf *m0) tx_start_bd = &txq->tx_ring[TX_BD (bd_prod, txq)].start_bd; - tx_start_bd->addr = -rte_cpu_to_le_64 (rte_mbuf_data_iova (m0)); + tx_start_bd->addr_lo = +rte_cpu_to_le_32 (U64_LO (rte_mbuf_data_iova (m0))); + tx_start_bd->addr_hi = +rte_cpu_to_le_32 (U64_HI (rte_mbuf_data_iova (m0))); tx_start_bd->nbytes =rte_cpu_to_le_16 (m0->data_len); tx_start_bd->bd_flags.as_bitfield =ETH_TX_BD_FLAGS_START_BD ; tx_start_bd->general_data =
@@ -5015,13 +5017,14 @@ static void bnx2x_update_rx_prod(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp, uint16_t rx_bd_prod, uint16_t rx_cq_prod) { - union ustorm_eth_rx_producers rx_prods; + struct ustorm_eth_rx_producers rx_prods;uint32_t i; +memset (&rx_prods,0 ,sizeof (rx_prods)); +/* update producers */ - rx_prods.prod.bd_prod = rx_bd_prod; - rx_prods.prod.cqe_prod = rx_cq_prod; - rx_prods.prod.reserved =0 ; + rx_prods.bd_prod = rx_bd_prod; + rx_prods.cqe_prod = rx_cq_prod;/* * Make sure that the BD and SGE data is updated before updating the
@@ -5034,9 +5037,8 @@ bnx2x_update_rx_prod(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp,wmb ();for (i =0 ; i < (sizeof (rx_prods) /4 ); i++) { -REG_WR (sc, - (fp->ustorm_rx_prods_offset + (i *4 )), - rx_prods.raw_data[i]); +REG_WR (sc, (fp->ustorm_rx_prods_offset + (i *4 )), + ((uint32_t *)&rx_prods)[i]); }wmb ();/* keep prod updates ordered */
drivers/net/bnx2x/bnx2x.h +7 -16
@@ -19,18 +19,7 @@#include <rte_bus_pci.h> #include <rte_io.h> -#if RTE_BYTE_ORDER ==RTE_LITTLE_ENDIAN -#ifndef __LITTLE_ENDIAN -#define __LITTLE_ENDIAN RTE_LITTLE_ENDIAN -#endif -#undef __BIG_ENDIAN -#elif RTE_BYTE_ORDER ==RTE_BIG_ENDIAN -#ifndef __BIG_ENDIAN -#define __BIG_ENDIAN RTE_BIG_ENDIAN -#endif -#undef __LITTLE_ENDIAN -#endif - +#include "bnx2x_osal.h" #include "bnx2x_ethdev.h" #include "ecore_mfw_req.h" #include "ecore_fw_defs.h"
@@ -1911,16 +1900,18 @@ bnx2x_hc_ack_sb(struct bnx2x_softc *sc, uint8_t sb_id, uint8_t storm, {uint32_t hc_addr = (HC_REG_COMMAND_REG +SC_PORT (sc) *32 +COMMAND_REG_INT_ACK ); -union igu_ack_register igu_ack; +struct igu_ack_register igu_ack; +uint32_t *val =NULL ; - igu_ack.sb.status_block_index = index; - igu_ack.sb.sb_id_and_flags = + igu_ack.status_block_index = index; + igu_ack.sb_id_and_flags = ((sb_id <<IGU_ACK_REGISTER_STATUS_BLOCK_ID_SHIFT ) | (storm <<IGU_ACK_REGISTER_STORM_ID_SHIFT ) | (update <<IGU_ACK_REGISTER_UPDATE_INDEX_SHIFT ) | (op <<IGU_ACK_REGISTER_INTERRUPT_MODE_SHIFT )); -REG_WR (sc, hc_addr, igu_ack.raw_data); + val = (uint32_t *)&igu_ack; +REG_WR (sc, hc_addr, *val);/* Make sure that ACK is written */ mb ();
drivers/net/bnx2x/bnx2x_osal.h new file +29 -0
@@ -0,0 +1,29 @@ +/* SPDX-License-Identifier: BSD-3-Clause +* Copyright (c) 2019 Cavium Inc. +* +* All rights reserved. +* www.cavium.com +*/ + +#ifndef BNX2X_OSAL_H +#define BNX2X_OSAL_H + +#include <sys/stat.h> + +#if RTE_BYTE_ORDER ==RTE_LITTLE_ENDIAN +#ifndef __LITTLE_ENDIAN +#define __LITTLE_ENDIAN RTE_LITTLE_ENDIAN +#endif +#undef __BIG_ENDIAN +#elif RTE_BYTE_ORDER ==RTE_BIG_ENDIAN +#ifndef __BIG_ENDIAN +#define __BIG_ENDIAN RTE_BIG_ENDIAN +#endif +#undef __LITTLE_ENDIAN +#endif + +#define __le16 uint16_t +#define __le32 uint32_t +#define __le64 uint64_t + +#endif /* BNX2X_OSAL_H */
drivers/net/bnx2x/bnx2x_rxtx.c +6 -4
@@ -321,12 +321,14 @@ static inline void bnx2x_upd_rx_prod_fast(struct bnx2x_softc *sc, struct bnx2x_fastpath *fp, uint16_t rx_bd_prod, uint16_t rx_cq_prod) { - union ustorm_eth_rx_producers rx_prods; + struct ustorm_eth_rx_producers rx_prods = { 0 }; +uint32_t *val =NULL ; - rx_prods.prod.bd_prod = rx_bd_prod; - rx_prods.prod.cqe_prod = rx_cq_prod; + rx_prods.bd_prod = rx_bd_prod; + rx_prods.cqe_prod = rx_cq_prod; -REG_WR (sc, fp->ustorm_rx_prods_offset, rx_prods.raw_data[0 ]); + val = (uint32_t *)&rx_prods; +REG_WR (sc, fp->ustorm_rx_prods_offset, val[0 ]); } static uint16_t
drivers/net/bnx2x/ecore_hsi.h +1940 -1568
2,871 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.18.0
Part of the diff is not shown here. View the raw message.
PATCH v3 3/3 net/bnx2x: update to latest FW 7.13.11
In reply to Rasesh ModyUse latest firmware 7.13.11.
Some of the fixes included with this FW are as following:
- Packets from a VF with pvid configured which were sent with a different vlan were transmitted instead of being discarded.
- In some multi-function configurations, inter-PF and inter-VF Tx switching is incorrectly enabled.
- Wrong assert code in FLR final cleanup in case it is sent not after FLR.
- Chip may stall in very rare cases under heavy traffic with FW GRO enabled.
- VF malicious notification error fixes.
- Default gre tunnel to IPGRE which allows proper RSS for IPGRE packets, L2GRE traffic will reach single queue.
- Removes unnecessary internal mem config, latest FW performs this autonomously.
Update the PMD version to 1.1.0.1.
--- doc/guides/nics/bnx2x.rst | 4 +- drivers/net/bnx2x/bnx2x.c | 40 +--- drivers/net/bnx2x/bnx2x.h | 5 +- drivers/net/bnx2x/ecore_fw_defs.h | 252 ++++++++++++----------- drivers/net/bnx2x/ecore_hsi.h | 2 +- drivers/net/bnx2x/ecore_init.h | 214 ++++++++++---------- drivers/net/bnx2x/ecore_init_ops.h | 192 ++++++++---------- drivers/net/bnx2x/ecore_mfw_req.h | 11 +- drivers/net/bnx2x/ecore_sp.c | 39 ++-- drivers/net/bnx2x/ecore_sp.h | 308 ++++++++++++++++++++++++----- 10 files changed, 640 insertions(+), 427 deletions(-)
doc/guides/nics/bnx2x.rst +2 -2
@@ -67,9 +67,9 @@ Supported QLogic NICs Prerequisites ------------- -- Requires firmware version **7.2.51.0**. It is included in most of the +- Requires firmware version **7.13.11.0**. It is included in most of the standard Linux distros. If it is not available visit - `linux-firmware git repository <https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/bnx2x/bnx2x-e2-7.2.51.0.fw>`_ + `linux-firmware git repository <https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/bnx2x/bnx2x-e2-7.13.11.0.fw>`_ to get the required firmware. Pre-Installation Configuration
drivers/net/bnx2x/bnx2x.c +10 -30
@@ -29,8 +29,8 @@#define BNX2X_PMD_VER_PREFIX "BNX2X PMD"#define BNX2X_PMD_VERSION_MAJOR 1 -#define BNX2X_PMD_VERSION_MINOR 0 -#define BNX2X_PMD_VERSION_REVISION 7 +#define BNX2X_PMD_VERSION_MINOR 1 +#define BNX2X_PMD_VERSION_REVISION 0#define BNX2X_PMD_VERSION_PATCH 1 static inline const char *
@@ -5231,20 +5231,6 @@ static void bnx2x_init_internal_common(struct bnx2x_softc *sc) {int i; -if (IS_MF_SI (sc)) { -/* -* In switch independent mode, the TSTORM needs to accept -* packets that failed classification, since approximate match -* mac addresses aren't written to NIG LLH. -*/ -REG_WR8 (sc, - (BAR_TSTRORM_INTMEM + -TSTORM_ACCEPT_CLASSIFY_FAILED_OFFSET ),2 ); - }else -REG_WR8 (sc, - (BAR_TSTRORM_INTMEM + -TSTORM_ACCEPT_CLASSIFY_FAILED_OFFSET ),0 ); -/* * Zero this manually as its initialization is currently missing * in the initTool.
@@ -5798,15 +5784,12 @@ static void bnx2x_init_objs(struct bnx2x_softc *sc) VNICS_PER_PATH(sc));/* RSS configuration object */ -ecore_init_rss_config_obj (&sc->rss_conf_obj, - sc->fp[0 ].cl_id, - sc->fp[0 ].index, -SC_FUNC (sc), -SC_FUNC (sc), +ecore_init_rss_config_obj (sc, &sc->rss_conf_obj, sc->fp->cl_id, + sc->fp->index,SC_FUNC (sc),SC_FUNC (sc),BNX2X_SP (sc, rss_rdata), (rte_iova_t )BNX2X_SP_MAPPING (sc, rss_rdata), -ECORE_FILTER_RSS_CONF_PENDING , - &sc->sp_state,ECORE_OBJ_TYPE_RX ); +ECORE_FILTER_RSS_CONF_PENDING , &sc->sp_state, +ECORE_OBJ_TYPE_RX ); }/*
@@ -5835,9 +5818,6 @@ static int bnx2x_func_start(struct bnx2x_softc *sc) start_params->network_cos_mode =FW_WRR ; } - start_params->gre_tunnel_mode =0 ; - start_params->gre_tunnel_rss =0 ; -return ecore_func_state_change (sc, &func_params); }
@@ -9651,8 +9631,8 @@ static void bnx2x_init_rte(struct bnx2x_softc *sc) }#define FW_HEADER_LEN 104 -#define FW_NAME_57711 "/lib/firmware/bnx2x/bnx2x-e1h-7.2.51.0.fw" -#define FW_NAME_57810 "/lib/firmware/bnx2x/bnx2x-e2-7.2.51.0.fw" +#define FW_NAME_57711 "/lib/firmware/bnx2x/bnx2x-e1h-7.13.11.0.fw" +#define FW_NAME_57810 "/lib/firmware/bnx2x/bnx2x-e2-7.13.11.0.fw"void bnx2x_load_firmware (struct bnx2x_softc *sc) {
@@ -10368,7 +10348,7 @@ static int bnx2x_init_hw_common(struct bnx2x_softc *sc)/* clean the DMAE memory */ sc->dmae_ready =1 ; -ecore_init_fill (sc,TSEM_REG_PRAM ,0 ,8 ); +ecore_init_fill (sc,TSEM_REG_PRAM ,0 ,8 ,1 );ecore_init_block (sc,BLOCK_TCM ,PHASE_COMMON );
@@ -11580,7 +11560,7 @@ static void bnx2x_reset_func(struct bnx2x_softc *sc) ilt_cli.end =ILT_NUM_PAGE_ENTRIES -1 ; ilt_cli.client_num =ILT_CLIENT_TM ; -ecore_ilt_boundry_init_op (sc, &ilt_cli,0 ); +ecore_ilt_boundary_init_op (sc, &ilt_cli,0 ,INITOP_CLEAR ); }/* this assumes that reset_port() called before reset_func() */
drivers/net/bnx2x/bnx2x.h +2 -3
@@ -83,9 +83,6 @@#ifndef ARRAY_SIZE #define ARRAY_SIZE (arr) (sizeof(arr) / sizeof((arr)[0]))#endif -#ifndef ARRSIZE -#define ARRSIZE (arr) (sizeof(arr) / sizeof((arr)[0])) -#endif #ifndef DIV_ROUND_UP #define DIV_ROUND_UP (n, d) (((n) + (d) - 1) / (d))#endif
@@ -1020,6 +1017,8 @@ struct bnx2x_pci_cap {uint16_t addr; }; +struct ecore_ilt ; +struct bnx2x_vfdb ;/* Top level device private data structure. */
drivers/net/bnx2x/ecore_fw_defs.h +135 -117
422 lines not on this page · raw message
drivers/net/bnx2x/ecore_hsi.h +1 -1
@@ -5508,7 +5508,7 @@ struct afex_vif_list_ramrod_data {* */ struct c2s_pri_trans_table_entry { -uint8_t val[8 ]; +uint8_t val[MAX_VLAN_PRIORITIES ]; };
drivers/net/bnx2x/ecore_init.h +109 -105
390 lines not on this page · raw message
drivers/net/bnx2x/ecore_init_ops.h +87 -105
334 lines not on this page · raw message
drivers/net/bnx2x/ecore_mfw_req.h +9 -2
@@ -14,7 +14,6 @@#define ECORE_MFW_REQ_H -#define PORT_0 0#define PORT_1 1#define PORT_MAX 2
@@ -143,6 +142,15 @@ struct iscsi_stats_info {uint8_t mac_add1[8 ];/* Additional Programmed MAC Addr 1. */ /* QoS Priority (per 802.1p). 0-7255 */ uint32_t qos_priority; +#define ISCSI_QOS_PRIORITY_OFFSET 0 +#define ISCSI_QOS_PRIORITY_MASK (0xffff) + +#define ISCSI_IP_ADDRESS_TYPE_OFFSET 30 +#define ISCSI_IP_ADDRESS_TYPE_MASK (3 << 30) +/* Driver does not have the IP address and type populated */ +#define ISCSI_IP_ADDRESS_TYPE_NOT_SET (0 << 30) +#define ISCSI_IP_ADDRESS_TYPE_IPV4 (1 << 30)/* IPV4 IP address set */ +#define ISCSI_IP_ADDRESS_TYPE_IPV6 (2 << 30)/* IPV6 IP address set */ uint8_t initiator_name[64 ];/* iSCSI Boot Initiator Node name. */
@@ -181,5 +189,4 @@ union drv_info_to_mcp { struct iscsi_stats_info iscsi_stat; }; -#endif /* ECORE_MFW_REQ_H */
drivers/net/bnx2x/ecore_sp.c +26 -13
@@ -501,7 +501,7 @@ static int __ecore_vlan_mac_h_read_lock(struct bnx2x_softc *sc __rte_unused,* * @details May sleep. Claims and releases execution queue lock during its run. */ -static int ecore_vlan_mac_h_read_lock (struct bnx2x_softc *sc, +int ecore_vlan_mac_h_read_lock (struct bnx2x_softc *sc,struct ecore_vlan_mac_obj *o) {int rc;
@@ -712,7 +712,7 @@ static uint8_t ecore_vlan_mac_get_rx_tx_flag(struct ecore_vlan_mac_objreturn rx_tx_flag; } -static void ecore_set_mac_in_nig (struct bnx2x_softc *sc, +void ecore_set_mac_in_nig (struct bnx2x_softc *sc,int add,unsigned char *dev_addr,int index) {uint32_t wb_data[2 ];
@@ -2764,12 +2764,16 @@ static int ecore_mcast_validate_e2(__rte_unused struct bnx2x_softc *sc, static void ecore_mcast_revert_e2(__rte_unused struct bnx2x_softc *sc,struct ecore_mcast_ramrod_params *p, -int old_num_bins) +int old_num_bins, +enum ecore_mcast_cmd cmd) {struct ecore_mcast_obj *o = p->mcast_obj; o->set_registry_size (o, old_num_bins); o->total_pending_num -= p->mcast_list_len; + +if (cmd ==ECORE_MCAST_CMD_SET ) + o->total_pending_num -= o->max_cmd_len; }/**
@@ -2915,7 +2919,8 @@ static int ecore_mcast_validate_e1h(__rte_unused struct bnx2x_softc *sc, static void ecore_mcast_revert_e1h(__rte_unused struct bnx2x_softc *sc, __rte_unused struct ecore_mcast_ramrod_params - *p, __rte_unused int old_num_bins) + *p, __rte_unused int old_num_bins, + __rte_unused enum ecore_mcast_cmd cmd) {/* Do nothing */ }
@@ -3093,7 +3098,7 @@ int ecore_config_mcast(struct bnx2x_softc *sc, r->clear_pending (r); error_exit1: - o->revert (sc, p, old_reg_size); + o->revert (sc, p, old_reg_size, cmd);return rc; }
@@ -3350,7 +3355,7 @@ static int ecore_credit_pool_get_entry_always_TRUE(__rte_unused struct* If credit is negative pool operations will always succeed (unlimited pool). * */ -static void ecore_init_credit_pool (struct ecore_credit_pool_obj *p, +void ecore_init_credit_pool (struct ecore_credit_pool_obj *p,int base,int credit) {/* Zero the object first */
@@ -3588,11 +3593,13 @@ int ecore_config_rss(struct bnx2x_softc *sc, struct ecore_config_rss_params *p)return rc; } -void ecore_init_rss_config_obj (struct ecore_rss_config_obj *rss_obj, +void ecore_init_rss_config_obj(struct bnx2x_softc *sc __rte_unused, +struct ecore_rss_config_obj *rss_obj,uint8_t cl_id,uint32_t cid,uint8_t func_id, -uint8_t engine_id,void *rdata, -ecore_dma_addr_t rdata_mapping,int state, -unsigned long *pstate,ecore_obj_type type) +uint8_t engine_id, +void *rdata,ecore_dma_addr_t rdata_mapping, +int state,unsigned long *pstate, +ecore_obj_type type) {ecore_init_raw_obj (&rss_obj->raw, cl_id, cid, func_id, rdata, rdata_mapping, state, pstate, type);
@@ -5107,8 +5114,14 @@ static int ecore_func_send_switch_update(struct bnx2x_softc *sc, struct ecore_fuECORE_MEMSET (rdata,0 ,sizeof (*rdata));/* Fill the ramrod data with provided parameters */ - rdata->tx_switch_suspend_change_flg =1 ; - rdata->tx_switch_suspend = switch_update_params->suspend; +if (ECORE_TEST_BIT (ECORE_F_UPDATE_TX_SWITCH_SUSPEND_CHNG , + &switch_update_params->changes)) { + rdata->tx_switch_suspend_change_flg =1 ; + rdata->tx_switch_suspend = +ECORE_TEST_BIT (ECORE_F_UPDATE_TX_SWITCH_SUSPEND , + &switch_update_params->changes); + } + rdata->echo =SWITCH_UPDATE ; return ecore_sp_post(sc, RAMROD_CMD_ID_COMMON_FUNCTION_UPDATE, 0,
@@ -5220,7 +5233,7 @@ static int ecore_func_send_tx_start(struct bnx2x_softc *sc, struct ecore_func_st rdata->dcb_enabled = tx_start_params->dcb_enabled; rdata->dcb_version = tx_start_params->dcb_version; - rdata->dont_add_pri_0_en = tx_start_params->dont_add_pri_0; + rdata->dont_add_pri_0_en = tx_start_params->dont_add_pri_0_en;for (i =0 ; i <ARRAY_SIZE (rdata->traffic_type_to_priority_cos); i++) rdata->traffic_type_to_priority_cos[i] =
drivers/net/bnx2x/ecore_sp.h +259 -49
628 lines not on this page · raw message
Signature · 1 line
2.18.0