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 53B6D42672 for ; Fri, 29 Sep 2023 17:32:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4CA30402AD; Fri, 29 Sep 2023 17:32:48 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 4F8794026E for ; Fri, 29 Sep 2023 17:32:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696001565; 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=Aa+z1ealSDgutdx+WRQaS4vxg3D0UH5gQnlXVWhwxTuwQvi1RcEdFEhMC0tjIOzGZBHM78 A/Rg8gY3dCvgJZYAiXJmgUJE27HjPVQ50lS210T6xnrls9iu6nVb+PEjFy6c2A6AGqcchk avLNGfB/FWWNlirA/ArGUQuQkzh1w10= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-395-wIye6wraMeOJpfWuGJpQiA-1; Fri, 29 Sep 2023 11:32:44 -0400 X-MC-Unique: wIye6wraMeOJpfWuGJpQiA-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2c120e3aa0dso202190671fa.2 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=iQXjkaldYkFlsHHosIT3r9yXu7dYVfStor0awZKb1XrfoUKbq7ZCIXTWUn8WAl/cjn kKTYdc6+rLXw5eTfMhelDTd2hYVQ1hVhN0ThA4cd/OihJXun72i1vFaoLiwZFNypDYH7 /TiJoJvrfQAzBlnk52G2ZYd93Saxlnt7qTfX1CpT62sjK71pvH0JrUYNHyhQ1QQGZesq b8OgcUKucz+TwlbOpMP4DQ13w5TC/GGBjSOI/tSilBd8RBsSlIqYCc+dlJbHnWTavohu 7DvPoCTsl0vpacFNHxTIilmpybLu7ZSC0Qt9XNafoAcC8Q/wCLXPIrHqtvcubA+wMBlk IP2w== X-Gm-Message-State: AOJu0YyhZh4+IESgEYzoCiiOe1JxxOh3NJAw37RKW3wF3T5xZhBmyBfl KvPsAMVt10nAF9poYEd5oBXBT5sv6m8f8+E2E7a7qvjvxjeUK2hL1eSVbe6UyTUch5Giu9r4fDT /xM3PzEOI1TFvqBB5xjkem2M= X-Received: by 2002:a2e:8795:0:b0:2bd:c3d:1dd5 with SMTP id n21-20020a2e8795000000b002bd0c3d1dd5mr4059534lji.32.1696001563014; 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: 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 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