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 84F60A0553; Thu, 20 Oct 2022 16:40:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 768E342D76; Thu, 20 Oct 2022 16:40:42 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2065.outbound.protection.outlook.com [40.107.244.65]) by mails.dpdk.org (Postfix) with ESMTP id E9A5D42D53 for ; Thu, 20 Oct 2022 16:40:40 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VY6kmDLIJyFU7dsuO9gKzTUntZ76OArcaMUdq9Rdn1w85XPUhbOnEL/p4oxyiqYh6xe5P22h0zEXweVQjHp77YC6mlgqC6sqvMaVgXfUnhoLGKDrkW07sJt8yuyBJvNkOrdVGafXZF6dO+AsMNYEiNv5uAyBkxY2EUs1Y140HEry0WNEtNKaHGfE67tstlWEeiQ7gpIqZb2YNADaRwOiycdpA8ac9ZJO1C7OY4D8Qm9nfMcvmqwCFCcCSq3hhYjJ60MpevKmsfUGfQWtY4eXmMzXE/BtRogyR2C8Au0niWyHhf8mRFM+h+eDJg9AK3fuB/gS66ZiT64eJkznIa8vwA== 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=0mrA1w1z5YbLBcK6hBJM4w3a7o2phtTnXjKhftYdMoI=; b=Z1C6ZC+RSwgv5tac+tRrOFC18/Ya9gA2N8m8p2hWEy1aGL7+YYhH6RgXeWgdZ8IyXd2Bw7pzyzOhCkjZ7vo4mp7BE4+5vCbz2El83QO8OQZbMacV5uduENj/lbbiV3XtouPwtJ1fM4s1ygnoWx73N/lY3S9ZWNePytfqQ92aTmX4zsUGKA3IUooVpOea1IWRqohWRZhp7SU8NQPxpyVaXQUNLa1ElbiDQHn/Iv7Y+WaT0+VECqYKfSknAshzO9IjPGRiTn2URk8Wkcp15mkArupDpClee52Hd3OU3/KOzmJ8XXJoaFa2zPOMjTXzDIlGLMw6wpAaLcitFeeoIuui+w== 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=0mrA1w1z5YbLBcK6hBJM4w3a7o2phtTnXjKhftYdMoI=; b=lhBZj15ZEC/OnnCIZptjXl8l7tVk14FGKoJA6Tz8H4ExuqJpAse+4dYtF6Z82Vxd6tG/IdQVUtbYyp2m9XRz55oq8bGd0QyP6A2/5DdhTRNQK4ZLf1GReVMt0FrbiuN7lYvCmI3giySBeJb0zhOfqT5vDW45l7MhaNAOyEyoZ/s= 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 SN7PR12MB7227.namprd12.prod.outlook.com (2603:10b6:806:2aa::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.29; Thu, 20 Oct 2022 14:40:38 +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; Thu, 20 Oct 2022 14:40:38 +0000 Message-ID: Date: Thu, 20 Oct 2022 15:40:33 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Subject: Re: [PATCH v6 1/8] net/gve/base: introduce GVE PMD base code Content-Language: en-US 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: <20221010101757.878317-2-junfeng.guo@intel.com> <20221020103656.1068036-1-junfeng.guo@intel.com> <20221020103656.1068036-2-junfeng.guo@intel.com> From: Ferruh Yigit In-Reply-To: <20221020103656.1068036-2-junfeng.guo@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0008.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ad::16) To DM6PR12MB4297.namprd12.prod.outlook.com (2603:10b6:5:211::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR12MB4297:EE_|SN7PR12MB7227:EE_ X-MS-Office365-Filtering-Correlation-Id: c336a7bf-43cb-437c-316f-08dab2a90e26 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jTNWPgan1oC1zYiXuJcf8YansfthR1kuU/Nn79b00QZRq0Lo8GnlYRMnz+SNBTNCLeersfsYcgcaZZOFX6UFOLYoJWArZ6G7fSA9h/pFAedoLZMcQ/0k9zkOiED829Bg3hjJfeYjbs8yqpADwBidlI4sbef07JtMnvIAlbFR+0ao10m6PcsAHDyR9OZUF6BiRMANIN6erKsHPHLHVXWt6SUs5Ccf2m5l9frmI03epMKxCKqWjUz3CqJC0vM3Nb36OoQVpbvG2+Ro/CltqVUaj5x1iIGnyL4D65yUPYXfFV0fJUVjg96n7CE5apBY7GbztAH+jSNJa6BKfXnMYfqGR1yBA/67477PbgZAT1cMjh+dbiw+eGKTg2Kw+Ct5vY3DZaCihVEV8b8gQE4Th/xTYSdf8HYE1x4r0XRlu+8lqMlgzMjFinRjtZ6htBAWmuFgvIx6hxJ3ILvMkdIXcaHE54E3nbc5a8G5PG0OkRjpnv16a+aJptFDugf+wSXBWwMpRvvHNZydfNqhDwyg7V0czLrU96yCmDCZR5a71BZRqDy1mXH7bPwV+7QoP2uHDeEzsGnWlf57+R7ujk8Q+ETjEV4PsJCiO4Yn4wcgJhVsj48tuZiZdva/V8JTqgtixK2Js2MVGZd6MBZnJM/IC8y35S+UAzsn0Of2SKo2ljYEGTt5SChV90Vosf/6l9pUZBXl+L0hBPqHyAQemVXcl2rPM6wEF3y+DXWZaTJxTwYkuz3rone3DVjnoyAkq8qkIOkUnxhWS22EiNw386ekdos22mK9KACNy6zmIQIDVtsM5iQugt/aKrf0R5zvzOhJ9Ht+ 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)(366004)(396003)(346002)(136003)(39860400002)(376002)(451199015)(86362001)(478600001)(966005)(6486002)(31696002)(44832011)(2616005)(186003)(8936002)(6506007)(7416002)(26005)(6512007)(53546011)(316002)(6666004)(2906002)(36756003)(83380400001)(41300700001)(31686004)(38100700002)(66556008)(5660300002)(66476007)(8676002)(66946007)(4326008)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bUFkclA4YllWTk9zT0d2Z2ZTY0oxUVJWelJmallvTE8xanVXcDdlRVFIU1Fv?= =?utf-8?B?Z09ETGoyTXdxWnZ5a0F5MXVodkhVRXRXU3V2OGtrL0thR0JqNUhaTCtUeHF3?= =?utf-8?B?eT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W12aWtXVVluYzhBUGMyeW1JRHAzWDV6?= =?utf-8?B?RW5wSitORXVsSFlvRDh5bkdJdExvZXFLaERLSllTYWtENHVUS1N3bkNROHo4?= =?utf-8?B?M3pDOTVDeGFOY2RpaUZ0OCs2QVdNdU5TK1hBdEVmVGczVXRjaTVXWVUzRER1?= =?utf-8?B?eWZLd0lMcVFxUDIvS3R5YWk5R3NiTWZOMU1GTzJRUzJDaEtaYVFaZFRqU0oy?= =?utf-8?Q?rcWZkSmBNYOvtMz1NxezSWT0M?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c336a7bf-43cb-437c-316f-08dab2a90e26 X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB4297.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2022 14:40:38.7946 (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: 0k/lzO2kHLmwYmN9VcLaawCIhrcLCai3rwvqVuw7k5Qg2sjv/Dp1LK74fxTh/SZ7 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7227 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/20/2022 11:36 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. Can drop "GVE PMD" from patch title, since 'net/gve/base:' already implies it, like: net/gve/base: introduce base code > > 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) 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.