DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Elena Agostini <eagostini@nvidia.com>
Cc: dpdk-dev <dev@dpdk.org>
Subject: Re: [PATCH v1 1/1] app/test-gpudev: introduce ethdev to rx/tx packets using GPU memory
Date: Thu, 18 Nov 2021 11:47:17 +0530	[thread overview]
Message-ID: <CALBAE1MYhppvnV2qmVfH2XkCf6zx_oYMOL+Mv1UBBirGQ+UEJg@mail.gmail.com> (raw)
In-Reply-To: <20211118015228.30628-2-eagostini@nvidia.com>

On Thu, Nov 18, 2021 at 12:28 AM <eagostini@nvidia.com> wrote:
>
> From: Elena Agostini <eagostini@nvidia.com>
>
> This patch introduces ethdev in test-gpudev app to provide:
> - an example to show how GPU memory can be used to send and receive packets
> - an useful tool to measure network metrics when using GPU memory with
> io forwarding
>
> With this feature test-gpudev can:
> - RX packets in CPU or GPU memory
> - Store packets in the gpudev communication list
> - TX receive packets from the communication list
>
> It's a simulation of a multi-core application.
>
> Signed-off-by: Elena Agostini <eagostini@nvidia.com>
> ---
>  app/test-gpudev/main.c | 471 +++++++++++++++++++++++++++++++++++++++--
>  1 file changed, 452 insertions(+), 19 deletions(-)
>
> diff --git a/app/test-gpudev/main.c b/app/test-gpudev/main.c
> index 250fba6427..daa586c64e 100644
> --- a/app/test-gpudev/main.c
> +++ b/app/test-gpudev/main.c
> @@ -10,6 +10,8 @@
>  #include <stdarg.h>
>  #include <errno.h>
>  #include <getopt.h>
> +#include <stdbool.h>
> +#include <signal.h>
>
>  #include <rte_common.h>
>  #include <rte_malloc.h>
> @@ -19,22 +21,98 @@
>  #include <rte_ethdev.h>
>  #include <rte_mempool.h>
>  #include <rte_mbuf.h>
> +#include <rte_launch.h>
> +#include <rte_lcore.h>
> +#include <rte_per_lcore.h>
>
>  #include <rte_gpudev.h>
>
> +#ifndef ACCESS_ONCE
> +#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&x)
> +#endif
> +
> +#ifndef WRITE_ONCE
> +#define WRITE_ONCE(x, v) (ACCESS_ONCE(x) = (v))
> +#endif

Better to have a public version of this macro as it uses just in this
test application.

  reply	other threads:[~2021-11-18  6:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-18  1:52 [PATCH v1 0/1] " eagostini
2021-11-18  1:52 ` [PATCH v1 1/1] " eagostini
2021-11-18  6:17   ` Jerin Jacob [this message]
2021-11-18 10:16     ` Elena Agostini
2021-11-18 18:56 ` [PATCH v2 0/1] " eagostini
2021-11-18 18:56   ` [PATCH v2 1/1] " eagostini
2023-07-06 18:58     ` Stephen Hemminger

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=CALBAE1MYhppvnV2qmVfH2XkCf6zx_oYMOL+Mv1UBBirGQ+UEJg@mail.gmail.com \
    --to=jerinjacobk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=eagostini@nvidia.com \
    /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).