Re: [PATCH v1] IB/core: Add generic function to extract IB speed from netdev

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

 



On Thu, Jun 08, 2017 at 08:43:41AM +0300, Moni Shoua wrote:
> >> >
> >> > +void ib_get_speed(struct net_device *netdev, u8 *speed, u8 *width)
> >> > +{
> >> > +   int rc;
> >> > +   u32 netdev_speed = SPEED_UNKNOWN;
> >> > +
> >
> > [1]
> >
> I think it should be clear that this function is good only for RoCE
> If you pass struct ib_device* instead of struct net_device* you can
> check link layer and return bad status of it is not Ethernet

Will do.

> The net_device will be obtained via get_netdev() hook.

So every explicit usage of ibdev->netdev can be considered as bed practice?

> Consider adding _eth_ to the name of the function (e.g. ib_get_etht_speed)

Will do.

> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux