[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YHQKWx6Alcc6OQ9X@unreal>
Date: Mon, 12 Apr 2021 11:52:43 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Dexuan Cui <decui@...rosoft.com>
Cc: "davem@...emloft.net" <davem@...emloft.net>,
"kuba@...nel.org" <kuba@...nel.org>,
KY Srinivasan <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
"wei.liu@...nel.org" <wei.liu@...nel.org>,
Wei Liu <liuwe@...rosoft.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"andrew@...n.ch" <andrew@...n.ch>,
"bernd@...rovitsch.priv.at" <bernd@...rovitsch.priv.at>,
"rdunlap@...radead.org" <rdunlap@...radead.org>,
Shachar Raindel <shacharr@...rosoft.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>
Subject: Re: [PATCH v4 net-next] net: mana: Add a driver for Microsoft Azure
Network Adapter (MANA)
On Mon, Apr 12, 2021 at 08:35:32AM +0000, Dexuan Cui wrote:
> > From: Leon Romanovsky <leon@...nel.org>
> > Sent: Monday, April 12, 2021 12:46 AM
> > To: Dexuan Cui <decui@...rosoft.com>
> > > ...
> > > +#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
>
Powered by blists - more mailing lists