Skip to contentSkip to conversation

Trivial fixes for 4.7

PATCH In review Leon Romanovsky 8 participants 47 messages May 6, 2016 – May 30, 2016 36 messages not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

v2 cover Trivial fixes for 4.7

Hi Doug,

I'm sending to you small collection of trivial fixes to core code.

It fixes forgotten skb release call, potential overrun in CMA/SA, integration of ib_addr.ko into ib_core.ko and one code simplifications which doesn't introduce any code change behavior.

Available in the "topic/fix-core" topic branch of this git repo:

git://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git

Or for browsing:

https://git.kernel.org/cgit/linux/kernel/git/leon/linux-rdma.git/log/?h=topic/fix-core

Changes since v2:
* Removed iwcm_nl_cb_table size initialization

Changes since v1:
* Added Reviewed-by tags
* Revisited titles
* Removed RDMA_NL_RDMA_CM_NUM_OPS and RDMA_NL_LS_NUM_OPS
* Removed useless enumeration value
* Converted ib_addr module to be integral part of ib_core module

Leon Romanovsky (1):
IB/core: Integrate IB address resolution module into core

Mark Bloch (4):
IB/IWPM: Fix a potential skb leak
IB/core: Remove unnecessary check in ibnl_rcv_msg IB/core: Fix a potential array overrun in CMA and SA agent IB/SA: Use correct free function

 drivers/infiniband/core/Makefile    |  6 ++----
 drivers/infiniband/core/addr.c      | 11 ++---------
 drivers/infiniband/core/cma.c       |  3 ++-
 drivers/infiniband/core/device.c    | 11 ++++++++++-
 drivers/infiniband/core/iwcm.c      |  2 +-
 drivers/infiniband/core/iwpm_util.c |  1 +
 drivers/infiniband/core/netlink.c   |  5 ++---
 drivers/infiniband/core/sa_query.c  |  4 ++--
 include/rdma/ib_addr.h              |  3 +++
 9 files changed, 25 insertions(+), 21 deletions(-)
Signature · 6 lines
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1462563928-29164-1-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org

#2 lore raw

PATCH v2 1/5 IB/IWPM: Fix a potential skb leak

From: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>

In case ibnl_put_msg fails in send_nlmsg_done, the function returns with -ENOMEM without freeing.

This patch fixes this behavior.

Fixes 30dc5e63d6a5 ("RDMA/core: Add support for iWARP Port Mapper user space service")
---
 drivers/infiniband/core/iwpm_util.c | 1 +
 1 file changed, 1 insertion(+)
drivers/infiniband/core/iwpm_util.c +1 -0
index 9b2bf2f..b65e06c 100644
@@ -634,6 +634,7 @@ static int send_nlmsg_done(struct sk_buff *skb, u8 nl_client, int iwpm_pid)
 	if (!(ibnl_put_msg(skb, &nlh, 0, 0, nl_client,
 			   RDMA_NL_IWPM_MAPINFO, NLM_F_MULTI))) {
 		pr_warn("%s Unable to put NLMSG_DONE\n", __func__);
+		dev_kfree_skb(skb);
 		return -ENOMEM;
 	}
 	nlh->nlmsg_type = NLMSG_DONE;
Signature · 6 lines
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

PATCH v2 2/5 IB/core: Remove unnecessary check in ibnl_rcv_msg

In reply to a message not in the archive

From: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>

RDMA_NL_GET_OP is defined like this: (type & ((1 << 10) - 1)) which means op (defined as an int) can never be a negative number.

---
 drivers/infiniband/core/netlink.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/infiniband/core/netlink.c +2 -3
index d47df93..9b8c20c 100644
@@ -151,12 +151,11 @@ static int ibnl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
 	struct ibnl_client *client;
 	int type = nlh->nlmsg_type;
 	int index = RDMA_NL_GET_CLIENT(type);
-	int op = RDMA_NL_GET_OP(type);
+	unsigned int op = RDMA_NL_GET_OP(type);
 
 	list_for_each_entry(client, &client_list, list) {
 		if (client->index == index) {
-			if (op < 0 || op >= client->nops ||
-			    !client->cb_table[op].dump)
+			if (op >= client->nops || !client->cb_table[op].dump)
 				return -EINVAL;
 
 			/*
Signature · 6 lines
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw

PATCH v2 3/5 IB/core: Fix a potential array overrun in CMA and SA agent

In reply to a message not in the archive

From: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>

Fix array overrun when going over callback table.
In declaration of callback table, the max size isn't provided and in registration phase, it is provided.

There is potential scenario where a new operation is added and it is not supported by current client. The acceptance of such operation by ib_netlink will cause to array overrun.

Fixes 809d5fc9bf65 ("infiniband: pass rdma_cm module to netlink_dump_start")
Fixes b493d91d333e ("iwcm: common code for port mapper")
Fixes 2ca546b92a02 ("IB/sa: Route SA pathrecord query through netlink")
---
 drivers/infiniband/core/cma.c      | 3 ++-
 drivers/infiniband/core/iwcm.c     | 2 +-
 drivers/infiniband/core/sa_query.c | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)
drivers/infiniband/core/cma.c +2 -1
index 93ab0ae..b575bd5 100644
@@ -4294,7 +4294,8 @@ static int __init cma_init(void)
 	if (ret)
 		goto err;
 
-	if (ibnl_add_client(RDMA_NL_RDMA_CM, RDMA_NL_RDMA_CM_NUM_OPS, cma_cb_table))
+	if (ibnl_add_client(RDMA_NL_RDMA_CM, ARRAY_SIZE(cma_cb_table),
+			    cma_cb_table))
 		pr_warn("RDMA CMA: failed to add netlink callback\n");
 	cma_configfs_init();
 
drivers/infiniband/core/iwcm.c +1 -1
index e28a160..51079e3 100644
@@ -1175,7 +1175,7 @@ static int __init iw_cm_init(void)
 	if (ret)
 		pr_err("iw_cm: couldn't init iwpm\n");
 
-	ret = ibnl_add_client(RDMA_NL_IWCM, RDMA_NL_IWPM_NUM_OPS,
+	ret = ibnl_add_client(RDMA_NL_IWCM, ARRAY_SIZE(iwcm_nl_cb_table),
 			      iwcm_nl_cb_table);
 	if (ret)
 		pr_err("iw_cm: couldn't register netlink callbacks\n");
drivers/infiniband/core/sa_query.c +1 -1
index 8a09c0f..1e7c652 100644
@@ -1820,7 +1820,7 @@ static int __init ib_sa_init(void)
 		goto err3;
 	}
 
-	if (ibnl_add_client(RDMA_NL_LS, RDMA_NL_LS_NUM_OPS,
+	if (ibnl_add_client(RDMA_NL_LS, ARRAY_SIZE(ib_sa_cb_table),
 			    ib_sa_cb_table)) {
 		pr_err("Failed to add netlink callback\n");
 		ret = -EINVAL;
Signature · 6 lines
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#5 lore raw

PATCH v2 4/5 IB/SA: Use correct free function

In reply to a message not in the archive

From: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>

Fixes a direct call to kfree_skb when nlmsg_free should be used.

---
 drivers/infiniband/core/sa_query.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/core/sa_query.c +1 -1
index 1e7c652..3ebd108 100644
@@ -536,7 +536,7 @@ static int ib_nl_send_msg(struct ib_sa_query *query, gfp_t gfp_mask)
 	data = ibnl_put_msg(skb, &nlh, query->seq, 0, RDMA_NL_LS,
 			    RDMA_NL_LS_OP_RESOLVE, NLM_F_REQUEST);
 	if (!data) {
-		kfree_skb(skb);
+		nlmsg_free(skb);
 		return -EMSGSIZE;
 	}
 
Signature · 6 lines
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#6 lore raw

PATCH v2 5/5 IB/core: Integrate IB address resolution module into core

In reply to a message not in the archive

From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>

IB address resolution is declared as a module (ib_addr.ko) which loads itself before IB core module (ib_core.ko).

It causes to the scenario where IB netlink which is initialized by IB core can't be used by ib_addr.ko.

In order to solve it, we are converting ib_addr.ko to be part of IB core module.

---
 drivers/infiniband/core/Makefile |  6 ++----
 drivers/infiniband/core/addr.c   | 11 ++---------
 drivers/infiniband/core/device.c | 11 ++++++++++-
 include/rdma/ib_addr.h           |  3 +++
 4 files changed, 17 insertions(+), 14 deletions(-)
drivers/infiniband/core/Makefile +2 -4
index f818538..2c6dc6b 100644
@@ -2,7 +2,7 @@ infiniband-$(CONFIG_INFINIBAND_ADDR_TRANS)	:= rdma_cm.o
 user_access-$(CONFIG_INFINIBAND_ADDR_TRANS)	:= rdma_ucm.o
 
 obj-$(CONFIG_INFINIBAND) +=		ib_core.o ib_mad.o ib_sa.o \
-					ib_cm.o iw_cm.o ib_addr.o \
+					ib_cm.o iw_cm.o \
 					$(infiniband-y)
 obj-$(CONFIG_INFINIBAND_USER_MAD) +=	ib_umad.o
 obj-$(CONFIG_INFINIBAND_USER_ACCESS) +=	ib_uverbs.o ib_ucm.o \
@@ -10,7 +10,7 @@ obj-$(CONFIG_INFINIBAND_USER_ACCESS) +=	ib_uverbs.o ib_ucm.o \
 
 ib_core-y :=			packer.o ud_header.o verbs.o cq.o sysfs.o \
 				device.o fmr_pool.o cache.o netlink.o \
-				roce_gid_mgmt.o
+				roce_gid_mgmt.o addr.o
 ib_core-$(CONFIG_INFINIBAND_USER_MEM) += umem.o
 ib_core-$(CONFIG_INFINIBAND_ON_DEMAND_PAGING) += umem_odp.o umem_rbtree.o
 
@@ -28,8 +28,6 @@ rdma_cm-$(CONFIG_INFINIBAND_ADDR_TRANS_CONFIGFS) += cma_configfs.o
 
 rdma_ucm-y :=			ucma.o
 
-ib_addr-y :=			addr.o
-
 ib_umad-y :=			user_mad.o
 
 ib_ucm-y :=			ucm.o
drivers/infiniband/core/addr.c +2 -9
index 337353d..3a203ee 100644
@@ -47,10 +47,6 @@
 #include <rdma/ib_addr.h>
 #include <rdma/ib.h>
 
-MODULE_AUTHOR("Sean Hefty");
-MODULE_DESCRIPTION("IB Address Translation");
-MODULE_LICENSE("Dual BSD/GPL");
-
 struct addr_req {
 	struct list_head list;
 	struct sockaddr_storage src_addr;
@@ -634,7 +630,7 @@ static struct notifier_block nb = {
 	.notifier_call = netevent_callback
 };
 
-static int __init addr_init(void)
+int addr_init(void)
 {
 	addr_wq = create_singlethread_workqueue("ib_addr");
 	if (!addr_wq)
@@ -645,12 +641,9 @@ static int __init addr_init(void)
 	return 0;
 }
 
-static void __exit addr_cleanup(void)
+void addr_cleanup(void)
 {
 	rdma_addr_unregister_client(&self);
 	unregister_netevent_notifier(&nb);
 	destroy_workqueue(addr_wq);
 }
-
-module_init(addr_init);
-module_exit(addr_cleanup);
drivers/infiniband/core/device.c +10 -1
index 1097984..8894ad0 100644
@@ -977,16 +977,24 @@ static int __init ib_core_init(void)
 		goto err_comp;
 	}
 
+	ret = addr_init();
+	if (ret) {
+		pr_warn("Could't init IB address resolution\n");
+		goto err_sysfs;
+	}
+
 	ret = ibnl_init();
 	if (ret) {
 		pr_warn("Couldn't init IB netlink interface\n");
-		goto err_sysfs;
+		goto err_addr;
 	}
 
 	ib_cache_setup();
 
 	return 0;
 
+err_addr:
+	addr_cleanup();
 err_sysfs:
 	class_unregister(&ib_class);
 err_comp:
@@ -1000,6 +1008,7 @@ static void __exit ib_core_cleanup(void)
 {
 	ib_cache_cleanup();
 	ibnl_cleanup();
+	addr_cleanup();
 	class_unregister(&ib_class);
 	destroy_workqueue(ib_comp_wq);
 	/* Make sure that any pending umem accounting work is done. */
include/rdma/ib_addr.h +3 -0
index 931a47b..e276a07 100644
@@ -54,6 +54,9 @@ struct rdma_addr_client {
 	struct completion comp;
 };
 
+int addr_init(void);
+void addr_cleanup(void);
+
 /**
  * rdma_addr_register_client - Register an address client.
  */
Signature · 6 lines
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1462563928-29164-6-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org

#8 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 21 lines · Leon Romanovsky

From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>

IB address resolution is declared as a module (ib_addr.ko) which loads itself before IB core module (ib_core.ko).

It causes to the scenario where IB netlink which is initialized by IB core can't be used by ib_addr.ko.

In order to solve it, we are converting ib_addr.ko to be part of IB core module.

drivers/infiniband/core/device.c +2 -0
index 1097984..8894ad0 100644
@@ -977,16 +977,24 @@ static int __init ib_core_init(void)
 		goto err_comp;
 	}
 
+	ret = addr_init();
+	if (ret) {

drivers/infiniband/core/device.c static int __init ib_core_init(void) · line 990

Quoted 10 lines
drivers/infiniband/core/device.c +5 -1
+		pr_warn("Could't init IB address resolution\n");
+		goto err_sysfs;
+	}
+
 	ret = ibnl_init();
 	if (ret) {
 		pr_warn("Couldn't init IB netlink interface\n");
-		goto err_sysfs;
+		goto err_addr;
 	}

It's unclear to me how this change helps things. Theoretically, if you load ib_addr before ib_core (and therefore before any ibnl_init() is run) and that prevents ib_addr from using the ibnl infrastructure, then you would think that building ib_addr into ib_core and then running the addr_init() before the ibnl_init() would have exactly the same problem. I don't see what issue is resolved by this patch. But, just as importantly, after reading addr.c to see how it uses the ibnl infrastructure, I don't even see what the original problem can be. Please elaborate more on what actual problem we are solving with this because I am loathe to change the module structure without good cause (in particular, I know at least the Red Hat init scripts and systemd units know about module names, so this requires changes to user space scripts and that's a big no-no if it can be avoided).

