<div dir="ltr"><div>1. This is the excerpt from the google's virtual nic spec: </div><div>"In addition to the device-owned register file, vector table, and doorbells, the gVNIC device uses <b>DMA</b> (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. </div><div>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."</div><div><div>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.</div><div><br></div><div>2. I also have a query: RHEL8 compilation in ci/Intel-compilation context fails due to; is this because of if `not is_linux`</div></div><div><pre style="white-space:pre-wrap;color:rgb(0,0,0)">meson.build:67:0: ERROR: Include dir lib/eal/linux/include does not exist.</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font face="arial, sans-serif">Passes: <a href="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/</a></font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font face="arial, sans-serif">Fails: <a href="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/</a></font></pre></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 22, 2023 at 1:52 AM Ferruh Yigit <<a href="mailto:ferruh.yigit@amd.com" target="_blank">ferruh.yigit@amd.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 5/19/2023 9:46 PM, Rushil Gupta wrote:<br>
> +static int<br>
> +gve_verify_driver_compatibility(struct gve_priv *priv)<br>
> +{<br>
> + const struct rte_memzone *driver_info_mem;<br>
> + struct gve_driver_info *driver_info;<br>
> + int err;<br>
> +<br>
> + driver_info_mem = rte_memzone_reserve_aligned("verify_driver_compatibility",<br>
> + sizeof(struct gve_driver_info),<br>
> + rte_socket_id(),<br>
> + RTE_MEMZONE_IOVA_CONTIG, PAGE_SIZE);<br>
> +<br>
> + if (driver_info_mem == NULL) {<br>
> + PMD_DRV_LOG(ERR,<br>
> + "Could not alloc memzone for driver compatibility");<br>
> + return -ENOMEM;<br>
> + }<br>
> + driver_info = (struct gve_driver_info *)driver_info_mem->addr;<br>
> +<br>
> + *driver_info = (struct gve_driver_info) {<br>
> + .os_type = 5, /* DPDK */<br>
> + .driver_major = GVE_VERSION_MAJOR,<br>
> + .driver_minor = GVE_VERSION_MINOR,<br>
> + .driver_sub = GVE_VERSION_SUB,<br>
> + .os_version_major = cpu_to_be32(DPDK_VERSION_MAJOR),<br>
> + .os_version_minor = cpu_to_be32(DPDK_VERSION_MINOR),<br>
> + .os_version_sub = cpu_to_be32(DPDK_VERSION_SUB),<br>
> + .driver_capability_flags = {<br>
> + cpu_to_be64(GVE_DRIVER_CAPABILITY_FLAGS1),<br>
> + cpu_to_be64(GVE_DRIVER_CAPABILITY_FLAGS2),<br>
> + cpu_to_be64(GVE_DRIVER_CAPABILITY_FLAGS3),<br>
> + cpu_to_be64(GVE_DRIVER_CAPABILITY_FLAGS4),<br>
> + },<br>
> + };<br>
> +<br>
> + populate_driver_version_strings((char *)driver_info->os_version_str1,<br>
> + (char *)driver_info->os_version_str2);<br>
> +<br>
> + err = gve_adminq_verify_driver_compatibility(priv,<br>
> + sizeof(struct gve_driver_info), (dma_addr_t)driver_info);<br>
<br>
Back to previous discussion, other commands pass physical address to the<br>
admin command, but this pass virtual address.<br>
To follow the same semantic, shouldn't above be 'driver_info_mem.iova'?<br>
<br>
I asked before but not able to get an answer, what is the memory type<br>
requirement for device?<br>
Why virtual address obtained via 'calloc()' is not working, but virtual<br>
address from hugepages are working?<br>
</blockquote></div>