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 7243C43BA4; Fri, 23 Feb 2024 13:39:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3C57402E3; Fri, 23 Feb 2024 13:39:32 +0100 (CET) Received: from mail-qt1-f173.google.com (mail-qt1-f173.google.com [209.85.160.173]) by mails.dpdk.org (Postfix) with ESMTP id 795984021E for ; Fri, 23 Feb 2024 13:39:31 +0100 (CET) Received: by mail-qt1-f173.google.com with SMTP id d75a77b69052e-42a35c720b8so1907471cf.3 for ; Fri, 23 Feb 2024 04:39:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708691971; x=1709296771; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Hc1+gXr3jzlnR8H5fVYiTHNjpSg4zjfSIDdSMAbg3Bc=; b=j4pd/0hv7/2nLlqDrDZ/6htVl1475qAOjKk/DcHlHYxq/J+X6wGSoyTbAuuvqvebpT 9Drmk6Zw6WFc31rc7KaDSvsMOvUyxacaWQsKV/E+Gmxk0YE79XZz3De6iCmVrzKeIa+q +37qecb1huVQrQAozEoACfd9l5hTp3DVV0Osb0XR0V4pEGbJarBtwyMCPLIlddqP3a4M EdGuFsp3Vn8FQy2IEq3rG78xxnGnm6AOxlg6+YQa9R9xA50VtBtkBqjwqewPoyI+pj/y 37m1Xx9+NmAnNdL/NK+GN/JJ5XVYWCiA1oEK0gJok0w4td+apNyCrMKm5J7UP9i9mRpi bmeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708691971; x=1709296771; 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=Hc1+gXr3jzlnR8H5fVYiTHNjpSg4zjfSIDdSMAbg3Bc=; b=hHNWYlJDCV6j//lq4CxoMrVSs3yHReGJPl29NxHOuwIuWN0rn/bCMpCqTbdxFoNs0P xJlH/1ofwVZhBI5gW/YrqJnp6+I1qkY9JP5oPSEncp8u0L9mmC6E8sFMbAIha6HrfPA2 HtvAyITDOOIo7vi4019ksEBZ3mCPiMh7nFgKKF5I7vUBCAq7KqoP3GsUVD94atbWHlsq iWTNBO0vlq/W/0oZCvOM2xWISV3HxR4VF9EkEUZSwru284A9L8Z6r20TpPexydXylXHC Vq1D9AjII8r1A9vqyUvd++AZT271InFYKXo1kvL9IhrQPaP12RKXJDggDqhAxYMLMV3o UqLQ== X-Forwarded-Encrypted: i=1; AJvYcCV1xWPE/ywrBT+wyB0haAmTSGDYS/MHuRUwp2FkSWq0OUnwiHZ49Txi7g0+mSDZZ7RnZEmQZg2E6VOrH5o= X-Gm-Message-State: AOJu0YydPUgLzJxYOh2qG2XE+GwjVBwCMHTt7XLMXQKRoD55lV6j4CTD t67gtqGu5t0d2nWKylQO9ZMcnrc2I1FWpZGkqRTWLkTvY4QCEH13ylLoIuzIvoeHvhNd1L6HT7N A9lwL7VJ2AKtCsxa7j9JV4p2ELYA= X-Google-Smtp-Source: AGHT+IGDj9Nrg6kMxxNyx8kneLcazcq0w2kZq24+cN66MlhAISVv8KzJ3rN1ilMIKnvkj9ZfsUcKy69b5jnOGEZQ/Y4= X-Received: by 2002:a05:622a:16:b0:42e:1570:55b8 with SMTP id x22-20020a05622a001600b0042e157055b8mr2205299qtw.59.1708691970713; Fri, 23 Feb 2024 04:39:30 -0800 (PST) MIME-Version: 1.0 References: <20221202153432.131023-1-mb@smartsharesystems.com> <20230116130724.50277-1-mb@smartsharesystems.com> <98CBD80474FA8B44BF855DF32C47DC35D87724@smartserver.smartshare.dk> <20230309082332.1103be22@hermes.local> In-Reply-To: <20230309082332.1103be22@hermes.local> From: Jerin Jacob Date: Fri, 23 Feb 2024 18:09:04 +0530 Message-ID: Subject: Re: [PATCH v7 1/4] net/bnx2x: fix warnings about rte_memcpy lengths To: Stephen Hemminger Cc: =?UTF-8?Q?Morten_Br=C3=B8rup?= , dev@dpdk.org, roretzla@linux.microsoft.com, rmody@marvell.com, timothy.mcdaniel@intel.com, matan@nvidia.com, viacheslavo@nvidia.com, ruifeng.wang@arm.com, zhoumin@loongson.cn, drc@linux.vnet.ibm.com, kda@semihalf.com, bruce.richardson@intel.com, konstantin.v.ananyev@yandex.ru, shshaikh@marvell.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 Thu, Mar 9, 2023 at 9:53=E2=80=AFPM Stephen Hemminger wrote: > > On Thu, 9 Feb 2023 17:49:31 +0100 > Morten Br=C3=B8rup wrote: > > > > rte_memcpy(old, new, sizeof(struct nig_stats)); > > > > > > - rte_memcpy(&(estats->rx_stat_ifhcinbadoctets_hi), &(pstats- > > > >mac_stx[1]), > > > - sizeof(struct mac_stx)); > > > + rte_memcpy(RTE_PTR_ADD(estats, > > > + offsetof(struct bnx2x_eth_stats, > > > rx_stat_ifhcinbadoctets_hi)), > > > + &pstats->mac_stx[1], sizeof(struct mac_stx)); > > Stop using rte_memcpy() in slow path like this. > memcpy() is just as fast, compiler can optimize, and the checking tools > are better with it. +1 @Morten Br=C3=B8rup Could you send the next version? I am marking as Change requested.