[PATCH v6 10/26] IB/Verbs: Reform cm related part in IB-core cma/ucm

2015-04-24 Thread Michael Wang
Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/cma.c | 81 +-- drivers/infiniband/core/ucm.c | 3 +- 2 files changed, 26 insertions(+), 58 deletions(-) diff --git a/drivers/infin

[PATCH v6 09/26] IB/Verbs: Reform IB-core verbs

2015-04-24 Thread Michael Wang
Use raw management helpers to reform IB-core verbs Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/verbs.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions

[PATCH v6 07/26] IB/Verbs: Reform IB-ulp ipoib

2015-04-24 Thread Michael Wang
Use raw management helpers to reform IB-ulp ipoib. Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 15 --- 1 file changed, 8

[PATCH v6 00/26] IB/Verbs: IB Management Helpers

2015-04-24 Thread Michael Wang
ger.kernel.org/msg23339.html Doug: https://www.mail-archive.com/linux-rdma@vger.kernel.org/msg23418.html https://www.mail-archive.com/linux-rdma@vger.kernel.org/msg23765.html Jason: https://www.mail-archive.com/linux-rdma@vger.kernel.org/msg23425.html Michael Wang (26

[PATCH v6 05/26] IB/Verbs: Reform IB-core sa_query

2015-04-24 Thread Michael Wang
Use raw management helpers to reform IB-core sa_query. Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/sa_query.c | 30 +- 1 file changed

[PATCH v6 02/26] IB/Verbs: Implement raw management helpers

2015-04-24 Thread Michael Wang
Cc: Sean Hefty Signed-off-by: Michael Wang --- include/rdma/ib_verbs.h | 25 + 1 file changed, 25 insertions(+) diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index d54f91e..a12e876 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h

[PATCH v6 03/26] IB/Verbs: Reform IB-core mad/agent/user_mad

2015-04-24 Thread Michael Wang
Use raw management helpers to reform IB-core mad/agent/user_mad. Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/agent.c| 2 +- drivers/infiniband/core/mad.c

[PATCH v6 06/26] IB/Verbs: Reform IB-core multicast

2015-04-24 Thread Michael Wang
Use raw management helpers to reform IB-core multicast. Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/multicast.c | 12 +++- 1 file changed, 3 insertions

Re: [PATCH v6 00/26] IB/Verbs: IB Management Helpers

2015-04-24 Thread Michael Wang
Add missing Cc: Devesh Sharma " Liran Liss " Dave Goodell " Regards, Michael Wang On 04/24/2015 02:23 PM, Michael Wang wrote: > Since v5: > * Thanks to Ira, Devesh for the review and testing :-) > * Thanks for the comments from Steve, Tom, Jason, Hal, Devesh, Ira,

Re: [PATCH v6 01/26] IB/Verbs: Implement new callback query_transport()

2015-04-24 Thread Michael Wang
On 04/24/2015 04:29 PM, Tom Talpey wrote: > On 4/24/2015 8:23 AM, Michael Wang wrote: [snip] >> +static enum rdma_transport_type >> +mlx5_ib_query_transport(struct ib_device *device, u8 port_num) >> +{ >> +return RDMA_TRANSPORT_IB; >> +} >> + > >

Re: [PATCH v5 00/27] IB/Verbs: IB Management Helpers

2015-04-24 Thread Michael Wang
On 04/24/2015 04:44 PM, Liran Liss wrote: >> From: Michael Wang [mailto:yun.w...@profitbricks.com] > > >> [snip] [snip] >> > > We don't want to stop code branches that are not abstractions but rather > depend > on the specific technology! > There

Re: [PATCH v3 04/28] IB/Verbs: Reform IB-core cm

2015-04-14 Thread Michael Wang
to find that none > of the ports support the feature and then we have to clean up. As this is > initialization code I don't see any issue with looping through the ports 2 > times and making the code cleaner. This style of logical could be found in other core module too, may be kee

Re: [PATCH v3 04/28] IB/Verbs: Reform IB-core cm

