DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: Rushil Gupta <rushilg@google.com>
Cc: qi.z.zhang@intel.com, jingjing.wu@intel.com,
	junfeng.guo@intel.com, joshwash@google.com, dev@dpdk.org,
	Jeroen de Borst <jeroendb@google.com>
Subject: Re: [v4] net/gve: check driver compatibility
Date: Tue, 23 May 2023 11:20:17 +0100	[thread overview]
Message-ID: <6328e24b-24f7-dc2f-5cf8-d7d6e59699a3@amd.com> (raw)
In-Reply-To: <CANzqiF6fOfrC8Sii99Jy0zY4CPo0v=zxfqKVUDz2JWq4V04M0w@mail.gmail.com>

On 5/22/2023 4:45 PM, Rushil Gupta wrote:
> 1. This is the excerpt from the google's virtual nic spec: 
> "In addition to the device-owned register file, vector table, and
> doorbells, the gVNIC device uses *DMA* (which in most cases amounts to
> ordinary memory access by host software since we're dealing with a
> virtual device, but guests must assume the device could be backed by
> actual hardware) to access physical memory. The following are all
> located in physical memory: Admin queue - 4096-byte command queue used
> for configuring gVNIC. 
> Some commands require an additional dma memory region to be passed to
> the device. These memory regions are allocated to execute the command
> and freed when the command completes."
> The calloc by default doesn't allow memory to be shared between the dpdk
> process and hypervisor (where virtual device lives); so that's the
> reason it doesn't work.
> 

Thanks Rushil for the info.
So, I expect gVNIC requires physical address to be passed in the admin
command, as 'driver_info_mem.iova'.

What confuses me is, latest version passes another virtual address
'driver_info' ('driver_info_mem->addr').

> 2. I also have a query: RHEL8 compilation in ci/Intel-compilation
> context fails due to; is this because of if `not is_linux`
> 
> meson.build:67:0: ERROR: Include dir lib/eal/linux/include does not exist.
> 

This error shouldn't be related with `not is_linux`, but I am not sure
about its root case, if it still exists in next version we can
communicate with CI team for details. For now I assume this is an
infrastructure issue.

