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