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 1C5EEA0A0E for ; Mon, 10 May 2021 18:04:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1601041106; Mon, 10 May 2021 18:04:37 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2067.outbound.protection.outlook.com [40.107.244.67]) by mails.dpdk.org (Postfix) with ESMTP id 703A441103 for ; Mon, 10 May 2021 18:04:35 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RACotOc3T+3ayvoc2H0dxMSAp/TZruUkNq3Dg4GGvb+XdITd7V9Jx9C+B0Fh4Dzv0FuOBnJoz4BGZ1kOjFOp5by9oQIAsevycnSzkGzidr/fJvCcTkP2odqmgITZSZQQplwtndPVmqZ3UR9Rs5Mk1Wx57ve8DkW+SP9R21JbfcQHMLbah1jEuHbZX2nn4EjZsGyfQlipMk8qGdMX82LVduvcKeZpxSPJRc5+2sGBm+Mk1sjqzLzBtviTwqqGx4I7Ol+F6Tyy4PC4v17zJkbWQAluXCYt9faNCb83x/0VksiyOUOa/4DZDTplOCPIBg8Qn6+iqznZEUqcOSM19fWBQg== 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-SenderADCheck; bh=CanUNamhWVblnCpY4d/3IWvNiiTMSfIfstFIuCMLrho=; b=YZ7G0Zu12RDRKn1rcrImGW3rJS6vZQ7uikZFhvuOzqAF6f740RIxVIfUxMEIbPadY2dAiKmdHDMeV+7B77E7Ve08ot5jJ/BXanuCjdAAX4NG9A30kCfAK1i4+FoefHtbhDrKRduoLWGcHVXJCslXAmkJmSH4Y+68a8YDf+ycb3gqbRc9yJtDBwPG6U6nghPNGwliuL3d+ICWoDXJ0NYi2zzQTOGMhexgNIby7FCrMozZEmrTr9Pg9aJ2RVVa38nr6EVqA2mcEoFE6WfwGM0kdYksNCyaWw+gNx1dIqjqG62LdpKzUM4RyFcdgmjW1u3GToJutTHyT182CZPXiVcFBA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=nxp.com smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none 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=CanUNamhWVblnCpY4d/3IWvNiiTMSfIfstFIuCMLrho=; b=DvFYTHDtD5b53MF/f7v0O5i4MJjeICNHWpKX9awACLcR0g6eefRMW1QxZ/JDTRieBa+ZCUop9iHv0MFn62m8BG8ycMi68wMAyJBZNpUv6VS4GZ/+d5hFv/znE8xWMM5K5sOghk9udt5LiAes/ooeSaPqhkBVkAi/8ZLKCZH+66TmVhwWa+bq+EWalbDpzW5d1lankrV6iv6d/1nlJjxZyXqTHcBlmrp9PeniQND/ycxSRP5MaQnKmcny/uk1f0G4obQuCYJKDaD1iTMJsCrG4M0wAHGSYSoWmnPSwbArk+ClfGDpga0JoWoYhtLRW49LCgb2xYN1u5keuyZWFu1CUw== Received: from BN8PR07CA0022.namprd07.prod.outlook.com (2603:10b6:408:ac::35) by DM6PR12MB4203.namprd12.prod.outlook.com (2603:10b6:5:21f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.26; Mon, 10 May 2021 16:04:33 +0000 Received: from BN8NAM11FT064.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ac:cafe::8b) by BN8PR07CA0022.outlook.office365.com (2603:10b6:408:ac::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:04:33 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT064.mail.protection.outlook.com (10.13.176.160) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:04:33 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:04:31 +0000 From: Xueming Li To: Rohit Raj CC: Luca Boccassi , Hemant Agrawal , dpdk stable Date: Mon, 10 May 2021 23:59:23 +0800 Message-ID: <20210510160258.30982-14-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7070ca93-d4e3-42b6-4ac7-08d913cd4d7d X-MS-TrafficTypeDiagnostic: DM6PR12MB4203: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GKOwG0VeCvsz/Iik45hnsRPNJEsrXAoR8VwjLEp3EA+RFLNCbYZE8whmfwIIhKpQN+zWB1EV33lqHt2sIZRxwysND8jBeIFsFJXEmCbzriRcDA37ZNhke2K/us/W8YCVb5k4rNg4eBrnAVRyHCmo+xjT/qNr41MfwXBf3gHem+UEh46fpjgCtpEHFin6qEypiBsz+GV0fvE/t1YNdt/LJ6zHab08xzvZiYZfnqdR+NAYk8k8mqaXrhrC6/kWDHe3KVeoplJ2/ZOhFByHv8Q6zrCeWpQ4ROWdhb+M3N9nhbkvBW0gpqJubUXHDSe3lEuXoNLiTUcXtZtJqasvPrb2OyAItT0yOquijLZh0BiE3yeGIsp79m7OW3qJLwKV/wIS6+3Cmcb8b234YSX40v3p26C4n9gaVZpaB1IpvZ0ZYS2qHyHORSsvgLsXf7PhR4EqIeQvs/UDAxd1HPWCn0Y9Ca3N7T3NzFhxGU6ASpUNxrUOBNdhwAjVu7Cq6PzNRWxO+xwSgtdZX+XjkxJUUfdZej+R+SLB48C0t5uyI0i3DTlZr7rSZwZt3PDxx7E+FAD2gc4tNMCekzkN68R7tQDOfOnlriq4GLb5abylxUsK65DO9iinYCqEpvbOh6aDFw3W5Jp1a8/W+5q0643SxTx+kE5ubnxJhLyHiggXRBqKbZFmG9Soz1eiZnL95rwQww58VhXj5axL/mfpCeQyVs6nzTxAtJ2BpUO7iMI/XRUH6/T6wKy0g3RrTBq9HJonTF6VWH8I/oUBb7/0q9Wwj30TMg== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(376002)(346002)(136003)(396003)(39860400002)(36840700001)(46966006)(6286002)(316002)(186003)(36860700001)(6916009)(36756003)(8676002)(7696005)(7636003)(54906003)(336012)(478600001)(426003)(356005)(36906005)(8936002)(86362001)(5660300002)(82310400003)(2616005)(82740400003)(53546011)(16526019)(4326008)(70206006)(70586007)(47076005)(1076003)(2906002)(83380400001)(6666004)(26005)(55016002)(966005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:04:33.7127 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7070ca93-d4e3-42b6-4ac7-08d913cd4d7d X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT064.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4203 Subject: [dpdk-stable] patch 'net/dpaa: fix getting link status' has been queued to stable release 20.11.2 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.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 05/12/21. 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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/c725e11eb3b131f59dcabca5c9056831ef257473 Thanks. Xueming Li --- >From c725e11eb3b131f59dcabca5c9056831ef257473 Mon Sep 17 00:00:00 2001 From: Rohit Raj Date: Wed, 24 Feb 2021 18:12:52 +0530 Subject: [PATCH] net/dpaa: fix getting link status Cc: Luca Boccassi [ upstream commit 89b9bb08dd7f742a7ba20d1812b4fe1b4ddf5008 ] According to DPDK Documentation, rte_eth_link_get API can wait up to 9 seconds for auto-negotiation to finish and then returns link status. In current implementation of rte_eth_link_get API in DPAA drivers, it was not waiting for auto negotiation to finish and was returning link status DOWN It can cause issues with DPDK applications which relies on rte_eth_link_get API for link statusand does not support link status interrupt. This patch fixes this bug by adding wait for up to 9 seconds for auto negotiation to finish. Fixes: 2aa10990a8dd ("bus/dpaa: enable link state interrupt") Signed-off-by: Rohit Raj Acked-by: Hemant Agrawal --- drivers/net/dpaa/dpaa_ethdev.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index 0c87c136d7..79e39451b3 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -49,6 +49,9 @@ #include #include +#define CHECK_INTERVAL 100 /* 100ms */ +#define MAX_REPEAT_TIME 90 /* 9s (90 * 100ms) in total */ + /* Supported Rx offloads */ static uint64_t dev_rx_offloads_sup = DEV_RX_OFFLOAD_JUMBO_FRAME | @@ -669,23 +672,30 @@ dpaa_dev_tx_burst_mode_get(struct rte_eth_dev *dev, } static int dpaa_eth_link_update(struct rte_eth_dev *dev, - int wait_to_complete __rte_unused) + int wait_to_complete) { struct dpaa_if *dpaa_intf = dev->data->dev_private; struct rte_eth_link *link = &dev->data->dev_link; struct fman_if *fif = dev->process_private; struct __fman_if *__fif = container_of(fif, struct __fman_if, __if); int ret, ioctl_version; + uint8_t count; PMD_INIT_FUNC_TRACE(); ioctl_version = dpaa_get_ioctl_version_number(); - if (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC) { - ret = dpaa_get_link_status(__fif->node_name, link); - if (ret) - return ret; + for (count = 0; count <= MAX_REPEAT_TIME; count++) { + ret = dpaa_get_link_status(__fif->node_name, link); + if (ret) + return ret; + if (link->link_status == ETH_LINK_DOWN && + wait_to_complete) + rte_delay_ms(CHECK_INTERVAL); + else + break; + } } else { link->link_status = dpaa_intf->valid; } -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:27.082257900 +0800 +++ 0015-net-dpaa-fix-getting-link-status.patch 2021-05-10 23:59:26.330000000 +0800 @@ -1 +1 @@ -From 89b9bb08dd7f742a7ba20d1812b4fe1b4ddf5008 Mon Sep 17 00:00:00 2001 +From c725e11eb3b131f59dcabca5c9056831ef257473 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit 89b9bb08dd7f742a7ba20d1812b4fe1b4ddf5008 ] @@ -20 +22,0 @@ -Cc: stable@dpdk.org @@ -29 +31 @@ -index d643514de6..c59873dd8a 100644 +index 0c87c136d7..79e39451b3 100644