Re: [RFC PATCH 06/11] IB/Verbs: Use management helper has_sa() and cap_sa(), for sa-check

From: Michael Wang
Date: Tue Mar 31 2015 - 09:25:15 EST


On 03/30/2015 07:02 PM, Doug Ledford wrote:
> On Mon, 2015-03-30 at 18:42 +0200, Michael Wang wrote:
>> [snip]
>>
>> rdma_transport_is_ib and rdma_port_ll_is_ib is actually just rough helper
>> to save some code, we can get rid of them when we no longer need them, but
>> currently device driver still using them a lot, I'm not sure if the new
>> mechanism could take cover all these cases...
> [snip]
>
> If we use something like this, then the above is all you need. Then
> every place in the code that checks for something like has_sa or cap_sa
> can be replaced with rdma_ib_mgmt. When Ira updates his patches for
> this, he can check for rdma_opa_mgmt to enable jumbo MAD packets and
> whatever else he needs. Every place that does transport == IB and ll ==
> Ethernet can become rdma_transport_is_roce. Every place that does
> transport == IB and ll == INFINIBAND becomes rdma_transport_is_ib.

Get your point :-) I need to investigate all those cases see if it
works, in case if things unclear, I'll reform it according to my
understanding to adapt to this new mechanism, if there are any
misunderstanding, we can address them case by case during
the review.

> The
> code in multicast.c just needs to check rdma_ib_mgmt() (which happens to
> make perfect sense anyway as the code in multicast.c that is checking
> that we are on an IB interface is doing so because IB requires extra
> management of the multicast group joins/leaves).

I'll adopt those helpers already been discussed, and they will be
implemented with the helpers from new mechanism
(eg, rdma_ib_mgmt) in next version.

> But, like I said, this
> is an all or nothing change, it isn't something we can ease into.

It's will be great if we can make it, let's see ;-)

Regards,
Michael Wang

>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/