Re: [PATCH for-next V1 5/9] IB/core: Add rdma_network_type to wc

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

 



On Mon, Nov 23, 2015 at 11:19 PM, Jason Gunthorpe
<jgunthorpe@xxxxxxxxxxxxxxxxxxxx> wrote:
>> +     /* Use the hint from IP Stack to select GID Type */
>> +     network_gid_type = ib_network_to_gid_type(addr->dev_addr.network);
>> +     if (addr->dev_addr.network != RDMA_NETWORK_IB) {
>> +             route->path_rec->gid_type = network_gid_type;
>> +             /* TODO: get the hoplimit from the inet/inet6 device */
>> +             route->path_rec->hop_limit = IPV6_DEFAULT_HOPLIMIT;
>
> Uh, that is more than a TODO, that is showing this is all messed up.
>
> It isn't just the hop limit that has to come from the route entry, all
> the source information of the path comes from there. Ie the gid table
> should accept the route entry directly and spit out the sgid_index.
>
> The responder side is the same, it also needs to do a route lookup to
> figure out what it is doing, and that may not match what the rx says
> from the headers. This is important stuff.
>

The only entity that translates between IPs and GIDs is the RDMACM.
The GID cache is like a database. It allows one to store, retrieve and
query the GIDs and GID attrs it stores.
roce_gid_mgmt, is the part that populates this "dumb" database.
IMHO, adding such a "smart" layer to the GID cache is wrong, as this
should be part of RDMACM which does the translation. No need to get
the gid cache involved.


> I really don't like the API changes that went in with the last series
> that added net_dev and gid_attr everywhere, that just seems to be
> enabling mistakes like the above. You can't use rocev2 without doing
> route lookups, providing APIs that don't force this to happen just
> encourages broken flows like this.
>
> 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
--
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