[dpdk-stable] patch 'net/hinic: remove optical module operation' has been queued to stable release 19.11.6

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Nov 30 12:50:21 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/02/20. 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. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/6a421d88cce65d4bb3d0aac76df6572ede3e972c

Thanks.

Luca Boccassi

---
>From 6a421d88cce65d4bb3d0aac76df6572ede3e972c Mon Sep 17 00:00:00 2001
From: Guoyang Zhou <zhouguoyang at huawei.com>
Date: Tue, 24 Nov 2020 14:45:34 +0800
Subject: [PATCH] net/hinic: remove optical module operation

[ upstream commit c07912fe9fb81700d48a691f67978b3ca1c56d45 ]

Remove the operation of optical modules in the link function, because
when device binds from dpdk to kernel, it will be linked failed. This
function does not take effect in cable mode, therefore, optimization
is required.

Fixes: 54ac33869932 ("net/hinic: set link down and up")

Signed-off-by: Guoyang Zhou <zhouguoyang at huawei.com>
---
 drivers/net/hinic/base/hinic_pmd_niccfg.c | 38 -----------------------
 drivers/net/hinic/base/hinic_pmd_niccfg.h |  2 --
 drivers/net/hinic/hinic_pmd_ethdev.c      | 14 ---------
 3 files changed, 54 deletions(-)

diff --git a/drivers/net/hinic/base/hinic_pmd_niccfg.c b/drivers/net/hinic/base/hinic_pmd_niccfg.c
index ad81fdde48..610f56d617 100644
--- a/drivers/net/hinic/base/hinic_pmd_niccfg.c
+++ b/drivers/net/hinic/base/hinic_pmd_niccfg.c
@@ -1647,44 +1647,6 @@ int hinic_get_link_mode(void *hwdev, u32 *supported, u32 *advertised)
 	return 0;
 }
 
-/**
- * hinic_set_xsfp_tx_status - Enable or disable the fiber in
- * tx direction when set link up or down.
- *
- * @param hwdev
- *   The hardware interface of a nic device.
- * @param enable
- *   Enable or Disable.
- *
- * @return
- *   0 on success.
- *   negative error value otherwise.
- */
-int hinic_set_xsfp_tx_status(void *hwdev, bool enable)
-{
-	struct hinic_set_xsfp_status xsfp_status;
-	u16 out_size = sizeof(struct hinic_set_xsfp_status);
-	int err;
-
-	memset(&xsfp_status, 0, sizeof(xsfp_status));
-	xsfp_status.mgmt_msg_head.resp_aeq_num = HINIC_AEQ1;
-	xsfp_status.port_id = hinic_global_func_id(hwdev);
-	xsfp_status.xsfp_tx_dis = ((enable == 0) ? 1 : 0);
-
-	err = l2nic_msg_to_mgmt_sync(hwdev, HINIC_PORT_CMD_SET_XSFP_STATUS,
-		&xsfp_status, sizeof(struct hinic_set_xsfp_status),
-		&xsfp_status, &out_size);
-	if (err || !out_size || xsfp_status.mgmt_msg_head.status) {
-		PMD_DRV_LOG(ERR,
-			"Failed to %s port xsfp status, err: %d, status: 0x%x, out size: 0x%x\n",
-			enable ? "Disable" : "Enable", err,
-			xsfp_status.mgmt_msg_head.status, out_size);
-		return -EFAULT;
-	}
-
-	return 0;
-}
-
 /**
  * hinic_flush_qp_res - Flush tx && rx chip resources in case of set vport
  * fake failed when device start.
diff --git a/drivers/net/hinic/base/hinic_pmd_niccfg.h b/drivers/net/hinic/base/hinic_pmd_niccfg.h
index b9e037ec2d..bf39b0272b 100644
--- a/drivers/net/hinic/base/hinic_pmd_niccfg.h
+++ b/drivers/net/hinic/base/hinic_pmd_niccfg.h
@@ -827,8 +827,6 @@ int hinic_set_link_status_follow(void *hwdev,
 
 int hinic_get_link_mode(void *hwdev, u32 *supported, u32 *advertised);
 
-int hinic_set_xsfp_tx_status(void *hwdev, bool enable);
-
 int hinic_flush_qp_res(void *hwdev);
 
 int hinic_init_function_table(void *hwdev, u16 rx_buf_sz);
diff --git a/drivers/net/hinic/hinic_pmd_ethdev.c b/drivers/net/hinic/hinic_pmd_ethdev.c
index 270e5791b8..a0499da7d4 100644
--- a/drivers/net/hinic/hinic_pmd_ethdev.c
+++ b/drivers/net/hinic/hinic_pmd_ethdev.c
@@ -941,13 +941,6 @@ static int hinic_dev_set_link_up(struct rte_eth_dev *dev)
 	struct hinic_nic_dev *nic_dev = HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(dev);
 	int ret;
 
-	ret = hinic_set_xsfp_tx_status(nic_dev->hwdev, true);
-	if (ret) {
-		PMD_DRV_LOG(ERR, "Enable port tx xsfp failed, dev_name: %s, port_id: %d",
-			    nic_dev->proc_dev_name, dev->data->port_id);
-		return ret;
-	}
-
 	/* link status follow phy port status, up will open pma */
 	ret = hinic_set_port_enable(nic_dev->hwdev, true);
 	if (ret)
