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 65AEB4233C for ; Mon, 9 Oct 2023 16:33:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 593D84067A; Mon, 9 Oct 2023 16:33:39 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id BAA59402A3; Mon, 9 Oct 2023 16:33:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696862017; x=1728398017; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=MmS2WJWYj3whcvwGDDKoqe9vrbI1VNXFxFRfv1v6YRA=; b=i1dF6pNyiU94kobHvTlP42NZrPgAUG4+iF5b+u92sHPKMkPH+JZTPp9U S80dnO1MSJKTH4G6nve0gJhJlcBF8IF/NuFjMslXH4bxtPwsfA9cfitTd N+TuH48mjzciJkB/ecKXELUmdeZ+PDCqPgC4jST37EM75W7AfscMyj8xI JncZVXv95YGYfC9CuBXAegbDpgqHeUDrl3cOq0+flbWw3fGOzQISwc/A3 AJDWnnuGIcEh0EsyncMHnLTQAxJocu4FhDBYMywzpwMSMROrlzGA97i5J HR17HocyhTtsFVPbewrbpwRQCVz8MzDWSUUtnc0YqxTnNcywl7MGwthG+ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10858"; a="388016645" X-IronPort-AV: E=Sophos;i="6.03,210,1694761200"; d="scan'208";a="388016645" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Oct 2023 07:33:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10858"; a="788179572" X-IronPort-AV: E=Sophos;i="6.03,210,1694761200"; d="scan'208";a="788179572" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 09 Oct 2023 07:33:34 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Mon, 9 Oct 2023 07:33:33 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Mon, 9 Oct 2023 07:33:33 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.169) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Mon, 9 Oct 2023 07:33:33 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YWP9LAurH1iVnG9hNI1EGAJrFgk9Db0dSYusQ17UPcY4VgBXFcVieKKyQ3GdIleIrGymaMESS31gQ19zf/dZ99Gxc0LO1ssL6X72D6DJWdPbo7wYsA7GHU/pMnJeGvov1dMYUMwllRTehAta5hz73nToP9HkzE6vxWr9gV2Dpj0nnPrt4BGgRZHQ/k2MwzkwAK1g8S1/qe8htMhY7TCCU0if+2wj6Dddv71n44MkXfTdINR4l8NepgaVr3SB66tCoQyVsVQ3XCganm+JKOrrO++Ksn3eg2g9yBWJnTGR8KSLiM1wVyZppp6zigj89Vy5OP58NYmqavrNXmYZM2lyDw== 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=2L+VM4flfH5Y01Ca0J1KjG07l3RwJYo+f3mfcFTv7sY=; b=F/pzh3f2dXuaXPPT3bWkmPgv3ioEWkZYSICe6/7Wpnj1AuvAv3Kqrqrv0Fn1+f7gDH23j2mH2cGgRic0c/DzidVAJBQznX47/ChTsO5YZ4LWrodjxDL7rGQw3fBv2CekSKh0H8yhqNIYCcFODXt9KibaupE9EagneGAmR/ccV8x2YqYY3gjLBba276fMRZFWrRszuNfP2BhMYGnOnEuyxvd+Thwr6UQqg65Btvwqovjd5K23+CwgM11mMWtqKj5qV4rHoGyOltNenN4GOi5FU80rbwMXsBCRoxIM36SPwfV7K7PglX5t2CUpNJkoC+BkwfA0TGZbgiaJdbwdhZm+AA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from CY8PR11MB7290.namprd11.prod.outlook.com (2603:10b6:930:9a::6) by CY8PR11MB6987.namprd11.prod.outlook.com (2603:10b6:930:55::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.30; Mon, 9 Oct 2023 14:33:30 +0000 Received: from CY8PR11MB7290.namprd11.prod.outlook.com ([fe80::1049:683e:132f:e690]) by CY8PR11MB7290.namprd11.prod.outlook.com ([fe80::1049:683e:132f:e690%7]) with mapi id 15.20.6838.040; Mon, 9 Oct 2023 14:33:30 +0000 Date: Mon, 9 Oct 2023 15:33:23 +0100 From: Bruce Richardson To: Jieqiang Wang CC: Yipeng Wang , Sameh Gobriel , Vladimir Medvedkin , Honnappa Nagarahalli , Dharmik Thakkar , , , , Feifei Wang , Ruifeng Wang Subject: Re: [PATCH v3] hash: fix SSE comparison Message-ID: References: <20230906023100.3618303-1-jieqiang.wang@arm.com> <20231007073634.3458294-1-jieqiang.wang@arm.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20231007073634.3458294-1-jieqiang.wang@arm.com> X-ClientProxiedBy: DUZPR01CA0069.eurprd01.prod.exchangelabs.com (2603:10a6:10:3c2::12) To CY8PR11MB7290.namprd11.prod.outlook.com (2603:10b6:930:9a::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY8PR11MB7290:EE_|CY8PR11MB6987:EE_ X-MS-Office365-Filtering-Correlation-Id: 7a992eee-7ef2-4694-0b3e-08dbc8d4b503 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gDUAx6GkTdqC1fWd47STmyZ682NyprcnxF15voBWydg3L6c0lUVjaDKjJ/V7iy7LJ53klibCHz7VAnJp3tM2H1w9rxRC7B6MT3Q6nOETQflTCQ45JawQ4d/M3+HyngpofWVkscPnXnH62BDPWl8aeQLanrDwlO/wG6GxcKo8xBwEEIpRhbNcjYEKZ2Sgwv+Zi1dCLnRkzH8O5xvwZECXaJyZ8cyQfjDyG7dY3sTqxNhoiqiGPLTMKFYVc4UhFrVi8Aq5cQJOw4zxz1Llm5GVTVrudpXPrq8eqdf7xzm6Na1q6Yzm44qoV75H96Jco+kRwa4JhAYYY6H2MJ3PpFlWmC/xvGZsjAYuiFNmcMecCzTE8zvXWHtkf96b+wWCrHK8P7z9/N6UN8jfIThP3lp6y49sSl2JIoDTVnbHuM1eCWlb9Mv082a5u8Q9zjyoQ7GfqOVw4PoYXRPhUmSRxnrmLLT4JLmqOHTUwje8ao7WWbu6W5cZzdRJKYNsJGw4DWs4VrDo/rCiSj1bfqhP6LvGhFXbRqExfeuXIrd8qYu9Wne1fUzlxa+FS1l6YKiGaVG/ X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CY8PR11MB7290.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(396003)(376002)(136003)(39860400002)(346002)(230922051799003)(451199024)(1800799009)(64100799003)(186009)(6506007)(6666004)(66476007)(6512007)(6916009)(2906002)(4326008)(44832011)(8676002)(41300700001)(54906003)(8936002)(5660300002)(83380400001)(38100700002)(6486002)(86362001)(478600001)(82960400001)(26005)(316002)(66556008)(66946007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?MZIiPlVQ6wW3ZWALMlFWv+X59CVZeesBmxjmu00Avxa9O5S86O67j8wAkCIi?= =?us-ascii?Q?tRZUhNG9af3XhioDH1wnQ+Yn8y9WL5g4aGKiBd6KwpXLZqkv9Mc6Fr3X6p+5?= =?us-ascii?Q?cZjSC5Gnf7+JLmJg5TBH2wZKiRSpIoC4vQoPpfMYdjAkakoox/nsJVU5fp1u?= =?us-ascii?Q?72+k3L1o+TIikDoURIe9ZPxzbUkx9DGbTzIODM8ukl7Xt9OpWZYy8yfVnnb8?= =?us-ascii?Q?YFkKhAiLwEjbGi7r2LL1tvqBYTLUogyLML9cnmKa7arbswd4gqDSPw1B6O3+?= =?us-ascii?Q?2L8bG+mq/C07afOFBXDxTEVWohsnzQBthiCsTemaRoddmmChUnMRr0n76PAO?= =?us-ascii?Q?rWwW76bd5urHqyvxXbypeVEFMMa3IZ4G5SjmgpL7L+HWPNSyU+cU3NXYtKts?= =?us-ascii?Q?1vOq7NA0mExoeJE1w71w5z/+JLeQPO/ibI2+3f6rUUydvT1UYRbdPohBhfvX?= =?us-ascii?Q?62ZgASTrEBK04fBz7gsE0zBacWf6MW5q4DB5QEdMaI7aBp0UUvXzIwJYhSJ2?= =?us-ascii?Q?DXugGM++2iymEoGFp/feG7VB//LceFZcP19zNREGCs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VZuMkicEewVF4ZiOcBs7JdFYe6IotG8tQKnu+NavsR911uGM?= =?us-ascii?Q?lNvsVsKllH0xjbqsIt3+wa/MjZIYrYjcD6GobTzM2Y3R1ew8wfwQf4ZJbr/M?= =?us-ascii?Q?WCZl+fe5aaB6by6sfm2RmZzYE4s9J7IDABAMt5yJqBeLg+lNX4w34f4Pp/4N?= =?us-ascii?Q?Tw=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 7a992eee-7ef2-4694-0b3e-08dbc8d4b503 X-MS-Exchange-CrossTenant-AuthSource: CY8PR11MB7290.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2023 14:33:30.1731 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: EvxZJIZ1radx98P4Q1omxWElSe5irRxv7qw90cnayDOpS6dnTUlVxZozfYcPycqTpK9yDzswcwoe1IG9kipWq0Wknjlfv9Dl4GjwFlqOIVQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR11MB6987 X-OriginatorOrg: intel.com 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 On Sat, Oct 07, 2023 at 03:36:34PM +0800, Jieqiang Wang wrote: > __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") > Cc: stable@dpdk.org > > v2: > 1. Utilize scalar mask instead of vector mask to save extra loads (Bruce) > > v3: > 1. Fix coding style warnings > > Signed-off-by: Feifei Wang > Signed-off-by: Jieqiang Wang > Reviewed-by: Ruifeng Wang Acked-by: Bruce Richardson