Skip to contentSkip to conversation

qed* enhancements.

PATCH In review Sudarsana Reddy Kalluru 2 participants 4 messages Mar 11, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover qed* enhancements.

The patch series adds couple of enhancements for qed/qede drivers. Please consider applying it to 'net-next' tree.

Sudarsana Reddy Kalluru (2):
qede: Populate mbi version in ethtool driver query data.
qed: Define new MF bit for no_vlan config

 drivers/net/ethernet/qlogic/qed/qed.h           |  3 +++
 drivers/net/ethernet/qlogic/qed/qed_dcbx.c      |  4 +---
 drivers/net/ethernet/qlogic/qed/qed_dev.c       |  6 ++++--
 drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 24 +++++++++++++++++++-----
 4 files changed, 27 insertions(+), 10 deletions(-)
Signature · 1 line
1.8.3.1
#1 lore raw

PATCH 1/2 qede: Populate mbi version in ethtool driver query data.

The patch adds support to display MBI image version in 'ethtool -i' output.

---
 drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)
drivers/net/ethernet/qlogic/qede/qede_ethtool.c +19 -5
index c623808..8447a8c 100644
@@ -652,9 +652,9 @@ static void qede_get_drvinfo(struct net_device *ndev,
 {
 	char mfw[ETHTOOL_FWVERS_LEN], storm[ETHTOOL_FWVERS_LEN];
 	struct qede_dev *edev = netdev_priv(ndev);
+	char mbi[ETHTOOL_FWVERS_LEN];
 
 	strlcpy(info->driver, "qede", sizeof(info->driver));
-	strlcpy(info->version, DRV_MODULE_VERSION, sizeof(info->version));
 
 	snprintf(storm, ETHTOOL_FWVERS_LEN, "%d.%d.%d.%d",
 		 edev->dev_info.common.fw_major,
@@ -668,13 +668,27 @@ static void qede_get_drvinfo(struct net_device *ndev,
 		 (edev->dev_info.common.mfw_rev >> 8) & 0xFF,
 		 edev->dev_info.common.mfw_rev & 0xFF);
 
-	if ((strlen(storm) + strlen(mfw) + strlen("mfw storm  ")) <
-	    sizeof(info->fw_version)) {
+	if ((strlen(storm) + strlen(DRV_MODULE_VERSION) + strlen("[storm]  ")) <
+	    sizeof(info->version))
+		snprintf(info->version, sizeof(info->version),
+			 "%s [storm %s]", DRV_MODULE_VERSION, storm);
+	else
+		snprintf(info->version, sizeof(info->version),
+			 "%s %s", DRV_MODULE_VERSION, storm);
+
+	if (edev->dev_info.common.mbi_version) {
+		snprintf(mbi, ETHTOOL_FWVERS_LEN, "%d.%d.%d",
+			 (edev->dev_info.common.mbi_version &
+			  QED_MBI_VERSION_2_MASK) >> QED_MBI_VERSION_2_OFFSET,
+			 (edev->dev_info.common.mbi_version &
+			  QED_MBI_VERSION_1_MASK) >> QED_MBI_VERSION_1_OFFSET,
+			 (edev->dev_info.common.mbi_version &
+			  QED_MBI_VERSION_0_MASK) >> QED_MBI_VERSION_0_OFFSET);
 		snprintf(info->fw_version, sizeof(info->fw_version),
-			 "mfw %s storm %s", mfw, storm);
+			 "mbi %s [mfw %s]", mbi, mfw);
 	} else {
 		snprintf(info->fw_version, sizeof(info->fw_version),
-			 "%s %s", mfw, storm);
+			 "mfw %s", mfw);
 	}
 
 	strlcpy(info->bus_info, pci_name(edev->pdev), sizeof(info->bus_info));
Signature · 1 line
1.8.3.1
#2 lore raw

PATCH 2/2 qed: Define new MF bit for no_vlan config

In reply to Sudarsana Reddy Kalluru

The patch introduces a new Multi-Function bit for cases where firmware shouldn't perform the insertion of vlan-0 tag. The new bit is defined to abstract the implementation from the actual MF mode.

---
 drivers/net/ethernet/qlogic/qed/qed.h      | 3 +++
 drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 4 +---
 drivers/net/ethernet/qlogic/qed/qed_dev.c  | 6 ++++--
 3 files changed, 8 insertions(+), 5 deletions(-)
drivers/net/ethernet/qlogic/qed/qed.h +3 -0
index 43a57ec..512186a 100644
@@ -492,6 +492,9 @@ enum qed_mf_mode_bit {
 
 	/* Allow DSCP to TC mapping */
 	QED_MF_DSCP_TO_TC_MAP,
+
+	/* Do not insert a vlan tag with id 0 */
+	QED_MF_DONT_ADD_VLAN0_TAG,
 };
 
 enum qed_ufp_mode {
drivers/net/ethernet/qlogic/qed/qed_dcbx.c +1 -3
index 69966df..5c6a276 100644
@@ -204,9 +204,7 @@ static bool qed_dcbx_roce_v2_tlv(u32 app_info_bitmap, u16 proto_id, bool ieee)
 	else
 		p_data->arr[type].update = DONT_UPDATE_DCB_DSCP;
 
-	/* Do not add vlan tag 0 when DCB is enabled and port in UFP/OV mode */
-	if ((test_bit(QED_MF_8021Q_TAGGING, &p_hwfn->cdev->mf_bits) ||
-	     test_bit(QED_MF_8021AD_TAGGING, &p_hwfn->cdev->mf_bits)))
+	if (test_bit(QED_MF_DONT_ADD_VLAN0_TAG, &p_hwfn->cdev->mf_bits))
 		p_data->arr[type].dont_add_vlan0 = true;
 
 	/* QM reconf data */
drivers/net/ethernet/qlogic/qed/qed_dev.c +4 -2
index 9df8c4b..1955737 100644
@@ -3157,12 +3157,14 @@ static int qed_hw_get_nvm_info(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
 			cdev->mf_bits = BIT(QED_MF_OVLAN_CLSS) |
 					BIT(QED_MF_LLH_PROTO_CLSS) |
 					BIT(QED_MF_UFP_SPECIFIC) |
-					BIT(QED_MF_8021Q_TAGGING);
+					BIT(QED_MF_8021Q_TAGGING) |
+					BIT(QED_MF_DONT_ADD_VLAN0_TAG);
 			break;
 		case NVM_CFG1_GLOB_MF_MODE_BD:
 			cdev->mf_bits = BIT(QED_MF_OVLAN_CLSS) |
 					BIT(QED_MF_LLH_PROTO_CLSS) |
-					BIT(QED_MF_8021AD_TAGGING);
+					BIT(QED_MF_8021AD_TAGGING) |
+					BIT(QED_MF_DONT_ADD_VLAN0_TAG);
 			break;
 		case NVM_CFG1_GLOB_MF_MODE_NPAR1_0:
 			cdev->mf_bits = BIT(QED_MF_LLH_MAC_CLSS) |
Signature · 1 line
1.8.3.1
maintainer
#3 lore raw
In reply to Sudarsana Reddy Kalluru

From: Sudarsana Reddy Kalluru <[email protected]>
Date: Mon, 11 Mar 2019 05:37:22 -0700

Quoted 2 lines

The patch series adds couple of enhancements for qed/qede drivers. Please consider applying it to 'net-next' tree.

You Marvell guys should know how the net-next tree works by now.

I announced it was closed for the merge window and it still is closed.

There are no excuses for not knowing this information, I even have a well known web site which tracks the state of the net-next tree:

http://vger.kernel.org/~davem/net-next.html

I also extensively announce the status changes of the net-next tree on all social media outlets as well.

Therefore, please resubmit this when it opens back up.