[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250107103749.3552291-1-gur.stavi@huawei.com>
Date: Tue, 7 Jan 2025 12:37:49 +0200
From: Gur Stavi <gur.stavi@...wei.com>
To: <sumang@...vell.com>
CC: <andrew+netdev@...n.ch>, <cai.huoqing@...ux.dev>, <corbet@....net>,
<davem@...emloft.net>, <edumazet@...gle.com>, <gongfan1@...wei.com>,
<guoxin09@...wei.com>, <gur.stavi@...wei.com>, <helgaas@...nel.org>,
<horms@...nel.org>, <kuba@...nel.org>, <linux-doc@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <meny.yossefi@...wei.com>,
<netdev@...r.kernel.org>, <pabeni@...hat.com>, <shenchenyang1@...ilicon.com>,
<shijing34@...wei.com>, <wulike1@...wei.com>, <zhoushuai28@...wei.com>
Subject: RE: [EXTERNAL] [PATCH net-next v03 1/1] hinic3: module initialization and tx/rx logic
> >+enum hinic3_service_type {
> >+ SERVICE_T_NIC =3D 0,
> >+ SERVICE_T_MAX =3D 1,
> >+ /* Only used for interruption resource management, mark the request
> >module */
> >+ SERVICE_T_INTF =3D (1 << 15),
> [Suman] any reason to define a type after _MAX? Does _MAX has some other co=
> nnotation? Also, one generic comment would be to use symmetrical naming con=
> vention like HINIC3_SERVICE_T_NIC or something like that.
The HW supports multiple services. E.g. RoCE. We plan to add support
for some of them them later. The specific service values are used by
HW (e.g. when reporting events) and therefore need to be defined
explicitly. MAX is a SW only value that is used to define array that is
accessed by service index.
We will add a comment for that.
> >+};
>
> ...
>
> >+static bool hinic3_adev_svc_supported(struct hinic3_hwdev *hwdev,
> >+ enum hinic3_service_type svc_type)
> >+{
> >+ switch (svc_type) {
> >+ case SERVICE_T_NIC:
> [Suman] Are there other SERVICE type which will be introduced later?
Yes. As explained above.
> >+ return hinic3_support_nic(hwdev);
> >+ default:
> >+ break;
> >+ }
> >+
> >+ return false;
> >+}
Powered by blists - more mailing lists