> Passes:
> http://patchwork.dpdk.org/project/dpdk/patch/20230508191552.104540-1-rushilg@google.com/ <http://patchwork.dpdk.org/project/dpdk/patch/20230508191552.104540-1-rushilg@google.com/>
> 
> Fails:
> http://patchwork.dpdk.org/project/dpdk/patch/20230519204618.1507956-1-rushilg@google.com/ <http://patchwork.dpdk.org/project/dpdk/patch/20230519204618.1507956-1-rushilg@google.com/>
> 
> 
> On Mon, May 22, 2023 at 1:52 AM Ferruh Yigit <ferruh.yigit@amd.com
> <mailto:ferruh.yigit@amd.com>> wrote:
> 
>     On 5/19/2023 9:46 PM, Rushil Gupta wrote:
>     > +static int
>     > +gve_verify_driver_compatibility(struct gve_priv *priv)
>     > +{
>     > +     const struct rte_memzone *driver_info_mem;
>     > +     struct gve_driver_info *driver_info;
>     > +     int err;
>     > +
>     > +     driver_info_mem =
>     rte_memzone_reserve_aligned("verify_driver_compatibility",
>     > +                     sizeof(struct gve_driver_info),
>     > +                     rte_socket_id(),
>     > +                     RTE_MEMZONE_IOVA_CONTIG, PAGE_SIZE);
>     > +
>     > +     if (driver_info_mem == NULL) {
>     > +             PMD_DRV_LOG(ERR,
>     > +                         "Could not alloc memzone for driver
>     compatibility");
>     > +             return -ENOMEM;
>     > +     }
>     > +     driver_info = (struct gve_driver_info *)driver_info_mem->addr;
>     > +
>     > +     *driver_info = (struct gve_driver_info) {
>     > +             .os_type = 5, /* DPDK */
>     > +             .driver_major = GVE_VERSION_MAJOR,
>     > +             .driver_minor = GVE_VERSION_MINOR,
>     > +             .driver_sub = GVE_VERSION_SUB,
>     > +             .os_version_major = cpu_to_be32(DPDK_VERSION_MAJOR),
>     > +             .os_version_minor = cpu_to_be32(DPDK_VERSION_MINOR),
>     > +             .os_version_sub = cpu_to_be32(DPDK_VERSION_SUB),
>     > +             .driver_capability_flags = {
>     > +                     cpu_to_be64(GVE_DRIVER_CAPABILITY_FLAGS1),
>     > +                     cpu_to_be64(GVE_DRIVER_CAPABILITY_FLAGS2),
>     > +                     cpu_to_be64(GVE_DRIVER_CAPABILITY_FLAGS3),
>     > +                     cpu_to_be64(GVE_DRIVER_CAPABILITY_FLAGS4),
>     > +             },
>     > +     };
>     > +
>     > +     populate_driver_version_strings((char
>     *)driver_info->os_version_str1,
>     > +                     (char *)driver_info->os_version_str2);
>     > +
>     > +     err = gve_adminq_verify_driver_compatibility(priv,
>     > +             sizeof(struct gve_driver_info),
>     (dma_addr_t)driver_info);
> 
>     Back to previous discussion, other commands pass physical address to the
>     admin command, but this pass virtual address.
>     To follow the same semantic, shouldn't above be 'driver_info_mem.iova'?
> 
>     I asked before but not able to get an answer, what is the memory type
>     requirement for device?
>     Why virtual address obtained via 'calloc()' is not working, but virtual
>     address from hugepages are working?
> 


  reply	other threads:[~2023-05-23 10:21 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-14  5:14 [PATCH] net/gve: Check whether the driver is compatible with the device presented Rushil Gupta
2023-04-14  9:05 ` Guo, Junfeng
2023-04-14 15:40   ` Ferruh Yigit
2023-04-18  5:30     ` Guo, Junfeng
2023-04-26 21:37 ` Rushil Gupta
2023-05-04 15:06   ` Ferruh Yigit
2023-05-08  6:23     ` Rushil Gupta
2023-05-08 16:00       ` Ferruh Yigit
2023-05-08 19:22         ` Rushil Gupta
2023-05-08 19:15   ` [v2] net/gve: check driver compatibility Rushil Gupta
2023-05-17 16:58     ` Ferruh Yigit
2023-05-18 17:41       ` Rushil Gupta
2023-05-19  7:15     ` [v3] " Rushil Gupta
2023-05-19  7:23     ` [PATCH] " Rushil Gupta
2023-05-19  7:26     ` Rushil Gupta
2023-05-19  7:41       ` Rushil Gupta
2023-05-19 10:04         ` Ferruh Yigit
2023-05-19 16:15           ` Rushil Gupta
2023-05-19 19:54       ` [v4] " Rushil Gupta
2023-05-19 20:46       ` Rushil Gupta
2023-05-19 20:56         ` Stephen Hemminger
2023-05-20 16:44           ` Rushil Gupta
2023-05-22  8:52         ` Ferruh Yigit
2023-05-22 15:45           ` Rushil Gupta
2023-05-23 10:20             ` Ferruh Yigit [this message]
2023-05-23 10:21         ` Ferruh Yigit
2023-05-24 17:14           ` Rushil Gupta
2023-05-31 16:40             ` Rushil Gupta
2023-05-24 17:13         ` [v5] " Rushil Gupta
2023-05-31 17:04           ` Ferruh Yigit
2023-05-18 17:40   ` [v3] " Rushil Gupta
2023-05-08 19:14 ` [v2] " Rushil Gupta

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=6328e24b-24f7-dc2f-5cf8-d7d6e59699a3@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=dev@dpdk.org \
    --cc=jeroendb@google.com \
    --cc=jingjing.wu@intel.com \
    --cc=joshwash@google.com \
    --cc=junfeng.guo@intel.com \
    --cc=qi.z.zhang@intel.com \
    --cc=rushilg@google.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).