Netdev Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH net 0/6] bnxt_en: Bug fixes.
@ 2019-08-16 22:33 Michael Chan
  2019-08-16 22:33 ` [PATCH net 1/6] bnxt_en: Fix VNIC clearing logic for 57500 chips Michael Chan
                   ` (6 more replies)
  0 siblings, 7 replies; 15+ messages in thread
From: Michael Chan @ 2019-08-16 22:33 UTC (permalink / raw)
  To: davem; +Cc: netdev

2 Bug fixes related to 57500 shutdown sequence and doorbell sequence,
2 TC Flower bug fixes related to the setting of the flow direction,
1 NVRAM update bug fix, and a minor fix to suppress an unnecessary
error message.  Please queue for -stable as well.  Thanks.

Michael Chan (2):
  bnxt_en: Fix VNIC clearing logic for 57500 chips.
  bnxt_en: Improve RX doorbell sequence.

Somnath Kotur (1):
  bnxt_en: Fix to include flow direction in L2 key

Vasundhara Volam (2):
  bnxt_en: Fix handling FRAG_ERR when NVM_INSTALL_UPDATE cmd fails
  bnxt_en: Suppress HWRM errors for HWRM_NVM_GET_VARIABLE command

Venkat Duvvuru (1):
  bnxt_en: Use correct src_fid to determine direction of the flow

 drivers/net/ethernet/broadcom/bnxt/bnxt.c         | 36 ++++++++++++++++-------
 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c |  9 ++++--
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 12 ++++----
 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c      |  8 ++---
 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h      |  2 +-
 5 files changed, 40 insertions(+), 27 deletions(-)

-- 
2.5.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net 1/6] bnxt_en: Fix VNIC clearing logic for 57500 chips.
  2019-08-16 22:33 [PATCH net 0/6] bnxt_en: Bug fixes Michael Chan
@ 2019-08-16 22:33 ` Michael Chan
  2019-08-16 22:33 ` [PATCH net 2/6] bnxt_en: Improve RX doorbell sequence Michael Chan
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Michael Chan @ 2019-08-16 22:33 UTC (permalink / raw)
  To: davem; +Cc: netdev

During device shutdown, the VNIC clearing sequence needs to be modified
to free the VNIC first before freeing the RSS contexts.  The current
code is doing the reverse and we can get mis-directed RX completions
to CP ring ID 0 when the RSS contexts are freed and zeroed.  These
mis-directed packets may cause the driver to crash.  The clearing
of RSS contexts is not required with the new sequence.

Refactor the VNCI clearing logic into a new function bnxt_clear_vnic()
and do the chip specific VNIC clearing sequence.

Fixes: 7b3af4f75b81 ("bnxt_en: Add RSS support for 57500 chips.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 7070349..1ef224f 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -7016,19 +7016,29 @@ static void bnxt_hwrm_clear_vnic_rss(struct bnxt *bp)
 		bnxt_hwrm_vnic_set_rss(bp, i, false);
 }
 
