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]

 



>> >
>> > +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
The net_device will be obtained via get_netdev() hook.
Consider adding _eth_ to the name of the function (e.g. ib_get_etht_speed)
--
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