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 166AB44106; Wed, 29 May 2024 23:56:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 08A0C402B0; Wed, 29 May 2024 23:56:39 +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 59AD440273 for ; Wed, 29 May 2024 23:56:37 +0200 (CEST) Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1f47f07aceaso2434585ad.0 for ; Wed, 29 May 2024 14:56:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1717019796; x=1717624596; 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=pelr4YtLIJ35YXYJiXVISZoZNqTjBZMgiGsFMCnxUQk=; b=W3LaQndOxF6XqWqM7n4c5+B7M1avIdkQHZXFQzh5Hlbd3RIttKxOUt22l6twBA2YnZ UYcocIdMNdw1X1yVSB9Z9vXjtErfcM5d0kdJyEnIBrz+X2TceOwaxVj2U59pxYSlyBP6 BNxT7zffAlOWX6FkVatyYskQmoK2lVcw4NM3m26INNkj9MkHqKbbSEffI04dVFhz/XJs 5GJW/sGrZUG5xOAAPI+1i9pqiEcKqjljToYWsGKCiYlfyXWC2jVdtt2tQ1psbhIsfObr 7idcM9mcvpFxzBQC6Hcn8NwzD/fLsudmwKtYJrUvmTssmbV1TRGf/76OLwjl6qE6yXVX M4ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717019796; x=1717624596; 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=pelr4YtLIJ35YXYJiXVISZoZNqTjBZMgiGsFMCnxUQk=; b=KNf8sYEjmvgSjHc4aE6PiHT8sKVxkyCT0td3CD+pMd8y+ZOH3Bz3j8PMPFz44YUiAH CB/r4/EIP3yd+UtET3gca805ZCn2t4U416gP5hKogpG5Dx2svtV36yunl5bBskvOoKTO seFwbQ7vXe+52gZbL/Z7mpw1JCVs6T/3+anXAb1WrPF3Rsdq5O0d23D1hQolL7RiHOQT RC2/m75WacXG+M2uXcb44eeO/p/h+koJAuJ5KJ6q3NkyvDREb3Pzxbc7LFZS0VKOJ7I4 mH79zPiK29fyu+H1dEg46ZG8R4nPKl0tHMd1C8l3SBggt1SOqNE6KLZbagnX0EWu9aZj KlPA== X-Gm-Message-State: AOJu0YzhB2E/jv7cIHA7kt7oXrP2LMeLvcPQmLQ2b082DwJAp7rQpUbU 7+YOC1LdlomsI1AV3/2Sho+jZwepuh4RfPP0VCAFnnN0AC54/lNQ5j66jzCeWs4= X-Google-Smtp-Source: AGHT+IGvTnowOossYiz08Y/n4YxCXndjT3na9/Dl9Wu1bFCj1WBgMguAOXb9GT5mY5Pr4Bx3H5WRKA== X-Received: by 2002:a17:903:11c5:b0:1f6:c08:8340 with SMTP id d9443c01a7336-1f6192ed343mr3439295ad.3.1717019796471; Wed, 29 May 2024 14:56:36 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f4771d24d0sm80072105ad.66.2024.05.29.14.56.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 14:56:36 -0700 (PDT) Date: Wed, 29 May 2024 14:56:34 -0700 From: Stephen Hemminger To: Mattias =?UTF-8?B?UsO2bm5ibG9t?= Cc: , , Morten =?UTF-8?B?QnLDuHJ1cA==?= Subject: Re: [RFC] eal: provide option to use compiler memcpy instead of RTE Message-ID: <20240529145634.33bbb439@hermes.local> In-Reply-To: <20240527111151.188607-1-mattias.ronnblom@ericsson.com> References: <20240527111151.188607-1-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 Mon, 27 May 2024 13:11:51 +0200 Mattias R=C3=B6nnblom wrote: > #ifdef RTE_USE_CC_MEMCPY > +static inline void > +rte_mov16(uint8_t *dst, const uint8_t *src) > +{ > + memcpy(dst, src, 16); > +} > + > +static inline void > +rte_mov32(uint8_t *dst, const uint8_t *src) > +{ > + memcpy(dst, src, 32); > +} > + > +static inline void > +rte_mov48(uint8_t *dst, const uint8_t *src) > +{ > + memcpy(dst, src, 48); > +} > + > +static inline void > +rte_mov64(uint8_t *dst, const uint8_t *src) > +{ > + memcpy(dst, src, 64); > +} > + > +static inline void > +rte_mov128(uint8_t *dst, const uint8_t *src) > +{ > + memcpy(dst, src, 128); > +} > + > +static inline void > +rte_mov256(uint8_t *dst, const uint8_t *src) > +{ > + memcpy(dst, src, 256); > +} > + > +static inline void * > +rte_memcpy(void *dst, const void *src, size_t n) > +{ > + return memcpy(dst, src, n); > +} > +#endif /* RTE_USE_CC_MEMCPY */ > + > +#ifdef __cplusplus > +} > +#endif You may need to make these macros to fully engage the checking options of GCC, fortify, coverity etc. Not sure if all the tools are smart enough to see through an inline.