Signature · 2 lines
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD

A message that is not in the archive (sent off-list or not yet received): ea50f1d2-6f05-66f7-18f7-0a569fd9cea5-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

#10 lore raw

RE: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 43 lines

-----Original Message-----
From: [email protected] [mailto:linux-rdma- [email protected]] On Behalf Of Doug Ledford
Sent: Friday, May 13, 2016 10:34 PM
To: Leon Romanovsky <[email protected]>
Cc: [email protected]; Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address
resolution module into core

Quoted 5 lines · Leon Romanovsky

From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/[email protected]>

IB address resolution is declared as a module (ib_addr.ko) which loads itself before IB core module (ib_core.ko).

Review

Quoted 7 lines

It causes to the scenario where IB netlink which is initialized by IB core can't be used by ib_addr.ko.

In order to solve it, we are converting ib_addr.ko to be part of IB core module.

(quoted diff) +0 -0

b/drivers/infiniband/core/device.c

Quoted 18 lines

index 1097984..8894ad0 100644

drivers/infiniband/core/device.c +7 -1
@@ -977,16 +977,24 @@ static int __init ib_core_init(void)
 		goto err_comp;
 	}
 
+	ret = addr_init();
+	if (ret) {
+		pr_warn("Could't init IB address resolution\n");
+		goto err_sysfs;
+	}
+
 	ret = ibnl_init();
 	if (ret) {
 		pr_warn("Couldn't init IB netlink interface\n");
-		goto err_sysfs;
+		goto err_addr;
Quoted 8 lines

drivers/infiniband/core/device.c static int __init ib_core_init(void) · line 990

Quoted 1 line
drivers/infiniband/core/device.c +0 -0
 	}

It's unclear to me how this change helps things. Theoretically, if you load ib_addr before ib_core (and therefore before any ibnl_init() is run) and that prevents ib_addr from using the ibnl infrastructure, then you would think that building ib_addr into ib_core and then running the addr_init() before the ibnl_init() would have exactly the same problem. I don't see what issue is resolved by this patch.

You are right, this patch doesn't solve the problem of using ibnl inside ib_addr, But this patch didn't try to do that, all it did was to integrate ib_addr into ib_core, It tried to preserve the current order of dependencies .

If this change is accepted, the order will be switched in the patches that add ibnl usage inside addr.c, another option is to pull this patch with the correct order into that series, this way we won't have to touch this area twice.

Quoted 2 lines

But, just as importantly, after reading addr.c to see how it uses the ibnl infrastructure, I don't even see what the original problem can be.

As it stands today:
- ibnl is part of ib_core.
- ib_core needs ib_addr.

So if we add ibnl usage to ib_addr it means ib_addr will need ib_core, which causes a dependency cycle.

Quoted 11 lines

Please elaborate more on what actual problem we are solving with this because I am loathe to change the module structure without good cause (in particular, I know at least the Red Hat init scripts and systemd units know about module names, so this requires changes to user space scripts and that's a big no-no if it can be avoided).

--
Doug Ledford <[email protected]>

              GPG KeyID: 0E572FDD

Mark Bloch.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): VI1PR05MB1391AD099C536541E79A09F9D2760-79XLn2atqDP8GeyK7vyn2tqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#12 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 8 lines · Mark Bloch
Quoted 2 lines

But, just as importantly, after reading addr.c to see how it uses the ibnl infrastructure, I don't even see what the original problem can be.

As it stands today:
- ibnl is part of ib_core.
- ib_core needs ib_addr.

So if we add ibnl usage to ib_addr it means ib_addr will need ib_core, which causes a dependency cycle.

Right, but in that case, this patch needs to be part of the series that adds the ibnl support into the ib_addr functionality. Because you split them into separate series, this was a patch looking for a problem to solve and it wasn't clear what it was. If I had taken the other series and not this series, it would have broken things. So please keep patches like this together with the other patches that depend on it.

That said, I also don't want to redo modules if we don't have to. As my previous email points out, changing modules breaks init scripts and systemd unit files. It is to be avoided when possible.

Signature · 2 lines
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD

A message that is not in the archive (sent off-list or not yet received): db369e8e-7993-dfb8-d459-2c4f3d6e5b14-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

#14 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 18 lines · Doug Ledford
Quoted 8 lines · Mark Bloch
Quoted 2 lines

But, just as importantly, after reading addr.c to see how it uses the ibnl infrastructure, I don't even see what the original problem can be.

As it stands today:
- ibnl is part of ib_core.
- ib_core needs ib_addr.

So if we add ibnl usage to ib_addr it means ib_addr will need ib_core, which causes a dependency cycle.

Right, but in that case, this patch needs to be part of the series that adds the ibnl support into the ib_addr functionality. Because you split them into separate series, this was a patch looking for a problem to solve and it wasn't clear what it was. If I had taken the other series and not this series, it would have broken things. So please keep patches like this together with the other patches that depend on it.

Quoted 3 lines

That said, I also don't want to redo modules if we don't have to. As my previous email points out, changing modules breaks init scripts and systemd unit files. It is to be avoided when possible.

Sorry,
I was in the mood of fixing things when I wrote and sent this patch. The question is which version will you more likely to accept: this one (remove ib_addr module) or previous one (add ib_netlink module)?

Thanks.

Quoted 7 lines
Signature · 3 lines
-- 
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD

A message that is not in the archive (sent off-list or not yet received): 20160516163048.GB4662-2ukJVAZIZ/[email protected]

#16 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 19 lines · Leon Romanovsky
Quoted 18 lines · Doug Ledford
Quoted 8 lines · Mark Bloch
Quoted 2 lines

But, just as importantly, after reading addr.c to see how it uses the ibnl infrastructure, I don't even see what the original problem can be.

As it stands today:
- ibnl is part of ib_core.
- ib_core needs ib_addr.

So if we add ibnl usage to ib_addr it means ib_addr will need ib_core, which causes a dependency cycle.

Right, but in that case, this patch needs to be part of the series that adds the ibnl support into the ib_addr functionality. Because you split them into separate series, this was a patch looking for a problem to solve and it wasn't clear what it was. If I had taken the other series and not this series, it would have broken things. So please keep patches like this together with the other patches that depend on it.

Quoted 8 lines
Quoted 3 lines

That said, I also don't want to redo modules if we don't have to. As my previous email points out, changing modules breaks init scripts and systemd unit files. It is to be avoided when possible.

Sorry,
I was in the mood of fixing things when I wrote and sent this patch. The question is which version will you more likely to accept: this one (remove ib_addr module) or previous one (add ib_netlink module)?

