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 23704455E2; Tue, 9 Jul 2024 13:42:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E313840689; Tue, 9 Jul 2024 13:42: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 0BA0C4067D for ; Tue, 9 Jul 2024 13:42:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720525376; 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=19qSrJdn7qyHym25kgE2GobfmVPso0txL0OKV4wHyc4=; b=co1iLUMaF69enth+UOXWuAPRvAcPRr6JNYmjkNeQN/biztUxHgiF4pPudpUXGVyT5U3GRN 4xovV6V02t7QZiNpWFR0/ViI0SShk7BPMaNoeLxlEXvzH0l3Q66535sQgJUra2eBJvbMZ5 DL/1PNV3lAVx7hoWzMPK2Z9AkvKKe6U= Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-192-r0xT9iwWPVmdLDEkniGwxg-1; Tue, 09 Jul 2024 07:42:55 -0400 X-MC-Unique: r0xT9iwWPVmdLDEkniGwxg-1 Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-52e9cc6a99eso38710e87.3 for ; Tue, 09 Jul 2024 04:42:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720525373; x=1721130173; 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=19qSrJdn7qyHym25kgE2GobfmVPso0txL0OKV4wHyc4=; b=CaIDH8dGu2MkSwWgOQn6jjYijagey/tv0+wE3Cr5Xg/AncU1aB754xct0U5uBkOtI3 ZLabY0kjjAahL40o5G6712HfRLqRa5f/INC9SBASfVZvcPmVXbo5w1Iz1j5vu2GW5ZWm OzeBU02prq5K3Qi0PQofwLTpKEULoxh9mYmRykf0ctZddB1aXbKQ1ye4HAo9rA185s/9 MiM/SrO3c1Jjfibva7weDSX2+r0c+HRyy1oaq0ZA3mfmFN+dTy3AVtqtKc1+Xe1gCFBo cGhzyCgzkbxxOp6vet0SxH+oicJL+PKnNk+gbj0nWIvV6SrdY0EOuFQaeFtqJlb9ShQ7 uYQg== X-Forwarded-Encrypted: i=1; AJvYcCV51926Va9Y2fWs+LzgdRsvakNxQDymqjSbzgeXOl1Nlo71EjkD7VoCDyolDdliOd+B3QP1P0DEt6CMjPg= X-Gm-Message-State: AOJu0Yy61bT9KQeEmkY2UhEseSHCAwS8WUfoz9/10VDdeZao+J7lnBtT PRpxa6gwk231dx7M8xwjcPgyJQog2LRLv9OvgwaSwJJUokdfpBiFDj+Jv/rH5+lKeeEAVqXz0Bm bxmhLQNe7XKPDQbpupz3kr/v0busaVGVOB/N/R1DqTOnQmlYN5vjtPj2SgbFiYvZTMgI3vjz12V vGTHDbhvRYF8uqq1o= X-Received: by 2002:a05:6512:2395:b0:52c:9383:4c16 with SMTP id 2adb3069b0e04-52eb99942ebmr1547070e87.22.1720525373230; Tue, 09 Jul 2024 04:42:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGA3avzGK8LISzxm/SxpPUwV0nWh74tf3Ojs0rr6Zt4jRyUNmO6WnjVTCv7PAQArXH5CtDez2bC2EFe2WWTA8k= X-Received: by 2002:a05:6512:2395:b0:52c:9383:4c16 with SMTP id 2adb3069b0e04-52eb99942ebmr1547054e87.22.1720525372860; Tue, 09 Jul 2024 04:42:52 -0700 (PDT) MIME-Version: 1.0 References: <20240302234812.9137-1-mb@smartsharesystems.com> <20240530154100.25811-1-mb@smartsharesystems.com> <99e4a1ac2166451dab7033e2181a0821@huawei.com> In-Reply-To: From: David Marchand Date: Tue, 9 Jul 2024 13:42:39 +0200 Message-ID: Subject: Re: [PATCH v8] eal/x86: improve rte_memcpy const size 16 performance To: =?UTF-8?Q?Morten_Br=C3=B8rup?= Cc: Konstantin Ananyev , "bruce.richardson@intel.com" , "konstantin.v.ananyev@yandex.ru" , "stephen@networkplumber.org" , "roretzla@linux.microsoft.com" , "mattias.ronnblom@ericsson.com" , "aconole@redhat.com" , "dev@dpdk.org" 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 Hello, On Tue, Jul 9, 2024 at 11:24=E2=80=AFAM David Marchand wrote: > > On Mon, Jun 10, 2024 at 3:40=E2=80=AFPM Konstantin Ananyev > wrote: > > > When the rte_memcpy() size is 16, the same 16 bytes are copied twice. > > > In the case where the size is known to be 16 at build time, omit the > > > duplicate copy. > > > > > > Reduced the amount of effectively copy-pasted code by using #ifdef > > > inside functions instead of outside functions. > > > > > > Suggested-by: Stephen Hemminger > > > Signed-off-by: Morten Br=C3=B8rup > > > Acked-by: Bruce Richardson > > Acked-by: Konstantin Ananyev > > Applied, thanks for the cleanup. This breaks OVS compilation (clang and gcc). make[1]: *** [Makefile:4722: lib/ofp-packet.lo] Error 1 make[1]: *** Waiting for unfinished jobs.... In file included from lib/ofp-print.c:34: In file included from ./lib/dp-packet.h:25: In file included from /home/runner/work/ovs/ovs/dpdk-dir/include/rte_mbuf.h= :38: In file included from /home/runner/work/ovs/ovs/dpdk-dir/include/rte_mempool.h:50: /home/runner/work/ovs/ovs/dpdk-dir/include/rte_memcpy.h:113:25: error: cast from 'const uint8_t *' (aka 'const unsigned char *') to 'const __m128i *' increases required alignment from 1 to 16 [-Werror,-Wcast-align] xmm0 =3D _mm_loadu_si128((const __m128i *)src); ^~~~~~~~~~~~~~~~~~~~ /home/runner/work/ovs/ovs/dpdk-dir/include/rte_memcpy.h:114:19: error: cast from 'uint8_t *' (aka 'unsigned char *') to '__m128i *' increases required alignment from 1 to 16 [-Werror,-Wcast-align] _mm_storeu_si128((__m128i *)dst, xmm0); ^~~~~~~~~~~~~~ 2 errors generated. make[1]: *** [Makefile:4722: lib/ofp-print.lo] Error 1 make[1]: Leaving directory '/home/runner/work/ovs/ovs' make: *** [Makefile:3102: all] Error 2 I dropped this patch from main for now. Can you have a look please? --=20 David Marchand