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 76F1EA0C41; Thu, 18 Nov 2021 07:17:45 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 49B2540687; Thu, 18 Nov 2021 07:17:45 +0100 (CET) Received: from mail-il1-f172.google.com (mail-il1-f172.google.com [209.85.166.172]) by mails.dpdk.org (Postfix) with ESMTP id B0E0540395 for ; Thu, 18 Nov 2021 07:17:43 +0100 (CET) Received: by mail-il1-f172.google.com with SMTP id l19so5429516ilk.0 for ; Wed, 17 Nov 2021 22:17:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KmP/f3I9iCI9uN+VK7fojn465tmb4F3ta5zxUThTpX8=; b=bfmYMhsSN0Uqq7oxZEZCK7R/O8Xzrpo+rqsyvx6TqRxLdRq2bi6l19+tN4sxMN8AdL hpKi+EQIR3SuXx5t2ffNCVQ5LBofq6kDtQsREWCfrmpzOGLJ3IEssiCSy0DLWeYe6l5V XpYbBJ3cjEtul/L6xq60dojJHB5Ofy9pVUhLWUb6jv4p3kFMRT8Z56wOFCEYwkGuU3B6 ikaCXbb6xgC4BHTrGcaSFR6LTNEvCa/khqIj0XR/VdKNbNVGO1PLel4BFOoZSK6z0gdm n+9xfd1FkpywCDFzdLbPHk949MwUrttHWVm9udswQwbxklNhRzm+K3YHxKo2a5MfJbqW 5D+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KmP/f3I9iCI9uN+VK7fojn465tmb4F3ta5zxUThTpX8=; b=U+cnOX4RBmx81lG6t9VMy6TAfHqd6OLLJ4KKYqSWmlVybrYMqgMubX3Ue8dHMLlqiG uTZmXFcYZJkcY8HB8P5KJy30M8aoYBNk/ZexMq9ZV/LYo2gJF+S0MHB/BjD8eOm3pY/z 5RqHIuC69YmsOIDWzWw2nsK2eFt0CcISO1EHXxSLRK1B2BlQak30sWhkdfGLIxiVRH3i hXr3yVUu1ARxeXvS4GIbGxf79YABcR7Nkb2Xi4vox12kDnmHdiwbzdeWQI18JDP21Gr1 SMFLiZqEhn+XBOgRQgU/h+2veB2nZ4A5V15wIc0k3I+VsaMsZjGjH7iRgfg15BpVmIwK 8a7A== X-Gm-Message-State: AOAM5320TyTxAvJy3gjzngx+pJH8YlRAE91h5ABLzuzlI8fkg+wSalHh /HnZiCAZz3GL2piV3pTdeC6/rIDK3cegixDbxrQfdAPWG2k= X-Google-Smtp-Source: ABdhPJzcFO/VnQngPrINsmO9OwgVACgLbnyXoVIZsUSlo6gpJXlF8gGDJoOhHSUnJclj8EUREkSoCNCdFYOKcriA7U4= X-Received: by 2002:a05:6e02:170a:: with SMTP id u10mr14331905ill.251.1637216263039; Wed, 17 Nov 2021 22:17:43 -0800 (PST) MIME-Version: 1.0 References: <20211118015228.30628-1-eagostini@nvidia.com> <20211118015228.30628-2-eagostini@nvidia.com> In-Reply-To: <20211118015228.30628-2-eagostini@nvidia.com> From: Jerin Jacob Date: Thu, 18 Nov 2021 11:47:17 +0530 Message-ID: Subject: Re: [PATCH v1 1/1] app/test-gpudev: introduce ethdev to rx/tx packets using GPU memory To: Elena Agostini Cc: dpdk-dev Content-Type: text/plain; charset="UTF-8" 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, Nov 18, 2021 at 12:28 AM wrote: > > From: Elena Agostini > > 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 > --- > 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 > #include > #include > +#include > +#include > > #include > #include > @@ -19,22 +21,98 @@ > #include > #include > #include > +#include > +#include > +#include > > #include > > +#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.