[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BL0PR2101MB093074F2F36A1C7471A40325CA709@BL0PR2101MB0930.namprd21.prod.outlook.com>
Date: Mon, 12 Apr 2021 14:29:48 +0000
From: Haiyang Zhang <haiyangz@...rosoft.com>
To: Andrew Lunn <andrew@...n.ch>, Dexuan Cui <decui@...rosoft.com>
CC: "davem@...emloft.net" <davem@...emloft.net>,
"kuba@...nel.org" <kuba@...nel.org>,
KY Srinivasan <kys@...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>,
"leon@...nel.org" <leon@...nel.org>,
"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)
> -----Original Message-----
> From: Andrew Lunn <andrew@...n.ch>
> Sent: Monday, April 12, 2021 8:16 AM
> To: Dexuan Cui <decui@...rosoft.com>
> Cc: davem@...emloft.net; kuba@...nel.org; KY Srinivasan
> <kys@...rosoft.com>; Haiyang Zhang <haiyangz@...rosoft.com>; Stephen
> Hemminger <sthemmin@...rosoft.com>; wei.liu@...nel.org; Wei Liu
> <liuwe@...rosoft.com>; netdev@...r.kernel.org; leon@...nel.org;
> bernd@...rovitsch.priv.at; rdunlap@...radead.org; Shachar Raindel
> <shacharr@...rosoft.com>; linux-kernel@...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)
>
> > +static inline bool is_gdma_msg(const void *req) {
> > + struct gdma_req_hdr *hdr = (struct gdma_req_hdr *)req;
> > +
> > + if (hdr->req.hdr_type == GDMA_STANDARD_HEADER_TYPE &&
> > + hdr->resp.hdr_type == GDMA_STANDARD_HEADER_TYPE &&
> > + hdr->req.msg_size >= sizeof(struct gdma_req_hdr) &&
> > + hdr->resp.msg_size >= sizeof(struct gdma_resp_hdr) &&
> > + hdr->req.msg_type != 0 && hdr->resp.msg_type != 0)
> > + return true;
> > +
> > + return false;
> > +}
> > +
> > +static inline bool is_gdma_msg_len(const u32 req_len, const u32 resp_len,
> > + const void *req)
> > +{
> > + struct gdma_req_hdr *hdr = (struct gdma_req_hdr *)req;
> > +
> > + if (req_len >= sizeof(struct gdma_req_hdr) &&
> > + resp_len >= sizeof(struct gdma_resp_hdr) &&
> > + req_len >= hdr->req.msg_size && resp_len >= hdr->resp.msg_size
> &&
> > + is_gdma_msg(req)) {
> > + return true;
> > + }
> > +
> > + return false;
> > +}
>
> You missed adding the mana_ prefix here. There might be others.
>
> > +#define CQE_POLLING_BUFFER 512
> > +struct ana_eq {
> > + struct gdma_queue *eq;
> > + struct gdma_comp cqe_poll[CQE_POLLING_BUFFER]; };
>
> > +static int ana_poll(struct napi_struct *napi, int budget) {
>
> You also have a few cases of ana_, not mana_. There might be others.
We will rename the remaining ana_ to mana_.
Also the driver version to protocol version in your previous comments.
Thanks,
- Haiyang
Powered by blists - more mailing lists