-static void bnxt_hwrm_resource_free(struct bnxt *bp, bool close_path,
-				    bool irq_re_init)
+static void bnxt_clear_vnic(struct bnxt *bp)
 {
-	if (bp->vnic_info) {
-		bnxt_hwrm_clear_vnic_filter(bp);
+	if (!bp->vnic_info)
+		return;
+
+	bnxt_hwrm_clear_vnic_filter(bp);
+	if (!(bp->flags & BNXT_FLAG_CHIP_P5)) {
 		/* clear all RSS setting before free vnic ctx */
 		bnxt_hwrm_clear_vnic_rss(bp);
 		bnxt_hwrm_vnic_ctx_free(bp);
-		/* before free the vnic, undo the vnic tpa settings */
-		if (bp->flags & BNXT_FLAG_TPA)
-			bnxt_set_tpa(bp, false);
-		bnxt_hwrm_vnic_free(bp);
 	}
+	/* before free the vnic, undo the vnic tpa settings */
+	if (bp->flags & BNXT_FLAG_TPA)
+		bnxt_set_tpa(bp, false);
+	bnxt_hwrm_vnic_free(bp);
+	if (bp->flags & BNXT_FLAG_CHIP_P5)
+		bnxt_hwrm_vnic_ctx_free(bp);
+}
+
+static void bnxt_hwrm_resource_free(struct bnxt *bp, bool close_path,
+				    bool irq_re_init)
+{
+	bnxt_clear_vnic(bp);
 	bnxt_hwrm_ring_free(bp, close_path);
 	bnxt_hwrm_ring_grp_free(bp);
 	if (irq_re_init) {
-- 
2.5.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net 2/6] bnxt_en: Improve RX doorbell sequence.
  2019-08-16 22:33 [PATCH net 0/6] bnxt_en: Bug fixes Michael Chan
  2019-08-16 22:33 ` [PATCH net 1/6] bnxt_en: Fix VNIC clearing logic for 57500 chips Michael Chan
@ 2019-08-16 22:33 ` Michael Chan
  2019-08-16 22:33 ` [PATCH net 3/6] bnxt_en: Fix handling FRAG_ERR when NVM_INSTALL_UPDATE cmd fails Michael Chan
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Michael Chan @ 2019-08-16 22:33 UTC (permalink / raw)
  To: davem; +Cc: netdev

When both RX buffers and RX aggregation buffers have to be
replenished at the end of NAPI, post the RX aggregation buffers first
before RX buffers.  Otherwise, we may run into a situation where
there are only RX buffers without RX aggregation buffers for a split
second.  This will cause the hardware to abort the RX packet and
report buffer errors, which will cause unnecessary cleanup by the
driver.

Ringing the Aggregation ring doorbell first before the RX ring doorbell
will prevent some of these buffer errors.  Use the same sequence during
ring initialization as well.

Fixes: 697197e5a173 ("bnxt_en: Re-structure doorbells.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 1ef224f..8dce406 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -2021,9 +2021,9 @@ static void __bnxt_poll_work_done(struct bnxt *bp, struct bnxt_napi *bnapi)
 	if (bnapi->events & BNXT_RX_EVENT) {
 		struct bnxt_rx_ring_info *rxr = bnapi->rx_ring;
 
-		bnxt_db_write(bp, &rxr->rx_db, rxr->rx_prod);
 		if (bnapi->events & BNXT_AGG_EVENT)
 			bnxt_db_write(bp, &rxr->rx_agg_db, rxr->rx_agg_prod);
+		bnxt_db_write(bp, &rxr->rx_db, rxr->rx_prod);
 	}
 	bnapi->events = 0;
 }
@@ -5064,6 +5064,7 @@ static void bnxt_set_db(struct bnxt *bp, struct bnxt_db_info *db, u32 ring_type,
 
 static int bnxt_hwrm_ring_alloc(struct bnxt *bp)
 {
+	bool agg_rings = !!(bp->flags & BNXT_FLAG_AGG_RINGS);
 	int i, rc = 0;
 	u32 type;
 
@@ -5139,7 +5140,9 @@ static int bnxt_hwrm_ring_alloc(struct bnxt *bp)
 		if (rc)
 			goto err_out;
 		bnxt_set_db(bp, &rxr->rx_db, type, map_idx, ring->fw_ring_id);
-		bnxt_db_write(bp, &rxr->rx_db, rxr->rx_prod);
+		/* If we have agg rings, post agg buffers first. */
+		if (!agg_rings)
+			bnxt_db_write(bp, &rxr->rx_db, rxr->rx_prod);
 		bp->grp_info[map_idx].rx_fw_ring_id = ring->fw_ring_id;
 		if (bp->flags & BNXT_FLAG_CHIP_P5) {
 			struct bnxt_cp_ring_info *cpr = &bnapi->cp_ring;
@@ -5158,7 +5161,7 @@ static int bnxt_hwrm_ring_alloc(struct bnxt *bp)
 		}
 	}
 
-	if (bp->flags & BNXT_FLAG_AGG_RINGS) {
+	if (agg_rings) {
 		type = HWRM_RING_ALLOC_AGG;
 		for (i = 0; i < bp->rx_nr_rings; i++) {
 			struct bnxt_rx_ring_info *rxr = &bp->rx_ring[i];
@@ -5174,6 +5177,7 @@ static int bnxt_hwrm_ring_alloc(struct bnxt *bp)
 			bnxt_set_db(bp, &rxr->rx_agg_db, type, map_idx,
 				    ring->fw_ring_id);
 			bnxt_db_write(bp, &rxr->rx_agg_db, rxr->rx_agg_prod);
+			bnxt_db_write(bp, &rxr->rx_db, rxr->rx_prod);
 			bp->grp_info[grp_idx].agg_fw_ring_id = ring->fw_ring_id;
 		}
 	}
-- 
2.5.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net 3/6] bnxt_en: Fix handling FRAG_ERR when NVM_INSTALL_UPDATE cmd fails
  2019-08-16 22:33 [PATCH net 0/6] bnxt_en: Bug fixes Michael Chan
  2019-08-16 22:33 ` [PATCH net 1/6] bnxt_en: Fix VNIC clearing logic for 57500 chips Michael Chan
  2019-08-16 22:33 ` [PATCH net 2/6] bnxt_en: Improve RX doorbell sequence Michael Chan
@ 2019-08-16 22:33 ` Michael Chan
  2019-08-16 22:33 ` [PATCH net 4/6] bnxt_en: Suppress HWRM errors for HWRM_NVM_GET_VARIABLE command Michael Chan
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Michael Chan @ 2019-08-16 22:33 UTC (permalink / raw)
  To: davem; +Cc: netdev, Vasundhara Volam

From: Vasundhara Volam <vasundhara-v.volam@broadcom.com>

If FW returns FRAG_ERR in response error code, driver is resending the
command only when HWRM command returns success. Fix the code to resend
NVM_INSTALL_UPDATE command with DEFRAG install flags, if FW returns
FRAG_ERR in its response error code.

Fixes: cb4d1d626145 ("bnxt_en: Retry failed NVM_INSTALL_UPDATE with defragmentation flag enabled.")
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
index c7ee63d..8445a0c 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
@@ -2016,21 +2016,19 @@ static int bnxt_flash_package_from_file(struct net_device *dev,
 	mutex_lock(&bp->hwrm_cmd_lock);
 	hwrm_err = _hwrm_send_message(bp, &install, sizeof(install),
 				      INSTALL_PACKAGE_TIMEOUT);
-	if (hwrm_err)
-		goto flash_pkg_exit;
-
-	if (resp->error_code) {
+	if (hwrm_err) {
 		u8 error_code = ((struct hwrm_err_output *)resp)->cmd_err;
 
-		if (error_code == NVM_INSTALL_UPDATE_CMD_ERR_CODE_FRAG_ERR) {
+		if (resp->error_code && error_code ==
+		    NVM_INSTALL_UPDATE_CMD_ERR_CODE_FRAG_ERR) {
 			install.flags |= cpu_to_le16(
 			       NVM_INSTALL_UPDATE_REQ_FLAGS_ALLOWED_TO_DEFRAG);
 			hwrm_err = _hwrm_send_message(bp, &install,
 						      sizeof(install),
 						      INSTALL_PACKAGE_TIMEOUT);
-			if (hwrm_err)
-				goto flash_pkg_exit;
 		}
+		if (hwrm_err)
+			goto flash_pkg_exit;
 	}
 
 	if (resp->result) {
-- 
2.5.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net 4/6] bnxt_en: Suppress HWRM errors for HWRM_NVM_GET_VARIABLE command
  2019-08-16 22:33 [PATCH net 0/6] bnxt_en: Bug fixes Michael Chan
                   ` (2 preceding siblings ...)
  2019-08-16 22:33 ` [PATCH net 3/6] bnxt_en: Fix handling FRAG_ERR when NVM_INSTALL_UPDATE cmd fails Michael Chan
@ 2019-08-16 22:33 ` Michael Chan
  2019-08-16 22:33 ` [PATCH net 5/6] bnxt_en: Use correct src_fid to determine direction of the flow Michael Chan
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 15+ messages in thread
From: Michael Chan @ 2019-08-16 22:33 UTC (permalink / raw)
  To: davem; +Cc: netdev, Vasundhara Volam

From: Vasundhara Volam <vasundhara-v.volam@broadcom.com>

For newly added NVM parameters, older firmware may not have the support.
Suppress the error message to avoid the unncessary error message which is
triggered when devlink calls the driver during initialization.

Fixes: 782a624d00fa ("bnxt_en: Add bnxt_en initial params table and register it.")
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
index 549c90d3..c05d663 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
@@ -98,10 +98,13 @@ static int bnxt_hwrm_nvm_req(struct bnxt *bp, u32 param_id, void *msg,
 	if (idx)
 		req->dimensions = cpu_to_le16(1);
 
-	if (req->req_type == cpu_to_le16(HWRM_NVM_SET_VARIABLE))
+	if (req->req_type == cpu_to_le16(HWRM_NVM_SET_VARIABLE)) {
 		memcpy(data_addr, buf, bytesize);
-
-	rc = hwrm_send_message(bp, msg, msg_len, HWRM_CMD_TIMEOUT);
+		rc = hwrm_send_message(bp, msg, msg_len, HWRM_CMD_TIMEOUT);
+	} else {
+		rc = hwrm_send_message_silent(bp, msg, msg_len,
+					      HWRM_CMD_TIMEOUT);
+	}
 	if (!rc && req->req_type == cpu_to_le16(HWRM_NVM_GET_VARIABLE))
 		memcpy(buf, data_addr, bytesize);
 
-- 
2.5.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net 5/6] bnxt_en: Use correct src_fid to determine direction of the flow
  2019-08-16 22:33 [PATCH net 0/6] bnxt_en: Bug fixes Michael Chan
                   ` (3 preceding siblings ...)
  2019-08-16 22:33 ` [PATCH net 4/6] bnxt_en: Suppress HWRM errors for HWRM_NVM_GET_VARIABLE command Michael Chan
@ 2019-08-16 22:33 ` Michael Chan
  2019-08-16 22:33 ` [PATCH net 6/6] bnxt_en: Fix to include flow direction in L2 key Michael Chan
  2019-08-18 20:06 ` [PATCH net 0/6] bnxt_en: Bug fixes David Miller
  6 siblings, 0 replies; 15+ messages in thread
From: Michael Chan @ 2019-08-16 22:33 UTC (permalink / raw)
  To: davem; +Cc: netdev, Venkat Duvvuru

From: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>

Direction of the flow is determined using src_fid. For an RX flow,
src_fid is PF's fid and for TX flow, src_fid is VF's fid. Direction
of the flow must be specified, when getting statistics for that flow.
Currently, for DECAP flow, direction is determined incorrectly, i.e.,
direction is initialized as TX for DECAP flow, instead of RX. Because
of which, stats are not reported for this DECAP flow, though it is
offloaded and there is traffic for that flow, resulting in flow age out.

This patch fixes the problem by determining the DECAP flow's direction
using correct fid.  Set the flow direction in all cases for consistency
even if 64-bit flow handle is not used.

Fixes: abd43a13525d ("bnxt_en: Support for 64-bit flow handle.")
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
index 6fe4a71..6224c30 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
@@ -1285,9 +1285,7 @@ static int bnxt_tc_add_flow(struct bnxt *bp, u16 src_fid,
 		goto free_node;
 
 	bnxt_tc_set_src_fid(bp, flow, src_fid);
-
-	if (bp->fw_cap & BNXT_FW_CAP_OVS_64BIT_HANDLE)
-		bnxt_tc_set_flow_dir(bp, flow, src_fid);
+	bnxt_tc_set_flow_dir(bp, flow, flow->src_fid);
 
 	if (!bnxt_tc_can_offload(bp, flow)) {
 		rc = -EOPNOTSUPP;
-- 
2.5.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net 6/6] bnxt_en: Fix to include flow direction in L2 key
  2019-08-16 22:33 [PATCH net 0/6] bnxt_en: Bug fixes Michael Chan
                   ` (4 preceding siblings ...)
  2019-08-16 22:33 ` [PATCH net 5/6] bnxt_en: Use correct src_fid to determine direction of the flow Michael Chan
@ 2019-08-16 22:33 ` Michael Chan
  2019-08-17  8:49   ` kbuild test robot
  2019-08-18 20:06 ` [PATCH net 0/6] bnxt_en: Bug fixes David Miller
  6 siblings, 1 reply; 15+ messages in thread
From: Michael Chan @ 2019-08-16 22:33 UTC (permalink / raw)
  To: davem; +Cc: netdev, Somnath Kotur

From: Somnath Kotur <somnath.kotur@broadcom.com>

FW expects the driver to provide unique flow reference handles
for Tx or Rx flows. When a Tx flow and an Rx flow end up sharing
a reference handle, flow offload does not seem to work.
This could happen in the case of 2 flows having their L2 fields
wildcarded but in different direction.
Fix to incorporate the flow direction as part of the L2 key

Fixes: abd43a13525d ("bnxt_en: Support for 64-bit flow handle.")
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c | 4 ++--
 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
index 6224c30..dd621f6 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
@@ -1236,7 +1236,7 @@ static int __bnxt_tc_del_flow(struct bnxt *bp,
 static void bnxt_tc_set_flow_dir(struct bnxt *bp, struct bnxt_tc_flow *flow,
 				 u16 src_fid)
 {
-	flow->dir = (bp->pf.fw_fid == src_fid) ? BNXT_DIR_RX : BNXT_DIR_TX;
+	flow->l2_key.dir = (bp->pf.fw_fid == src_fid) ? BNXT_DIR_RX : BNXT_DIR_TX;
 }
 
 static void bnxt_tc_set_src_fid(struct bnxt *bp, struct bnxt_tc_flow *flow,
@@ -1405,7 +1405,7 @@ static void bnxt_fill_cfa_stats_req(struct bnxt *bp,
 		 * 2. 15th bit of flow_handle must specify the flow
 		 *    direction (TX/RX).
 		 */
-		if (flow_node->flow.dir == BNXT_DIR_RX)
+		if (flow_node->flow.l2_key.dir == BNXT_DIR_RX)
 			handle = CFA_FLOW_INFO_REQ_FLOW_HANDLE_DIR_RX |
 				 CFA_FLOW_INFO_REQ_FLOW_HANDLE_MAX_MASK;
 		else
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h
index ffec57d..e6373b3 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_tc.h
@@ -17,6 +17,7 @@
 /* Structs used for storing the filter/actions of the TC cmd.
  */
 struct bnxt_tc_l2_key {
+	u8		dir;
 	u8		dmac[ETH_ALEN];
 	u8		smac[ETH_ALEN];
 	__be16		inner_vlan_tpid;
@@ -98,7 +99,6 @@ struct bnxt_tc_flow {
 
 	/* flow applicable to pkts ingressing on this fid */
 	u16				src_fid;
-	u8				dir;
 #define BNXT_DIR_RX	1
 #define BNXT_DIR_TX	0
 	struct bnxt_tc_l2_key		l2_key;
-- 
2.5.1


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net 6/6] bnxt_en: Fix to include flow direction in L2 key
  2019-08-16 22:33 ` [PATCH net 6/6] bnxt_en: Fix to include flow direction in L2 key Michael Chan
@ 2019-08-17  8:49   ` kbuild test robot
  0 siblings, 0 replies; 15+ messages in thread
From: kbuild test robot @ 2019-08-17  8:49 UTC (permalink / raw)
  To: Michael Chan; +Cc: kbuild-all, davem, netdev, Somnath Kotur

[-- Attachment #1: Type: text/plain, Size: 8510 bytes --]

Hi Michael,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net/master]

url:    https://github.com/0day-ci/linux/commits/Michael-Chan/bnxt_en-Bug-fixes/20190817-155755
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=sparc64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c: In function 'bnxt_tc_get_decap_handle':
>> drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c:1047:9: warning: braces around scalar initializer
     struct bnxt_tc_l2_key l2_info = { {0} };
            ^~~~~~~~~~~~~~
   drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c:1047:9: note: (near initialization for 'l2_info.dir')

vim +1047 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c

8c95f773b4a367 Sathya Perla          2017-10-26  1040  
8c95f773b4a367 Sathya Perla          2017-10-26  1041  static int bnxt_tc_get_decap_handle(struct bnxt *bp, struct bnxt_tc_flow *flow,
8c95f773b4a367 Sathya Perla          2017-10-26  1042  				    struct bnxt_tc_flow_node *flow_node,
8c95f773b4a367 Sathya Perla          2017-10-26  1043  				    __le32 *decap_filter_handle)
8c95f773b4a367 Sathya Perla          2017-10-26  1044  {
8c95f773b4a367 Sathya Perla          2017-10-26  1045  	struct ip_tunnel_key *decap_key = &flow->tun_key;
cd66358e52f745 Sathya Perla          2017-10-26  1046  	struct bnxt_tc_info *tc_info = bp->tc_info;
8c95f773b4a367 Sathya Perla          2017-10-26 @1047  	struct bnxt_tc_l2_key l2_info = { {0} };
8c95f773b4a367 Sathya Perla          2017-10-26  1048  	struct bnxt_tc_tunnel_node *decap_node;
8c95f773b4a367 Sathya Perla          2017-10-26  1049  	struct ip_tunnel_key tun_key = { 0 };
8c95f773b4a367 Sathya Perla          2017-10-26  1050  	struct bnxt_tc_l2_key *decap_l2_info;
8c95f773b4a367 Sathya Perla          2017-10-26  1051  	__le32 ref_decap_handle;
8c95f773b4a367 Sathya Perla          2017-10-26  1052  	int rc;
8c95f773b4a367 Sathya Perla          2017-10-26  1053  
8c95f773b4a367 Sathya Perla          2017-10-26  1054  	/* Check if there's another flow using the same tunnel decap.
8c95f773b4a367 Sathya Perla          2017-10-26  1055  	 * If not, add this tunnel to the table and resolve the other
479ca3bf91da97 Sriharsha Basavapatna 2018-04-11  1056  	 * tunnel header fileds. Ignore src_port in the tunnel_key,
479ca3bf91da97 Sriharsha Basavapatna 2018-04-11  1057  	 * since it is not required for decap filters.
8c95f773b4a367 Sathya Perla          2017-10-26  1058  	 */
479ca3bf91da97 Sriharsha Basavapatna 2018-04-11  1059  	decap_key->tp_src = 0;
8c95f773b4a367 Sathya Perla          2017-10-26  1060  	decap_node = bnxt_tc_get_tunnel_node(bp, &tc_info->decap_table,
8c95f773b4a367 Sathya Perla          2017-10-26  1061  					     &tc_info->decap_ht_params,
8c95f773b4a367 Sathya Perla          2017-10-26  1062  					     decap_key);
8c95f773b4a367 Sathya Perla          2017-10-26  1063  	if (!decap_node)
8c95f773b4a367 Sathya Perla          2017-10-26  1064  		return -ENOMEM;
8c95f773b4a367 Sathya Perla          2017-10-26  1065  
8c95f773b4a367 Sathya Perla          2017-10-26  1066  	flow_node->decap_node = decap_node;
8c95f773b4a367 Sathya Perla          2017-10-26  1067  
8c95f773b4a367 Sathya Perla          2017-10-26  1068  	if (decap_node->tunnel_handle != INVALID_TUNNEL_HANDLE)
8c95f773b4a367 Sathya Perla          2017-10-26  1069  		goto done;
8c95f773b4a367 Sathya Perla          2017-10-26  1070  
8c95f773b4a367 Sathya Perla          2017-10-26  1071  	/* Resolve the L2 fields for tunnel decap
8c95f773b4a367 Sathya Perla          2017-10-26  1072  	 * Resolve the route for remote vtep (saddr) of the decap key
8c95f773b4a367 Sathya Perla          2017-10-26  1073  	 * Find it's next-hop mac addrs
8c95f773b4a367 Sathya Perla          2017-10-26  1074  	 */
8c95f773b4a367 Sathya Perla          2017-10-26  1075  	tun_key.u.ipv4.dst = flow->tun_key.u.ipv4.src;
8c95f773b4a367 Sathya Perla          2017-10-26  1076  	tun_key.tp_dst = flow->tun_key.tp_dst;
e9ecc731a87912 Sathya Perla          2017-12-01  1077  	rc = bnxt_tc_resolve_tunnel_hdrs(bp, &tun_key, &l2_info);
8c95f773b4a367 Sathya Perla          2017-10-26  1078  	if (rc)
8c95f773b4a367 Sathya Perla          2017-10-26  1079  		goto put_decap;
8c95f773b4a367 Sathya Perla          2017-10-26  1080  
8c95f773b4a367 Sathya Perla          2017-10-26  1081  	decap_l2_info = &decap_node->l2_info;
c8fb7b8259c67b Sunil Challa          2017-12-01  1082  	/* decap smac is wildcarded */
8c95f773b4a367 Sathya Perla          2017-10-26  1083  	ether_addr_copy(decap_l2_info->dmac, l2_info.smac);
8c95f773b4a367 Sathya Perla          2017-10-26  1084  	if (l2_info.num_vlans) {
8c95f773b4a367 Sathya Perla          2017-10-26  1085  		decap_l2_info->num_vlans = l2_info.num_vlans;
8c95f773b4a367 Sathya Perla          2017-10-26  1086  		decap_l2_info->inner_vlan_tpid = l2_info.inner_vlan_tpid;
8c95f773b4a367 Sathya Perla          2017-10-26  1087  		decap_l2_info->inner_vlan_tci = l2_info.inner_vlan_tci;
8c95f773b4a367 Sathya Perla          2017-10-26  1088  	}
8c95f773b4a367 Sathya Perla          2017-10-26  1089  	flow->flags |= BNXT_TC_FLOW_FLAGS_TUNL_ETH_ADDRS;
8c95f773b4a367 Sathya Perla          2017-10-26  1090  
8c95f773b4a367 Sathya Perla          2017-10-26  1091  	/* For getting a decap_filter_handle we first need to check if
8c95f773b4a367 Sathya Perla          2017-10-26  1092  	 * there are any other decap flows that share the same tunnel L2
8c95f773b4a367 Sathya Perla          2017-10-26  1093  	 * key and if so, pass that flow's decap_filter_handle as the
8c95f773b4a367 Sathya Perla          2017-10-26  1094  	 * ref_decap_handle for this flow.
8c95f773b4a367 Sathya Perla          2017-10-26  1095  	 */
8c95f773b4a367 Sathya Perla          2017-10-26  1096  	rc = bnxt_tc_get_ref_decap_handle(bp, flow, decap_l2_info, flow_node,
8c95f773b4a367 Sathya Perla          2017-10-26  1097  					  &ref_decap_handle);
8c95f773b4a367 Sathya Perla          2017-10-26  1098  	if (rc)
8c95f773b4a367 Sathya Perla          2017-10-26  1099  		goto put_decap;
8c95f773b4a367 Sathya Perla          2017-10-26  1100  
8c95f773b4a367 Sathya Perla          2017-10-26  1101  	/* Issue the hwrm cmd to allocate a decap filter handle */
8c95f773b4a367 Sathya Perla          2017-10-26  1102  	rc = hwrm_cfa_decap_filter_alloc(bp, flow, decap_l2_info,
8c95f773b4a367 Sathya Perla          2017-10-26  1103  					 ref_decap_handle,
8c95f773b4a367 Sathya Perla          2017-10-26  1104  					 &decap_node->tunnel_handle);
8c95f773b4a367 Sathya Perla          2017-10-26  1105  	if (rc)
8c95f773b4a367 Sathya Perla          2017-10-26  1106  		goto put_decap_l2;
8c95f773b4a367 Sathya Perla          2017-10-26  1107  
8c95f773b4a367 Sathya Perla          2017-10-26  1108  done:
8c95f773b4a367 Sathya Perla          2017-10-26  1109  	*decap_filter_handle = decap_node->tunnel_handle;
8c95f773b4a367 Sathya Perla          2017-10-26  1110  	return 0;
8c95f773b4a367 Sathya Perla          2017-10-26  1111  
8c95f773b4a367 Sathya Perla          2017-10-26  1112  put_decap_l2:
8c95f773b4a367 Sathya Perla          2017-10-26  1113  	bnxt_tc_put_decap_l2_node(bp, flow_node);
8c95f773b4a367 Sathya Perla          2017-10-26  1114  put_decap:
8c95f773b4a367 Sathya Perla          2017-10-26  1115  	bnxt_tc_put_tunnel_node(bp, &tc_info->decap_table,
8c95f773b4a367 Sathya Perla          2017-10-26  1116  				&tc_info->decap_ht_params,
8c95f773b4a367 Sathya Perla          2017-10-26  1117  				flow_node->decap_node);
8c95f773b4a367 Sathya Perla          2017-10-26  1118  	return rc;
8c95f773b4a367 Sathya Perla          2017-10-26  1119  }
8c95f773b4a367 Sathya Perla          2017-10-26  1120  

:::::: The code at line 1047 was first introduced by commit
:::::: 8c95f773b4a367f7b9bcca7ab5f85675cfc812e9 bnxt_en: add support for Flower based vxlan encap/decap offload

:::::: TO: Sathya Perla <sathya.perla@broadcom.com>
:::::: CC: David S. Miller <davem@davemloft.net>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 58668 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net 0/6] bnxt_en: Bug fixes.
  2019-08-16 22:33 [PATCH net 0/6] bnxt_en: Bug fixes Michael Chan
                   ` (5 preceding siblings ...)
  2019-08-16 22:33 ` [PATCH net 6/6] bnxt_en: Fix to include flow direction in L2 key Michael Chan
@ 2019-08-18 20:06 ` David Miller
  6 siblings, 0 replies; 15+ messages in thread
From: David Miller @ 2019-08-18 20:06 UTC (permalink / raw)
  To: michael.chan; +Cc: netdev

From: Michael Chan <michael.chan@broadcom.com>
Date: Fri, 16 Aug 2019 18:33:31 -0400

> 2 Bug fixes related to 57500 shutdown sequence and doorbell sequence,
> 2 TC Flower bug fixes related to the setting of the flow direction,
> 1 NVRAM update bug fix, and a minor fix to suppress an unnecessary
> error message.  Please queue for -stable as well.  Thanks.

Series applied and queued up for -stable, thanks.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net 0/6] bnxt_en: Bug fixes.
  2018-11-15  8:25 Michael Chan
@ 2018-11-15 17:40 ` David Miller
  0 siblings, 0 replies; 15+ messages in thread
From: David Miller @ 2018-11-15 17:40 UTC (permalink / raw)
  To: michael.chan; +Cc: netdev

From: Michael Chan <michael.chan@broadcom.com>
Date: Thu, 15 Nov 2018 03:25:36 -0500

> Most of the bug fixes are related to the new 57500 chips, including some
> initialization and counter fixes, disabling RDMA support, and a
> workaround for occasional missing interrupts.  The last patch from
> Vasundhara fixes the year/month parameters for firmware coredump.

Series applied, thanks Michael.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net 0/6] bnxt_en: Bug fixes.
@ 2018-11-15  8:25 Michael Chan
  2018-11-15 17:40 ` David Miller
  0 siblings, 1 reply; 15+ messages in thread
From: Michael Chan @ 2018-11-15  8:25 UTC (permalink / raw)
  To: davem; +Cc: netdev

Most of the bug fixes are related to the new 57500 chips, including some
initialization and counter fixes, disabling RDMA support, and a
workaround for occasional missing interrupts.  The last patch from
Vasundhara fixes the year/month parameters for firmware coredump.

Michael Chan (5):
  bnxt_en: Fix RSS context allocation.
  bnxt_en: Fix rx_l4_csum_errors counter on 57500 devices.
  bnxt_en: Disable RDMA support on the 57500 chips.
  bnxt_en: Workaround occasional TX timeout on 57500 A0.
  bnxt_en: Add software "missed_irqs" counter.

Vasundhara Volam (1):
  bnxt_en: Fix filling time in bnxt_fill_coredump_record()

 drivers/net/ethernet/broadcom/bnxt/bnxt.c         | 70 ++++++++++++++++++++++-
 drivers/net/ethernet/broadcom/bnxt/bnxt.h         |  4 ++
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c |  9 ++-
 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c     |  3 +
 4 files changed, 81 insertions(+), 5 deletions(-)

-- 
2.5.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net 0/6] bnxt_en: Bug fixes.
  2018-07-09  6:24 Michael Chan
@ 2018-07-09 23:28 ` David Miller
  0 siblings, 0 replies; 15+ messages in thread
From: David Miller @ 2018-07-09 23:28 UTC (permalink / raw)
  To: michael.chan; +Cc: netdev

From: Michael Chan <michael.chan@broadcom.com>
Date: Mon,  9 Jul 2018 02:24:46 -0400

> These are bug fixes in error code paths, TC Flower VLAN TCI flow
> checking bug fix, proper filtering of Broadcast packets if IFF_BROADCAST
> is not set, and a bug fix in bnxt_get_max_rings() to return 0 ring
> parameters when the return value is -ENOMEM.

Series applied, thank you.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net 0/6] bnxt_en: Bug fixes.
@ 2018-07-09  6:24 Michael Chan
  2018-07-09 23:28 ` David Miller
  0 siblings, 1 reply; 15+ messages in thread
From: Michael Chan @ 2018-07-09  6:24 UTC (permalink / raw)
  To: davem; +Cc: netdev

These are bug fixes in error code paths, TC Flower VLAN TCI flow
checking bug fix, proper filtering of Broadcast packets if IFF_BROADCAST
is not set, and a bug fix in bnxt_get_max_rings() to return 0 ring
parameters when the return value is -ENOMEM.

Michael Chan (4):
  bnxt_en: Fix inconsistent BNXT_FLAG_AGG_RINGS logic.
  bnxt_en: Always set output parameters in bnxt_get_max_rings().
  bnxt_en: Support clearing of the IFF_BROADCAST flag.
  bnxt_en: Do not modify max IRQ count after RDMA driver requests/frees
    IRQs.

Venkat Duvvuru (1):
  bnxt_en: Fix the vlan_tci exact match check.

Vikas Gupta (1):
  bnxt_en: Fix for system hang if request_irq fails

 drivers/net/ethernet/broadcom/bnxt/bnxt.c     | 24 ++++++++++++++-------
 drivers/net/ethernet/broadcom/bnxt/bnxt.h     |  1 -
 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c  | 30 ++++++++++++++++++++++++---
 drivers/net/ethernet/broadcom/bnxt/bnxt_ulp.c |  2 --
 4 files changed, 44 insertions(+), 13 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net 0/6] bnxt_en: bug fixes.
  2017-10-14  1:09 [PATCH net 0/6] bnxt_en: bug fixes Michael Chan
