From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A8991A04DB for ; Mon, 30 Nov 2020 12:50:39 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A104A5928; Mon, 30 Nov 2020 12:50:38 +0100 (CET) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by dpdk.org (Postfix) with ESMTP id EC8D45928 for ; Mon, 30 Nov 2020 12:50:36 +0100 (CET) Received: by mail-wr1-f51.google.com with SMTP id 64so15776211wra.11 for ; Mon, 30 Nov 2020 03:50:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7lVsRhq04FM46KWISwTfIvLYFTCiVNLwyQIk3yHE7eQ=; b=fNWwLd0/XLCRLqp4MyNS2Uk8hKJKPQgEEA3piGy7XlWvHa40P25csB9L2t4IRXLAjn TnI/AElGGMU3NSs/Iy8euPXAHERA4TKaVozfs+jL0b/BV1tk21I5whSda4RRaEglPGri wsZSOegA7RcydZR5fhqArpkEgfoLP7hVY/gO/9gni/XN6ugmTOTivZiwEnXiHT9JIUOn 1im6pApbPwXSYNcwc8ON0cDGyjLYCqfVVDNmAD0kmM6QHGyTMDlXg81djglpT67+1KY6 hadiBhLzH+GgB7u52/10+SfeHt3KNMnMcIBnvFJF8A8YNMEM+N/wf9YjSTVrF950pCNU a9Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7lVsRhq04FM46KWISwTfIvLYFTCiVNLwyQIk3yHE7eQ=; b=qkYdzs/ZvwjlhiOYLZUc5l8cYVVYFeTAPDuYw8Xfp0NDGKZcTWinJspHWCIb0Kl+dI PsC/jZoshYvXw5W8Uw5csOxT+mTuxb8r89bbKoZmQa/s6BFRLfSHZu8NxTqPJ4WGWU99 2lH+fIOI0JwkOODzZi/vvMTb7ledI639uTwoMEOgwVZ4yjV11PCPa+dEXaWt1jGUAZRM ZpdUAwrJSbJYYzxF+7vLON0dqZO75QK+W+FFoL8uhpBRMUDTDWrLm5O8S7GrrZ5KdFRn ZKU0cNzslSjEayTkHdc1GZrX8m6//fi33O3GFksKiCdEmkRnb3oRBOSNU7dRUMZLB2OP NyaQ== X-Gm-Message-State: AOAM530dL5ZvxlrSsrzKJC6AorCKQONQ1/CjhYUaCTTEAEswm8kn6On/ Lt+0LZPgvN3bV1r5HSF7q1E= X-Google-Smtp-Source: ABdhPJxmcn4VkjkWopF0TMyyzB5K/P7XJ1B39fYCB5Yhi6RTa+z4zZjmQrEJZdW+t6y1W5OsdlyFag== X-Received: by 2002:adf:ed51:: with SMTP id u17mr28561173wro.61.1606737035009; Mon, 30 Nov 2020 03:50:35 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id d8sm23043104wmb.11.2020.11.30.03.50.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2020 03:50:34 -0800 (PST) From: luca.boccassi@gmail.com To: Guoyang Zhou Cc: dpdk stable Date: Mon, 30 Nov 2020 11:50:21 +0000 Message-Id: <20201130115027.64046-3-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201130115027.64046-1-luca.boccassi@gmail.com> References: <20201028104606.3504127-1-luca.boccassi@gmail.com> <20201130115027.64046-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/hinic: remove optical module operation' has been queued to stable release 19.11.6 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 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 --- 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@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)