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 8691942672; Fri, 29 Sep 2023 17:32:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 76961402AD; Fri, 29 Sep 2023 17:32:50 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 384064026E for ; Fri, 29 Sep 2023 17:32:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696001568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/RxsW2as/1k21Lsx9H0JEtNG97KGEZkPpEaYy9kHo5w=; b=dTUvxqtTNfOayXc4+ByFvNFGWe09dp6zWDvC9/mHU9T+yBLSj/ZCdr52oW5UAP1cOyifDh 850OBeF6U5q0GS4G7+8GQMtI4iHgB+cg6LwqaJenFNDQHwwxrucHX8hwfxIiLhAci09gKL fJ7EzxwY6qcaQgV6zf9B4NR7D5ZdkwI= Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com [209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-464-LnZltNQKOYix-zNENkzO_w-1; Fri, 29 Sep 2023 11:32:44 -0400 X-MC-Unique: LnZltNQKOYix-zNENkzO_w-1 Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-2bfb2c81664so202176241fa.3 for ; Fri, 29 Sep 2023 08:32:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696001563; x=1696606363; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/RxsW2as/1k21Lsx9H0JEtNG97KGEZkPpEaYy9kHo5w=; b=eOsgPVi76z7bHNXADbmv8vOU3RuzXB4jwC0isnFUdnvfNrQdHc6x6LibgDsoYzazrr 2Ptq+oU9mt3ER+yRJ7ZBW1cbIhznnpDLntsy3OAieHoT8D6KLH+bCITJj5BeC98Bzq3L 1QatTFfEm/ih/Cv4MFqAK1MiYHgJoz+w8Bsc8ZZhOVchgeZ50BfpLMUVjsfObTEKJbe3 LAW1EvjX0hKBr1Sjehy/agbXM70kQ13N3KPw31RUyM0kCn3ZyRltD8BMIwS4kvuQ+nx6 YV69ii77ZD2tOSMdmZiAjlbTjIX2lYfq8Qd/cJKeLXPmgLVdszKwJIe8nPC5JXWjwGfa PtUg== X-Gm-Message-State: AOJu0YzcQvHE+D7BDzOrMpSbCDdd85bpaJYOVEyjZITMvwkHNfLO4xvM f6v2K0tMnABblQTXattIYCNwriNLoTKTt6dBbcRt68GD3WlL8IwhRrQuSXNJ2q2cK7tdtVp9+u1 0FoD8jFG32gf+Lr8SBLw= X-Received: by 2002:a2e:8795:0:b0:2bd:c3d:1dd5 with SMTP id n21-20020a2e8795000000b002bd0c3d1dd5mr4059531lji.32.1696001563011; Fri, 29 Sep 2023 08:32:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEFC+nhqtWiz7oMN4Zg8vHjbQnKtPDFthbkzkLftLbGK6XDsUIHDoh3kB5Z1sonlGOGo4OqFch83KUcGZ7gR5k= X-Received: by 2002:a2e:8795:0:b0:2bd:c3d:1dd5 with SMTP id n21-20020a2e8795000000b002bd0c3d1dd5mr4059511lji.32.1696001562701; Fri, 29 Sep 2023 08:32:42 -0700 (PDT) MIME-Version: 1.0 References: <20230906023100.3618303-1-jieqiang.wang@arm.com> In-Reply-To: <20230906023100.3618303-1-jieqiang.wang@arm.com> From: David Marchand Date: Fri, 29 Sep 2023 17:32:30 +0200 Message-ID: Subject: Re: [PATCH] hash: fix SSE comparison To: Yipeng Wang , Sameh Gobriel , Bruce Richardson , Vladimir Medvedkin Cc: Honnappa Nagarahalli , Dharmik Thakkar , dev@dpdk.org, nd@arm.com, Jieqiang Wang , stable@dpdk.org, Feifei Wang , Ruifeng Wang X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, Sep 6, 2023 at 4:31=E2=80=AFAM 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: yipeng1.wang@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Feifei Wang > Signed-off-by: Jieqiang Wang > Reviewed-by: Ruifeng Wang A review from this library maintainers please? --=20 David Marchand