@ 2017-10-15  1:52 ` David Miller
  0 siblings, 0 replies; 15+ messages in thread
From: David Miller @ 2017-10-15  1:52 UTC (permalink / raw)
  To: michael.chan; +Cc: netdev

From: Michael Chan <michael.chan@broadcom.com>
Date: Fri, 13 Oct 2017 21:09:28 -0400

> Various bug fixes for the VF/PF link change logic, VF resource checking,
> potential firmware response corruption on NVRAM and DCB parameters,
> and reading the wrong register for PCIe link speed on the VF.

Series applied, thanks.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net 0/6] bnxt_en: bug fixes.
@ 2017-10-14  1:09 Michael Chan
  2017-10-15  1:52 ` David Miller
  0 siblings, 1 reply; 15+ messages in thread
From: Michael Chan @ 2017-10-14  1:09 UTC (permalink / raw)
  To: davem; +Cc: netdev

Various bug fixes for the VF/PF link change logic, VF resource checking,
potential firmware response corruption on NVRAM and DCB parameters,
and reading the wrong register for PCIe link speed on the VF.

Michael Chan (4):
  bnxt_en: Improve VF/PF link change logic.
  bnxt_en: Don't use rtnl lock to protect link change logic in
    workqueue.
  bnxt_en: Fix VF resource checking.
  bnxt_en: Fix possible corrupted NVRAM parameters from firmware
    response.

