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 69A6D42B7D; Tue, 23 May 2023 12:21:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E66CE40A80; Tue, 23 May 2023 12:21:38 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2086.outbound.protection.outlook.com [40.107.95.86]) by mails.dpdk.org (Postfix) with ESMTP id F3DAB40689 for ; Tue, 23 May 2023 12:21:37 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jV9Q8VOlQunDwqcwIp8WLKKOJjMZU7ik+eHt2q72mPpvVUwycqU+CjoIjuw221SDnOflIsnwKvjT6gVE0rB2On0iqW59EhJcHqBp9o/MpSAsxcyP7yObKYFRZR4I3oICQ21Vwe+cbSvtN+a/6Lr+KyaMYDDql1A9WkOq6Sg40LAnaHjWAm6KCYZ5l3SidC8lGtcGLvsR/CB36PsjWtVc+m7Kf5g4kaxEBWNJrQZsuLbMVFJyflcIiz7L+yrd04vwlTyUidMR8cSILDsDAlLa5/uiVQy6Yxh8OtNrkuqSXAQ9MavPzEZ0yNgfNRkkKcsWeHW8mhq3mGL9uUnoR3LHSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=s0yJWtQVfOLNUAewA0pMphxyCXGz+PtXCXhTpls8O/8=; b=Dp9oQtOH1gaHuT+nvEqlA+38x+whIxSX/P9xUeKkjxAhEQa4joWTipZ4Nr6y3/LkhaUrFLAMOMvMGELwyV7lK/ZpVPGy8i3C5mnv8MO7tpoCbxEkltmN5oVezGbUFVpnY7w8ArK6MPlkAVdbIwmi0utR/KVjbTUzkNa+KFlfI4zRBn3mmvQJzyc0Hm2NxiFfGz3A3dAyyWOpFjBCtzcMgB0jSgFlPnecSvZxPN3+qp3oCfZpA5rh7gq6GlbEBqffsazdGBc3o2uH0Z9tMeGo3ItAKvVJ+4yPTV2f8hoFyf68ozVWTRW4kKmVyIR4oTOPMRtRAJbVm8LG/m9unYTiVQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=s0yJWtQVfOLNUAewA0pMphxyCXGz+PtXCXhTpls8O/8=; b=IdTfKgh4dWkgQQyCdAnswZvwaguAYRcXOE/ONJc02xCRexBPBypCdqFZxyTtjna9CO5CEABsmiNtegr9UMWTHyjpbW2vzPf8s9D25o6XHsut4YMjF/+kccUp3JG5Wt6sw18tdvrlF7QF7VbNphMsExOzUCe4ZbHwsfXMoTOoILU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by MN0PR12MB6004.namprd12.prod.outlook.com (2603:10b6:208:380::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6387.30; Tue, 23 May 2023 10:21:34 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::7957:641d:6aba:3f9a]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::7957:641d:6aba:3f9a%4]) with mapi id 15.20.6411.028; Tue, 23 May 2023 10:21:34 +0000 Message-ID: <6328e24b-24f7-dc2f-5cf8-d7d6e59699a3@amd.com> Date: Tue, 23 May 2023 11:20:17 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Content-Language: en-US To: Rushil Gupta Cc: qi.z.zhang@intel.com, jingjing.wu@intel.com, junfeng.guo@intel.com, joshwash@google.com, dev@dpdk.org, Jeroen de Borst References: <20230519072600.1444309-1-rushilg@google.com> <20230519204618.1507956-1-rushilg@google.com> <820618d8-460f-b415-2c34-6be67f6d7c72@amd.com> From: Ferruh Yigit Subject: Re: [v4] net/gve: check driver compatibility In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0548.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:319::11) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|MN0PR12MB6004:EE_ X-MS-Office365-Filtering-Correlation-Id: 849cfbbf-83d6-48dd-24fa-08db5b777b9d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sNy00nwSNqSwMqjziBMDp719vpYSl5IaYDHPGLLiWWPrEbqb0U1yNsT0MrqNwZJxXFQzMWpIeB3pLVblTXITr2AOabDQquTGCBRsV/O2eC7/ZqxvFbI9DWM3OVfSJW1okaAeK3rPiyzvTjLN3Co/bI2VcPja3aX8UfxlSeqIF1IUKaXf0E65YBIolxjiZXfWU3buo8qVRdJN1Fyi1UesUGbeCLI1hDiyTy8jQ3xrjVyscliLAtj1+TXWUeZmp7HZ6ifFInojxviOAuYpTmWtuxae7HIqnDAzPBYfpSfiwI91RNvT1xrEsFVBtTYNvWxEZDs5jL0LWY2M0mAPFtSEZya3MDZdc5SqmKbtcoZw3A/ngk3yMwGjTdxUnAEmtKB7gIIXSamtS1O3gWFlFHU2EG2CjoGkPpa9nMODp8EasF4X5yltsVd4xuHRj0d+oEWIFpiFRAVDZcxURCCwJD2UD5ILpcqQc7KIkoWvo4UJ9aOxnQS8yfQNp4KObZ9t9XVEBifm6vMljLZtY7cbRBh2dPYT7FgXtfD/TtAAN7Cd4IUIypDIqjzXrXim1W8nv1yRpG141mURgN8kABPQZQ+dDHH/d6v1JQffvMiZcYhkoCO8HBJ4ML2iVB2p64t7GdHDxxuLXb8+4zwdpvGOcZdrckyd7+WOT5/KgMKxyHvsS0Q= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(366004)(376002)(396003)(346002)(39860400002)(136003)(451199021)(31686004)(66899021)(478600001)(66556008)(6916009)(66476007)(66946007)(4326008)(6512007)(53546011)(38100700002)(186003)(83380400001)(2616005)(6506007)(36756003)(6666004)(966005)(6486002)(44832011)(2906002)(8936002)(8676002)(26005)(41300700001)(86362001)(5660300002)(31696002)(316002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?c3h5eTNZcFFVWjJXT2VqbGlFTzdYUDNmQkZkaHhWRnBlVWpqNGpoeTM3dVl1?= =?utf-8?B?M3d6SWoycEpGRXhvOFdOU2VzQmxRNUJkYVRHZDVpNXFQTUFyYm1PZU8rK2ZH?= =?utf-8?B?aXY3UTNDSHRKTDlwUGREYUZ1NXpnZ2VkTHNpY0xZWXdCS0dmSDI1ZWQ4RCt2?= =?utf-8?B?VHpDVkxRdUl3YzFVdUpQSE9EZnY1RVBHYzdaOXlGMUgvQ290Q2llSXVuZjBj?= =?utf-8?B?bkQrdWZ1ZDNJM281cmNZalFMU2plWVNVUWRlZXdQNzdkNjVISGFuRXNGNktp?= =?utf-8?B?VXdIbXZNQ3Jn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VJeTRo?= =?utf-8?Q?CudEYFgB9xMBX4BZQ9nleGcBJ?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 849cfbbf-83d6-48dd-24fa-08db5b777b9d X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2023 10:21:33.8949 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6iZta5kdvp84kc/EjH0H/maiiIB9pqskCfyG70ZZu1ir+0vIU5VXLWiHOYGPDLzN X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6004 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 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/ > > Fails: > http://patchwork.dpdk.org/project/dpdk/patch/20230519204618.1507956-1-rushilg@google.com/ > > > On Mon, May 22, 2023 at 1:52 AM Ferruh Yigit > 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? >