Can you build netlink in and then init the ib_addr module after the netlink init is complete? Wouldn't that resolve the dependency ordering issue without changing the module names?

Signature · 2 lines
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD

A message that is not in the archive (sent off-list or not yet received): 298657b0-6e57-745b-5eb3-001984bffbc3-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

#18 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 3 lines · Doug Ledford

Can you build netlink in and then init the ib_addr module after the netlink init is complete? Wouldn't that resolve the dependency ordering issue without changing the module names?

Why are you so worried about ib_addr's module name? Is that actually hand loaded instead of relying in the implicit dependencies???

Is failure to load a module going to break any existing scripts?

Worse comes to worse, just make dummy empty ib_addr.ko, but I've never seen that in-kernel before.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20160516182743.GF7248-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org

#20 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 7 lines · Jason Gunthorpe
Quoted 3 lines · Doug Ledford

Can you build netlink in and then init the ib_addr module after the netlink init is complete? Wouldn't that resolve the dependency ordering issue without changing the module names?

Why are you so worried about ib_addr's module name? Is that actually hand loaded instead of relying in the implicit dependencies???

It's hand unloaded. Depending on the release of software you are talking about, the init script has the ability to unload/reload the IB stack. In that case, it has to know about ib_addr so that it can unload after ib_core. I should know, when the order changed from ib_core first and ib_addr second to the opposite it broke the Red Hat init script for a release, including all the bug reports about the rdma stack failing to shut down properly because it was unloading modules in the wrong order. This falls in the same category of a lot of other things: you don't break user space if you don't have to.

Quoted 7 lines

Is failure to load a module going to break any existing scripts?

Worse comes to worse, just make dummy empty ib_addr.ko, but I've never seen that in-kernel before.

Jason

Signature · 2 lines
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD

A message that is not in the archive (sent off-list or not yet received): 5045d314-e2f5-bda6-5583-2212335593fd-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

#22 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 9 lines · Doug Ledford
Quoted 7 lines · Jason Gunthorpe
Quoted 3 lines · Doug Ledford

Can you build netlink in and then init the ib_addr module after the netlink init is complete? Wouldn't that resolve the dependency ordering issue without changing the module names?

Why are you so worried about ib_addr's module name? Is that actually hand loaded instead of relying in the implicit dependencies???

Quoted 9 lines

It's hand unloaded. Depending on the release of software you are talking about, the init script has the ability to unload/reload the IB stack. In that case, it has to know about ib_addr so that it can unload after ib_core. I should know, when the order changed from ib_core first and ib_addr second to the opposite it broke the Red Hat init script for a release, including all the bug reports about the rdma stack failing to shut down properly because it was unloading modules in the wrong order. This falls in the same category of a lot of other things: you don't break user space if you don't have to.

I think the reason that this thread fails to die is our trouble to understand if code refactoring is enough justification to get rid of all these modules.

All guides/scripts which I saw, instructs to load all these ib_... modules together and it looks redundant to have such large number of them [1].

[1]
http://www.rdmamojo.com/2014/11/08/working-rdma-ubuntu/#Starting_the_RDMA_services

Quoted 15 lines
Quoted 8 lines

Is failure to load a module going to break any existing scripts?

Worse comes to worse, just make dummy empty ib_addr.ko, but I've never seen that in-kernel before.

Jason

Signature · 2 lines
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD

A message that is not in the archive (sent off-list or not yet received): 20160518044119.GH4662-2ukJVAZIZ/[email protected]

#24 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 24 lines · Leon Romanovsky
Quoted 9 lines · Doug Ledford
Quoted 7 lines · Jason Gunthorpe
Quoted 3 lines · Doug Ledford

Can you build netlink in and then init the ib_addr module after the netlink init is complete? Wouldn't that resolve the dependency ordering issue without changing the module names?

Why are you so worried about ib_addr's module name? Is that actually hand loaded instead of relying in the implicit dependencies???

Quoted 9 lines

It's hand unloaded. Depending on the release of software you are talking about, the init script has the ability to unload/reload the IB stack. In that case, it has to know about ib_addr so that it can unload after ib_core. I should know, when the order changed from ib_core first and ib_addr second to the opposite it broke the Red Hat init script for a release, including all the bug reports about the rdma stack failing to shut down properly because it was unloading modules in the wrong order. This falls in the same category of a lot of other things: you don't break user space if you don't have to.

I think the reason that this thread fails to die is our trouble to understand if code refactoring is enough justification to get rid of all these modules.

Quoted 6 lines

All guides/scripts which I saw, instructs to load all these ib_... modules together and it looks redundant to have such large number of them [1].

[1]
http://www.rdmamojo.com/2014/11/08/working-rdma-ubuntu/#Starting_the_RDMA_services

I've never heard of rdmamojo before...interesting.

Anyway, it probably is true that the number of modules is superfluous. I'm not arguing against that.

Quoted 17 lines
Quoted 15 lines
Quoted 8 lines

Is failure to load a module going to break any existing scripts?

Worse comes to worse, just make dummy empty ib_addr.ko, but I've never seen that in-kernel before.

Jason

Signature · 2 lines
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD
Signature · 2 lines
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD
#25 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

In reply to a message not in the archive
Quoted 24 lines · Doug Ledford
Quoted 23 lines · Leon Romanovsky
Quoted 21 lines · Doug Ledford
Quoted 8 lines · Mark Bloch
Quoted 2 lines

But, just as importantly, after reading addr.c to see how it uses the ibnl infrastructure, I don't even see what the original problem can be.

As it stands today:
- ibnl is part of ib_core.
- ib_core needs ib_addr.

So if we add ibnl usage to ib_addr it means ib_addr will need ib_core, which causes a dependency cycle.

Right, but in that case, this patch needs to be part of the series that adds the ibnl support into the ib_addr functionality. Because you split them into separate series, this was a patch looking for a problem to solve and it wasn't clear what it was. If I had taken the other series and not this series, it would have broken things. So please keep patches like this together with the other patches that depend on it.

That said, I also don't want to redo modules if we don't have to. As my previous email points out, changing modules breaks init scripts and systemd unit files. It is to be avoided when possible.

Quoted 8 lines
Quoted 4 lines

Sorry,
I was in the mood of fixing things when I wrote and sent this patch. The question is which version will you more likely to accept: this one (remove ib_addr module) or previous one (add ib_netlink module)?

Can you build netlink in and then init the ib_addr module after the netlink init is complete? Wouldn't that resolve the dependency ordering issue without changing the module names?

It seems reasonable and we will test it, before reposting.

However generally speaking, I agree with Jason and Ira that this module (ib_addr.ko) is useless as module and can be part of ib_core.ko.

It doesn't seem as a big deal to fix all that init scripts (remove two lines).

Quoted 7 lines
Signature · 3 lines
-- 
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD

A message that is not in the archive (sent off-list or not yet received): 20160516185434.GC4662-2ukJVAZIZ/[email protected]

#27 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 30 lines · Leon Romanovsky
Quoted 29 lines · Doug Ledford
Quoted 27 lines · Leon Romanovsky
Quoted 18 lines · Doug Ledford
Quoted 8 lines · Mark Bloch
Quoted 2 lines

But, just as importantly, after reading addr.c to see how it uses the ibnl infrastructure, I don't even see what the original problem can be.

As it stands today:
- ibnl is part of ib_core.
- ib_core needs ib_addr.

So if we add ibnl usage to ib_addr it means ib_addr will need ib_core, which causes a dependency cycle.

Right, but in that case, this patch needs to be part of the series that adds the ibnl support into the ib_addr functionality. Because you split them into separate series, this was a patch looking for a problem to solve and it wasn't clear what it was. If I had taken the other series and not this series, it would have broken things. So please keep patches like this together with the other patches that depend on it.

Quoted 3 lines

That said, I also don't want to redo modules if we don't have to. As my previous email points out, changing modules breaks init scripts and systemd unit files. It is to be avoided when possible.

Sorry,
I was in the mood of fixing things when I wrote and sent this patch. The question is which version will you more likely to accept: this one (remove ib_addr module) or previous one (add ib_netlink module)?

Quoted 5 lines
Quoted 3 lines

Can you build netlink in and then init the ib_addr module after the netlink init is complete? Wouldn't that resolve the dependency ordering issue without changing the module names?

It seems reasonable and we will test it, before reposting.

Thanks.

Quoted 5 lines

However generally speaking, I agree with Jason and Ira that this module (ib_addr.ko) is useless as module and can be part of ib_core.ko.

It doesn't seem as a big deal to fix all that init scripts (remove two lines).

It's not removing two lines. If someone wants to be able to boot both kernels prior to this change and kernel post this change, they have to now write their script to handle both conditions sanely. And they have to know to do so, where as very often they simply get caught off guard and things are broken for some period of time. If the change to ib_addr actually solved a problem that couldn't be solved otherwise, that would be one thing. But it doesn't. It's a complete no-op.

Signature · 2 lines
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD

A message that is not in the archive (sent off-list or not yet received): 82b21da8-8bec-a7ed-fc48-b7570c0aa4ce-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

#29 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 3 lines

and things are broken for some period of time. If the change to ib_addr actually solved a problem that couldn't be solved otherwise, that would be one thing. But it doesn't. It's a complete no-op.

The original patches had a horrible dynamic registration scheme for the netlink dispatch that only served to work around the pointless module split. The issue is that the dispatch needs to have function relocations from both modules to follow the usual netlink idioms.

It is unfortunate that distro scripts have become such that they break if the kernel changes even something small like dependencies.

Another alternative is to move only the parts of ib_addr that touch netlink into ib_core. Hopefully that doesn't create an empty module.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20160516210327.GB10945-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org

#31 lore raw

RE: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 11 lines