Sankar Patchineelam (1):
  bnxt_en: Fix possible corruption in DCB parameters from firmware.

Vasundhara Volam (1):
  bnxt_en: Fix VF PCIe link speed and width logic.

 drivers/net/ethernet/broadcom/bnxt/bnxt.c         | 99 +++++++++++++++++------
 drivers/net/ethernet/broadcom/bnxt/bnxt.h         |  5 ++
 drivers/net/ethernet/broadcom/bnxt/bnxt_dcb.c     | 23 ++++--
 drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c |  8 +-
 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c   | 11 ++-
 5 files changed, 112 insertions(+), 34 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, back to index

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-16 22:33 [PATCH net 0/6] bnxt_en: Bug fixes Michael Chan
2019-08-16 22:33 ` [PATCH net 1/6] bnxt_en: Fix VNIC clearing logic for 57500 chips Michael Chan
2019-08-16 22:33 ` [PATCH net 2/6] bnxt_en: Improve RX doorbell sequence Michael Chan
2019-08-16 22:33 ` [PATCH net 3/6] bnxt_en: Fix handling FRAG_ERR when NVM_INSTALL_UPDATE cmd fails Michael Chan
2019-08-16 22:33 ` [PATCH net 4/6] bnxt_en: Suppress HWRM errors for HWRM_NVM_GET_VARIABLE command Michael Chan
2019-08-16 22:33 ` [PATCH net 5/6] bnxt_en: Use correct src_fid to determine direction of the flow Michael Chan
2019-08-16 22:33 ` [PATCH net 6/6] bnxt_en: Fix to include flow direction in L2 key Michael Chan
2019-08-17  8:49   ` kbuild test robot
2019-08-18 20:06 ` [PATCH net 0/6] bnxt_en: Bug fixes David Miller
  -- strict thread matches above, loose matches on Subject: below --
2018-11-15  8:25 Michael Chan
2018-11-15 17:40 ` David Miller
2018-07-09  6:24 Michael Chan
2018-07-09 23:28 ` David Miller
2017-10-14  1:09 [PATCH net 0/6] bnxt_en: bug fixes Michael Chan
2017-10-15  1:52 ` David Miller

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org netdev@archiver.kernel.org
	public-inbox-index netdev


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox