DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Michał Krawczyk" <mk@semihalf.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev <dev@dpdk.org>, Marcin Wojtas <mw@semihalf.com>,
	Shai Brandes <shaibran@amazon.com>,
	 Evgeny Schemeilin <evgenys@amazon.com>,
	Igor Chauskin <igorch@amazon.com>
Subject: Re: [RFC 1/8] net/ena: fix warnings related to rte_memcpy and gcc-12
Date: Wed, 8 Jun 2022 21:18:15 +0200	[thread overview]
Message-ID: <CAJMMOfMMqYPLPMJr71pzo1OUAejroHQhaYDt=QFybMw_gDBFsA@mail.gmail.com> (raw)
In-Reply-To: <20220608083231.1bcb1a01@hermes.local>

śr., 8 cze 2022 o 17:32 Stephen Hemminger <stephen@networkplumber.org>
napisał(a):
>
> On Wed, 8 Jun 2022 14:29:58 +0200
> Michał Krawczyk <mk@semihalf.com> wrote:
>
> > wt., 7 cze 2022 o 19:17 Stephen Hemminger <stephen@networkplumber.org>
> > napisał(a):
> > >
> > > Rte_memcpy is not needed for small objects only used on control
> > > path. Regular memcpy is as fast or faster and there is more
> > > robust since static analysis etc knows what it does.
> > >
> > > In this driver it was redefining all memcpy as rte_memcpy
> > > which is even worse.
> >
> > Hi Stephen,
> >
> > I would like to shed some light on why we're redefining all the memcpy
> > as rte_memcpy. The ENA HAL is unmodifiable, as it's shared across many
> > platforms and we cannot simply adjust it for the DPDK. We can use the
> > ena_plat_dpdk.h to change the ena_com (HAL) definitions, and that's
> > what we're doing with memcpy. It's being used on the data path for the
> > Tx, to copy the bounce buffers. Following the recommendations in [1]
> > plus the results from [2], we wanted to make use of the optimized
> > memcpy on the ENA's data path as well to reduce the CPU time spent in
> > the PMD. I'm worried that removing rte_memcpy from the ena_plat_dpdk.h
> > will result in some performance degradation for the ENA data path.
> > However I understand your concerns for the control path and I'm ok
> > with it.
> >
> > [1] https://doc.dpdk.org/guides/prog_guide/writing_efficient_code.html#memory
> > [2] https://www.intel.com/content/www/us/en/developer/articles/technical/performance-optimization-of-memcpy-in-dpdk.html
> >
> > Thanks,
> > Michal
> >
>
>
> I admit to having little sympathy unfixable for base/ style code.
> You could have just replaced memcpy() in their with an abstraction layer
> like other drivers.
>

We'll probably end up with the solution you're suggesting. For now
let's remove the memcpy redefinition at all to suppress the warnings.

Acked-by: Michal Krawczyk <mk@semiahalf.com>

  reply	other threads:[~2022-06-08 19:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-07 17:17 [RFC 0/8] Gcc-12 warning fixes Stephen Hemminger
2022-06-07 17:17 ` [RFC 1/8] net/ena: fix warnings related to rte_memcpy and gcc-12 Stephen Hemminger
2022-06-08 12:29   ` Michał Krawczyk
2022-06-08 15:32     ` Stephen Hemminger
2022-06-08 19:18       ` Michał Krawczyk [this message]
2022-06-08 20:52         ` Stephen Hemminger
2022-06-07 17:17 ` [RFC 2/8] net/qede: fix gcc-12 rte_memcpy warnings Stephen Hemminger
2022-06-23 14:16   ` David Marchand
2022-06-07 17:17 ` [RFC 3/8] net/ice: fix rte_memcpy warnings with gcc-12 Stephen Hemminger
2022-06-07 17:17 ` [RFC 4/8] test/ipfrag: fix gcc-12 warnings Stephen Hemminger
2022-06-07 17:17 ` [RFC 5/8] test/ipsec: fix gcc-12 rte_memcpy warnings Stephen Hemminger
2022-06-07 17:17 ` [RFC 6/8] net/enetfc: fix array out of bounds warning Stephen Hemminger
2022-06-07 17:17 ` [RFC 7/8] vhost: replace rte_memcpy to fix warning Stephen Hemminger
2022-06-07 17:17 ` [RFC 8/8] ip_frag: fix gcc-12 warnings Stephen Hemminger
2022-06-08  8:19   ` Konstantin Ananyev
2022-06-08 15:26     ` Stephen Hemminger
2022-06-09  7:09       ` Morten Brørup
2022-06-14 21:20         ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJMMOfMMqYPLPMJr71pzo1OUAejroHQhaYDt=QFybMw_gDBFsA@mail.gmail.com' \
    --to=mk@semihalf.com \
    --cc=dev@dpdk.org \
    --cc=evgenys@amazon.com \
    --cc=igorch@amazon.com \
    --cc=mw@semihalf.com \
    --cc=shaibran@amazon.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).