-----Original Message-----
From: Jason Gunthorpe [mailto:jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org]
Sent: Tuesday, May 17, 2016 12:03 AM
To: Doug Ledford <[email protected]>
Cc: [email protected]; Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>; linux- [email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address
resolution module into core

Quoted 8 lines
Quoted 3 lines

and things are broken for some period of time. If the change to ib_addr actually solved a problem that couldn't be solved otherwise, that would be one thing. But it doesn't. It's a complete no-op.

The original patches had a horrible dynamic registration scheme for the netlink dispatch that only served to work around the pointless module split. The issue is that the dispatch needs to have function relocations from both modules to follow the usual netlink idioms.

Are you talking about the changes in ibnl_add_client?
Those changes were because of a different module (ib_sa.ko) In sa_query.c we register a ibnl client for RDMA_NL_LS and
we use that for getting path records (ibacm runs in userspace and listens on that netlink socket). If we look at the definition of RDMA_NS_LS it is defined as a rdma local service operations, so naturedly I feel ip->gid should be added to that family.

It means we have two modules (ib_sa.ko and ib_core/ib_addr depends if we integrate them or not) Needing to use different operations which are part of the same family.

The approach I've chosen is the easiest to implement because I'm not sure we
need all the complexity other solutions impose. I think Ira suggested to introduce "add operation" it's an idea I've thought about, but it raises the issue of ibnl needing to manage each family. This idea has the benefit if we want to have an overlap between clients, can you think of a use case where different clients need to support the same operation?

I should also mention the option of adding a new family RDMA_NL_LS_IP or something like that. I didn't do that because we are using ibacm to answer the ip->gid requests. Ibacm already listens on a netlink socket for RDMA_NS_LS, so it makes adding Ip->gid to ibacm much easier and nicer if it needs to listen on only one netlink socket.

Quoted 7 lines

It is unfortunate that distro scripts have become such that they break if the kernel changes even something small like dependencies.

Another alternative is to move only the parts of ib_addr that touch netlink into ib_core. Hopefully that doesn't create an empty module.

Jason

Mark
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): VI1PR05MB1391FBF91190C84744581DB8D2480-79XLn2atqDP8GeyK7vyn2tqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#33 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 2 lines · Mark Bloch

Are you talking about the changes in ibnl_add_client? Those changes were because of a different module (ib_sa.ko)

Bleck, why is this such a mess? Can't you get everything into one module so we don't need this dynamic stuff??

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20160517165647.GB19976-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org

#35 lore raw

RE: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 9 lines

-----Original Message-----
From: Jason Gunthorpe [mailto:jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org]
Sent: Tuesday, May 17, 2016 7:57 PM
To: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>
Cc: Doug Ledford <[email protected]>; [email protected]; linux- [email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address
resolution module into core

Quoted 7 lines
Quoted 2 lines · Mark Bloch

Are you talking about the changes in ibnl_add_client? Those changes were because of a different module (ib_sa.ko)

Bleck, why is this such a mess? Can't you get everything into one module so we don't need this dynamic stuff??

Well, seeing as ib_sa.ko doesn't have to be loaded we will still need A dynamic part somewhere, to handle the registration/deregistration. We will probably need a new module to manage that.
I think this is doable, but do we need it?

I agree there might be a more elegant solution, but I don't see any other modules that will use it. Do we have a use case other than ib_sa/ib_core?

Mark

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#36 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

In reply to a message not in the archive
Quoted 2 lines · Jason Gunthorpe

It is unfortunate that distro scripts have become such that they break if the kernel changes even something small like dependencies.

What script exactly break, btw? We had quite a few module merges / split in other subsystems I contribute to, and they've not been major issues.

Quoted 2 lines

Another alternative is to move only the parts of ib_addr that touch netlink into ib_core. Hopefully that doesn't create an empty module.

Or just create a dummy ib_addr module IFF it really is an issue. --
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#38 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 7 lines · Christoph Hellwig
Quoted 2 lines · Jason Gunthorpe

It is unfortunate that distro scripts have become such that they break if the kernel changes even something small like dependencies.

What script exactly break, btw? We had quite a few module merges / split in other subsystems I contribute to, and they've not been major issues.

Debian Sid works like a charm with/without ib_addr.ko as a separate module. It looks like breakage will be in testing scripts only.

Quoted 6 lines
Quoted 4 lines

Another alternative is to move only the parts of ib_addr that touch netlink into ib_core. Hopefully that doesn't create an empty module.

Or just create a dummy ib_addr module IFF it really is an issue.

#39 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

In reply to a message not in the archive
Quoted 7 lines · Christoph Hellwig
Quoted 2 lines · Jason Gunthorpe

It is unfortunate that distro scripts have become such that they break if the kernel changes even something small like dependencies.

What script exactly break, btw? We had quite a few module merges / split in other subsystems I contribute to, and they've not been major issues.

The Red Hat SysV Init script for the RDMA subsystem on both RHEL and Fedora (prior to the switch over to systemd for the RDMA init, which means EL6 and earlier and I'm not sure when we switched in Fedora, but I'm sure the old SysV init version of the Fedora rdma package is already EOL) and the OFED SysV init script are the two for certain that I know of.

The RDMA subsystem is a bit unique in that the older SysV init scripts allowed a reload operation, and that required removing all the modules and then reinserting them. The more modern systemd unit did away with reload as an option and so it would work fine with the module name change (although it would barf on other more important modules if they changed names, primarily the end modules, such as ucma and friends).

I can't speak to Debian. Among other issues, the only reason this would even possibly be an issue for seemingly older OS releases is if the OS in question still does either an RDMA stack update in a stable kernel (like Red Hat does with all of its releases, including EL 6) or if the older release gets newer kernels (like we do with Fedora, but our Fedora releases short lived and so this isn't a problem there, but I have no knowledge of Debian releases).

Quoted 5 lines
Quoted 3 lines

Another alternative is to move only the parts of ib_addr that touch netlink into ib_core. Hopefully that doesn't create an empty module.

Or just create a dummy ib_addr module IFF it really is an issue.

This is an awful lot of arguing over seemingly nothing. These things were true when I rejected the first patch:

1) It didn't solve any problem. By code inspection, it wouldn't even work to solve the problem that the commit message says it was supposed to solve.
2) It was part of a series that was unrelated to the issue it was supposed to help instead of part of the series that supposedly needed it.
3) It needlessly broke user space scripts (for systems that get updated to modern upstream, which, believe it or not, EL 6 still is included in that...the EL 6.8 update that just went out includes an upstream 4.1 RDMA core subsystem).

If you want me to take the patch, then one of 1? and 2 need to be true:

1a) It needs to actually solve a problem in the patch itself (and the git log should reflect the problem it solves).

1b) It can solve a problem for some other code in the same series as it.

2) The solution must at least be more elegant or appropriate than alternative solutions that don't break user space.

In short, give me actual justification and I'll take it. After all, breaking older init scripts is a pretty minor user space break. But I need *some* justification.

Signature · 2 lines
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD
#40 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

In reply to a message not in the archive
Quoted 45 lines · Doug Ledford
Quoted 30 lines · Leon Romanovsky
Quoted 29 lines · Doug Ledford
Quoted 27 lines · Leon Romanovsky
Quoted 18 lines · Doug Ledford
Quoted 8 lines · Mark Bloch
Quoted 2 lines

But, just as importantly, after reading addr.c to see how it uses the ibnl infrastructure, I don't even see what the original problem can be.

As it stands today:
- ibnl is part of ib_core.
- ib_core needs ib_addr.

So if we add ibnl usage to ib_addr it means ib_addr will need ib_core, which causes a dependency cycle.

Right, but in that case, this patch needs to be part of the series that adds the ibnl support into the ib_addr functionality. Because you split them into separate series, this was a patch looking for a problem to solve and it wasn't clear what it was. If I had taken the other series and not this series, it would have broken things. So please keep patches like this together with the other patches that depend on it.

Quoted 3 lines

That said, I also don't want to redo modules if we don't have to. As my previous email points out, changing modules breaks init scripts and systemd unit files. It is to be avoided when possible.

Sorry,
I was in the mood of fixing things when I wrote and sent this patch. The question is which version will you more likely to accept: this one (remove ib_addr module) or previous one (add ib_netlink module)?

Quoted 5 lines
Quoted 3 lines

Can you build netlink in and then init the ib_addr module after the netlink init is complete? Wouldn't that resolve the dependency ordering issue without changing the module names?

It seems reasonable and we will test it, before reposting.

Thanks.

Quoted 5 lines

However generally speaking, I agree with Jason and Ira that this module (ib_addr.ko) is useless as module and can be part of ib_core.ko.

It doesn't seem as a big deal to fix all that init scripts (remove two lines).

Quoted 7 lines

It's not removing two lines. If someone wants to be able to boot both kernels prior to this change and kernel post this change, they have to now write their script to handle both conditions sanely. And they have to know to do so, where as very often they simply get caught off guard and things are broken for some period of time. If the change to ib_addr actually solved a problem that couldn't be solved otherwise, that would be one thing. But it doesn't. It's a complete no-op.

I think that your position is too tight for not allowing modules restructure. It looks like that this complexity doesn't exist outside testing scripts.

For my testings, I'm using Debian Sid with inbox scripts/packages and it handles correctly IB stack with different kernels and different set of modules.

Quoted 7 lines
Signature · 3 lines
-- 
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD

A message that is not in the archive (sent off-list or not yet received): 20160517054834.GD4662-2ukJVAZIZ/[email protected]

#42 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 10 lines · Leon Romanovsky
Quoted 7 lines · Doug Ledford

It's not removing two lines. If someone wants to be able to boot both kernels prior to this change and kernel post this change, they have to now write their script to handle both conditions sanely. And they have to know to do so, where as very often they simply get caught off guard and things are broken for some period of time. If the change to ib_addr actually solved a problem that couldn't be solved otherwise, that would be one thing. But it doesn't. It's a complete no-op.

Quoted 3 lines

I think that your position is too tight for not allowing modules restructure. It looks like that this complexity doesn't exist outside testing scripts.

No, they were/are production scripts.

Quoted 2 lines

For my testings, I'm using Debian Sid with inbox scripts/packages and it handles correctly IB stack with different kernels and different set of modules.

Does it support reloading the stack and have you tried it if it does?

Signature · 2 lines
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD

A message that is not in the archive (sent off-list or not yet received): 910c3e4c-2427-34c4-cc42-f8e951c7d157-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

#44 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 15 lines · Doug Ledford
Quoted 10 lines · Leon Romanovsky
Quoted 7 lines · Doug Ledford

It's not removing two lines. If someone wants to be able to boot both kernels prior to this change and kernel post this change, they have to now write their script to handle both conditions sanely. And they have to know to do so, where as very often they simply get caught off guard and things are broken for some period of time. If the change to ib_addr actually solved a problem that couldn't be solved otherwise, that would be one thing. But it doesn't. It's a complete no-op.

Quoted 3 lines

I think that your position is too tight for not allowing modules restructure. It looks like that this complexity doesn't exist outside testing scripts.

Quoted 6 lines

No, they were/are production scripts.

Quoted 2 lines

For my testings, I'm using Debian Sid with inbox scripts/packages and it handles correctly IB stack with different kernels and different set of modules.

Does it support reloading the stack and have you tried it if it does?

It is RedHat specific, from my understanding in other distribution there is no special script to reload RDMA, I wrote for myself module reload script for debug.

Quoted 6 lines
Signature · 3 lines
-- 
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD

A message that is not in the archive (sent off-list or not yet received): 20160518044709.GI4662-2ukJVAZIZ/[email protected]

#46 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 18 lines · Leon Romanovsky
Quoted 17 lines · Doug Ledford
Quoted 10 lines · Leon Romanovsky
Quoted 7 lines · Doug Ledford

It's not removing two lines. If someone wants to be able to boot both kernels prior to this change and kernel post this change, they have to now write their script to handle both conditions sanely. And they have to know to do so, where as very often they simply get caught off guard and things are broken for some period of time. If the change to ib_addr actually solved a problem that couldn't be solved otherwise, that would be one thing. But it doesn't. It's a complete no-op.

Quoted 3 lines

I think that your position is too tight for not allowing modules restructure. It looks like that this complexity doesn't exist outside testing scripts.

No, they were/are production scripts.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

For my testings, I'm using Debian Sid with inbox scripts/packages and it handles correctly IB stack with different kernels and different set of modules.

Does it support reloading the stack and have you tried it if it does?

It is RedHat specific, from my understanding in other distribution there is no special script to reload RDMA, I wrote for myself module reload script for debug.

Then I guess I was just nice to developers back in the day.

Signature · 2 lines
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD
#47 lore raw

RE: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

In reply to a message not in the archive
Quoted 12 lines

-----Original Message-----
From: Doug Ledford [mailto:[email protected]]
Sent: Monday, May 16, 2016 8:43 PM
To: [email protected]
Cc: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>; [email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address
resolution module into core
Can you build netlink in and then init the ib_addr module after the
netlink init is complete? Wouldn't that resolve the dependency ordering
issue without changing the module names?

Sorry, but I don't understand what do you mean by this.
If you would like to keep the current module structure (ib_core.ko and ib_addr.ko) The only way to use ibnl from within addr.c is to move the ibnl initialization to addr.c and build netlink.c as part of ib_addr.ko, but it seems kind of strange if ib_addr is responsible to initialize ibnl.

Quoted 5 lines

--
Doug Ledford <[email protected]>

              GPG KeyID: 0E572FDD

Mark
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): VI1PR05MB13915036338162B126E55CC2D2480-79XLn2atqDP8GeyK7vyn2tqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#49 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 12 lines · Mark Bloch
Quoted 12 lines

-----Original Message-----
From: Doug Ledford [mailto:[email protected]]
Sent: Monday, May 16, 2016 8:43 PM
To: [email protected]
Cc: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>; [email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address
resolution module into core
Can you build netlink in and then init the ib_addr module after the
netlink init is complete? Wouldn't that resolve the dependency ordering
issue without changing the module names?

Quoted 5 lines

Sorry, but I don't understand what do you mean by this.
If you would like to keep the current module structure (ib_core.ko and ib_addr.ko) The only way to use ibnl from within addr.c is to move the ibnl initialization to addr.c and build netlink.c as part of ib_addr.ko, but it seems kind of strange if ib_addr is responsible to initialize ibnl.

Not according to what I was looking at. In the original patch, you moved addr.c into ib_core and changed addr_init and addr_cleanup from static to normal. You were then able to control whether the addr code went before or after the netlink code by rearranging the order of init sequences in device.c:ib_core_init(). It is entirely possible that you could leave ib_addr as a module, change addr_init to rdma_addr_init and EXPORT_SYMBOL it, and likewise with the cleanup function, and remove the module_init(addr_init); and module_exit(addr_cleanup); from the addr.c file. This would then allow you to control when ib_addr was inited by adding a call to rdma_addr_init() in device.c:ib_core_init() just like you had in your patch. It would solve the problem and give you complete control while being transparent to user space. This is what I mean:

commit ec5394412286e325b83b6c64d026f4d7bab40ccd

Author: Doug Ledford <[email protected]>
Date:   Tue May 17 11:43:57 2016 -0400

IB/core: change module init ordering

Change ib_addr to be init'ed by ib_core and not by the module load process. This gives us precise controle of when the module is initialized while still preserving the existing module names and load ordering. This is to be backward compatible with existing, older SysV init scripts. When those older systems are dead and gone, we can revisit this and change the module names and load orders however we want.

drivers/infiniband/core/addr.c +5 -1
index 337353d86cfa..fda808546e0e 100644
@@ -634,7 +634,17 @@ static struct notifier_block nb = {
        .notifier_call = netevent_callback
 };
 
-static int __init addr_init(void)
+/*
+ * This is a little unorthodox.  We export our init function so that the
+ * ib_core module can call it at the right time after the other modules
+ * we depend on have registered.  We do this solely because there are some
+ * user space init scripts that expect ib_addr to be loaded prior to

ib_core
+ * and due to recent changes, we need the ib netlink code brought up before
+ * we bring this code up and that code is now in ib_core. When the older
+ * SysV init script systems that have these init scripts are dead and gone,
+ * we can revisit this and possibly just include addr.c in ib_core.
+ */
+int rdma_addr_init(void)

 {
        addr_wq = create_singlethread_workqueue("ib_addr");
        if (!addr_wq)
@@ -644,13 +654,12 @@ static int __init addr_init(void)
        rdma_addr_register_client(&self);
        return 0;

}
+EXPORT_SYMBOL(rdma_addr_init);

-static void __exit addr_cleanup(void)
+void rdma_addr_cleanup(void)

 {
        rdma_addr_unregister_client(&self);
        unregister_netevent_notifier(&nb);
        destroy_workqueue(addr_wq);

}
-
-module_init(addr_init);
-module_exit(addr_cleanup);
+EXPORT_SYMBOL(rdma_addr_cleanup);

(quoted diff) +0 -0

b/drivers/infiniband/core/core_priv.h
index eab32215756b..e0a5187ea98c 100644

drivers/infiniband/core/core_priv.h +0 -0
@@ -137,4 +137,7 @@ static inline bool rdma_is_upper_dev_rcu(struct

net_device *dev,

        return _upper == upper;

}

+int rdma_addr_init(void);
+void rdma_addr_cleanup(void);
+
#endif /* _CORE_PRIV_H */

(quoted diff) +0 -0

b/drivers/infiniband/core/device.c
index 10979844026a..4fdf87a485cc 100644

drivers/infiniband/core/device.c +9 -0
@@ -983,10 +983,18 @@ static int __init ib_core_init(void)
                goto err_sysfs;
        }
 
+       ret = rdma_addr_init();
+       if (ret) {
+               pr_warn("Couldn't init IB address resolution module\n");
+               goto err_ibnl;
+       }
+
        ib_cache_setup();
 
        return 0;
 
+err_ibnl:
+       ibnl_cleanup();
 err_sysfs:
        class_unregister(&ib_class);
 err_comp:
@@ -999,6 +1007,7 @@ err:
 static void __exit ib_core_cleanup(void)
 {
        ib_cache_cleanup();
+       rdma_addr_cleanup();
        ibnl_cleanup();
        class_unregister(&ib_class);
        destroy_workqueue(ib_comp_wq);
Signature · 2 lines
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD

A message that is not in the archive (sent off-list or not yet received): eea7049c-5a27-1498-8e8b-674d69468fbb-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

#51 lore raw

RE: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 154 lines

-----Original Message-----
From: Doug Ledford [mailto:[email protected]]
Sent: Tuesday, May 17, 2016 6:49 PM
To: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>; [email protected]
Cc: [email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address
resolution module into core

Quoted 12 lines · Mark Bloch
Quoted 12 lines

-----Original Message-----
From: Doug Ledford [mailto:[email protected]]
Sent: Monday, May 16, 2016 8:43 PM
To: [email protected]
Cc: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>; [email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address
resolution module into core
Can you build netlink in and then init the ib_addr module after the
netlink init is complete? Wouldn't that resolve the dependency ordering
issue without changing the module names?

Quoted 2 lines

Sorry, but I don't understand what do you mean by this.
If you would like to keep the current module structure (ib_core.ko and

ib_addr.ko)

Quoted 1 line

The only way to use ibnl from within addr.c is to move the ibnl initialization

to addr.c

Quoted 2 lines

and build netlink.c as part of ib_addr.ko, but it seems kind of strange if ib_addr is responsible to initialize ibnl.

Not according to what I was looking at. In the original patch, you moved addr.c into ib_core and changed addr_init and addr_cleanup from static to normal. You were then able to control whether the addr code went before or after the netlink code by rearranging the order of init sequences in device.c:ib_core_init(). It is entirely possible that you could leave ib_addr as a module, change addr_init to rdma_addr_init and EXPORT_SYMBOL it, and likewise with the cleanup function, and remove the module_init(addr_init); and module_exit(addr_cleanup); from the addr.c file. This would then allow you to control when ib_addr was inited by adding a call to rdma_addr_init() in device.c:ib_core_init() just like you had in your patch. It would solve the problem and give you complete control while being transparent to user space. This is what I mean:

commit ec5394412286e325b83b6c64d026f4d7bab40ccd

Author: Doug Ledford <[email protected]>
Date:   Tue May 17 11:43:57 2016 -0400

IB/core: change module init ordering

Change ib_addr to be init'ed by ib_core and not by the module load process. This gives us precise controle of when the module is initialized while still preserving the existing module names and load ordering. This is to be backward compatible with existing, older SysV init scripts. When those older systems are dead and gone, we can revisit this and change the module names and load orders however we want.

drivers/infiniband/core/addr.c +4 -1
index 337353d86cfa..fda808546e0e 100644
@@ -634,7 +634,17 @@ static struct notifier_block nb = {
        .notifier_call = netevent_callback
 };
 
-static int __init addr_init(void)
+/*
+ * This is a little unorthodox.  We export our init function so that the
+ * ib_core module can call it at the right time after the other modules
+ * we depend on have registered.  We do this solely because there are

some
+ * user space init scripts that expect ib_addr to be loaded prior to ib_core
+ * and due to recent changes, we need the ib netlink code brought up before
+ * we bring this code up and that code is now in ib_core. When the older
+ * SysV init script systems that have these init scripts are dead and gone,
+ * we can revisit this and possibly just include addr.c in ib_core.
+ */

drivers/infiniband/core/addr.c +4 -4
+int rdma_addr_init(void)
 {
        addr_wq = create_singlethread_workqueue("ib_addr");
        if (!addr_wq)
@@ -644,13 +654,12 @@ static int __init addr_init(void)
        rdma_addr_register_client(&self);
        return 0;
 }
+EXPORT_SYMBOL(rdma_addr_init);
 
-static void __exit addr_cleanup(void)
+void rdma_addr_cleanup(void)
 {
        rdma_addr_unregister_client(&self);
        unregister_netevent_notifier(&nb);
        destroy_workqueue(addr_wq);
 }
-
-module_init(addr_init);
-module_exit(addr_cleanup);
+EXPORT_SYMBOL(rdma_addr_cleanup);
drivers/infiniband/core/core_priv.h +3 -0
index eab32215756b..e0a5187ea98c 100644
@@ -137,4 +137,7 @@ static inline bool rdma_is_upper_dev_rcu(struct
 net_device *dev,
        return _upper == upper;
 }
 
+int rdma_addr_init(void);
+void rdma_addr_cleanup(void);
+

#endif /* _CORE_PRIV_H */

drivers/infiniband/core/device.c +9 -1
index 10979844026a..4fdf87a485cc 100644
@@ -983,10 +983,18 @@ static int __init ib_core_init(void)
                goto err_sysfs;
        }
 
+       ret = rdma_addr_init();
+       if (ret) {
+               pr_warn("Couldn't init IB address resolution module\n");
+               goto err_ibnl;
+       }
+
        ib_cache_setup();
 
        return 0;
 
+err_ibnl:
+       ibnl_cleanup();
 err_sysfs:
        class_unregister(&ib_class);
 err_comp:
@@ -999,6 +1007,7 @@ err:
 static void __exit ib_core_cleanup(void)
 {
        ib_cache_cleanup();
+       rdma_addr_cleanup();
        ibnl_cleanup();
        class_unregister(&ib_class);
        destroy_workqueue(ib_comp_wq);
 
 
 
--

Doug Ledford <[email protected]>

Quoted 2 lines
              GPG KeyID: 0E572FDD

I'm not sure it will solve the problem. it has been a while since
I've looked into how Linux handles modules so I might be wrong, but:
When we build a module that has to use a symbol from a different module
The symbol is unresolved (in has no address in the .ko file) the moment we load the module, The kernel searches for the address of the symbol, maps the module into memory and writes the correct address.

Now in our case, verbs.c is part of ib_core.ko, and it uses rdma_addr_find_l2_eth_by_grh (which is in addr.c, part of ib_addr.ko) So the moment we try to load ib_core we need to have ib_addr already in memory (because we need the address of rdma_addr_find_l2_eth_by_grh) modprobe knows about that (because it sees there is a dependency between ib_core and ib_addr) so it tries to load ib_addr.ko first. ib_addr uses ibnl, so it has an unresolved symbol, which means ib_core.ko needs to be loaded before it, this is why we have a cycle.

After all the theoretical mambo jambo, I had to check it and this is what I got:
Using your code + my ibnl patches, the module_install step fails:

	depmod: ERROR: Found 2 modules in dependency cycles!
	depmod: ERROR: Cycle detected: ib_core -> ib_addr -> ib_core

Mark.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): VI1PR05MB13910C6D09E0B6B9D477B1EAD2490-79XLn2atqDP8GeyK7vyn2tqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#53 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 163 lines · Mark Bloch
Quoted 154 lines

-----Original Message-----
From: Doug Ledford [mailto:[email protected]]
Sent: Tuesday, May 17, 2016 6:49 PM
To: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>; [email protected]
Cc: [email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address
resolution module into core

Quoted 12 lines · Mark Bloch
Quoted 12 lines

-----Original Message-----
From: Doug Ledford [mailto:[email protected]]
Sent: Monday, May 16, 2016 8:43 PM
To: [email protected]
Cc: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>; [email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address
resolution module into core
Can you build netlink in and then init the ib_addr module after the
netlink init is complete? Wouldn't that resolve the dependency ordering
issue without changing the module names?

Quoted 2 lines

Sorry, but I don't understand what do you mean by this.
If you would like to keep the current module structure (ib_core.ko and

ib_addr.ko)

Quoted 1 line

The only way to use ibnl from within addr.c is to move the ibnl initialization

to addr.c

Quoted 2 lines

and build netlink.c as part of ib_addr.ko, but it seems kind of strange if ib_addr is responsible to initialize ibnl.

Not according to what I was looking at. In the original patch, you moved addr.c into ib_core and changed addr_init and addr_cleanup from static to normal. You were then able to control whether the addr code went before or after the netlink code by rearranging the order of init sequences in device.c:ib_core_init(). It is entirely possible that you could leave ib_addr as a module, change addr_init to rdma_addr_init and EXPORT_SYMBOL it, and likewise with the cleanup function, and remove the module_init(addr_init); and module_exit(addr_cleanup); from the addr.c file. This would then allow you to control when ib_addr was inited by adding a call to rdma_addr_init() in device.c:ib_core_init() just like you had in your patch. It would solve the problem and give you complete control while being transparent to user space. This is what I mean:

commit ec5394412286e325b83b6c64d026f4d7bab40ccd

Author: Doug Ledford <[email protected]>
Date:   Tue May 17 11:43:57 2016 -0400

IB/core: change module init ordering

Change ib_addr to be init'ed by ib_core and not by the module load process. This gives us precise controle of when the module is initialized while still preserving the existing module names and load ordering. This is to be backward compatible with existing, older SysV init scripts. When those older systems are dead and gone, we can revisit this and change the module names and load orders however we want.

drivers/infiniband/core/addr.c +4 -1
index 337353d86cfa..fda808546e0e 100644
@@ -634,7 +634,17 @@ static struct notifier_block nb = {
        .notifier_call = netevent_callback
 };
 
-static int __init addr_init(void)
+/*
+ * This is a little unorthodox.  We export our init function so that the
+ * ib_core module can call it at the right time after the other modules
+ * we depend on have registered.  We do this solely because there are

some
+ * user space init scripts that expect ib_addr to be loaded prior to ib_core
+ * and due to recent changes, we need the ib netlink code brought up before
+ * we bring this code up and that code is now in ib_core. When the older
+ * SysV init script systems that have these init scripts are dead and gone,
+ * we can revisit this and possibly just include addr.c in ib_core.
+ */

drivers/infiniband/core/addr.c +4 -4
+int rdma_addr_init(void)
 {
        addr_wq = create_singlethread_workqueue("ib_addr");
        if (!addr_wq)
@@ -644,13 +654,12 @@ static int __init addr_init(void)
        rdma_addr_register_client(&self);
        return 0;
 }
+EXPORT_SYMBOL(rdma_addr_init);
 
-static void __exit addr_cleanup(void)
+void rdma_addr_cleanup(void)
 {
        rdma_addr_unregister_client(&self);
        unregister_netevent_notifier(&nb);
        destroy_workqueue(addr_wq);
 }
-
-module_init(addr_init);
-module_exit(addr_cleanup);
+EXPORT_SYMBOL(rdma_addr_cleanup);
drivers/infiniband/core/core_priv.h +3 -0
index eab32215756b..e0a5187ea98c 100644
@@ -137,4 +137,7 @@ static inline bool rdma_is_upper_dev_rcu(struct
 net_device *dev,
        return _upper == upper;
 }
 
+int rdma_addr_init(void);
+void rdma_addr_cleanup(void);
+

#endif /* _CORE_PRIV_H */

drivers/infiniband/core/device.c +9 -1
index 10979844026a..4fdf87a485cc 100644
@@ -983,10 +983,18 @@ static int __init ib_core_init(void)
                goto err_sysfs;
        }
 
+       ret = rdma_addr_init();
+       if (ret) {
+               pr_warn("Couldn't init IB address resolution module\n");
+               goto err_ibnl;
+       }
+
        ib_cache_setup();
 
        return 0;
 
+err_ibnl:
+       ibnl_cleanup();
 err_sysfs:
        class_unregister(&ib_class);
 err_comp:
@@ -999,6 +1007,7 @@ err:
 static void __exit ib_core_cleanup(void)
 {
        ib_cache_cleanup();
+       rdma_addr_cleanup();
        ibnl_cleanup();
        class_unregister(&ib_class);
        destroy_workqueue(ib_comp_wq);
 
 
 
--

Doug Ledford <[email protected]>

Quoted 2 lines
              GPG KeyID: 0E572FDD

I'm not sure it will solve the problem. it has been a while since
I've looked into how Linux handles modules so I might be wrong, but:
When we build a module that has to use a symbol from a different module
The symbol is unresolved (in has no address in the .ko file) the moment we load the module, The kernel searches for the address of the symbol, maps the module into memory and writes the correct address.

Quoted 3 lines

Now in our case, verbs.c is part of ib_core.ko, and it uses rdma_addr_find_l2_eth_by_grh (which is in addr.c, part of ib_addr.ko) So the moment we try to load ib_core we need to have ib_addr already in memory (because we need the address of rdma_addr_find_l2_eth_by_grh) modprobe knows about that (because it sees there is a dependency between ib_core and ib_addr) so it tries to load ib_addr.ko first.

Yep.

Quoted 1 line

ib_addr uses ibnl, so it has an unresolved symbol,

Yep.

Quoted 7 lines

which means ib_core.ko needs to be loaded before it, this is why we have a cycle.

After all the theoretical mambo jambo, I had to check it and this is what I got:
Using your code + my ibnl patches, the module_install step fails:

	depmod: ERROR: Found 2 modules in dependency cycles!
	depmod: ERROR: Cycle detected: ib_core -> ib_addr -> ib_core

Unless you went back to your original first patch set where ib_netlink was a separate module, then the load order could be ib_netlink -> ib_addr -> ib_core and things would work. Possibly. Depends on whether the ib_netlink module has anything in it that references symbols in ib_core.

Signature · 2 lines
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD

A message that is not in the archive (sent off-list or not yet received): d54c2884-c2e9-8952-75f8-43147943640c-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

#55 lore raw

RE: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 10 lines

-----Original Message-----
From: Doug Ledford [mailto:[email protected]]
Sent: Wednesday, May 18, 2016 5:17 PM
To: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>; [email protected]
Cc: [email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address
resolution module into core

[snip]

Quoted 4 lines

Unless you went back to your original first patch set where ib_netlink was a separate module, then the load order could be ib_netlink -> ib_addr -> ib_core and things would work. Possibly. Depends on whether the ib_netlink module has anything in it that references symbols in ib_core.

Yes, the first version did just that and worked, but then there were comments that we have too many modules and I shouldn't add another one.

V0 adds a new kernel module (ib_netlink.ko ) but leaves ib_core and ib_addr modules unchanged. I also have a version with Leon's patch
that eliminates ib_addr.ko and doesn't add a new module.

Would you like me to submit a new version (with Leon's patch) or the review can continue with V0?

Quoted 4 lines

--
Doug Ledford <[email protected]>

              GPG KeyID: 0E572FDD

Mark

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): VI1PR05MB1391C3E551DDAEA3ABFE71FFD2490-79XLn2atqDP8GeyK7vyn2tqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#57 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 15 lines · Mark Bloch
Quoted 10 lines

-----Original Message-----
From: Doug Ledford [mailto:[email protected]]
Sent: Wednesday, May 18, 2016 5:17 PM
To: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>; [email protected]
Cc: [email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address
resolution module into core

[snip]

Quoted 4 lines

Unless you went back to your original first patch set where ib_netlink was a separate module, then the load order could be ib_netlink -> ib_addr -> ib_core and things would work. Possibly. Depends on whether the ib_netlink module has anything in it that references symbols in ib_core.

Quoted 8 lines

Yes, the first version did just that and worked, but then there were comments that we have too many modules and I shouldn't add another one.

V0 adds a new kernel module (ib_netlink.ko ) but leaves ib_core and ib_addr modules unchanged. I also have a version with Leon's patch
that eliminates ib_addr.ko and doesn't add a new module.

Would you like me to submit a new version (with Leon's patch) or the review can continue with V0?

One of the things that has come about as a result of this conversation is that EL6 is the only distro to provide the reload capability. I have the ability to make sure it gets updated to account for the module change, so let's move forward with a version that removes ib_addr and moves it into the ib_core and also keep the new ib_netlink stuff in ib_core. So, fewer modules, not more.

Signature · 2 lines
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD

A message that is not in the archive (sent off-list or not yet received): 0558d12b-2646-63b4-89f8-9bf4aba689db-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

#59 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 2 lines · Doug Ledford

moves it into the ib_core and also keep the new ib_netlink stuff in ib_core. So, fewer modules, not more.

What about getting rid of ib_sa as well so we can avoid that dynamic netlink registration patch too?

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20160518171536.GB15170-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org

#61 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 6 lines · Jason Gunthorpe
Quoted 2 lines · Doug Ledford

moves it into the ib_core and also keep the new ib_netlink stuff in ib_core. So, fewer modules, not more.

What about getting rid of ib_sa as well so we can avoid that dynamic netlink registration patch too?

That's fine too.

Signature · 2 lines
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD

A message that is not in the archive (sent off-list or not yet received): fe88d9cc-3d03-030d-c4c9-360ef0ce7067-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

#63 lore raw

RE: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 12 lines

-----Original Message-----
From: Doug Ledford [mailto:[email protected]]
Sent: Wednesday, May 18, 2016 8:59 PM
To: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>; [email protected]; linux- [email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address
resolution module into core

On 05/18/2016 01:15 PM, Jason Gunthorpe wrote:

Quoted 8 lines
Quoted 6 lines · Doug Ledford
Quoted 2 lines

moves it into the ib_core and also keep the new ib_netlink stuff in ib_core. So, fewer modules, not more.

What about getting rid of ib_sa as well so we can avoid that dynamic netlink registration patch too?

That's fine too.

Integrating ib_sa into ib_core also means to do the same for ib_mad.
If you agree with it (ib_sa & ib_mad becoming part of ib_core), I'll create the patches.

Mark
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): VI1PR05MB1391B1C6DFE620C31A6474A0D2490-79XLn2atqDP8GeyK7vyn2tqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#65 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 16 lines · Mark Bloch
Quoted 16 lines

-----Original Message-----
From: Doug Ledford [mailto:[email protected]]
Sent: Wednesday, May 18, 2016 8:59 PM
To: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>; [email protected]; linux- [email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address
resolution module into core

Quoted 4 lines · Jason Gunthorpe
Quoted 2 lines · Doug Ledford

moves it into the ib_core and also keep the new ib_netlink stuff in ib_core. So, fewer modules, not more.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

What about getting rid of ib_sa as well so we can avoid that dynamic netlink registration patch too?

That's fine too.

Integrating ib_sa into ib_core also means to do the same for ib_mad.
If you agree with it (ib_sa & ib_mad becoming part of ib_core), I'll create the patches.

Ira, Hal?

Signature · 2 lines
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD

A message that is not in the archive (sent off-list or not yet received): 561a675d-89d2-e675-cf83-e86ecb7519b6-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org

#67 lore raw

RE: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 20 lines · Mark Bloch
Quoted 19 lines
Quoted 19 lines

-----Original Message-----
From: Doug Ledford [mailto:[email protected]]
Sent: Wednesday, May 18, 2016 8:59 PM
To: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>; [email protected]; linux- [email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address
resolution module into core

Quoted 6 lines · Jason Gunthorpe
Quoted 2 lines · Doug Ledford

moves it into the ib_core and also keep the new ib_netlink stuff in ib_core. So, fewer modules, not more.

What about getting rid of ib_sa as well so we can avoid that dynamic netlink registration patch too?

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

That's fine too.

Integrating ib_sa into ib_core also means to do the same for ib_mad. If you agree with it (ib_sa & ib_mad becoming part of ib_core), I'll create

the patches.

Ira, Hal?

I don't see a problem with that.

Ira

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 2807E5FD2F6FDA4886F6618EAC48510E22EDE332-8k97q/[email protected]

#69 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 21 lines · Ira
Quoted 21 lines · Mark Bloch
Quoted 20 lines
Quoted 20 lines

-----Original Message-----
From: Doug Ledford [mailto:[email protected]]
Sent: Wednesday, May 18, 2016 8:59 PM
To: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>; [email protected]; linux- [email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address
resolution module into core

Quoted 6 lines · Jason Gunthorpe
Quoted 2 lines · Doug Ledford

moves it into the ib_core and also keep the new ib_netlink stuff in ib_core. So, fewer modules, not more.

What about getting rid of ib_sa as well so we can avoid that dynamic netlink registration patch too?

That's fine too.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

Integrating ib_sa into ib_core also means to do the same for ib_mad. If you agree with it (ib_sa & ib_mad becoming part of ib_core), I'll create

the patches.

Ira, Hal?

I don't see a problem with that.

Doug,

Will it be acceptable to you if Mark base his patches on this assumption?

Thanks.

Quoted 3 lines

Ira

A message that is not in the archive (sent off-list or not yet received): 20160523085809.GF25500-2ukJVAZIZ/[email protected]

#71 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 26 lines · Leon Romanovsky
Quoted 25 lines · Ira
Quoted 25 lines · Mark Bloch
Quoted 16 lines
Quoted 16 lines

-----Original Message-----
From: Doug Ledford [mailto:[email protected]]
Sent: Wednesday, May 18, 2016 8:59 PM
To: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>; [email protected]; linux- [email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address
resolution module into core

Quoted 4 lines · Jason Gunthorpe
Quoted 2 lines · Doug Ledford

moves it into the ib_core and also keep the new ib_netlink stuff in ib_core. So, fewer modules, not more.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

What about getting rid of ib_sa as well so we can avoid that dynamic netlink registration patch too?

That's fine too.

Integrating ib_sa into ib_core also means to do the same for ib_mad. If you agree with it (ib_sa & ib_mad becoming part of ib_core), I'll create

the patches.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Ira, Hal?

I don't see a problem with that.

Doug,

Will it be acceptable to you if Mark base his patches on this assumption?

Yes.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#73 lore raw

RE: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 43 lines

-----Original Message-----
From: Doug Ledford [mailto:[email protected]]
Sent: Monday, May 23, 2016 5:06 PM
To: [email protected]; Weiny, Ira <[email protected]>
Cc: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>; Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>; [email protected]; [email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address
resolution module into core

Quoted 18 lines · Leon Romanovsky
Quoted 17 lines · Ira
Quoted 17 lines · Mark Bloch
Quoted 16 lines
Quoted 16 lines

-----Original Message-----
From: Doug Ledford [mailto:[email protected]]
Sent: Wednesday, May 18, 2016 8:59 PM
To: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>; [email protected]; linux- [email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address
resolution module into core

Quoted 4 lines · Jason Gunthorpe
Quoted 2 lines · Doug Ledford

moves it into the ib_core and also keep the new ib_netlink stuff in ib_core. So, fewer modules, not more.

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

What about getting rid of ib_sa as well so we can avoid that dynamic netlink registration patch too?

That's fine too.

Integrating ib_sa into ib_core also means to do the same for ib_mad. If you agree with it (ib_sa & ib_mad becoming part of ib_core), I'll

create

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

the patches.

Ira, Hal?

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

I don't see a problem with that.

Doug,

Will it be acceptable to you if Mark base his patches on this assumption?

Yes.

Actually the new series is already posted,
http://marc.info/?l=linux-rdma&m=146366717406108&w=2
if you can have a look at it'll be great.

Mark
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): VI1PR05MB13910E30E227D4DCDBC19033D24E0-79XLn2atqDP8GeyK7vyn2tqRiQSDpxhJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

#75 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 43 lines · Mark Bloch
Quoted 43 lines

-----Original Message-----
From: Doug Ledford [mailto:[email protected]]
Sent: Monday, May 23, 2016 5:06 PM
To: [email protected]; Weiny, Ira <[email protected]>
Cc: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>; Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>; [email protected]; [email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address
resolution module into core

Quoted 31 lines · Leon Romanovsky
Quoted 30 lines · Ira
Quoted 30 lines · Mark Bloch
Quoted 29 lines
Quoted 20 lines

-----Original Message-----
From: Doug Ledford [mailto:[email protected]]
Sent: Wednesday, May 18, 2016 8:59 PM
To: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>; [email protected]; linux-
[email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate
IB address
resolution module into core

Quoted 6 lines · Jason Gunthorpe
Quoted 3 lines · Doug Ledford

moves it into the ib_core and also keep the new
ib_netlink stuff in
ib_core. So, fewer modules, not more.

Quoted 5 lines
Quoted 3 lines

What about getting rid of ib_sa as well so we can avoid that dynamic
netlink registration patch too?

That's fine too.

Integrating ib_sa into ib_core also means to do the same for ib_mad.
If you agree with it (ib_sa & ib_mad becoming part of ib_core), I'll

Quoted 5 lines
Quoted 5 lines

create

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

the patches.

Ira, Hal?

Having just been through a development of a new HCA from scratch, I found it very useful to have the separation between the core IB functionality and what I perceive as clients of that core infrastructure (ib_mad and ib_sa in particular).

The separation feels natural, and it allows a more piecemeal approach - a device can be loaded and tested with one WR at a time. Once ib_mad gets loaded, a lot of "traffic" is created and just about the whole HCA under development needs to work to support it.

IMHO, if these "clients" gets joined with ib_core, the path for newcomers will be (even) steeper. I would appreciate if that particular separation can be kept. I am fine with the other merges, and it might as well be a good idea to join ib_mad and ib_sa,

Thanks,
Knut Omang
(lead developer of Oracle's new IB HCA, soon to appear here..:-) )

Quoted 14 lines
Quoted 9 lines
Quoted 6 lines
Quoted 1 line

I don't see a problem with that.

Doug,

Will it be acceptable to you if Mark base his patches on this assumption?

Yes.

Actually the new series is already posted,
http://marc.info/?l=linux-rdma&m=146366717406108&w=2
if you can have a look at it'll be great.

Quoted 6 lines

Mark
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected] 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1464586394.13055.426.camel-6miFZF/[email protected]

#77 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 55 lines · Knut Omang
Quoted 43 lines · Mark Bloch
Quoted 43 lines

-----Original Message-----
From: Doug Ledford [mailto:[email protected]]
Sent: Monday, May 23, 2016 5:06 PM
To: [email protected]; Weiny, Ira <[email protected]>
Cc: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>; Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>; [email protected]; [email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address
resolution module into core

Quoted 31 lines · Leon Romanovsky
Quoted 30 lines · Ira
Quoted 30 lines · Mark Bloch
Quoted 29 lines
Quoted 20 lines

-----Original Message-----
From: Doug Ledford [mailto:[email protected]]
Sent: Wednesday, May 18, 2016 8:59 PM
To: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>; [email protected]; linux-
[email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate
IB address
resolution module into core

Quoted 6 lines · Jason Gunthorpe
Quoted 3 lines · Doug Ledford

moves it into the ib_core and also keep the new
ib_netlink stuff in
ib_core. So, fewer modules, not more.

Quoted 5 lines
Quoted 3 lines

What about getting rid of ib_sa as well so we can avoid that dynamic
netlink registration patch too?

That's fine too.

Integrating ib_sa into ib_core also means to do the same for ib_mad.
If you agree with it (ib_sa & ib_mad becoming part of ib_core), I'll

Quoted 5 lines
Quoted 5 lines

create

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

the patches.

Ira, Hal?

Having just been through a development of a new HCA from scratch, I found it very useful to have the separation between the core IB functionality and what I perceive as clients of that core infrastructure (ib_mad and ib_sa in particular).

Quoted 4 lines

The separation feels natural, and it allows a more piecemeal approach - a device can be loaded and tested with one WR at a time. Once ib_mad gets loaded, a lot of "traffic" is created and just about the whole HCA under development needs to work to support it.

Adding new device to IB is not an easy task and we clearly need to improve in that area, however these merges are targeted to the end-user of IB stack which constantly needs to load all these modules.

For the easy development, you can simply revert them in your tree. Hope it helps.

Quoted 9 lines

IMHO, if these "clients" gets joined with ib_core, the path for newcomers will be (even) steeper. I would appreciate if that particular separation can be kept. I am fine with the other merges, and it might as well be a good idea to join ib_mad and ib_sa,

Thanks,
Knut Omang
(lead developer of Oracle's new IB HCA, soon to appear here..:-) )

Terrific,
We are eager to see it.

Quoted 21 lines
Quoted 21 lines
Quoted 10 lines
Quoted 7 lines
Quoted 2 lines

I don't see a problem with that.

Doug,

Will it be acceptable to you if Mark base his patches on this assumption?

Yes.

Actually the new series is already posted,
http://marc.info/?l=linux-rdma&m=146366717406108&w=2
if you can have a look at it'll be great.

Mark
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20160530063349.GA7477-2ukJVAZIZ/[email protected]

#79 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 56 lines · Leon Romanovsky
Quoted 55 lines · Knut Omang
Quoted 43 lines · Mark Bloch
Quoted 43 lines

-----Original Message-----
From: Doug Ledford [mailto:[email protected]]
Sent: Monday, May 23, 2016 5:06 PM
To: [email protected]; Weiny, Ira <[email protected]>
Cc: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>; Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>; [email protected]; [email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address
resolution module into core

Quoted 31 lines · Leon Romanovsky
Quoted 30 lines · Ira
Quoted 30 lines · Mark Bloch
Quoted 29 lines
Quoted 20 lines

-----Original Message-----
From: Doug Ledford [mailto:[email protected]]
Sent: Wednesday, May 18, 2016 8:59 PM
To: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: Mark Bloch <markb-VPRAkNaXOzVWk0Htik3J/[email protected]>; [email protected]; linux-
[email protected]
Subject: Re: [PATCH rdma-next V2 5/5] IB/core: Integrate
IB address
resolution module into core

Quoted 6 lines · Jason Gunthorpe
Quoted 3 lines · Doug Ledford

moves it into the ib_core and also keep the new
ib_netlink stuff in
ib_core. So, fewer modules, not more.

Quoted 5 lines
Quoted 3 lines

What about getting rid of ib_sa as well so we can avoid that dynamic
netlink registration patch too?

That's fine too.

Integrating ib_sa into ib_core also means to do the same for ib_mad.
If you agree with it (ib_sa & ib_mad becoming part of ib_core), I'll

Quoted 5 lines
Quoted 5 lines

create

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

the patches.

Ira, Hal?

Having just been through a development of a new HCA from scratch, I found it very useful to have the separation between the core IB functionality and what I perceive as clients of that core infrastructure (ib_mad and ib_sa in particular).

Quoted 8 lines
Quoted 4 lines

The separation feels natural, and it allows a more piecemeal approach - a device can be loaded and tested with one WR at a time. Once ib_mad gets loaded, a lot of "traffic" is created and just about the whole HCA under development needs to work to support it.

Adding new device to IB is not an easy task and we clearly need to improve in that area, however these merges are targeted to the end-user of IB stack which constantly needs to load all these modules.

In a well configured system, this should all happen automatically - this is why we have udev? End users should never have to struggle at this level.

Quoted 1 line

For the easy development, you can simply revert them in your tree.

:-)
Development and debugging needs aside: Keeping separation between layers is still a good idea IMHO.

Quoted 8 lines

Hope it helps.

Quoted 6 lines

IMHO, if these "clients" gets joined with ib_core, the path for newcomers will be (even) steeper. I would appreciate if that particular separation can be kept. I am fine with the other merges, and it might as well be a good idea to join ib_mad and ib_sa,

Quoted 6 lines
Quoted 3 lines

Thanks,
Knut Omang
(lead developer of Oracle's new IB HCA, soon to appear here..:-) )

Terrific,
We are eager to see it.

Good things come to those who wait :-)
Still playing catch-up with the activity here as is evident from my late comment in this thread..

Knut

Quoted 15 lines
Quoted 15 lines
Quoted 15 lines
Quoted 10 lines
Quoted 7 lines
Quoted 2 lines

I don't see a problem with that.

Doug,

Will it be acceptable to you if Mark base his patches on this assumption?

Yes.

Actually the new series is already posted,
http://marc.info/?l=linux-rdma&m=146366717406108&w=2
if you can have a look at it'll be great.

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

Mark
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected] 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 1464608255.20967.27.camel-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org

#81 lore raw

Re: [PATCH rdma-next V2 5/5] IB/core: Integrate IB address resolution module into core

Quoted 13 lines · Knut Omang
Quoted 8 lines
Quoted 4 lines

The separation feels natural, and it allows a more piecemeal approach - a device can be loaded and tested with one WR at a time. Once ib_mad gets loaded, a lot of "traffic" is created and just about the whole HCA under development needs to work to support it.

Adding new device to IB is not an easy task and we clearly need to improve in that area, however these merges are targeted to the end-user of IB stack which constantly needs to load all these modules.

In a well configured system, this should all happen automatically - this is why we have udev? End users should never have to struggle at this level.

Quoted 5 lines
Quoted 1 line

For the easy development, you can simply revert them in your tree.

:-)
Development and debugging needs aside: Keeping separation between layers is still a good idea IMHO.

We tried it for the first version of IB router patches which required conversion ib_netlink to be a module and found ourselves with bazillion little modules for every file in IB core.

#82 lore raw
In reply to a message not in the archive
Quoted 35 lines · Leon Romanovsky

Hi Doug,

I'm sending to you small collection of trivial fixes to core code.

It fixes forgotten skb release call, potential overrun in CMA/SA, integration of ib_addr.ko into ib_core.ko and one code simplifications which doesn't introduce any code change behavior.

Available in the "topic/fix-core" topic branch of this git repo:

git://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git

Or for browsing:

https://git.kernel.org/cgit/linux/kernel/git/leon/linux-rdma.git/log/?h=topic/fix-core

Changes since v2:
* Removed iwcm_nl_cb_table size initialization

Changes since v1:
* Added Reviewed-by tags
* Revisited titles
* Removed RDMA_NL_RDMA_CM_NUM_OPS and RDMA_NL_LS_NUM_OPS
* Removed useless enumeration value
* Converted ib_addr module to be integral part of ib_core module

Leon Romanovsky (1):
IB/core: Integrate IB address resolution module into core

Mark Bloch (4):
IB/IWPM: Fix a potential skb leak
IB/core: Remove unnecessary check in ibnl_rcv_msg IB/core: Fix a potential array overrun in CMA and SA agent IB/SA: Use correct free function

Quoted 11 lines
 drivers/infiniband/core/Makefile    |  6 ++----
 drivers/infiniband/core/addr.c      | 11 ++---------
 drivers/infiniband/core/cma.c       |  3 ++-
 drivers/infiniband/core/device.c    | 11 ++++++++++-
 drivers/infiniband/core/iwcm.c      |  2 +-
 drivers/infiniband/core/iwpm_util.c |  1 +
 drivers/infiniband/core/netlink.c   |  5 ++---
 drivers/infiniband/core/sa_query.c  |  4 ++--
 include/rdma/ib_addr.h              |  3 +++
 9 files changed, 25 insertions(+), 21 deletions(-)

I've taken the first four of these. I'll respond to the fifth separately.

Signature · 2 lines
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD