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 9694E4234A for ; Tue, 10 Oct 2023 11:50:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 824544067C; Tue, 10 Oct 2023 11:50:57 +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 AB4964067B for ; Tue, 10 Oct 2023 11:50:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696931455; 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=XUNMTQ6SvH8B54v+59haO6v/c3zcEdnd2SaK9LtnvjM=; b=hj4g3+mKsHcrtfZVjHPxEK+YpezAsFgafIPDKwwqhnBpuaNE+pOkiRUZklDkzmPMz6dCfZ PoLQQ3Y90UGf+1/p2b7ylT5Aay/SYE/nhIb0g5Rdn7KQZjLPkiq8H/0m1PcjIts3oWFsqY uCPgAtDW0+iho3odGtynE+aW/yXsBes= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-70-X3jYMje0OPa3gXiLFVaL_g-1; Tue, 10 Oct 2023 05:50:49 -0400 X-MC-Unique: X3jYMje0OPa3gXiLFVaL_g-1 Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-2c2c4358880so47337211fa.1 for ; Tue, 10 Oct 2023 02:50:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696931447; x=1697536247; 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=XUNMTQ6SvH8B54v+59haO6v/c3zcEdnd2SaK9LtnvjM=; b=f/W+rGVWVShwN/mHX+89tiPFatrbN7d2aIeRBrj31DM3qoxM3BQstU45YCjJTukZ8j xVr19adHeNUTRR99as9r3TSxGptyy2//5THLB4Zfjl6bkGrgZMD3y0h7qdiSz63oSPJa v79TRmaV+pFw4AzTqfQ7ej/ENoZ2/mrGVvwWBrFgakOmeO7wg/jk4v5eBH3ms23bPMov J43TXXSkH5Y1zvJKOkk1ys83Jl3EJt6nlpjFbeKhPUboNe+EYrZ9K7Uc0p5LjATbB62S XOGTuR1y9v6Il0NdptYODtrDwbbRixPqPJDCONkYQfWRwlmt5rTbJqhvIk1KJPlM3C2l mPRA== X-Gm-Message-State: AOJu0Yz7L0vZmIasTgBCxErVQq4ZijfWBcWOXgscgJflEjGy7UisPZwK SpSbxBSve6omALXULui9hJWRrU3pzwHw5ZuMnIIVJVOlZE5CKqfsbEjSzeZFV4mTziJe8gLJnTX 8/2nqG3gvwOX+0QlJRQl02fk= X-Received: by 2002:a2e:8089:0:b0:2b6:e105:6174 with SMTP id i9-20020a2e8089000000b002b6e1056174mr15189722ljg.47.1696931447583; Tue, 10 Oct 2023 02:50:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFe4CBdUIpuCms6bYq2MiVyTEfaqN1NJGaS04QLxAYoe0wsxpYuDlNMHHQ5mKVk1ZTxEWOd+xE0N+IMIg41kLE= X-Received: by 2002:a2e:8089:0:b0:2b6:e105:6174 with SMTP id i9-20020a2e8089000000b002b6e1056174mr15189710ljg.47.1696931447294; Tue, 10 Oct 2023 02:50:47 -0700 (PDT) MIME-Version: 1.0 References: <20230906023100.3618303-1-jieqiang.wang@arm.com> <20231007073634.3458294-1-jieqiang.wang@arm.com> In-Reply-To: From: David Marchand Date: Tue, 10 Oct 2023 11:50:34 +0200 Message-ID: Subject: Re: [PATCH v3] hash: fix SSE comparison To: Jieqiang Wang Cc: Bruce Richardson , Yipeng Wang , Sameh Gobriel , Vladimir Medvedkin , Honnappa Nagarahalli , Dharmik Thakkar , dev@dpdk.org, nd@arm.com, 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 Mon, Oct 9, 2023 at 4:33=E2=80=AFPM Bruce Richardson wrote: > > On Sat, Oct 07, 2023 at 03:36:34PM +0800, Jieqiang Wang wrote: > > __mm_cmpeq_epi16 returns 0xFFFF if the corresponding 16-bit elements ar= e > > 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 (Bruc= e) > > > > v3: > > 1. Fix coding style warnings Changelog and other notes on a patch should not be in the commitlog itself, but should go after ---. https://doc.dpdk.org/guides/contributing/patches.html#creating-patches > > > > Signed-off-by: Feifei Wang > > Signed-off-by: Jieqiang Wang > > Reviewed-by: Ruifeng Wang > Acked-by: Bruce Richardson Applied, thanks Jieqiang and Bruce. --=20 David Marchand