From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4CD0F428F8 for ; Sun, 9 Apr 2023 17:29:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 47320410EF; Sun, 9 Apr 2023 17:29:56 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2046.outbound.protection.outlook.com [40.107.94.46]) by mails.dpdk.org (Postfix) with ESMTP id A0A3D410EF for ; Sun, 9 Apr 2023 17:29:54 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AI//1UabsixERVF48fFunNdrBHvpT7L1M+rBOozueBlVaVzbuwM/VCope47uB5LvdrJT1hgz3JQ1zC7k/4W1NmJXNFxnrSePThniIe1T/h3pwpdvOGl+KdzYiZHWmyjRN9rcUw2oDH8wbgLVfIMkOdXzjBJfwv0yAVpupjs1n9xbnmgND8C9GG8INlnYDzZnU72vBP0rJ1eAXH2wseyDoUlm9oNpipOzVXP0+xJuHx++Z9a5GOIUVX+kVijm8nO7iwWvErgL9HckuO6CPAqsW1Yw8NrVjU29ayANIr9ElNU8W8c+rUwdjbmbhOfQUeZpK6ulbUlhQmwk94vE5mSIWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+nzzRNxVkZXM4A3poxYT3abdEQyKUaMmblt+s3eUdj8=; b=hjPv4rnxgHtydRv0fIbDMNY3NAYNHpFsN27BuU2mrdvxZeGIlhRru5oz/OvqY+1PxNRFvGnMwEsWUGHJFtDLdM6lGD9AKxp2mgvE3gI5yUOebELDaz13r1Ka1fdpEy10jZa1kR5k4IUv6qAprV39LpeLYZrrAiPQMWxtXPaXILKvnEMmuArfS6CUF1mvygwMadjD4BSO414d+G0+sKmIJU/4AOc/XA5vaDe4gfu1xObHy9v1zq8p66Zf6dsvR4iDr3FtDgJIo6La4Jft99fSavjFdi6p5VkCYSrVGN84Of5BqXYY5yHQANg1P1wMew9JmNI02ImAk0XoWS6JCoTOdg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=redhat.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+nzzRNxVkZXM4A3poxYT3abdEQyKUaMmblt+s3eUdj8=; b=HvmEnbpm3yexptwcWlvSjszMaafAZ2Ukp0wW5Nhaoxo41XBELXMoBrVDGXUewtfRdWn9RgKpkDBkeTqZQ3xsCW/6Sqpn1xdF6mDpEsMQHeBNo8jbniksJ549aeWyJGawi9458PKEVwHJpeDni21K/GzOyhPfEiitO9xroyP3JkxWAnhXqoPgGjsUkeIwsbu10JWA5+aRSzIjZXvUEhvcTtkiFR7RTJUe1QVwyaHJJZOm2CyXXZ5n/44MX5g+ThGKJ7T4ZP/ZN1vCfcZlIo6AlaAzpS8RERV6bqBerKWHbwFZBRAP11T/6gtWR8t4ZtHDmVoz1ts8NqRCcTJgHOgg8g== Received: from BN9PR03CA0707.namprd03.prod.outlook.com (2603:10b6:408:ef::22) by MW3PR12MB4491.namprd12.prod.outlook.com (2603:10b6:303:5c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.38; Sun, 9 Apr 2023 15:29:51 +0000 Received: from BN8NAM11FT065.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ef:cafe::13) by BN9PR03CA0707.outlook.office365.com (2603:10b6:408:ef::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.38 via Frontend Transport; Sun, 9 Apr 2023 15:29:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN8NAM11FT065.mail.protection.outlook.com (10.13.177.63) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.25 via Frontend Transport; Sun, 9 Apr 2023 15:29:51 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Sun, 9 Apr 2023 08:29:40 -0700 Received: from nvidia.com (10.126.231.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Sun, 9 Apr 2023 08:29:39 -0700 From: Xueming Li To: David Marchand CC: Simei Su , dpdk stable Subject: patch 'net/i40e: revert link status check on device start' has been queued to stable release 22.11.2 Date: Sun, 9 Apr 2023 23:23:56 +0800 Message-ID: <20230409152529.5308-49-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230409152529.5308-1-xuemingl@nvidia.com> References: <20230227062349.13764-1-xuemingl@nvidia.com> <20230409152529.5308-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT065:EE_|MW3PR12MB4491:EE_ X-MS-Office365-Filtering-Correlation-Id: 9dc67fec-5584-4520-640a-08db390f42ed X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F5FNtAmir13s1DeLSK/TcAL7S9cdzWQq6QOt2hywCjukm3WPvwp6Mg80x9ZvvLWp2OfbwVJkzqctFpGibKH1xxCj6ptKZ5KDQHevMer/BLVCrT0+Y72lUZXC9+2y3PnqwExwAhMPJauul0DhTnNo2qtJHw1TBk6xGQ3Wp1gzkjOozEbQMwfNUNI7F3COcIVFl4foKaFkwZW8kNX5flAJcFW+SIFT/yUoMfBAjXY/qE5t2ZK+vYgUwAcAjMj5D9wsvnUuWc/lmFQvQv7StmfYkbdl8UY67jRT7D04AM5QermiZDFLW8fJI0NN8oiXbav79UMZafP7Ryb451VwaI0vC5aweG+hIemll3ctYwYLVaTBNcLhdCA8lPVg9Z9TzU6Qc7V766dRSvqyOFAZfrxmYNTZbgAKe/WchV/Tik1YYvR8uPlDpJ2XzqMNvVlfO5g+kkmFancD0W/X1+nzFqqumTPot89B+RImSI4BxQDaE1yQKMiuk9RH2Dio/9Se8pOavcffrzIcXY50NH9HAEtRLAafQZOI2efK/Fhcs/C1rSs8IKFh9M9d3lss/d5Rgf+VY8QESEdHbeVLutgSRXLpmvyD0qCtf0elt4tL+d/2QI+Xpt/z0GGQ8bM+Ij7KujLpQbecBEXNiQl+ffDXz+j7Nf2cQiU83O49XPxpeiuA0kEhFbfdwPFWPYTSpOzul/InX6pLB6mn5XbU8lt+CUPlFO1hp6SH8KQq870F8MoZ5DRVxNsx11w+HlL8lXPijmuNOcwtGu7YaWxtJdH05IEiE4hJYw7my5c83XX08MTJAwzmbnekcIaSJx57MaksUcKZVPbUkfdnb3ytazuFVP3nSpjZCVCp+h9yufe9YaThZYo= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(346002)(136003)(39860400002)(376002)(396003)(451199021)(46966006)(36840700001)(40470700004)(86362001)(36756003)(316002)(41300700001)(70586007)(8676002)(4326008)(6916009)(966005)(7696005)(70206006)(54906003)(478600001)(40480700001)(55016003)(82310400005)(5660300002)(2906002)(8936002)(36860700001)(82740400003)(356005)(7636003)(16526019)(6286002)(186003)(6666004)(53546011)(1076003)(26005)(336012)(2616005)(426003)(47076005)(83380400001)(40460700003)(309714004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2023 15:29:51.1172 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9dc67fec-5584-4520-640a-08db390f42ed X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT065.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4491 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 22.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/11/23. 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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging/commit/287a57f832421a1c912332f5ca7a952098f5065f Thanks. Xueming Li --- >From 287a57f832421a1c912332f5ca7a952098f5065f Mon Sep 17 00:00:00 2001 From: David Marchand Date: Tue, 13 Dec 2022 10:18:37 +0100 Subject: [PATCH] net/i40e: revert link status check on device start Cc: Xueming Li [ upstream commit a8ca8edf8c076c765c6d142ab4664a1f61414233 ] The mentioned changes broke existing applications when the link status of i40e ports is down at the time the port is started. Revert those changes, the original issue will need a different fix. Fixes: a4ba77367923 ("net/i40e: enable maximum frame size at port level") Fixes: 2184f7cdeeaa ("net/i40e: fix max frame size config at port level") Fixes: 719469f13b11 ("net/i40e: fix jumbo frame Rx with X722") Signed-off-by: David Marchand Acked-by: Simei Su --- drivers/net/i40e/i40e_ethdev.c | 50 +++++----------------------------- 1 file changed, 7 insertions(+), 43 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 7726a89d99..a982e42264 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -387,7 +387,6 @@ static int i40e_set_default_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr); static int i40e_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu); -static void i40e_set_mac_max_frame(struct rte_eth_dev *dev, uint16_t size); static int i40e_ethertype_filter_convert( const struct rte_eth_ethertype_filter *input, @@ -1711,6 +1710,11 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused) */ i40e_add_tx_flow_control_drop_filter(pf); + /* Set the max frame size to 0x2600 by default, + * in case other drivers changed the default value. + */ + i40e_aq_set_mac_config(hw, I40E_FRAME_SIZE_MAX, TRUE, false, 0, NULL); + /* initialize RSS rule list */ TAILQ_INIT(&pf->rss_config_list); @@ -2328,7 +2332,6 @@ i40e_dev_start(struct rte_eth_dev *dev) uint32_t intr_vector = 0; struct i40e_vsi *vsi; uint16_t nb_rxq, nb_txq; - uint16_t max_frame_size; hw->adapter_stopped = 0; @@ -2467,9 +2470,6 @@ i40e_dev_start(struct rte_eth_dev *dev) "please call hierarchy_commit() " "before starting the port"); - max_frame_size = dev->data->mtu + I40E_ETH_OVERHEAD; - i40e_set_mac_max_frame(dev, max_frame_size); - return I40E_SUCCESS; tx_err: @@ -2809,9 +2809,6 @@ i40e_dev_set_link_down(struct rte_eth_dev *dev) return i40e_phy_conf_link(hw, abilities, speed, false); } -#define CHECK_INTERVAL 100 /* 100ms */ -#define MAX_REPEAT_TIME 10 /* 1s (10 * 100ms) in total */ - static __rte_always_inline void update_link_reg(struct i40e_hw *hw, struct rte_eth_link *link) { @@ -2878,6 +2875,8 @@ static __rte_always_inline void update_link_aq(struct i40e_hw *hw, struct rte_eth_link *link, bool enable_lse, int wait_to_complete) { +#define CHECK_INTERVAL 100 /* 100ms */ +#define MAX_REPEAT_TIME 10 /* 1s (10 * 100ms) in total */ uint32_t rep_cnt = MAX_REPEAT_TIME; struct i40e_link_status link_status; int status; @@ -6738,7 +6737,6 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev) if (!ret) rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL); - break; default: PMD_DRV_LOG(DEBUG, "Request %u is not supported yet", @@ -12123,40 +12121,6 @@ i40e_cloud_filter_qinq_create(struct i40e_pf *pf) return ret; } -static void -i40e_set_mac_max_frame(struct rte_eth_dev *dev, uint16_t size) -{ - struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private); - uint32_t rep_cnt = MAX_REPEAT_TIME; - struct rte_eth_link link; - enum i40e_status_code status; - bool can_be_set = true; - - /* - * I40E_MEDIA_TYPE_BASET link up can be ignored - * I40E_MEDIA_TYPE_BASET link down that hw->phy.media_type - * is I40E_MEDIA_TYPE_UNKNOWN - */ - if (hw->phy.media_type != I40E_MEDIA_TYPE_BASET && - hw->phy.media_type != I40E_MEDIA_TYPE_UNKNOWN) { - do { - update_link_reg(hw, &link); - if (link.link_status) - break; - rte_delay_ms(CHECK_INTERVAL); - } while (--rep_cnt); - can_be_set = !!link.link_status; - } - - if (can_be_set) { - status = i40e_aq_set_mac_config(hw, size, TRUE, 0, false, NULL); - if (status != I40E_SUCCESS) - PMD_DRV_LOG(ERR, "Failed to set max frame size at port level"); - } else { - PMD_DRV_LOG(ERR, "Set max frame size at port level not applicable on link down"); - } -} - RTE_LOG_REGISTER_SUFFIX(i40e_logtype_init, init, NOTICE); RTE_LOG_REGISTER_SUFFIX(i40e_logtype_driver, driver, NOTICE); #ifdef RTE_ETHDEV_DEBUG_RX -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-04-09 21:45:40.011846800 +0800 +++ 0048-net-i40e-revert-link-status-check-on-device-start.patch 2023-04-09 21:45:38.649042200 +0800 @@ -1 +1 @@ -From a8ca8edf8c076c765c6d142ab4664a1f61414233 Mon Sep 17 00:00:00 2001 +From 287a57f832421a1c912332f5ca7a952098f5065f Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit a8ca8edf8c076c765c6d142ab4664a1f61414233 ] @@ -13 +15,0 @@ -Cc: stable@dpdk.org