Re: [PATCH v4 for-next 07/14] IB/core: GID attribute should be returned from verbs API and cache API

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

 



On Thu, May 28, 2015 at 07:34:36PM +0300, Or Gerlitz wrote:

> As for the RoCE GID table itself, adding in properly net-devices in their
> native Linux kernel form, namely with if_index and name-space -- seems to me
> the correct way to go.

Well, no, it is goofy. Callers with a path have a if_index/net pair.
Several other callers have an actual struct netdevice.

The first thing roce_gid_table_find_gid_by_port does is convert the
if_index/net pair back to a netdevice. This tells me the API is wrong,
callers that already have a netdevice should just pass it in, and path
is one that should be special cased to search.

But I don't even want to talk about that for a clean up series.

I want to know that the behavior of ib_find_cached_gid does not
change. If it hasn't changed then we don't need to change call
sites to pass in the optional netdev, because it must work as it does
today. Otherwise the cleanup is broken.

So, my specific advice is:

- roce_gid_table_find_gid_by_port should accept a netdevice or null
- Always pass null for the netdevice for all call sites
- Do not change the ib_* APIs during the clean up.

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