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 50D06A034F for ; Wed, 10 Nov 2021 07:39:49 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4A79540142; Wed, 10 Nov 2021 07:39:49 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2082.outbound.protection.outlook.com [40.107.243.82]) by mails.dpdk.org (Postfix) with ESMTP id 08B9940142 for ; Wed, 10 Nov 2021 07:39:48 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PvsH/g1ljq88bMzvX9wjGYI3R9sNTHvsFQ80sQ1jLgN2nOjDRvSNvXnUV6nh4MaFz4aa5dTzHkTCdmqOUSdYo3DeThkexo5UZkujttZGSfJ5qKm5uWU/yKjLM+cEjKz5lS9zHM1MvnrKbZNmKSxE3VC1e4kG9YPZObFSPCGGRwUjGDwk8yi6qi21Q+iIyWQNbRp7COfFNW7a8GM/yub1+0t4AKzG7fXjVqGtL/8M0meMoHs3+e2PeJVTEggJzYiTgOn5qAhoJ4v7BGOzD0Po36Es7zB6Fkfsz6yrxvQZn6eY/4/gnvEK3Hq28W/YABYqncdcvZsDSn7GmL5QgmBloQ== 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=7kNwsQh5qvRdeV+BpyKu173+Chha5mHWY/qPjlimAiE=; b=apuTXyeqrWkvCbcZH/LahX+LbhOtWgQqwa5P+kiJXBCWBgQIPxlCuDFqoUvUqLiU/8GP/kcsh+SyWkZ+p/y7bCk8ffJ+ctyXnn/oH6nahEIi4NRFryGk5EB7/TIJKz+WLFhDOXftf8Qb/JvO0E+g0sysRS8vt3MMCJiP0g9CGk6YPYpGP2cHo8WX4f2vSmYnlHBg1N0KpGu3Nny5ohkQWnadRFe+Wxwi8wej5Q7cMvYUEORW8u3BYE5skXHj9dUm0GW4gV51i+lWHiVE8mB+GezzL7Hq9r5kCE2F2kEqOnZBILBoZXtTObJJ7Oy+alMwPaakB7xrkcNi3SfSGXWX8Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine 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=7kNwsQh5qvRdeV+BpyKu173+Chha5mHWY/qPjlimAiE=; b=FbfSirKYEG5398BhP4LG9+Akw7TJB1FFbo4uhOiZf3TsZsxXZgQuKyd9vIPjV6KMxyO0HOR5yxHafL+A2rWfk83w10mzWXriWIf0P3mjnCcBUcMosr8tE5ciOAiu1LvAtVr8ri6owS424GeIstlZR2yVaEseUkyq2V1P3RUTHclCQpOOI4ezm47SEFGhrkoWUtxvgxDX771Xl5SaOZUK/HXfxl0iAKFVR1c1N8sK0a8fHX7SCtSFMVwFLbrXVoBlW4fYqs+KELJAgGq4bM8u+6Q80A5SnHfZanWb+JMoGvEwgmyOjMdh0OE89Ws5KFqfVO8wB+3OHrZEe34uwiTADw== Received: from DM6PR08CA0050.namprd08.prod.outlook.com (2603:10b6:5:1e0::24) by BYAPR12MB3462.namprd12.prod.outlook.com (2603:10b6:a03:ad::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14; Wed, 10 Nov 2021 06:39:45 +0000 Received: from DM6NAM11FT018.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1e0:cafe::49) by DM6PR08CA0050.outlook.office365.com (2603:10b6:5:1e0::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:39:45 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; 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 DM6NAM11FT018.mail.protection.outlook.com (10.13.172.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:39:45 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:39:40 +0000 From: Xueming Li To: Xueming Li CC: Luca Boccassi , Kevin Traynor , dpdk stable Date: Wed, 10 Nov 2021 14:29:10 +0800 Message-ID: <20211110063216.2744012-67-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 98c7b0cc-4e0c-4128-96d8-08d9a414e272 X-MS-TrafficTypeDiagnostic: BYAPR12MB3462: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4RBHQ8BJJmgiJmbgeCsB61VFEvq/3PZq0XqXKWP5mxQFjYOf8rzhi/XFSrgsHfZRS15KHj2XDvObwoALu24aq6Hx4KRJJy/VP0jtNZzrlwaRSGHmPRq/NPRj95AcD160gT1N4lqjmArkT5KqMbbk+FoQXaxrYGPzVcd3+L7c2stKrPNnHtIhGH+bxeYk/CW+wjc15tfrwZ5KBm1rQR8QsaAajJuXckeQ4pCeq5X7ccGwRuqkJkx0GITxrAzp55a5EPxhTUm1otMnben+U3a86Ne3LiL+DB14KouNMC6E+l8jIbxPBrZAjLnN4/LL6yzfPStPmndS30GXw6HLuHyMBwtdK5YzY6MRH0X+q6wgKfha1IA2MWdaTglEEo1xQZggKw8LxmWfyRQwYccJOXqwqUvyRijYAMMpOlCN35JJU6NJC8wTTqVuGpmRwxV4BqAup5Hp/qRFwGuXAkpSMJka5VElGhZlFZQyAetzBOc4Nx95iMrkO7UuElZs9zW7GbFJdkeHnNFhwamSQp6SEBjbYL6T9F0QQ76OoCJJQaOBO0tZI8acWbXj45skxrqaga3Dpy8Y+T7IAWeDhsOBcS4NgOLoNbyY+R8p5dwPIMHWcgRu2rrWtOk772y78NQfv7QdMWliy88g+dyz/oKjqw61kKyGe2+zM9HjUqXhGDVimwsBe0LfNbGxxy1wKyELtJsaQwn1EyGEQWc4tCx/9LshKYNm/vn74iS5fqwv2DmZYl+CNa5wGhOny7a6fKMSVXInXESAFsOQyZm4H73yvjR+EQfmP+HYpmsk9UxiADqDUpiUdGrFy3ZfZ2FcWQ6yYt9o2MVcpklwX9tHdbzpA+H0BA== 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)(36840700001)(46966006)(2616005)(70206006)(70586007)(966005)(8936002)(186003)(83380400001)(6862004)(7049001)(86362001)(26005)(336012)(36860700001)(82310400003)(7696005)(508600001)(1076003)(426003)(47076005)(6666004)(2906002)(36756003)(6200100001)(316002)(5660300002)(54906003)(55016002)(6286002)(8676002)(7636003)(356005)(4001150100001)(4326008)(37006003)(53546011)(16526019); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:39:45.4028 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 98c7b0cc-4e0c-4128-96d8-08d9a414e272 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: DM6NAM11FT018.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3462 Subject: [dpdk-stable] patch 'sched: get 64-bit greatest common divisor' has been queued to stable release 20.11.4 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.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/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/bb7f3bc24ba6023e9bd5782ac68bc433c3e7a005 Thanks. Xueming Li --- >From bb7f3bc24ba6023e9bd5782ac68bc433c3e7a005 Mon Sep 17 00:00:00 2001 From: Xueming Li Date: Thu, 23 Sep 2021 16:11:21 +0800 Subject: [PATCH] sched: get 64-bit greatest common divisor Cc: Xueming Li [ upstream commit eb5636e879a568a323cbed4c356162011e7312be ] This patch adds new function that compute the greatest common divisor of 64 bits, also changes the original 32 bits function to call this new 64-bit version. Signed-off-by: Xueming Li Acked-by: Kevin Traynor --- lib/librte_sched/rte_sched_common.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lib/librte_sched/rte_sched_common.h b/lib/librte_sched/rte_sched_common.h index 96706df7bd..e4cbbd9077 100644 --- a/lib/librte_sched/rte_sched_common.h +++ b/lib/librte_sched/rte_sched_common.h @@ -51,10 +51,10 @@ rte_min_pos_4_u16(uint16_t *x) * gcd(a, b) = gcd(b, a mod b) * */ -static inline uint32_t -rte_get_gcd(uint32_t a, uint32_t b) +static inline uint64_t +rte_get_gcd64(uint64_t a, uint64_t b) { - uint32_t c; + uint64_t c; if (a == 0) return b; @@ -76,6 +76,15 @@ rte_get_gcd(uint32_t a, uint32_t b) return a; } +/* + * 32-bit version of Greatest Common Divisor (GCD). + */ +static inline uint32_t +rte_get_gcd(uint32_t a, uint32_t b) +{ + return rte_get_gcd64(a, b); +} + /* * Compute the Lowest Common Denominator (LCD) of two numbers. * This implementation computes GCD first: -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:05.019503122 +0800 +++ 0066-sched-get-64-bit-greatest-common-divisor.patch 2021-11-10 14:17:01.824079806 +0800 @@ -1 +1 @@ -From eb5636e879a568a323cbed4c356162011e7312be Mon Sep 17 00:00:00 2001 +From bb7f3bc24ba6023e9bd5782ac68bc433c3e7a005 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit eb5636e879a568a323cbed4c356162011e7312be ] @@ -10,2 +12,0 @@ -Cc: stable@dpdk.org - @@ -15 +16 @@ - lib/sched/rte_sched_common.h | 15 ++++++++++++--- + lib/librte_sched/rte_sched_common.h | 15 ++++++++++++--- @@ -18 +19 @@ -diff --git a/lib/sched/rte_sched_common.h b/lib/sched/rte_sched_common.h +diff --git a/lib/librte_sched/rte_sched_common.h b/lib/librte_sched/rte_sched_common.h @@ -20,2 +21,2 @@ ---- a/lib/sched/rte_sched_common.h -+++ b/lib/sched/rte_sched_common.h +--- a/lib/librte_sched/rte_sched_common.h ++++ b/lib/librte_sched/rte_sched_common.h