2015-04-14 Thread Michael Wang
n we are now forced to think of > things clearly. The only per-dev checking left is all included in #24 (now may be #10 too), which is inside: 1. cma_listen_on_dev 2. ib_ucm_add_one I can't find a good way to apply per-port check in this two, seems like they are at the stage which not related

Re: [PATCH v3 05/28] IB/Verbs: Reform IB-core sa_query

2015-04-14 Thread Michael Wang
#x27;t introduce this problem, but I > think the port number should be "i + s". Actually I'm planning to cleanup the places play with 's' and 'e' too, for example both cache.c and device.c implemented helper start_port() end_port() with exactly the same

Re: [PATCH v3 07/28] IB/Verbs: Reform IB-ulp ipoib

2015-04-14 Thread Michael Wang
On 04/13/2015 09:27 PM, Jason Gunthorpe wrote: > On Mon, Apr 13, 2015 at 02:25:16PM +0200, Michael Wang wrote: >> dev_list = kmalloc(sizeof *dev_list, GFP_KERNEL); >> if (!dev_list) >> @@ -1673,13 +1671,19 @@ static void ipoib_add_one(str

Re: [PATCH v3 10/28] IB/Verbs: Reform cm related part in IB-core cma

2015-04-14 Thread Michael Wang
is very similar to the case of cma_listen_on_dev() which do not associated with any particular port in #24. If the port 1 is enough to present the whole device's cm capability, maybe we can get rid of cap_ib_cm_dev() too? And maybe cap_ib_cm(device, device->node_type == RDMA_N

Re: [PATCH v3 27/28] IB/Verbs: Clean up rdma_ib_or_iboe()

2015-04-14 Thread Michael Wang
On 04/13/2015 10:33 PM, Jason Gunthorpe wrote: > On Mon, Apr 13, 2015 at 02:36:45PM +0200, Michael Wang wrote: >> We have finished introducing the cap_XX(), and raw helper rdma_ib_or_iboe() >> is no longer necessary, thus clean it up. > > So, the net result is not loo

Re: [PATCH v3 07/28] IB/Verbs: Reform IB-ulp ipoib

2015-04-14 Thread Michael Wang
no case that port 1 support cm while others doesn't. Regards, Michael Wang > > >> >> That seems reasonable, and solves the #10 problem, but we should >> enforce this invariant during device register. >> >> Typically the ports seem to be completely orthogonal

Re: [PATCH v3 07/28] IB/Verbs: Reform IB-ulp ipoib

2015-04-14 Thread Michael Wang
On 04/14/2015 05:40 PM, ira.weiny wrote: > On Tue, Apr 14, 2015 at 04:32:57PM +0200, Michael Wang wrote: >> >> >> On 04/14/2015 04:18 PM, ira.weiny wrote: >> [snip] >>> >>> /** >>> - * cap_ib_cm_dev - Check if any port of device has the ca

Re: [PATCH v3 10/28] IB/Verbs: Reform cm related part in IB-core cma

2015-04-14 Thread Michael Wang
On 04/14/2015 05:50 PM, ira.weiny wrote: > On Tue, Apr 14, 2015 at 10:35:34AM +0200, Michael Wang wrote: >> >> >> On 04/13/2015 09:25 PM, Hefty, Sean wrote: >>>> @@ -1037,17 +1033,13 @@ void rdma_destroy_id(struct rdma_cm_id *id) >>>>mutex_unl

Re: [PATCH v3 07/28] IB/Verbs: Reform IB-ulp ipoib

2015-04-15 Thread Michael Wang
unwind back to module load failure. We can give client->add() callback a return value and make ib_register_device() return -ENOMEM when it failed, just wondering why we don't do this at first, any special reason? Regards, Michael Wang > > Jason > -- To unsubscribe from this list: send

Re: [PATCH v3 01/28] IB/Verbs: Implement new callback query_transport()

2015-04-16 Thread Michael Wang
Hi, Hal On 04/15/2015 08:36 PM, Hal Rosenstock wrote: > On 4/13/2015 8:22 AM, Michael Wang wrote: [snip] >> __attribute_const__ enum rdma_transport_type >> @@ -1501,6 +1504,8 @@ struct ib_device { >> int(*query_port)(str

[PATCH v4 00/27] IB/Verbs: IB Management Helpers

2015-04-16 Thread Michael Wang
ttps://www.mail-archive.com/linux-rdma@vger.kernel.org/msg23425.html Michael Wang (27): IB/Verbs: Implement new callback query_transport() IB/Verbs: Implement raw management helpers IB/Verbs: Reform IB-core mad/agent/user_mad IB/Verbs: Reform IB-core cm IB/Verbs: Reform IB-core

[PATCH v4 01/27] IB/Verbs: Implement new callback query_transport()

2015-04-16 Thread Michael Wang
IB IB qib IB_CA IB IB IB Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/device.c | 1 + drivers/infiniband

[PATCH v4 04/27] IB/Verbs: Reform IB-core cm

2015-04-16 Thread Michael Wang
Use raw management helpers to reform IB-core cm. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/cm.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions

[PATCH v4 07/27] IB/Verbs: Reform IB-ulp ipoib

2015-04-16 Thread Michael Wang
Use raw management helpers to reform IB-ulp ipoib. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions

[PATCH v4 05/27] IB/Verbs: Reform IB-core sa_query

2015-04-16 Thread Michael Wang
Use raw management helpers to reform IB-core sa_query. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/sa_query.c | 29 ++--- 1 file changed, 18 insertions

[PATCH v4 09/27] IB/Verbs: Reform IB-core verbs/uverbs_cmd/sysfs

2015-04-16 Thread Michael Wang
Use raw management helpers to reform IB-core verbs/uverbs_cmd/sysfs. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/sysfs.c | 8 ++-- drivers/infiniband/core/uverbs_cmd.c | 6

[PATCH v4 13/27] IB/Verbs: Reserve legacy transport type in 'dev_addr'

2015-04-16 Thread Michael Wang
Reserve the legacy transport type for the 'transport' member of 'struct rdma_dev_addr' until we make sure this is no longer needed. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- dri

[PATCH v4 10/27] IB/Verbs: Reform cm related part in IB-core cma/ucm

2015-04-16 Thread Michael Wang
e Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/cma.c | 81 +-- drivers/infiniband/core/ucm.c | 3 +- 2 files changed, 26 insertions(+), 58 deletions(-) diff --git a/drivers/infiniband/core/cma.c b/dr

[PATCH v4 12/27] IB/Verbs: Reform mcast related part in IB-core cma

2015-04-16 Thread Michael Wang
Use raw management helpers to reform mcast related part in IB-core cma. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/cma.c | 57 +++ 1 file

[PATCH v4 08/27] IB/Verbs: Reform IB-ulp xprtrdma

2015-04-16 Thread Michael Wang
Use raw management helpers to reform IB-ulp xprtrdma. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 3 +-- net/sunrpc/xprtrdma/svc_rdma_transport.c | 45

[PATCH v4 16/27] IB/Verbs: Use management helper cap_ib_mad()

2015-04-16 Thread Michael Wang
Introduce helper cap_ib_mad() to help us check if the port of an IB device support Infiniband Management Datagrams. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/mad.c | 6

[PATCH v4 15/27] IB/Verbs: Reform rest part in IB-core cma

2015-04-16 Thread Michael Wang
Use raw management helpers to reform rest part in IB-core cma. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/cma.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions

[PATCH v4 11/27] IB/Verbs: Reform route related part in IB-core cma

2015-04-16 Thread Michael Wang
Use raw management helpers to reform route related part in IB-core cma. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/cma.c | 31 --- drivers/infiniband

[PATCH v4 06/27] IB/Verbs: Reform IB-core multicast

2015-04-16 Thread Michael Wang
Use raw management helpers to reform IB-core multicast. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/multicast.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions

[PATCH v4 14/27] IB/Verbs: Reform cma_acquire_dev()

2015-04-16 Thread Michael Wang
Reform cma_acquire_dev() with management helpers, introduce cma_validate_port() to make the code more clean. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/cma.c | 69

[PATCH v4 17/27] IB/Verbs: Use management helper cap_ib_smi()

2015-04-16 Thread Michael Wang
Introduce helper cap_ib_smi() to help us check if the port of an IB device support Infiniband Subnet Management Interface. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/agent.c | 2

[PATCH v4 19/27] IB/Verbs: Use management helper cap_iw_cm()

2015-04-16 Thread Michael Wang
Introduce helper cap_iw_cm() to help us check if the port of an IB device support IWARP Communication Manager. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/cma.c | 14

[PATCH v4 20/27] IB/Verbs: Use management helper cap_ib_sa()

2015-04-16 Thread Michael Wang
Introduce helper cap_ib_sa() to help us check if the port of an IB device support Infiniband Subnet Administrator. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/cma.c | 4

[PATCH v4 18/27] IB/Verbs: Use management helper cap_ib_cm()

2015-04-16 Thread Michael Wang
Introduce helper cap_ib_cm() to help us check if the port of an IB device support Infiniband Communication Manager. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/cm.c | 6

[PATCH v4 03/27] IB/Verbs: Reform IB-core mad/agent/user_mad

2015-04-16 Thread Michael Wang
Use raw management helpers to reform IB-core mad/agent/user_mad. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/agent.c| 2 +- drivers/infiniband/core/mad.c | 20

[PATCH v4 21/27] IB/Verbs: Use management helper cap_ib_mcast()

2015-04-16 Thread Michael Wang
Introduce helper cap_ib_mcast() to help us check if the port of an IB device support Infiniband Multicast. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/cma.c | 6

[PATCH v4 25/27] IB/Verbs: Use management helper cap_eth_ah()

2015-04-16 Thread Michael Wang
Introduce helper cap_eth_ah() to help us check if the port of an IB device support Ethernet Address Handler. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/cma.c | 6

[PATCH v4 23/27] IB/Verbs: Use management helper cap_read_multi_sge()

2015-04-16 Thread Michael Wang
Introduce helper cap_read_multi_sge() to help us check if the port of an IB device support RDMA Read Multiple Scatter-Gather Entries. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- include/rdma/ib_verbs.h

[PATCH v4 22/27] IB/Verbs: Use management helper cap_ipoib()

2015-04-16 Thread Michael Wang
Introduce helper cap_ipoib() to help us check if the port of an IB device support IP over Infiniband. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 +- include

[PATCH v4 24/27] IB/Verbs: Use management helper cap_af_ib()

2015-04-16 Thread Michael Wang
Introduce helper cap_af_ib() to help us check if the port of an IB device support Native Infiniband Address. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/cma.c | 2 +- include/rdma

[PATCH v4 02/27] IB/Verbs: Implement raw management helpers

2015-04-16 Thread Michael Wang
Signed-off-by: Michael Wang --- include/rdma/ib_verbs.h | 25 + 1 file changed, 25 insertions(+) diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index d54f91e..a12e876 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -1748,6 +1748,31

[PATCH v4 27/27] IB/Verbs: Cleanup rdma_node_get_transport()

2015-04-16 Thread Michael Wang
We have get rid of all the scene using legacy rdma_node_get_transport(), now clean it up. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/verbs.c | 21 - include

[PATCH v4 26/27] IB/Verbs: Clean up rdma_ib_or_iboe()

2015-04-16 Thread Michael Wang
We have finished introducing the cap_XX(), and raw helper rdma_ib_or_iboe() is no longer necessary, thus clean it up. Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- include/rdma/ib_verbs.h

Re: [PATCH v4 03/27] IB/Verbs: Reform IB-core mad/agent/user_mad

2015-04-16 Thread Michael Wang
ree, actually it's unnecessary to use both i and cur_port, we can just use the same way inside ib_mad_init_device() ;-) Regards, Michael Wang > > -- Hal > >> +continue; >> + >> if (ib_agent_port_close(device, cur_port)) >>

Re: [PATCH v4 04/27] IB/Verbs: Reform IB-core cm

2015-04-16 Thread Michael Wang
alternatively, this could be goto at end of this routine where > there is same 2 calls. I think Jason made this comment on earlier set of > these patches. Thanks for the notify, I guess I missed it, my bad :-P Will be "goto free" in next version. Regards, Michael Wang > > --

Re: [PATCH v4 10/27] IB/Verbs: Reform cm related part in IB-core cma/ucm

2015-04-16 Thread Michael Wang
On 04/16/2015 03:10 PM, Hal Rosenstock wrote: > On 4/16/2015 4:08 AM, Michael Wang wrote: >> >> Use raw management helpers to reform cm related part in IB-core cma/ucm. >> >> These checks focus on the device cm type rather than the port capability, >> directly

Re: [PATCH v4 14/27] IB/Verbs: Reform cma_acquire_dev()

2015-04-16 Thread Michael Wang
urrently ? It looks different to me since in this case the > port will be saved into id_priv->id.port_num whereas currently it isn't. I get your point :-) what about: ret = ib_find_cached_gid(device, gid, &found_port, NULL); if (port != found_port

Re: [PATCH v4 20/27] IB/Verbs: Use management helper cap_ib_sa()

2015-04-16 Thread Michael Wang
On 04/16/2015 03:36 PM, Hal Rosenstock wrote: > On 4/16/2015 4:12 AM, Michael Wang wrote: >> >> Introduce helper cap_ib_sa() to help us check if the port of an >> IB device support Infiniband Subnet Administrator. > > Nit: Administrator -> Administration Will b

Re: [PATCH v4 27/27] IB/Verbs: Cleanup rdma_node_get_transport()

2015-04-16 Thread Michael Wang
those who implemented the callback won't return UNSPECIFIED, others all have the correct transport type (otherwise BUG()) and won't result UNSPECIFIED :-) Regards, Michael Wang > >> IB_LINK_LAYER_INFINIBAND, -- To unsubscribe from this list: send the line "unsubs

Re: [PATCH v4 27/27] IB/Verbs: Cleanup rdma_node_get_transport()

2015-04-16 Thread Michael Wang
On 04/16/2015 03:42 PM, Hal Rosenstock wrote: > On 4/16/2015 9:41 AM, Michael Wang wrote: >> >> >> On 04/16/2015 03:36 PM, Hal Rosenstock wrote: >> [snip] >>>> -EXPORT_SYMBOL(rdma_node_get_transport); >>>> - >>>> enum rdma_link_la

Re: [PATCH v4 10/27] IB/Verbs: Reform cm related part in IB-core cma/ucm

2015-04-16 Thread Michael Wang
en_on_dev N cma_bind_loopback N rdma_listen N rdma_connectY rdma_accept Y rdma_reject Y rdma_disconnect Y ib_ucm_add_one N Is this list correct? Regards, Michael Wang

Re: [PATCH v3 25/28] IB/Verbs: Use management helper cap_af_ib()

2015-04-16 Thread Michael Wang
rdma_resolve_ip ... } So I guess IBoE using ib address rather than ip? Regards, Michael Wang > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the bod

Re: [PATCH v3 07/28] IB/Verbs: Reform IB-ulp ipoib

2015-04-17 Thread Michael Wang
nfluence the whole device, as long as the rest client can keep the device working (but how to estimate that...). While just ignore the failure seems really strange... Regards, Michael Wang > > - R. > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel"

Re: [PATCH v3 07/28] IB/Verbs: Reform IB-ulp ipoib

2015-04-17 Thread Michael Wang
On 04/16/2015 07:05 PM, Weiny, Ira wrote: >> >> On Wed, Apr 15, 2015 at 09:58:18AM +0200, Michael Wang wrote: >> >>> We can give client->add() callback a return value and make >>> ib_register_device() return -ENOMEM when it failed, just wondering why >

Re: [PATCH v3 27/28] IB/Verbs: Clean up rdma_ib_or_iboe()

2015-04-17 Thread Michael Wang
On 04/16/2015 06:43 PM, Jason Gunthorpe wrote: > On Tue, Apr 14, 2015 at 11:13:03AM +0200, Michael Wang wrote: > >>> I would be very happy to see a patch that adds cap_ib_smi to the >>> current tree and states 'This patch is tested to have no change on the &

Re: [PATCH v3 27/28] IB/Verbs: Clean up rdma_ib_or_iboe()

2015-04-17 Thread Michael Wang
On 04/16/2015 08:07 PM, Steve Wise wrote: > > >> -Original Message- >> From: Jason Gunthorpe [mailto:jguntho...@obsidianresearch.com] >> Sent: Thursday, April 16, 2015 11:43 AM >> To: Michael Wang >> Cc: Roland Dreier; Sean Hefty; Hal Rosenstock; l

Re: [PATCH v4 10/27] IB/Verbs: Reform cm related part in IB-core cma/ucm

2015-04-17 Thread Michael Wang
On 04/16/2015 07:21 PM, Tom Talpey wrote: > On 4/16/2015 11:22 AM, Michael Wang wrote: >> >> >> On 04/16/2015 04:31 PM, Hefty, Sean wrote: >>>>> This is equivalent to today where the checks are per node rather than >>>>> per port. >>

Re: [PATCH v4 10/27] IB/Verbs: Reform cm related part in IB-core cma/ucm

2015-04-17 Thread Michael Wang
is becoming a much bigger > change than you originally intended. :) My pleasure :-) It do exceeded my expectations, fortunately I have you guys on my side, without your comments, it's impossible to make it so far :-) Regards, Michael Wang > > - Sean > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH v4 10/27] IB/Verbs: Reform cm related part in IB-core cma/ucm

2015-04-17 Thread Michael Wang
On 04/16/2015 05:58 PM, Jason Gunthorpe wrote: > On Thu, Apr 16, 2015 at 10:08:10AM +0200, Michael Wang wrote: >> >> Use raw management helpers to reform cm related part in IB-core cma/ucm. >> >> These checks focus on the device cm type rather than the port capabili

Re: [RFC PATCH 08/11] IB/Verbs: Use management helper has_iwarp() for, iwarp-check

2015-03-30 Thread Michael Wang
these scenes there in device driver, since vendor could have different way to classify the usage of transfer and link layer. Our purpose is to introduce IB core management approach, which may not be applicable on device level, maybe we can just pass them :-) Regards, Michael Wang > > Jason -- To

Re: [PATCH 01/11] IB/Verbs: Use helpers to check transport and link layer

2015-03-30 Thread Michael Wang
Hi, Doug Thanks for the comments :-) On 03/30/2015 05:56 PM, Doug Ledford wrote: > On Fri, 2015-03-27 at 16:40 +0100, Michael Wang wrote: >> We have so much places to check transport type and link layer type, it's now >> make sense to introduce some helpers in order to ref

Re: [RFC PATCH 07/11] IB/Verbs: Use management helper has_mcast() and, cap_mcast() for mcast-check

2015-03-30 Thread Michael Wang
On 03/30/2015 06:11 PM, Doug Ledford wrote: > On Fri, 2015-03-27 at 16:46 +0100, Michael Wang wrote: >> Introduce helper has_mcast() and cap_mcast() to help us check if an >> IB device or it's port support Multicast. > This probably needs reworded or rethought. In truth, *

Re: [RFC PATCH 08/11] IB/Verbs: Use management helper has_iwarp() for, iwarp-check

2015-03-30 Thread Michael Wang
On 03/30/2015 06:13 PM, Doug Ledford wrote: > On Fri, 2015-03-27 at 16:47 +0100, Michael Wang wrote: >> Introduce helper has_iwarp() to help us check if an IB device >> support IWARP protocol. > This is a needless redirection. Just stick with the original > rdma_transport_is_

Re: [RFC PATCH 02/11] IB/Verbs: Use management helper tech_iboe() for iboe-check

2015-03-30 Thread Michael Wang
On 03/30/2015 06:17 PM, Doug Ledford wrote: > On Fri, 2015-03-27 at 16:42 +0100, Michael Wang wrote: >> Introduce helper tech_iboe() to help us check if the port of an IB >> device is using RoCE/IBoE technology. > Just use rdma_transport_is_roce() instead. Sounds good :-) will

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 b

Re: [PATCH 01/11] IB/Verbs: Use helpers to check transport and link layer

2015-03-30 Thread Michael Wang
On 03/30/2015 06:22 PM, Doug Ledford wrote: > On Mon, 2015-03-30 at 18:14 +0200, Michael Wang wrote: >> [snip] > There is no "gradually eliminate them" to the suggestion I made. > Remember, my suggestion was to remove the transport and link_layer items > from the port

Re: [RFC PATCH 07/11] IB/Verbs: Use management helper has_mcast() and, cap_mcast() for mcast-check

2015-03-31 Thread Michael Wang
On 03/31/2015 01:47 AM, ira.weiny wrote: > On Mon, Mar 30, 2015 at 06:20:48PM +0200, Michael Wang wrote: >> [snip] >>>> Cc: Jason Gunthorpe >>>> Cc: Doug Ledford >>>> Cc: Ira Weiny >>>> Cc: Sean Hefty >>>> Signed-off-by:

Re: [RFC PATCH 08/11] IB/Verbs: Use management helper has_iwarp() for, iwarp-check

2015-03-31 Thread Michael Wang
On 03/31/2015 12:35 AM, Jason Gunthorpe wrote: > On Mon, Mar 30, 2015 at 05:10:12PM +0200, Michael Wang wrote: >> I found that actually we don't have to touch this one which >> only used by HW driver currently. > I'm having a hard time understanding this, the code in qu

Re: [RFC PATCH 08/11] IB/Verbs: Use management helper has_iwarp() for, iwarp-check

2015-03-31 Thread Michael Wang
lace where infer max-read-sges from transport type, it looks more like a special case to me rather than a generic method we could exposed... and also not very related with IB management helper concept IMHO. Regards, Michael Wang -- To unsubscribe from this list: send the line "unsubsc

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

Re: [RFC PATCH 08/11] IB/Verbs: Use management helper has_iwarp() for, iwarp-check

2015-03-31 Thread Michael Wang
On 03/31/2015 03:42 PM, Tom Talpey wrote: > On 3/31/2015 7:41 AM, Michael Wang wrote: >> [snip] > Yes, in fact the iWARP protocol does not preclude multiple read SGEs, > even though most iWARP implementations have chosen to support just one. > > Even for multi-SGE-capable

Re: [PATCH v6 01/26] IB/Verbs: Implement new callback query_transport()

2015-04-27 Thread Michael Wang
still need it to separate the port support IB/ETH without the check on link-layer, So what about a new enum on protocol type? Like: enum rdma_protocol { RDMA_PROTOCOL_IB, RDMA_PROTOCOL_IBOE, RDMA_PROTOCOL_IWARP, RDMA_PROTOCOL_USNIC_UDP }; So we could use query_pr

Re: [PATCH v6 02/26] IB/Verbs: Implement raw management helpers

2015-04-27 Thread Michael Wang
ere, we can still get rid of the link layer meanwhile leave the legacy transport type alone :-) Regards, Michael Wang > > Jason > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH v6 00/26] IB/Verbs: IB Management Helpers

2015-04-27 Thread Michael Wang
l be some trivial change in next version related to naming. Regards, Michael Wang > > -Regards > Devesh >> -Original Message----- >> From: Michael Wang [mailto:yun.w...@profitbricks.com] >> Sent: Friday, April 24, 2015 6:43 PM >> To: Roland Dreier; Sean Hefty;

Re: [PATCH v6 01/26] IB/Verbs: Implement new callback query_transport()

2015-04-28 Thread Michael Wang
currently there is no place need it... The only three cases currently are: 1. trasnport IB, link layer IB //PROTOCOL_IB 2. transport IB, link layer ETH //PROTOCOL_IBOE 3. transport IWARP //PROTOCOL_IWARP Regards, Michael Wang > >>> >>>>

[PATCH v7 01/23] IB/Verbs: Implement new callback query_protocol()

2015-04-28 Thread Michael Wang
IB qib IB_CA IB IB IB Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/device.c | 1 + drivers

[PATCH v7 04/23] IB/Verbs: Reform IB-core cm

2015-04-28 Thread Michael Wang
Use raw management helpers to reform IB-core cm. Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/cm.c | 20 +--- 1 file changed, 17 insertions(+), 3

[PATCH v7 00/23] IB/Verbs: IB Management Helpers

2015-04-28 Thread Michael Wang
Sean: https://www.mail-archive.com/linux-rdma@vger.kernel.org/msg23339.html Doug: https://www.mail-archive.com/linux-rdma@vger.kernel.org/msg23418.html https://www.mail-archive.com/linux-rdma@vger.kernel.org/msg23765.html Jason: https://www.mail-archive.com/

[PATCH v7 09/23] IB/Verbs: Reform IB-core verbs

2015-04-28 Thread Michael Wang
Use raw management helpers to reform IB-core verbs Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/verbs.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions

[PATCH v7 16/23] IB/Verbs: Use management helper cap_ib_smi()

2015-04-28 Thread Michael Wang
Introduce helper cap_ib_smi() to help us check if the port of an IB device support Infiniband Subnet Management Interface. Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband

[PATCH v7 21/23] IB/Verbs: Use management helper cap_read_multi_sge()

2015-04-28 Thread Michael Wang
Introduce helper cap_read_multi_sge() to help us check if the port of an IB device support RDMA Read Multiple Scatter-Gather Entries. Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- include

[PATCH v7 23/23] IB/Verbs: Use management helper cap_eth_ah()

2015-04-28 Thread Michael Wang
Introduce helper cap_eth_ah() to help us check if the port of an IB device support Ethernet Address Handler. Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/cma.c

[PATCH v7 12/23] IB/Verbs: Reform mcast related part in IB-core cma

2015-04-28 Thread Michael Wang
Use raw management helpers to reform mcast related part in IB-core cma. Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/cma.c | 56

[PATCH v7 18/23] IB/Verbs: Use management helper cap_iw_cm()

2015-04-28 Thread Michael Wang
Introduce helper cap_iw_cm() to help us check if the port of an IB device support IWARP Communication Manager. Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/cma.c

[PATCH v7 22/23] IB/Verbs: Use management helper cap_af_ib()

2015-04-28 Thread Michael Wang
Introduce helper cap_af_ib() to help us check if the port of an IB device support Native Infiniband Address. Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/cma.c

[PATCH v7 19/23] IB/Verbs: Use management helper cap_ib_sa()

2015-04-28 Thread Michael Wang
Introduce helper cap_ib_sa() to help us check if the port of an IB device support Infiniband Subnet Administration. Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core

[PATCH v7 20/23] IB/Verbs: Use management helper cap_ib_mcast()

2015-04-28 Thread Michael Wang
Introduce helper cap_ib_mcast() to help us check if the port of an IB device support Infiniband Multicast. Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/cma.c

[PATCH v7 17/23] IB/Verbs: Use management helper cap_ib_cm()

2015-04-28 Thread Michael Wang
Introduce helper cap_ib_cm() to help us check if the port of an IB device support Infiniband Communication Manager. Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core

[PATCH v7 15/23] IB/Verbs: Use management helper cap_ib_mad()

2015-04-28 Thread Michael Wang
Introduce helper cap_ib_mad() to help us check if the port of an IB device support Infiniband Management Datagrams. Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core

[PATCH v7 14/23] IB/Verbs: Reform rest part in IB-core cma

2015-04-28 Thread Michael Wang
Use raw management helpers to reform rest part in IB-core cma. Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/cma.c | 20 +--- 1 file changed, 9

[PATCH v7 07/23] IB/Verbs: Reform IB-ulp ipoib

2015-04-28 Thread Michael Wang
Use raw management helpers to reform IB-ulp ipoib. Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/ulp/ipoib/ipoib_main.c | 15 --- 1 file changed, 8

[PATCH v7 13/23] IB/Verbs: Reform cma_acquire_dev()

2015-04-28 Thread Michael Wang
Reform cma_acquire_dev() with management helpers, introduce cma_validate_port() to make the code more clean. Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/cma.c

[PATCH v7 11/23] IB/Verbs: Reform route related part in IB-core cma

2015-04-28 Thread Michael Wang
Use raw management helpers to reform route related part in IB-core cma. Cc: Hal Rosenstock Cc: Steve Wise Cc: Tom Talpey Cc: Jason Gunthorpe Cc: Doug Ledford Cc: Ira Weiny Cc: Sean Hefty Signed-off-by: Michael Wang --- drivers/infiniband/core/cma.c | 31

<    1   2   3   4   5   6   7   8   9   >