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 18835431D5 for ; Sun, 22 Oct 2023 16:25:14 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 12410406A2; Sun, 22 Oct 2023 16:25:14 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by mails.dpdk.org (Postfix) with ESMTP id 1FAA6402C4 for ; Sun, 22 Oct 2023 16:25:13 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FV7E7J53VFdkFWwRdQj83dTksHjqXOjryGcG7Kc22MKVtb7VW/+8ApD45ckNPrOuQJHsx8iz2cAYNcF8qv6YgYpQZtSGlF4cHu5S86aBCeSVyUNRkiinzLzcsWbEzo769eLmdzD3td2McLa2Ahx3J/RrVoXQxGRLBnQKbLrKafqRqhJFZBrdtDZnUYbo9XC3rzPNmm88st6R8Bb2Rb8pGF+i9IY5VzoH8nvK35TIVQbUb7mx9w7GgdHHpveEK0qK3FM+LkpVr0IPru1E1ndXcxIk4xmKKamSIIxnLDHTD3/jhY8Bd+ogbFk6uz3Z4INQC3zycuu25UCNaB1y5F1rAQ== 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=XqXI6o3mSthl5shHp0j4DaYfNf4xdo8vxFONLIoFvdQ=; b=Yl5frk0DV38UDY22bhHCH/gWZoATedPhT/M2NcrVF4bIwbiVHD6D/rjNkwVtIoatQGv7J2PZk3Yz3d3o3fQejSTXvQx0DwP3hORqPuZc9qgWUJ3OQk/f08fi4yLZEUv23+NMKhYZNePupcYjJeASAd6LWfx9+za8q39TiObx41emrRayCVClA01Ipqi8QjfnWlCqOBnmYeTtSP8Mjd+g8HBSxOlsppPegGoEbrb/bPmh4nSqo4TtuwHO3TFaEE8+rputzM152lIvfjSbAcAIkWqnBfxOiVmhOU7G5qk8UCgBrVPTSS0Uyvho6cBMLVUHRONqcm/BR7ffsVx0ZyLvZw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=arm.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=XqXI6o3mSthl5shHp0j4DaYfNf4xdo8vxFONLIoFvdQ=; b=mwGRJjuPR/5IkR+xIrwXdVPlc8Tak2Nh5ibWsKenfoY1Vye9YyjMY4R2MgL3itEbiL72nAUVKlyBRoCbj5K0o1i9etYN1/qIUTMWXOzHDQxCt4w2ISuR1CSL+6yntuhbby1bUrcgwqh8MdFuFomIJZ0ZRXHiTOC6HmFtA8no/F/VS4okyGGQdq2EKeXT0A7u+3NK5Sf4C8xxRu6NgbizFx0hAHupotzAAbuBQ2Wa97OKBIR6zYsyuEiWP4QjSbhvBHoa3mb1tve9FvOoXzwiq+pauWQnDLkPpVxR/e7JjjrG7C/O12VAaMqqwK+wRkCNDFoq3LDSZmkB+16w/Wol8Q== Received: from CH0PR13CA0002.namprd13.prod.outlook.com (2603:10b6:610:b1::7) by DM4PR12MB5312.namprd12.prod.outlook.com (2603:10b6:5:39d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.31; Sun, 22 Oct 2023 14:25:09 +0000 Received: from CO1PEPF000044EE.namprd05.prod.outlook.com (2603:10b6:610:b1:cafe::46) by CH0PR13CA0002.outlook.office365.com (2603:10b6:610:b1::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.14 via Frontend Transport; Sun, 22 Oct 2023 14:25:09 +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 CO1PEPF000044EE.mail.protection.outlook.com (10.167.241.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.15 via Frontend Transport; Sun, 22 Oct 2023 14:25:09 +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.41; Sun, 22 Oct 2023 07:25:02 -0700 Received: from nvidia.com (10.126.231.35) 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.41; Sun, 22 Oct 2023 07:25:00 -0700 From: Xueming Li To: Jieqiang Wang CC: Feifei Wang , Ruifeng Wang , Bruce Richardson , dpdk stable Subject: patch 'hash: align SSE lookup to scalar implementation' has been queued to stable release 22.11.4 Date: Sun, 22 Oct 2023 22:20:52 +0800 Message-ID: <20231022142250.10324-24-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231022142250.10324-1-xuemingl@nvidia.com> References: <20231022142250.10324-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044EE:EE_|DM4PR12MB5312:EE_ X-MS-Office365-Filtering-Correlation-Id: 710fbafc-055d-481e-4eb7-08dbd30ab20e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /PtDMseiJo9UPRzu9mFK+ytyB5FS2aISYGkIX2hte/iMCka6CczSv2/KqLSW8Eet1sovFi9WDSVvcWMgvciehMPpQ/suZeEuhH/jf45C3DoYB7u2msqV9ehOY4qvDia6qJMML8km4xMlycpTjrMJ8RSHtSriY7S4WdF+DhfyDZcN6No23UyCS+rBsZr7K7lSdON8ItsNE0/YSyOAhh22SWBUSKfYYJ60PVuKaTEXodarAgZvESKewxVUOGkgz/E3el+OC0UaTtlDe1ptAjLNJXH40h4ZpGKh5/08MNzk/fKgPoz7fQf+gz/FBjrHFUclNpxIMr15c/bfjNEwPl/gujE6tOtPNCRBsCviCeYpr8nglRDIvr4N9nQab/rxnaUWsPbmGtUaQ6RQxV31laN/ID7/lWS2n61zB+phXlMMJiyOngNsdadjPgobO+urQO25xijCooEOGca0IOajHwoXgiEW4KQyOfkErdQUjQyjHslh/wqZklqEXvMLahMs1SL1wkxy2waIST1DPPIHFfI0PY5S9yCpJRMyNVZkxl6AHwU/gDEhRKr3TMUEQrvIgymkezC3UGJinR8ZN2wc+rcNNPYsfxBMh3caSXExFR+JzbMjE7q57aCKRB3dq9+uyp+3SByHmJkeRHzctnQyWjk3K+ivVsuJ43EulhP2PjEc6YWl2hdZ68exHcbcgBNG9w12I1FBCRras4ZMMTca2LeSYX7mWtavcZkYqblq2K7Xdt5UEO3Egkn90Ezxt3S7Y5k5mTjzLvuaUI+nH8tcV22cT7SC0aYJ/XsWLEVVipavROo= 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:(13230031)(4636009)(396003)(136003)(346002)(376002)(39860400002)(230922051799003)(64100799003)(451199024)(1800799009)(82310400011)(186009)(36840700001)(40470700004)(46966006)(2906002)(36860700001)(6916009)(316002)(70586007)(70206006)(54906003)(82740400003)(356005)(2616005)(6286002)(16526019)(7636003)(1076003)(7696005)(478600001)(6666004)(53546011)(966005)(55016003)(47076005)(40480700001)(336012)(426003)(40460700003)(41300700001)(5660300002)(36756003)(86362001)(4326008)(8936002)(8676002)(26005)(4001150100001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2023 14:25:09.1910 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 710fbafc-055d-481e-4eb7-08dbd30ab20e 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: CO1PEPF000044EE.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5312 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.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/15/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=af391d2427d78f3c4dbf2b3e581e0b5edf6ca1c8 Thanks. Xueming Li --- >From af391d2427d78f3c4dbf2b3e581e0b5edf6ca1c8 Mon Sep 17 00:00:00 2001 From: Jieqiang Wang Date: Sat, 7 Oct 2023 15:36:34 +0800 Subject: [PATCH] hash: align SSE lookup to scalar implementation Cc: Xueming Li [ upstream commit e93bbaa72cca7ec912d756afdf10e393f9d71791 ] __mm_cmpeq_epi16 returns 0xFFFF if the corresponding 16-bit elements are equal. In original SSE2 implementation for function compare_signatures, it utilizes _mm_movemask_epi8 to create mask from the MSB of each 8-bit element, while we should only care about the MSB of lower 8-bit in each 16-bit element. For example, if the comparison result is all equal, SSE2 path returns 0xFFFF while NEON and default scalar path return 0x5555. Although this bug is not causing any negative effects since the caller function solely examines the trailing zeros of each match mask, we recommend this fix to ensure consistency with NEON and default scalar code behaviors. Fixes: c7d93df552c2 ("hash: use partial-key hashing") Signed-off-by: Feifei Wang Signed-off-by: Jieqiang Wang Reviewed-by: Ruifeng Wang Acked-by: Bruce Richardson --- lib/hash/rte_cuckoo_hash.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c index 829b79c89a..a08b5dd875 100644 --- a/lib/hash/rte_cuckoo_hash.c +++ b/lib/hash/rte_cuckoo_hash.c @@ -1860,11 +1860,15 @@ compare_signatures(uint32_t *prim_hash_matches, uint32_t *sec_hash_matches, _mm_load_si128( (__m128i const *)prim_bkt->sig_current), _mm_set1_epi16(sig))); + /* Extract the even-index bits only */ + *prim_hash_matches &= 0x5555; /* Compare all signatures in the bucket */ *sec_hash_matches = _mm_movemask_epi8(_mm_cmpeq_epi16( _mm_load_si128( (__m128i const *)sec_bkt->sig_current), _mm_set1_epi16(sig))); + /* Extract the even-index bits only */ + *sec_hash_matches &= 0x5555; break; #elif defined(__ARM_NEON) case RTE_HASH_COMPARE_NEON: { -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-10-22 22:17:35.298506800 +0800 +++ 0023-hash-align-SSE-lookup-to-scalar-implementation.patch 2023-10-22 22:17:34.156723700 +0800 @@ -1 +1 @@ -From e93bbaa72cca7ec912d756afdf10e393f9d71791 Mon Sep 17 00:00:00 2001 +From af391d2427d78f3c4dbf2b3e581e0b5edf6ca1c8 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit e93bbaa72cca7ec912d756afdf10e393f9d71791 ] @@ -20 +22,0 @@ -Cc: stable@dpdk.org @@ -31 +33 @@ -index d92a903bb3..19b23f2a97 100644 +index 829b79c89a..a08b5dd875 100644 @@ -34 +36 @@ -@@ -1868,11 +1868,15 @@ compare_signatures(uint32_t *prim_hash_matches, uint32_t *sec_hash_matches, +@@ -1860,11 +1860,15 @@ compare_signatures(uint32_t *prim_hash_matches, uint32_t *sec_hash_matches,