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 60D4A45AF8; Wed, 9 Oct 2024 23:57:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2607140156; Wed, 9 Oct 2024 23:57:16 +0200 (CEST) Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) by mails.dpdk.org (Postfix) with ESMTP id 0DBD14014F for ; Wed, 9 Oct 2024 23:57:13 +0200 (CEST) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-20bc506347dso1988935ad.0 for ; Wed, 09 Oct 2024 14:57:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728511033; x=1729115833; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=sSjwA8FpN4HzZODGPHFJgZurZ9llP3hfVWh8N0K4eJE=; b=kgNnlItNhj0dPA5jwn8U5nTFgIx4810grX15///a4QnKHIbcpikOo0i7oFiRo7wdYz 1YmDEFotCtBzl0yUXUoPxpV4P7XsgdOs0A4ymotgx9uqe3pivwhRVVrWMBovVgcCT/YD l91W2IC33BuK73Iahve2y1snFNnXkkL4mp6m+RjR6Bjws9Z6JGCnE9YUSCeo2YCYj1u3 Xu06hAQs3mxkhQOhjzSKBmqzN9MCEDHwHp4LvCmK/rM87t60nyMv3PNUU4pHB/qLGSBF 1kA1flzGeFQS6Vtbz3axDhkQFBBVviOwLyROE27eN4obe+la3fZlBktd+S7EFGYMPLhc PQ5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728511033; x=1729115833; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sSjwA8FpN4HzZODGPHFJgZurZ9llP3hfVWh8N0K4eJE=; b=Vvy6VeztToUAqx4KEC9y2e8yI9cK3oMIfXfpNsc7284PB5A/dtn7v3+9DWABqjPjcy J8T9eEHTeeJx3Qm92cuxz+zVRsqfHQWMJgDEYzc+gD3bV5TNj37heW2xHq8oTwqVPqBo Zj6zV8XEnXLQ49C7KE/zba5Q4fSsHK2rleEwlVYbnn9ugDkiMfosidSpTeS3NcopyM8S b4ZcO5OAK0+15QMFW+eKxsPlzY22gueCtmt1ApDkNAIj/sHPSGnL8QB7xSMhkpIO7o3P MIkbse3ze3n577FrtkCbr6r3eYiEOhgP2OiDU3N9zGpnb71s7Qsww1bwiFCbK4uPcp6g N6tQ== X-Gm-Message-State: AOJu0Yw5u/BIprKyScbswxbTh3khF8ZHG5qhCsq4310pKXHYyIoyi+sq FlxJ4V80/G+/KFZNKG698tn1QWhzNzSvRKD3gE1exzC+kIqh2p4HhaqIXt6GywI= X-Google-Smtp-Source: AGHT+IEp+Hf2LwVCQI+SeYXF7mkJSTgCWe8GSS6dFWGya3LmopsRv/Yv7jsQsjXbOytLEy+JcHwZrw== X-Received: by 2002:a17:902:da81:b0:205:861c:5c4a with SMTP id d9443c01a7336-20c6379b2e6mr59243375ad.60.1728511033148; Wed, 09 Oct 2024 14:57:13 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7e9f681f089sm8872310a12.25.2024.10.09.14.57.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2024 14:57:12 -0700 (PDT) Date: Wed, 9 Oct 2024 14:57:10 -0700 From: Stephen Hemminger To: Mattias =?UTF-8?B?UsO2bm5ibG9t?= Cc: , Mattias =?UTF-8?B?UsO2bm5ibG9t?= , Morten =?UTF-8?B?QnLDuHJ1cA==?= , David Marchand , Pavan Nikhilesh , Bruce Richardson Subject: Re: [PATCH v6 7/7] vhost: optimize memcpy routines when cc memcpy is used Message-ID: <20241009145710.6050d1a8@hermes.local> In-Reply-To: <20240920102716.738940-8-mattias.ronnblom@ericsson.com> References: <20240724075357.546248-2-mattias.ronnblom@ericsson.com> <20240920102716.738940-1-mattias.ronnblom@ericsson.com> <20240920102716.738940-8-mattias.ronnblom@ericsson.com> MIME-Version: 1.0 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 Fri, 20 Sep 2024 12:27:16 +0200 Mattias R=C3=B6nnblom wrote: > +#if defined(RTE_USE_CC_MEMCPY) && defined(RTE_ARCH_X86_64) > +static __rte_always_inline void > +pktcpy(void *restrict in_dst, const void *restrict in_src, size_t len) > +{ > + void *dst =3D __builtin_assume_aligned(in_dst, 16); > + const void *src =3D __builtin_assume_aligned(in_src, 16); Not sure if buffer is really aligned that way but x86 doesn't care. Since src and dst can be pointers into mbuf at an offset. The offset will be a multiple of the buffer len.