@@ -971,13 +964,6 @@ static int hinic_dev_set_link_down(struct rte_eth_dev *dev)
 	struct hinic_nic_dev *nic_dev = HINIC_ETH_DEV_TO_PRIVATE_NIC_DEV(dev);
 	int ret;
 
-	ret = hinic_set_xsfp_tx_status(nic_dev->hwdev, false);
-	if (ret) {
-		PMD_DRV_LOG(ERR, "Disable port tx xsfp failed, dev_name: %s, port_id: %d",
-			    nic_dev->proc_dev_name, dev->data->port_id);
-		return ret;
-	}
-
 	/* link status follow phy port status, up will close pma */
 	ret = hinic_set_port_enable(nic_dev->hwdev, false);
 	if (ret)
-- 
2.27.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-11-30 11:49:30.489491046 +0000
+++ 0003-net-hinic-remove-optical-module-operation.patch	2020-11-30 11:49:30.394271593 +0000
@@ -1 +1 @@
-From c07912fe9fb81700d48a691f67978b3ca1c56d45 Mon Sep 17 00:00:00 2001
+From 6a421d88cce65d4bb3d0aac76df6572ede3e972c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit c07912fe9fb81700d48a691f67978b3ca1c56d45 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -22 +23 @@
-index be6445d719..8c08d63286 100644
+index ad81fdde48..610f56d617 100644
@@ -25 +26 @@
-@@ -1658,44 +1658,6 @@ int hinic_get_link_mode(void *hwdev, u32 *supported, u32 *advertised)
+@@ -1647,44 +1647,6 @@ int hinic_get_link_mode(void *hwdev, u32 *supported, u32 *advertised)
@@ -61 +62 @@
--		return -EIO;
+-		return -EFAULT;
@@ -71 +72 @@
-index 73b16b4d69..04cd374ca6 100644
+index b9e037ec2d..bf39b0272b 100644
@@ -74 +75 @@
-@@ -909,8 +909,6 @@ int hinic_set_link_status_follow(void *hwdev,
+@@ -827,8 +827,6 @@ int hinic_set_link_status_follow(void *hwdev,
@@ -84 +85 @@
-index 378f2c810b..62642354cf 100644
+index 270e5791b8..a0499da7d4 100644
@@ -87 +88 @@
-@@ -939,13 +939,6 @@ static int hinic_dev_set_link_up(struct rte_eth_dev *dev)
+@@ -941,13 +941,6 @@ static int hinic_dev_set_link_up(struct rte_eth_dev *dev)
@@ -101 +102 @@
-@@ -969,13 +962,6 @@ static int hinic_dev_set_link_down(struct rte_eth_dev *dev)
+@@ -971,13 +964,6 @@ static int hinic_dev_set_link_down(struct rte_eth_dev *dev)


More information about the stable mailing list