[dpdk-stable] patch 'net/bnxt: set a VNIC as default only once' has been queued to stable release 18.08.1

Kevin Traynor ktraynor at redhat.com
Wed Nov 21 17:47:52 CET 2018


Hi,

FYI, your patch has been queued to stable release 18.08.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/27/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 3cb7778df73f9d486659a5c4a6b0d09147a13fcd Mon Sep 17 00:00:00 2001
From: Ajit Khaparde <ajit.khaparde at broadcom.com>
Date: Fri, 28 Sep 2018 19:00:03 -0700
Subject: [PATCH] net/bnxt: set a VNIC as default only once

[ upstream commit 5bf10cdb67db5ee7308cc752b51f0f12dcdcb0e8 ]

If a vnic is configured as default and the setting has not changed,
there is no need to issue this setting again to the FW.

Fixes: db678d5c2b54 ("net/bnxt: add HWRM VNIC configure")

Signed-off-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
 drivers/net/bnxt/bnxt.h      | 1 +
 drivers/net/bnxt/bnxt_hwrm.c | 9 ++++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
index c580ec22b..84b7cbd3d 100644
--- a/drivers/net/bnxt/bnxt.h
+++ b/drivers/net/bnxt/bnxt.h
@@ -251,4 +251,5 @@ struct bnxt {
 #define BNXT_FLAG_PTP_SUPPORTED	(1 << 6)
 #define BNXT_FLAG_MULTI_HOST    (1 << 7)
+#define BNXT_FLAG_DFLT_VNIC_SET	(1 << 12)
 #define BNXT_FLAG_NEW_RM	(1 << 30)
 #define BNXT_FLAG_INIT_DONE	(1 << 31)
diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
index 41d8b93c3..05217ccdb 100644
--- a/drivers/net/bnxt/bnxt_hwrm.c
+++ b/drivers/net/bnxt/bnxt_hwrm.c
@@ -1448,7 +1448,10 @@ int bnxt_hwrm_vnic_cfg(struct bnxt *bp, struct bnxt_vnic_info *vnic)
 	req.lb_rule = rte_cpu_to_le_16(vnic->lb_rule);
 	req.mru = rte_cpu_to_le_16(vnic->mru);
-	if (vnic->func_default)
+	/* Configure default VNIC only once. */
+	if (vnic->func_default && !(bp->flags & BNXT_FLAG_DFLT_VNIC_SET)) {
 		req.flags |=
 		    rte_cpu_to_le_32(HWRM_VNIC_CFG_INPUT_FLAGS_DEFAULT);
+		bp->flags |= BNXT_FLAG_DFLT_VNIC_SET;
+	}
 	if (vnic->vlan_strip)
 		req.flags |=
@@ -1588,4 +1591,8 @@ int bnxt_hwrm_vnic_free(struct bnxt *bp, struct bnxt_vnic_info *vnic)
 
 	vnic->fw_vnic_id = INVALID_HW_RING_ID;
+	/* Configure default VNIC again if necessary. */
+	if (vnic->func_default && (bp->flags & BNXT_FLAG_DFLT_VNIC_SET))
+		bp->flags &= ~BNXT_FLAG_DFLT_VNIC_SET;
+
 	return rc;
 }
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-21 16:44:31.992730184 +0000
+++ 0038-net-bnxt-set-a-VNIC-as-default-only-once.patch	2018-11-21 16:44:30.000000000 +0000
@@ -1,13 +1,14 @@
-From 5bf10cdb67db5ee7308cc752b51f0f12dcdcb0e8 Mon Sep 17 00:00:00 2001
+From 3cb7778df73f9d486659a5c4a6b0d09147a13fcd Mon Sep 17 00:00:00 2001
 From: Ajit Khaparde <ajit.khaparde at broadcom.com>
 Date: Fri, 28 Sep 2018 19:00:03 -0700
 Subject: [PATCH] net/bnxt: set a VNIC as default only once
 
+[ upstream commit 5bf10cdb67db5ee7308cc752b51f0f12dcdcb0e8 ]
+
 If a vnic is configured as default and the setting has not changed,
 there is no need to issue this setting again to the FW.
 
 Fixes: db678d5c2b54 ("net/bnxt: add HWRM VNIC configure")
-Cc: stable at dpdk.org
 
 Signed-off-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
 ---
@@ -16,20 +17,20 @@
  2 files changed, 9 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h
-index 75b7215ce..f75b0ad3c 100644
+index c580ec22b..84b7cbd3d 100644
 --- a/drivers/net/bnxt/bnxt.h
 +++ b/drivers/net/bnxt/bnxt.h
-@@ -262,4 +262,5 @@ struct bnxt {
- #define BNXT_FLAG_KONG_MB_EN	(1 << 10)
- #define BNXT_FLAG_TRUSTED_VF_EN	(1 << 11)
+@@ -251,4 +251,5 @@ struct bnxt {
+ #define BNXT_FLAG_PTP_SUPPORTED	(1 << 6)
+ #define BNXT_FLAG_MULTI_HOST    (1 << 7)
 +#define BNXT_FLAG_DFLT_VNIC_SET	(1 << 12)
  #define BNXT_FLAG_NEW_RM	(1 << 30)
  #define BNXT_FLAG_INIT_DONE	(1 << 31)
 diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c
-index b605659ed..38698e214 100644
+index 41d8b93c3..05217ccdb 100644
 --- a/drivers/net/bnxt/bnxt_hwrm.c
 +++ b/drivers/net/bnxt/bnxt_hwrm.c
-@@ -1461,7 +1461,10 @@ int bnxt_hwrm_vnic_cfg(struct bnxt *bp, struct bnxt_vnic_info *vnic)
+@@ -1448,7 +1448,10 @@ int bnxt_hwrm_vnic_cfg(struct bnxt *bp, struct bnxt_vnic_info *vnic)
  	req.lb_rule = rte_cpu_to_le_16(vnic->lb_rule);
  	req.mru = rte_cpu_to_le_16(vnic->mru);
 -	if (vnic->func_default)
@@ -41,7 +42,7 @@
 +	}
  	if (vnic->vlan_strip)
  		req.flags |=
-@@ -1601,4 +1604,8 @@ int bnxt_hwrm_vnic_free(struct bnxt *bp, struct bnxt_vnic_info *vnic)
+@@ -1588,4 +1591,8 @@ int bnxt_hwrm_vnic_free(struct bnxt *bp, struct bnxt_vnic_info *vnic)
  
  	vnic->fw_vnic_id = INVALID_HW_RING_ID;
 +	/* Configure default VNIC again if necessary. */


More information about the stable mailing list