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 4CA1B41D8D for ; Mon, 27 Feb 2023 08:18:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 46D3340ED6; Mon, 27 Feb 2023 08:18:37 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2047.outbound.protection.outlook.com [40.107.237.47]) by mails.dpdk.org (Postfix) with ESMTP id AC7C140A84 for ; Mon, 27 Feb 2023 08:18:33 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MB1GBXgd1QcXHmIdEiiiS1CxOYTNTsnDFgu/fbpZAo0JIl6PTj9JiRbfKAEtnbelBJmWnVl0BhqaDNUXE5pcLm8juru9UkZGzLo5nqv07HzBn7aMinqNDvmY++5lyPDNsAcOcmofezA0VywYBrpmVetexQCVEsebcv2TCoTf1X0Pd2fiNCdFKqdobEtbIpn41WH3J9sTICqsWCsHTph7Jk5cnTjo44GEuH3YPmmzXQkyub453wgV1YSTCYw+koneb2EY18GUlRYNT3MGYl13GaUDspp2zawer+oPJ7K4CXtI9H1VFu2js9qzesyhOO7AhrXclWDIJGFx4/lBQikH8A== 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=F/nFaUWEnZg5VTx0zP8bOpnZdkJVDD8nF0goiRSv9qA=; b=LGWP+DuBsueqzllgpyJqNc5H041sp9H8qA6NJX09KrU5AzEr8Wcy/zrTAgj9jLR8rBm0bC4uxELLP9EdVuCayFq+nJ7YIFdKs17xU8++58b40wH58cRvgdF77K4ckZOqv9nvqhCwnkwKi5CGgd9CvBbQTfB7N8C0KxaLtyIvYmdgJ4Di4AApAY5hWpU8UZUB83pUVZR/A5d9I1RAQ5s4TKyc9nBffVmYGIM9baiTVELCoHWFuHNO8/BZHpEf52AOgpbbrsd6XM2DQr4QJQSYUoM1slEeeLoPbhzSDuYmd2AAJ8rDLCB94RiyTqO/BvuPdM5Inl7aFTPiYUxxbFMLow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=intel.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=F/nFaUWEnZg5VTx0zP8bOpnZdkJVDD8nF0goiRSv9qA=; b=Xe3SaTnVTdQcVQXRWNPdsqyKjZRKytHLHTNRIRaIMeQJUktHCajHcH3A+ThmnrOFqR+41oqlBB+Y2fLtLIuDL5fMzI1ihXooYGN6RMfzz4XvA59mlw27aFRJb5NThKT2WRd42AUtxyLTDyy2/XzKpfF3l0QaKVhAszNzm6AoeLdVBRCjgfKamuGLY6XKCjNlDo9AYzAqhv2qTlVgNrt3AyqiloUnQ3eUSjkqaQ4NTnxbpiNizu0Pf+uKAW/BAe5QHc23WkzrpJK3Kpo7Sqjc/NFBG03QEHo17T1+zr7NaETCSMb0k94Kl3x5c/GSLzi8E/fx3tklYoG+zT3Cg0iJqA== Received: from BL1PR13CA0138.namprd13.prod.outlook.com (2603:10b6:208:2bb::23) by MW4PR12MB7309.namprd12.prod.outlook.com (2603:10b6:303:22f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.25; Mon, 27 Feb 2023 07:18:30 +0000 Received: from BL02EPF00010208.namprd05.prod.outlook.com (2603:10b6:208:2bb:cafe::68) by BL1PR13CA0138.outlook.office365.com (2603:10b6:208:2bb::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.16 via Frontend Transport; Mon, 27 Feb 2023 07:18:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) 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.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BL02EPF00010208.mail.protection.outlook.com (10.167.241.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.12 via Frontend Transport; Mon, 27 Feb 2023 07:18:29 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Sun, 26 Feb 2023 23:18:09 -0800 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, 26 Feb 2023 23:18:07 -0800 From: Xueming Li To: Bruce Richardson CC: Cristian Dumitrescu , dpdk stable Subject: patch 'examples/qos_sched: fix Tx port config when link down' has been queued to stable release 22.11.2 Date: Mon, 27 Feb 2023 15:01:07 +0800 Message-ID: <20230227070107.15664-159-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230227070107.15664-1-xuemingl@nvidia.com> References: <20230227062349.13764-1-xuemingl@nvidia.com> <20230227070107.15664-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF00010208:EE_|MW4PR12MB7309:EE_ X-MS-Office365-Filtering-Correlation-Id: 6b1e6efb-a126-44b9-6d83-08db1892d38f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tYAXMp5CBrVjeL4I6GckOMAelByJ69nyMLQZiIEf8W6YQRSiuRMORp9L/mqyECyfpN1oQz1aZfEp3zDGEQTrnWtFu8ADOT2GjzevC5FFDkSZ7GwpK/zIQusJi1B/jUk7230eQcznKuKwsWifORA4arFrM++YtL/IgZ/gAm/50gcvLXNlgDPLWJzqN06dDAWb9O0yTCwHLG8ZmSp4NVSUGFaaYP7T9My4IXC8RyXohH0I9dLFefc5BYiRAEnkFHRJQS2hZaUa1U/o6nbl/e7Jn3AiG5qg4FF8SvvptLBKhQ8IBL4TUGVS6a4AE9JcSr1RVv1HJEaD7AXb05G5vaNISrQ/U/t3lSNwySRv0Ax9HE/ghD9LclCeFOZZ1Y6KteRiLtn7KtbNesKap2djsTyicFO9aGqsyv2MPML2MwIO8Tra/BfEVB9i8g6SjVzENYaIOJFP2pr4qGfsXQ7FYXqsOChRUKspwbhQ8g0Bt8vkfsMa0bFuy2I7V23sgxaHRDRHWPiP9/Ho80rFNExTAF4a0t8f9/ey14Aw7OPSoZ2UgItkv5tVp6wh2Jhx8Tf58ZZDUZQoLVLevX6NVlEK4DDVZJGL1//0uE+zHPYR/zHHK9Hi6f9JzpqMMn2k9ixEpk2S8Co2EI6XAq+FbOkUaK9bJyAjx2ha1E0zUwmE4HlkChIZpO4BHKjNqPWDORs/+qGS2u5/+iYNKjv9fAT7x2US/wgslVhMAIPCqqu9RnGhjictsMzhB6ben2+BWGrFolY9BmVOYdpx2P8f8kUzEMY6KWxjk/3bQDBzCofCJNUe44U= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230025)(4636009)(136003)(396003)(39860400002)(376002)(346002)(451199018)(36840700001)(46966006)(40470700004)(40460700003)(16526019)(6286002)(478600001)(82740400003)(7636003)(356005)(70206006)(6916009)(8676002)(4326008)(70586007)(2906002)(41300700001)(5660300002)(40480700001)(186003)(26005)(7696005)(336012)(55016003)(2616005)(426003)(1076003)(53546011)(47076005)(8936002)(36860700001)(966005)(36756003)(82310400005)(86362001)(316002)(54906003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2023 07:18:29.4709 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6b1e6efb-a126-44b9-6d83-08db1892d38f 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.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF00010208.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7309 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 03/01/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/commit/?h=22.11-staging&id=dc7302e733911234b7b0d5e147e3812ba7a2a92f Thanks. Xueming Li --- >From dc7302e733911234b7b0d5e147e3812ba7a2a92f Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Fri, 3 Feb 2023 10:05:30 +0000 Subject: [PATCH] examples/qos_sched: fix Tx port config when link down Cc: Xueming Li [ upstream commit 665b49c51639a10c553433bc2bcd85c7331c631e ] The Tx port config will fail if the port is not up, so wait 10 seconds on startup for it to start. Fixes: de3cfa2c9823 ("sched: initial import") Signed-off-by: Bruce Richardson Acked-by: Cristian Dumitrescu --- examples/qos_sched/init.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c index d28350e14a..7a27c03b64 100644 --- a/examples/qos_sched/init.c +++ b/examples/qos_sched/init.c @@ -328,6 +328,8 @@ int app_init(void) for(i = 0; i < nb_pfc; i++) { uint32_t socket = rte_lcore_to_socket_id(qos_conf[i].rx_core); struct rte_ring *ring; + struct rte_eth_link link = {0}; + int retry_count = 100, retry_delay = 100; /* try every 100ms for 10 sec */ snprintf(ring_name, MAX_NAME_LEN, "ring-%u-%u", i, qos_conf[i].rx_core); ring = rte_ring_lookup(ring_name); @@ -358,6 +360,14 @@ int app_init(void) app_init_port(qos_conf[i].rx_port, qos_conf[i].mbuf_pool); app_init_port(qos_conf[i].tx_port, qos_conf[i].mbuf_pool); + rte_eth_link_get(qos_conf[i].tx_port, &link); + if (link.link_status == 0) + printf("Waiting for link on port %u\n", qos_conf[i].tx_port); + while (link.link_status == 0 && retry_count--) { + rte_delay_ms(retry_delay); + rte_eth_link_get(qos_conf[i].tx_port, &link); + } + qos_conf[i].sched_port = app_init_sched_port(qos_conf[i].tx_port, socket); } -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-27 14:08:45.928141300 +0800 +++ 0160-examples-qos_sched-fix-Tx-port-config-when-link-down.patch 2023-02-27 14:08:40.969237000 +0800 @@ -1 +1 @@ -From 665b49c51639a10c553433bc2bcd85c7331c631e Mon Sep 17 00:00:00 2001 +From dc7302e733911234b7b0d5e147e3812ba7a2a92f Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 665b49c51639a10c553433bc2bcd85c7331c631e ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org