Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1609006pxb; Mon, 12 Apr 2021 02:13:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwv7PJh8bDl8bm19d05cbvleyoNfA4pdZDGDhF7mX5UhJ9qxrGNjUfQVax9MiUWw0Uc5IMA X-Received: by 2002:a17:906:7806:: with SMTP id u6mr24933801ejm.130.1618218788692; Mon, 12 Apr 2021 02:13:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618218788; cv=none; d=google.com; s=arc-20160816; b=auX9H7LZlU4MVpzE2jluHy2G9S86KMnG4RQH6FfiCmfyPTWSyga+gd/K0rs2IWrar1 T955boipx+YGMMM73xFf6DkpNlIFpf3UoSEH7bzFhOB+K+xnTo1OZ1UKa2k8/t2msDdl EIweTU3Homs2FF7Tg0Rv+s67w6Vt/K5Tlq/WFEbmoLbNRT+4NC0kMTJyT8Xj7bzxi+lG BT5of7Z5Auy0Y5x3VKazUd6+a7AOjbzIGsYS3qM2uGiPVLyO8cYASn8cAtJ5XJsJ/F4M E6uqCB9aiwdS7R/vM7qjH/17kBbDAJCV4Kbb1d2gUTRxX3FagfpO71wOK0u/617aIbQ5 sZ2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jTDuDQHC1jcYXuTSWSLl+RgiiOOY9tk2VVbUbaJ3d8c=; b=O9ngBht7cjZTKwpT5wvIS7u6BIvxnILC3+emY5vXEmoK/72LgLQVjwxxv5Mro/Bk2e K03AyrH5Or0p6wLPw3XAqJlBagfPLhfjlYWonq9tY953EWMR3h9Iq25425XCnHjp6gMT D78npD+95MykttZEeA/DFcCTzJXEC6O6hcKvuMnbgkYBlfrsGzNvBh5SkSiFCBecV/rr OKlgbnqzrS/J2/pc6jqHgsvtw89VJcQwC2CEKi4B5Ik6ak62rFou3xNIbfdyrqCjbTBz 6XY9YyNVgijTrKH1oyptRmsZhtSa82EwWquoo8SchP2gSpTKfxDUG2lqn9tFZlaV2N1r wPUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aYsWHDuH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u4si6987862ejn.119.2021.04.12.02.12.45; Mon, 12 Apr 2021 02:13:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aYsWHDuH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240160AbhDLJJ4 (ORCPT + 99 others); Mon, 12 Apr 2021 05:09:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:44272 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238822AbhDLIyw (ORCPT ); Mon, 12 Apr 2021 04:54:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A446061363; Mon, 12 Apr 2021 08:52:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618217579; bh=hrWfHU5AAc5N/c21/smS4Sap61CFVbzlbuSTQUEq1B8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aYsWHDuHjnYvcAjqadsSxQE3wBtMTzBJMv67OFHZ5rnLhkQEFxnpgMWfRjaovnwr6 GFivLGNUi5hmjXJTxmEINEa8JIxgDGnNxZ4DqYqUQgOVtYVWPagBvsfsuOsmihUbVJ lepBlXLejyPqZIl54p2qfjqIcqMXlBhHKYXgKYmKR8OUAfqEPCABpXyKW1NkfFkpgl LXPlPrG1FYluboLSa58//ynE8gpd69NGsob4AV/XzqasTw8qqd8BGApp26eITreDDG Amrc+hbX1696QejfORGBqICHtep//3uJgHHXIDqMeRpTI+KqE2pXXl1f5r2S5JMXw3 d5TV+hMh53tcA== Date: Mon, 12 Apr 2021 11:52:43 +0300 From: Leon Romanovsky To: Dexuan Cui Cc: "davem@davemloft.net" , "kuba@kernel.org" , KY Srinivasan , Haiyang Zhang , Stephen Hemminger , "wei.liu@kernel.org" , Wei Liu , "netdev@vger.kernel.org" , "andrew@lunn.ch" , "bernd@petrovitsch.priv.at" , "rdunlap@infradead.org" , Shachar Raindel , "linux-kernel@vger.kernel.org" , "linux-hyperv@vger.kernel.org" Subject: Re: [PATCH v4 net-next] net: mana: Add a driver for Microsoft Azure Network Adapter (MANA) Message-ID: References: <20210412023455.45594-1-decui@microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 12, 2021 at 08:35:32AM +0000, Dexuan Cui wrote: > > From: Leon Romanovsky > > Sent: Monday, April 12, 2021 12:46 AM > > To: Dexuan Cui > > > ... > > > +#define ANA_MAJOR_VERSION 0 > > > +#define ANA_MINOR_VERSION 1 > > > +#define ANA_MICRO_VERSION 1 > > > > Please don't introduce drier versions. > > This is not the usual "driver version", though it's called "drv version" :-) > As you can see, the driver does not use the macro MODULE_VERSION(). > > Here the "drv version" actually means the version of the VF-to-PF protocol, > with which the Azure Network Adapter ethernet NIC driver (i.e. the VF driver) > talks to the PF driver. The protocol version determines the formats of the > messages that are sent from the VF driver to the PF driver, e.g. query the > MAC address, create Send/Receive queues, configure RSS, etc. > > Currently the protocol versin is 0.1.1 You may ask why it's called > "drv version" rather than "protocol version" -- it's because the PF driver > calls it that way, so I think here the VF driver may as well use the same > name. BTW, the "drv ver" info is passed to the PF driver in the below > function: Ohh, yes, the "driver version" is not the ideal name for that. I already looked on it in previous patch, came to the conclusion about the protocol and forgot :(. > > static int mana_query_client_cfg(struct ana_context *ac, u32 drv_major_ver, > u32 drv_minor_ver, u32 drv_micro_ver, > u16 *max_num_vports) > { > struct gdma_context *gc = ac->gdma_dev->gdma_context; > struct ana_query_client_cfg_resp resp = {}; > struct ana_query_client_cfg_req req = {}; > struct device *dev = gc->dev; > int err = 0; > > mana_gd_init_req_hdr(&req.hdr, ANA_QUERY_CLIENT_CONFIG, > sizeof(req), sizeof(resp)); > req.drv_major_ver = drv_major_ver; > req.drv_minor_ver = drv_minor_ver; > req.drv_micro_ver = drv_micro_ver; > > err = mana_send_request(ac, &req, sizeof(req), &resp, sizeof(resp)); > > Thanks, > Dexuan >