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 907E3A0032; Fri, 21 Oct 2022 11:49:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 45C6042BA6; Fri, 21 Oct 2022 11:49:28 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2061.outbound.protection.outlook.com [40.107.223.61]) by mails.dpdk.org (Postfix) with ESMTP id 004D142BDE for ; Fri, 21 Oct 2022 11:49:26 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AbfsEbS5iocJtquIOYv2zki8eok/NUlU19hAD8jSUFo4Hju5b6kTParbmDs0w+v4hpzzS6uvrM6Fsj7bV+Q/G3tJUv414LH3Gx+yPlSIBVlNX77T9cxQ4P8McemMw/xJpehZ9gjMM2RstRyQGnfHdQWQrTTXjm+jTswn/c5GlxBYyMMtY79DL8wgHQ0NnXX3sDzLbv1F91SVD3s3qD8ns9CoApQF+Jg4cqfM/bgOUMenfi7z/8Sm1N69dN7iVFWS7OTzVxXOCkS9nolKqIrbYI9foq7vwO1nY+NaNoQgDnQwgF2mQxJDoBwrPkLimJ7idKG2pGh46W/SKBRjO8ER6Q== 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=E+Kigk2KzW59AVBG2gIvMYBuswylXqtnOs1cbXDyZVM=; b=K1N9MjDZaEnKTyDn4XpTVKrC07JsuLAHQgt3hLCcOpXJjR8cbMNcxuLBf3VHlQmfayNNHNOwRbAZ1baa5X0IV2Vb+Lp75tefNeKaQfeQLwbaJ2u0LD4My4OdNN8tGIF4R6B2BN4sA/iEHfYlPtKQmUCJhikcRYe6ubivswFf49Ddq3QIZcm1KJJi3829bx/DxPfBS1Lh7NnEhBw0vedYIhip2uCJ6+68l1Js4ButeBd2vQ7HJ4gF0vetkAoih4ndrC96kBUl8kPmd13stcrqU+bJyF3MfS//JYEipIKitdUApZ3zUtFhOMY36wBSglenk1tByhBlHQN10qSqjonKaQ== 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=E+Kigk2KzW59AVBG2gIvMYBuswylXqtnOs1cbXDyZVM=; b=aP0qrl/Y2n6jGQ+O7Gyq0xLb84CX1u2+SJZwcOtQAYQBmmoyd1p1ym377uRUrtPrq8+luHIF9L8aeqk28N+Xw6uVfBSVH3z9xl89OQgzT8E+0lgaZVS/t1s0p5Kz3KLPHqQaLhQ0FtPQjoAo1u0Z4kg6NQXI6mMQFKbLVvYdWeE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM6PR12MB4297.namprd12.prod.outlook.com (2603:10b6:5:211::20) by BL1PR12MB5079.namprd12.prod.outlook.com (2603:10b6:208:31a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.34; Fri, 21 Oct 2022 09:49:24 +0000 Received: from DM6PR12MB4297.namprd12.prod.outlook.com ([fe80::b9fd:e732:4585:6b25]) by DM6PR12MB4297.namprd12.prod.outlook.com ([fe80::b9fd:e732:4585:6b25%7]) with mapi id 15.20.5723.033; Fri, 21 Oct 2022 09:49:24 +0000 Message-ID: <23dad7c2-dbb5-afb4-2797-6ebf3303454d@amd.com> Date: Fri, 21 Oct 2022 10:49:18 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Subject: Re: [PATCH v7 1/8] net/gve/base: introduce base code To: Junfeng Guo , qi.z.zhang@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com Cc: dev@dpdk.org, xiaoyun.li@intel.com, awogbemila@google.com, bruce.richardson@intel.com, hemant.agrawal@nxp.com, stephen@networkplumber.org, chenbo.xia@intel.com, helin.zhang@intel.com, Haiyue Wang References: <20221020103656.1068036-1-junfeng.guo@intel.com> <20221021091928.2674471-1-junfeng.guo@intel.com> <20221021091928.2674471-2-junfeng.guo@intel.com> Content-Language: en-US From: Ferruh Yigit In-Reply-To: <20221021091928.2674471-2-junfeng.guo@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0262.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8a::34) To DM6PR12MB4297.namprd12.prod.outlook.com (2603:10b6:5:211::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR12MB4297:EE_|BL1PR12MB5079:EE_ X-MS-Office365-Filtering-Correlation-Id: 98cc137f-625a-4e70-7fb3-08dab3498969 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nFDrCq15OeQbJBotbcEtG6+XUAxdASF0+1PshUnjC06FfZ35Fn3aO2F/DRbWTfz04deaucBENG2bgcsVIFLw9OhzEJ5IPExzhSlS4XhdCZc+ESgbwPxdDfhX/ouVxbnJHUbBJw6gbKC5zNI78McgOW9s2nXluIGOy01vKSYo/GNYDcxGpvXWTv8g3so/7/XNu1Ws7UEGY4/3xQcvKhew+5Sf3hixvkTBSeiLykWGkMhVZxS1j2KWBxiHKv1xRbC3Mom8OjB35mzEikW66xnXknqIXDwm1pr2M/me+QhygnHB34jdfxebKK2yGEyP8qOF379pQIz/zaRkY/OiCXZ+spYXtbqJbhxaXAQ5qBPOJwWeN+/LEX8H1PUhMQN5QsnJQyiNGVeO6mVLV9YODuGuLzremeXECBxYE32MYGzIpGaPxkOh4pDMCYMEqEcG+7MwryKjRCMQf1fSVWS0Y3lp8tiq13DgEK8Nu32vQd0wB2Oehwvek/1/vyKkbkQJmkwK/sCzEbGNTO+8xv40LD2viocu4s3vK/XsAThKHvpvpSotgbKXgc819itVNuNMTVLSp6bLnwBQeuQlpgRjxXkPfZ4Da8ZXKaVcBeLAwaOYOCr0Z0deJTnstZmXusQL4NBdBbiBRd+e96OTV8W13sr7hVPZsC0Gq1U3xVERqWBqAxbk8Cdv/pJi3ZlyZl1DiTXKdsPpTv5PRl9nKi5NluD3WEZedVEkBX2cfAPyNE+7IAKJBLCEn2U00mAwkjQ/0t25OiN9ecq85cinD/ZbhDYAsYGkPlViPuqi9So76RuCGgbKOZ8HM+3JolmlOSrjfQ8v X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR12MB4297.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(376002)(39860400002)(366004)(346002)(396003)(451199015)(31686004)(86362001)(44832011)(36756003)(26005)(6506007)(4326008)(8676002)(53546011)(2906002)(66476007)(8936002)(66556008)(38100700002)(41300700001)(7416002)(31696002)(5660300002)(66946007)(6512007)(83380400001)(316002)(966005)(186003)(478600001)(6666004)(2616005)(6486002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RU9PcTRsWlhQUFpObE5ZZW83bmRXbnptdmpXeXI3MUFlNGdzK2tXSUVqMEdG?= =?utf-8?B?b2dwcXpXRjI2bjNlemcxazdqVGZEdU9wbExEWnltSFFwT01Fb1I3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Yxem5aeGZ1S3N4L3FQbXN2ZGNkMUFhNmNh?= =?utf-8?B?bzlreUxoVXA3a2R4WE0xYVFlOHNoUGQ4Wm1mUCt5MjhnRWFiakcrSHZadk80?= =?utf-8?B?VEI1WTNiUEx4ck03SVlaSi9rWjlZYkFEU254d1U3MVI0UGxYWU9vTUlpZHdm?= =?utf-8?B?TzZ3UnFpR2laRGxqbkV4WE1sZlIzV2JvTW02Z1F6L2M2Nmx1MFY5Vmo0cXhq?= =?utf-8?Q?gV/+sZXW94yutiiQTtxBjQx32?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 98cc137f-625a-4e70-7fb3-08dab3498969 X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB4297.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2022 09:49:24.7453 (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: WFCmyvKoy0cMTz+oJRQ3tP6IgE6rJkGkPQ5uUxxHSK1QqWKDEPBcZTZLvJ3ANLy8 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5079 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 10/21/2022 10:19 AM, Junfeng Guo wrote: > The following base code is based on Google Virtual Ethernet (gve) > driver v1.3.0 under MIT license. > - gve_adminq.c > - gve_adminq.h > - gve_desc.h > - gve_desc_dqo.h > - gve_register.h > - gve.h > > The original code is in: > https://github.com/GoogleCloudPlatform/compute-virtual-ethernet-linux/\ > tree/v1.3.0/google/gve > > Note that these code are not Intel files and they come from the kernel > community. The base code there has the statement of > SPDX-License-Identifier: (GPL-2.0 OR MIT). Here we just follow the > required MIT license as an exception to DPDK. > > Signed-off-by: Xiaoyun Li > Signed-off-by: Haiyue Wang > Signed-off-by: Junfeng Guo <...> > +static bool gve_adminq_wait_for_cmd(struct gve_priv *priv, u32 prod_cnt) > +{ > + int i; > + > + for (i = 0; i < GVE_MAX_ADMINQ_EVENT_COUNTER_CHECK; i++) { > + if (ioread32be(&priv->reg_bar0->adminq_event_counter) > + == prod_cnt) [copy/paste from previous version] Syntax, why not move second half of the equation in above line? Unless this is coming from google code and updating it brings maintanance cost.