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 B2AFCA0C42; Wed, 23 Jun 2021 19:03:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3F33E4003F; Wed, 23 Jun 2021 19:03:58 +0200 (CEST) Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) by mails.dpdk.org (Postfix) with ESMTP id A8B274003E for ; Wed, 23 Jun 2021 19:03:56 +0200 (CEST) Received: by mail-pj1-f41.google.com with SMTP id bv7-20020a17090af187b029016fb18e04cfso3986184pjb.0 for ; Wed, 23 Jun 2021 10:03:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=x6kB2tSnbKQj2YYHZ2cAp5/PD97OBInxgLdCffFuKgA=; b=UxlN5OL9uuR9mxf9xtFVefRhmXljp4vdf8ZDKRsECbrxsKUD4gKe7MbsL00gu6l9hr UALUZ4KTKdH1E/NlEWECxjbAWk+D1tYiglWFcqlPGUuqdZ+mKCDGBgAChTd3GhDDe1K4 pPl6aVZBt9ENpO27q5SUq2huP9Y/as+ou3CyrHSBwIHv631ITQsx1xfhETRjlMHhTvFs zYixH3ZkgB2Tma4e+/uCE3+2i5e4U0BnsfPRACJNElcolB05yVOdjaQ4mASEdbjDmkDu s1HKACEE+QEyhUK2SREXbUxZVbYdVGqZBq5KFUM/VLApMT4AlW2cfsdCfrmh/Lm9/ggG GJfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=x6kB2tSnbKQj2YYHZ2cAp5/PD97OBInxgLdCffFuKgA=; b=a+O8dgcc7A4tfsXTJrw5yRC4rEetohQ4WP9NlgBDzOdp3El71OuNQ0R3ShCqsOj2RF 1miZHBOmTPfN+F6KuGWHP6wwiy2mICF4kfTHjALs4k4/unoy4t/hH4AUtQ4Ab3+85ut4 J3Rmm+F3Ymk/shIvv5SGW4NYgp60ywZMbZ4LajEsHwGO5dVLR+lKx52eQetQOhq/x+0R kjjYtyaUlK3tUfTEzxB+I3XcL7DpPaBopqc/3Zha14OXmJQEpw4qGslHFFScflsAdIav stFDbX7Imi+Xb+xoLGsKQsxZR8uecbPsnjAzNyhASsiS9rxjymxrYypnCgxtcZStekhU m4Cg== X-Gm-Message-State: AOAM532+UjI+CZ7ucfJ9qjc2IWnn7ZnkduWA3XZ8UIaQgrWpCxErkdrg cjM2a7oSXXhaTuOsWc0swvzsmA== X-Google-Smtp-Source: ABdhPJyjij0HXtyMjpbj/C9R8cQeDTcB/F7A6suof29tQj+YZQcjX2a0Sx4i92AO6eE2oVh0hjSv9w== X-Received: by 2002:a17:902:446:b029:120:1fd:adbf with SMTP id 64-20020a1709020446b029012001fdadbfmr768553ple.52.1624467835853; Wed, 23 Jun 2021 10:03:55 -0700 (PDT) Received: from hermes.local (76-14-218-44.or.wavecable.com. [76.14.218.44]) by smtp.gmail.com with ESMTPSA id n14sm217490pjo.15.2021.06.23.10.03.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Jun 2021 10:03:55 -0700 (PDT) Date: Wed, 23 Jun 2021 10:03:47 -0700 From: Stephen Hemminger To: David Christensen Cc: jgrajcia@cisco.com, dev@dpdk.org Message-ID: <20210623100347.58f9a384@hermes.local> In-Reply-To: <20210623164935.59796-1-drc@linux.vnet.ibm.com> References: <20210623164935.59796-1-drc@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] net/memif: replace memcpy() with rte_memcpy() to improve perf 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 Sender: "dev" On Wed, 23 Jun 2021 09:49:35 -0700 David Christensen wrote: > Replacing memcpy() with rte_memcpy() improved 64 byte packet > performance by 33% on a POWER9 system and by 10% on an x86_64 > system. I see rte_memcpy was already used in the patch diff > Signed-off-by: David Christensen > --- > drivers/net/memif/rte_eth_memif.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/memif/rte_eth_memif.c b/drivers/net/memif/rte_eth_memif.c > index d17222c612..330c9c2fd6 100644 > --- a/drivers/net/memif/rte_eth_memif.c > +++ b/drivers/net/memif/rte_eth_memif.c > @@ -384,8 +384,8 @@ eth_memif_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) > rte_pktmbuf_pkt_len(mbuf_head) += cp_len; > > rte_memcpy(rte_pktmbuf_mtod_offset(mbuf, void *, dst_off), > - (uint8_t *)memif_get_buffer(proc_private, d0) + src_off, > - cp_len); > + (uint8_t *)memif_get_buffer(proc_private, d0) > + + src_off, cp_len); This just changes line break for no good reason. > > src_off += cp_len; > dst_off += cp_len; > @@ -644,7 +644,8 @@ eth_memif_tx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) > } > cp_len = RTE_MIN(dst_len, src_len); > > - rte_memcpy((uint8_t *)memif_get_buffer(proc_private, d0) + dst_off, > + rte_memcpy((uint8_t *) > + memif_get_buffer(proc_private, d0) + dst_off, > rte_pktmbuf_mtod_offset(mbuf, void *, src_off), > cp_len); > ditto. Look like this patch is confused, the description does not match the code.