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 E728C4234A; Tue, 10 Oct 2023 11:50:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8680440297; Tue, 10 Oct 2023 11:50:54 +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 18F7B40278 for ; Tue, 10 Oct 2023 11:50:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696931452; 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=cmXCL6rfodtbSO1BgP7QvLR4T1AL95JZv2cUerfibqpBxpzScyKrq08+oEQhldOG86G/R1 pqQABYM9cspbo93r+Nn1PewgI1JjGuf1EoAnhwBO1ZVgyR5p5vxaW8vwF9qbo8J+UJoNCf QghWgEOAKdiHFG/o6gxnaNitce0qCZ0= 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-679-gIUFjiiFNoeakGtn1nXuzg-1; Tue, 10 Oct 2023 05:50:49 -0400 X-MC-Unique: gIUFjiiFNoeakGtn1nXuzg-1 Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2c296e65210so47312341fa.3 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=j9uneUXQpgqeJjx2RRkaLPXMn09JBn0LuWyl9mjNs/8Q7duie+SHd0CQcOLcPH3/lJ gtN3YB5A7J1cIpvNWCmiZiB/AIritYrTMeEobjeyDpnRtSj7U+yjKX1o0T3O8rxn+FjM vm+u/C7kwt5AxTyCSY0XtmXGGURDXKcribtlam5beuMHoD08L23AJP9bahwZ3blc9N8O TkqmiBtrhXWt2CFVCdpJtDH48iQRGa20CouXbGN29llf5yhe42T5FCNDeJ93pWwGvzpu hOFvTYP6fhrB6R3dELh6dk4UUksg1+3Y49B9K67QYGWHNVn08t0Ng6tCj0CoFFD2czBg kR+Q== X-Gm-Message-State: AOJu0Yz13E38ZY1U8lTcoMKMD5oAseGbvxIN8oQDyQvG3R0XbHbPniFa P2PArVMOWAnknzkLdsg3SJX1ytbvs9o+CebtGx08K83Knx39imuFUNI1Mk52QsLNHuFDQVZmLgA HvsSbhNuvxcOwrGfl+Kc= X-Received: by 2002:a2e:8089:0:b0:2b6:e105:6174 with SMTP id i9-20020a2e8089000000b002b6e1056174mr15189732ljg.47.1696931447591; 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: 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 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