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

2015-03-31 Thread Jason Gunthorpe
On Tue, Mar 31, 2015 at 08:51:13PM -0400, ira.weiny wrote: Going forward we want to NAK stuff like this: if (rdma_ib_mgmt() || rdma_opa_mgmt()) if (has_sa() || has_opa_foobar()) I'm confused. Is the idea that you would NAK has_sa but be in favor of has_ib_sa? It is the || I

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

2015-03-31 Thread ira.weiny
On Tue, Mar 31, 2015 at 05:12:02PM -0600, Jason Gunthorpe wrote: On Mon, Mar 30, 2015 at 01:02:03PM -0400, Doug Ledford wrote: 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

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

2015-03-31 Thread Michael Wang
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

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

2015-03-31 Thread Jason Gunthorpe
On Mon, Mar 30, 2015 at 01:02:03PM -0400, Doug Ledford wrote: 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. I don't want to see this slide back into some ill

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

2015-03-30 Thread Doug Ledford
On Mon, 2015-03-30 at 18:42 +0200, Michael Wang wrote: On 03/30/2015 06:16 PM, Doug Ledford wrote: On Fri, 2015-03-27 at 16:46 +0100, Michael Wang wrote: Introduce helper has_sa() and cap_sa() to help us check if an IB device or it's port support Subnet Administrator. There's no

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

2015-03-30 Thread Michael Wang
On 03/30/2015 06:16 PM, Doug Ledford wrote: On Fri, 2015-03-27 at 16:46 +0100, Michael Wang wrote: Introduce helper has_sa() and cap_sa() to help us check if an IB device or it's port support Subnet Administrator. There's no functional reason to have both rdma_transport_is_ib and

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

2015-03-27 Thread ira.weiny
On Fri, Mar 27, 2015 at 04:46:11PM +0100, Michael Wang wrote: Introduce helper has_sa() and cap_sa() to help us check if an IB device or it's port support Subnet Administrator. I think these 2 should be combined. The question is if a port requires the use of the SA depending on the network

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

2015-03-27 Thread Yun Wang
On Fri, Mar 27, 2015 at 5:47 PM, ira.weiny ira.we...@intel.com wrote: On Fri, Mar 27, 2015 at 04:46:11PM +0100, Michael Wang wrote: Introduce helper has_sa() and cap_sa() to help us check if an IB device or it's port support Subnet Administrator. I think these 2 should be combined. The

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

2015-03-27 Thread Michael Wang
Introduce helper has_sa() and cap_sa() to help us check if an IB device or it's port support Subnet Administrator. Cc: Jason Gunthorpe jguntho...@obsidianresearch.com Cc: Doug Ledford dledf...@redhat.com Cc: Ira Weiny ira.we...@intel.com Cc: Sean Hefty sean.he...@intel.com Signed-off-by: Michael

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

2015-03-27 Thread Doug Ledford
On Fri, 2015-03-27 at 12:47 -0400, ira.weiny wrote: On Fri, Mar 27, 2015 at 04:46:11PM +0100, Michael Wang wrote: Introduce helper has_sa() and cap_sa() to help us check if an IB device or it's port support Subnet Administrator. I think these 2 should be combined. The question is if a