DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Elena Agostini <eagostini@nvidia.com>
Cc: "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>,
	 "Richardson, Bruce" <bruce.richardson@intel.com>,
	Stephen Hemminger <stephen@networkplumber.org>,
	 "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [PATCH v3 1/1] app/testpmd: add GPU memory option for mbuf pools
Date: Wed, 17 Nov 2021 19:09:29 +0530	[thread overview]
Message-ID: <CALBAE1N4AdQpNRrnejNa84wWdGH-gK-=vP_nODNE+E4tSKV-7w@mail.gmail.com> (raw)
In-Reply-To: <DM6PR12MB4107DB7352F18469B91288B0CD9A9@DM6PR12MB4107.namprd12.prod.outlook.com>

On Wed, Nov 17, 2021 at 6:09 PM Elena Agostini <eagostini@nvidia.com> wrote:
>
> > > >>
>
> > > >>>>
>
> > > >>
>
> > > >>>>> On Wed, 17 Nov 2021 03:04:59 +0000
>
> > > >>
>
> > > >>>>
>
> > > >>>>>> This patch introduces GPU memory in testpmd through the gpudev library.
>
> > > >>
>
> > > >>>>
>
> > > >>
>
> > > >>>>>> Testpmd can be used for network benchmarks when using GPU memory
>
> > > >>
>
> > > >>>>
>
> > > >>
>
> > > >>>>>> instead of regular CPU memory to send and receive packets.
>
> > > >>
>
> > > >>>>
>
> > > >>
>
> > > >>>>>> This option is currently limited to iofwd engine to ensure
>
> > > >>
>
> > > >>>>
>
> > > >>
>
> > > >>>>>> no workload is applied on packets not accessible from the CPU.
>
> > > >>
>
> > > >>>>
>
> > > >>
>
> > > >>>>>>
>
> > > >>
>
> > > >>>>
>
> > > >>
>
> > > >>>>>> The options chose is --mbuf-size so buffer split feature across
>
> > > >>
>
> > > >>>>
>
> > > >>
>
> > > >>>>>> different mempools can be enabled.
>
> > > >>
>
> > > >>>>
>
> > > >>
>
> > > >>>>>>
>
> > > >>
>
> > > >>>>
>
> > > >>
>
> > > >>>>>> Signed-off-by: Elena Agostini <eagostini@nvidia.com>
>
> > > >>
>
> > > >>>>
>
> > > >>
>
> > > >>>>>
>
> > > >>
>
> > > >>>>
>
> > > >>
>
> > > >>>>> Won't this create a hard dependency of test-pmd on gpudev?
>
> > > >>
>
> > > >>>>
>
> > > >>
>
> > > >>>>> I thought gpudev was supposed to be optional
>
> > > >>
>
> > > >>>>
>
> > > >>
>
> > > >>>>
>
> > > >>
>
> > > >>>>
>
> > > >>
>
> > > >>>> Sure, let me submit another patch to make it optional
>
> > > >>
>
> > > >>>
>
> > > >>
>
> > > >>> Why to add yet another compile time macro everywhere in testpmd and
>
> > > >>
>
> > > >>> make hard to maintain?
>
> > > >>
>
> > > >>> Adding iofwd kind of code is very simple to add test/test-gpudev and
>
> > > >>
>
> > > >>> all GPU specific options
>
> > > >>
>
> > > >>> can be added in test-gpudev. It also helps to review the patches as
>
> > > >>
>
> > > >>> test cases focus on
>
> > > >>
>
> > > >>> each device class.
>
> > > >>
>
> > > >>
>
> > > >>
>
> > > >> Test-gpudev is standalone unit test to ensure gpudev functions work correctly.
>
> > > >>
>
> > > >> In testpmd instead, there is a connection between gpudev and the network.
>
> > > >
>
> > > > I understand that. We had the same case with eventdev, where it needs to
>
> > > > work with network. Testpmd is already complicated, IMO, we should
>
> > > > focus only ethdev
>
> > > > test cases on testpmd, test-gpudev can use ethdev API to enable
>
> > > > networking requirements for gpudev.
>
> > > >
>
> > >
>
> > > +1
>
> >
>
> > +1
>
>
>
> Testpmd already manages different type of memories for mempools.
>
> gpudev is just another type of memory, there is nothing more than that.

Let take this example:
1) New code changes

 app/test-pmd/cmdline.c    |  32 +++++++-
 app/test-pmd/config.c     |   4 +-
 app/test-pmd/icmpecho.c   |   2 +-
 app/test-pmd/meson.build  |   2 +-
 app/test-pmd/parameters.c |  15 +++-
 app/test-pmd/testpmd.c    | 167 +++++++++++++++++++++++++++++++++++---
 app/test-pmd/testpmd.h    |  16 +++-
 7 files changed, 217 insertions(+), 21 deletions(-)

2) Good amount of code need to go through condition compilation as
gpudev is optional that make
testpmd further ugly.

3) It introduces new memtype, now

+enum mbuf_mem_type {
+ MBUF_MEM_CPU,
+ MBUF_MEM_GPU
+};

The question largely, why testpmd need to pollute for this, testpmd,
we are using for testing ethdev device class.
All we are saying is to enable this use case in test-gpudev so that it
focuses on GPU specific, Whoever is not
interested in specific libraries do not even need to review the testpmd patches.

  reply	other threads:[~2021-11-17 13:39 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 20:49 [dpdk-dev] [PATCH] app/testpmd: add GPU memory option in iofwd engine eagostini
2021-11-11 21:41 ` [PATCH v2 0/1] " eagostini
2021-11-11 21:41   ` [PATCH v2 1/1] " eagostini
2021-11-16 16:28     ` Slava Ovsiienko
2021-11-16 17:16       ` Ananyev, Konstantin
2021-11-16 18:15         ` Elena Agostini
2021-11-16 17:55     ` Ferruh Yigit
2021-11-16 18:06       ` Elena Agostini
2021-11-16 18:11         ` Ferruh Yigit
2021-11-16 19:09           ` Jerin Jacob
2021-11-16 19:14             ` Elena Agostini
2021-11-16 19:21               ` Jerin Jacob
2021-11-17  8:55                 ` Bruce Richardson
2021-11-17  3:04 ` [PATCH v3 0/1] app/testpmd: add GPU memory option for mbuf pools eagostini
2021-11-17  3:04   ` [PATCH v3 1/1] " eagostini
2021-11-16 21:34     ` Stephen Hemminger
2021-11-17 11:08       ` Elena Agostini
2021-11-17 11:23         ` Jerin Jacob
2021-11-17 11:26           ` Elena Agostini
2021-11-17 11:31             ` Jerin Jacob
2021-11-17 11:48               ` Ferruh Yigit
2021-11-17 12:36                 ` Ananyev, Konstantin
2021-11-17 12:39                   ` Elena Agostini
2021-11-17 13:39                     ` Jerin Jacob [this message]
2021-11-17 13:50                       ` Elena Agostini
2021-11-17 14:02                         ` Jerin Jacob
2021-11-17 14:07                           ` Elena Agostini
2021-11-17 17:44                             ` Elena Agostini
2021-11-17 21:49 ` [PATCH v4 0/1] " eagostini
2021-11-17 21:49   ` [PATCH v4 1/1] " eagostini
2021-11-17 14:04     ` Bruce Richardson

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='CALBAE1N4AdQpNRrnejNa84wWdGH-gK-=vP_nODNE+E4tSKV-7w@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=eagostini@nvidia.com \
    --cc=ferruh.yigit@intel.com \
    --cc=konstantin.ananyev@intel.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).