RE: [EXTERNAL] [PATCH net-next v03 1/1] hinic3: module initialization and tx/rx logic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> >+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;
> >+}





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux