All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] RDMA/cma: Remove netlink interface of CMA statistics
@ 2017-11-13 14:40 Leon Romanovsky
       [not found] ` <20171113144024.26655-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Leon Romanovsky @ 2017-11-13 14:40 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe, Sean Hefty, Hal Rosenstock
  Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Parav Pandit, Leon Romanovsky

From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

CMA statistics were exposed to users through netlink interface long time
ago, but it wasn't exposed using netlink extensibility approach. The
current implementation was based on struct and not attributes.

Let's remove it, before anyone is actually start to use it and prevents us
to write it properly.

Signed-off-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 drivers/infiniband/core/cma.c     | 82 ---------------------------------------
 drivers/infiniband/core/netlink.c |  4 +-
 include/uapi/rdma/rdma_netlink.h  | 28 +------------
 3 files changed, 3 insertions(+), 111 deletions(-)

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index e79c807e2a4d..e14e1d5024d0 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -4387,84 +4387,6 @@ static void cma_remove_one(struct ib_device *device, void *client_data)
 	kfree(cma_dev);
 }

-static int cma_get_id_stats(struct sk_buff *skb, struct netlink_callback *cb)
-{
-	struct nlmsghdr *nlh;
-	struct rdma_cm_id_stats *id_stats;
-	struct rdma_id_private *id_priv;
-	struct rdma_cm_id *id = NULL;
-	struct cma_device *cma_dev;
-	int i_dev = 0, i_id = 0;
-
-	/*
-	 * We export all of the IDs as a sequence of messages.  Each
-	 * ID gets its own netlink message.
-	 */
-	mutex_lock(&lock);
-
-	list_for_each_entry(cma_dev, &dev_list, list) {
-		if (i_dev < cb->args[0]) {
-			i_dev++;
-			continue;
-		}
-
-		i_id = 0;
-		list_for_each_entry(id_priv, &cma_dev->id_list, list) {
-			if (i_id < cb->args[1]) {
-				i_id++;
-				continue;
-			}
-
-			id_stats = ibnl_put_msg(skb, &nlh, cb->nlh->nlmsg_seq,
-						sizeof *id_stats, RDMA_NL_RDMA_CM,
-						RDMA_NL_RDMA_CM_ID_STATS,
-						NLM_F_MULTI);
-			if (!id_stats)
-				goto out;
-
-			memset(id_stats, 0, sizeof *id_stats);
-			id = &id_priv->id;
-			id_stats->node_type = id->route.addr.dev_addr.dev_type;
-			id_stats->port_num = id->port_num;
-			id_stats->bound_dev_if =
-				id->route.addr.dev_addr.bound_dev_if;
-
-			if (ibnl_put_attr(skb, nlh,
-					  rdma_addr_size(cma_src_addr(id_priv)),
-					  cma_src_addr(id_priv),
-					  RDMA_NL_RDMA_CM_ATTR_SRC_ADDR))
-				goto out;
-			if (ibnl_put_attr(skb, nlh,
-					  rdma_addr_size(cma_dst_addr(id_priv)),
-					  cma_dst_addr(id_priv),
-					  RDMA_NL_RDMA_CM_ATTR_DST_ADDR))
-				goto out;
-
-			id_stats->pid		= id_priv->owner;
-			id_stats->port_space	= id->ps;
-			id_stats->cm_state	= id_priv->state;
-			id_stats->qp_num	= id_priv->qp_num;
-			id_stats->qp_type	= id->qp_type;
-
-			i_id++;
-		}
-
-		cb->args[1] = 0;
-		i_dev++;
-	}
-
-out:
-	mutex_unlock(&lock);
-	cb->args[0] = i_dev;
-	cb->args[1] = i_id;
-
-	return skb->len;
-}
-
-static const struct rdma_nl_cbs cma_cb_table[] = {
-	[RDMA_NL_RDMA_CM_ID_STATS] = { .dump = cma_get_id_stats},
-};
-
 static int cma_init_net(struct net *net)
 {
 	struct cma_pernet *pernet = cma_pernet(net);
@@ -4514,7 +4436,6 @@ static int __init cma_init(void)
 	if (ret)
 		goto err;

-	rdma_nl_register(RDMA_NL_RDMA_CM, cma_cb_table);
 	cma_configfs_init();

 	return 0;
@@ -4531,7 +4452,6 @@ static int __init cma_init(void)
 static void __exit cma_cleanup(void)
 {
 	cma_configfs_exit();
-	rdma_nl_unregister(RDMA_NL_RDMA_CM);
 	ib_unregister_client(&cma_client);
 	unregister_netdevice_notifier(&cma_nb);
 	rdma_addr_unregister_client(&addr_client);
@@ -4540,7 +4460,5 @@ static void __exit cma_cleanup(void)
 	destroy_workqueue(cma_wq);
 }

-MODULE_ALIAS_RDMA_NETLINK(RDMA_NL_RDMA_CM, 1);
-
 module_init(cma_init);
 module_exit(cma_cleanup);
diff --git a/drivers/infiniband/core/netlink.c b/drivers/infiniband/core/netlink.c
index b12e58787c3d..675e31ce8f94 100644
--- a/drivers/infiniband/core/netlink.c
+++ b/drivers/infiniband/core/netlink.c
@@ -58,7 +58,6 @@ EXPORT_SYMBOL(rdma_nl_chk_listeners);
 static bool is_nl_msg_valid(unsigned int type, unsigned int op)
 {
 	static const unsigned int max_num_ops[RDMA_NL_NUM_CLIENTS] = {
-		[RDMA_NL_RDMA_CM] = RDMA_NL_RDMA_CM_NUM_OPS,
 		[RDMA_NL_IWCM] = RDMA_NL_IWPM_NUM_OPS,
 		[RDMA_NL_LS] = RDMA_NL_LS_NUM_OPS,
 		[RDMA_NL_NLDEV] = RDMA_NLDEV_NUM_OPS,
@@ -176,8 +175,7 @@ static int rdma_nl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh,
 		return -EPERM;

 	/* FIXME: Convert IWCM to properly handle doit callbacks */
-	if ((nlh->nlmsg_flags & NLM_F_DUMP) || index == RDMA_NL_RDMA_CM ||
-	    index == RDMA_NL_IWCM) {
+	if ((nlh->nlmsg_flags & NLM_F_DUMP) || index == RDMA_NL_IWCM) {
 		struct netlink_dump_control c = {
 			.dump = cb_table[op].dump,
 		};
diff --git a/include/uapi/rdma/rdma_netlink.h b/include/uapi/rdma/rdma_netlink.h
index 861440a87e7c..feefc94b7502 100644
--- a/include/uapi/rdma/rdma_netlink.h
+++ b/include/uapi/rdma/rdma_netlink.h
@@ -4,8 +4,7 @@
 #include <linux/types.h>

 enum {
-	RDMA_NL_RDMA_CM = 1,
-	RDMA_NL_IWCM,
+	RDMA_NL_IWCM = 2,
 	RDMA_NL_RSVD,
 	RDMA_NL_LS,	/* RDMA Local Services */
 	RDMA_NL_NLDEV,	/* RDMA device interface */
@@ -13,8 +12,7 @@ enum {
 };

 enum {
-	RDMA_NL_GROUP_CM = 1,
-	RDMA_NL_GROUP_IWPM,
+	RDMA_NL_GROUP_IWPM = 2,
 	RDMA_NL_GROUP_LS,
 	RDMA_NL_NUM_GROUPS
 };
@@ -23,17 +21,6 @@ enum {
 #define RDMA_NL_GET_OP(type) (type & ((1 << 10) - 1))
 #define RDMA_NL_GET_TYPE(client, op) ((client << 10) + op)

-enum {
-	RDMA_NL_RDMA_CM_ID_STATS = 0,
-	RDMA_NL_RDMA_CM_NUM_OPS
-};
-
-enum {
-	RDMA_NL_RDMA_CM_ATTR_SRC_ADDR = 1,
-	RDMA_NL_RDMA_CM_ATTR_DST_ADDR,
-	RDMA_NL_RDMA_CM_NUM_ATTR,
-};
-
 /* iwarp port mapper op-codes */
 enum {
 	RDMA_NL_IWPM_REG_PID = 0,
@@ -47,17 +34,6 @@ enum {
 	RDMA_NL_IWPM_NUM_OPS
 };

-struct rdma_cm_id_stats {
-	__u32	qp_num;
-	__u32	bound_dev_if;
-	__u32	port_space;
-	__s32	pid;
-	__u8	cm_state;
-	__u8	node_type;
-	__u8	port_num;
-	__u8	qp_type;
-};
-
 enum {
 	IWPM_NLA_REG_PID_UNSPEC = 0,
 	IWPM_NLA_REG_PID_SEQ,
--
2.15.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [RFC PATCH] RDMA/cma: Remove netlink interface of CMA statistics
       [not found] ` <20171113144024.26655-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
@ 2017-11-13 19:24   ` Jason Gunthorpe
       [not found]     ` <20171113192432.GL6918-uk2M96/98Pc@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Jason Gunthorpe @ 2017-11-13 19:24 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Parav Pandit, Leon Romanovsky

On Mon, Nov 13, 2017 at 04:40:24PM +0200, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> 
> CMA statistics were exposed to users through netlink interface long time
> ago, but it wasn't exposed using netlink extensibility approach. The
> current implementation was based on struct and not attributes.
> 
> Let's remove it, before anyone is actually start to use it and prevents us
> to write it properly.

You should describe why you think it is safe to remove a uAPI from the
kernel in the commit message.. When was it introduced? Why was a uAPI
added with no users??

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC PATCH] RDMA/cma: Remove netlink interface of CMA statistics
       [not found]     ` <20171113192432.GL6918-uk2M96/98Pc@public.gmane.org>
@ 2017-11-14  8:05       ` Leon Romanovsky
       [not found]         ` <20171114080550.GR18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Leon Romanovsky @ 2017-11-14  8:05 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Parav Pandit

[-- Attachment #1: Type: text/plain, Size: 1273 bytes --]

On Mon, Nov 13, 2017 at 12:24:32PM -0700, Jason Gunthorpe wrote:
> On Mon, Nov 13, 2017 at 04:40:24PM +0200, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> >
> > CMA statistics were exposed to users through netlink interface long time
> > ago, but it wasn't exposed using netlink extensibility approach. The
> > current implementation was based on struct and not attributes.
> >
> > Let's remove it, before anyone is actually start to use it and prevents us
> > to write it properly.
>
> You should describe why you think it is safe to remove a uAPI from the
> kernel in the commit message.. When was it introduced? Why was a uAPI
> added with no users??

I didn't want to invest time before I actually see that it is possible.
The purpose of this RFC is to hear feedback and see if anyone cares enough
about that code.

The code was introduced a long time ago [1] as an attempt to provide
netstat-like information. It had simple demo application, which didn't
work for me, before I started to refactor ib_netlink.

Also latest fixes from Parav in the actual callback implementation support
my feelings that the kernel part is broken too.

Is it enough to proceed with the submission of actual patch?

Thanks

>
> Jason

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC PATCH] RDMA/cma: Remove netlink interface of CMA statistics
       [not found]         ` <20171114080550.GR18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-11-14  8:51           ` Or Gerlitz
       [not found]             ` <CAJ3xEMhfdXz8zQFetjQPfe7HZiCi+N0z6r9XSucuTzQo1--PBg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Or Gerlitz @ 2017-11-14  8:51 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Jason Gunthorpe, Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Parav Pandit, Moni Shoua

On Tue, Nov 14, 2017 at 10:05 AM, Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
>
> On Mon, Nov 13, 2017 at 12:24:32PM -0700, Jason Gunthorpe wrote:
> > On Mon, Nov 13, 2017 at 04:40:24PM +0200, Leon Romanovsky wrote:
> > > From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> > >
> > > CMA statistics were exposed to users through netlink interface long time
> > > ago, but it wasn't exposed using netlink extensibility approach. The
> > > current implementation was based on struct and not attributes.
> > >
> > > Let's remove it, before anyone is actually start to use it and prevents us
> > > to write it properly.
> >
> > You should describe why you think it is safe to remove a uAPI from the
> > kernel in the commit message.. When was it introduced? Why was a uAPI
> > added with no users??
>
> I didn't want to invest time before I actually see that it is possible.
> The purpose of this RFC is to hear feedback and see if anyone cares enough
> about that code.
>
> The code was introduced a long time ago [1]


missing ref

>
> as an attempt to provide netstat-like information. It had simple demo application, which didn't
> work for me



what didn't work exactly?

This is UAPI, if you want to remove it, make sure to provide a good
replacement and see
if/what is the upstream procedure for UAPI changes/removals, I guess
there is such, sending
email to a subsystem list doesn't seem enough to me.


>
> before I started to refactor ib_netlink.
>
> Also latest fixes from Parav in the actual callback implementation support
> my feelings that the kernel part is broken too.
>
> Is it enough to proceed with the submission of actual patch?
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC PATCH] RDMA/cma: Remove netlink interface of CMA statistics
       [not found]             ` <CAJ3xEMhfdXz8zQFetjQPfe7HZiCi+N0z6r9XSucuTzQo1--PBg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-11-14  9:56               ` Leon Romanovsky
       [not found]                 ` <20171114095605.GU18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Leon Romanovsky @ 2017-11-14  9:56 UTC (permalink / raw)
  To: Or Gerlitz
  Cc: Jason Gunthorpe, Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Parav Pandit, Moni Shoua

[-- Attachment #1: Type: text/plain, Size: 2783 bytes --]

On Tue, Nov 14, 2017 at 10:51:31AM +0200, Or Gerlitz wrote:
> On Tue, Nov 14, 2017 at 10:05 AM, Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> >
> > On Mon, Nov 13, 2017 at 12:24:32PM -0700, Jason Gunthorpe wrote:
> > > On Mon, Nov 13, 2017 at 04:40:24PM +0200, Leon Romanovsky wrote:
> > > > From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> > > >
> > > > CMA statistics were exposed to users through netlink interface long time
> > > > ago, but it wasn't exposed using netlink extensibility approach. The
> > > > current implementation was based on struct and not attributes.
> > > >
> > > > Let's remove it, before anyone is actually start to use it and prevents us
> > > > to write it properly.
> > >
> > > You should describe why you think it is safe to remove a uAPI from the
> > > kernel in the commit message.. When was it introduced? Why was a uAPI
> > > added with no users??
> >
> > I didn't want to invest time before I actually see that it is possible.
> > The purpose of this RFC is to hear feedback and see if anyone cares enough
> > about that code.
> >
> > The code was introduced a long time ago [1]
>
>
> missing ref

http://linux-rdma.vger.kernel.narkive.com/EMsWPDF2/patch-v4-0-6-ib-netlink-interface-and-rdma-cm-exports

>
> >
> > as an attempt to provide netstat-like information. It had simple demo application, which didn't
> > work for me
>
>
>
> what didn't work exactly?

Started from compilation, continued to wrong data presented.
There is no need to carry 7-years old code, which no one cares about it.

>
> This is UAPI, if you want to remove it, make sure to provide a good
> replacement and see
> if/what is the upstream procedure for UAPI changes/removals,

So, are you going to fight removal of DECnet support from netdev?
https://patchwork.ozlabs.org/patch/837484/
It is going to break user experience of Debian and Ubuntu 9.10 lovers.
http://retrocmp.com/decnet/decnet-on-ubuntu-setup

> I guess there is such, sending
> email to a subsystem list doesn't seem enough to me.

Maybe for you it is not enough, for Linus it is enough and for other
subsystems which removed user visible changes is enough too.
https://patchwork.kernel.org/patch/9788849/
https://www.spinics.net/lists/linux-btrfs/msg66769.html

Thanks

>
>
> >
> > before I started to refactor ib_netlink.
> >
> > Also latest fixes from Parav in the actual callback implementation support
> > my feelings that the kernel part is broken too.
> >
> > Is it enough to proceed with the submission of actual patch?
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC PATCH] RDMA/cma: Remove netlink interface of CMA statistics
       [not found]                 ` <20171114095605.GU18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-11-14 15:23                   ` Jason Gunthorpe
       [not found]                     ` <20171114152350.GA4263-uk2M96/98Pc@public.gmane.org>
  2017-11-14 16:04                   ` Or Gerlitz
  1 sibling, 1 reply; 16+ messages in thread
From: Jason Gunthorpe @ 2017-11-14 15:23 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Or Gerlitz, Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Parav Pandit, Moni Shoua

On Tue, Nov 14, 2017 at 11:56:05AM +0200, Leon Romanovsky wrote:

> > what didn't work exactly?
> 
> Started from compilation, continued to wrong data presented.
> There is no need to carry 7-years old code, which no one cares about it.

If it legiminately doesn't actually work then that is reason enough to
be able to drop a uAPI, IMHO.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC PATCH] RDMA/cma: Remove netlink interface of CMA statistics
       [not found]                 ` <20171114095605.GU18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  2017-11-14 15:23                   ` Jason Gunthorpe
@ 2017-11-14 16:04                   ` Or Gerlitz
       [not found]                     ` <CAJ3xEMhM0xfNxRU+37oWKq_w=MGtE3sUXy38bARgX5-3G9zhvw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  1 sibling, 1 reply; 16+ messages in thread
From: Or Gerlitz @ 2017-11-14 16:04 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Jason Gunthorpe, Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Parav Pandit, Moni Shoua

On Tue, Nov 14, 2017 at 11:56 AM, Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> wrote:
> On Tue, Nov 14, 2017 at 10:51:31AM +0200, Or Gerlitz wrote:

>> what didn't work exactly?

> Started from compilation, continued to wrong data presented.
> There is no need to carry 7-years old code, which no one cares about it.

The cma kernel code doesn't compile for seven years, impossible.. you
are referring maybe to some user-space code. Re presenting wrong data,
again, you mean the user-space code or the kernel code sending wrong
data to user-space? please be precise.

Or.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC PATCH] RDMA/cma: Remove netlink interface of CMA statistics
       [not found]                     ` <CAJ3xEMhM0xfNxRU+37oWKq_w=MGtE3sUXy38bARgX5-3G9zhvw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-11-14 17:35                       ` Leon Romanovsky
       [not found]                         ` <20171114173516.GZ18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Leon Romanovsky @ 2017-11-14 17:35 UTC (permalink / raw)
  To: Or Gerlitz
  Cc: Jason Gunthorpe, Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Parav Pandit, Moni Shoua

[-- Attachment #1: Type: text/plain, Size: 1143 bytes --]

On Tue, Nov 14, 2017 at 06:04:07PM +0200, Or Gerlitz wrote:
> On Tue, Nov 14, 2017 at 11:56 AM, Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> wrote:
> > On Tue, Nov 14, 2017 at 10:51:31AM +0200, Or Gerlitz wrote:
>
> >> what didn't work exactly?
>
> > Started from compilation, continued to wrong data presented.
> > There is no need to carry 7-years old code, which no one cares about it.
>
> The cma kernel code doesn't compile for seven years, impossible.. you
> are referring maybe to some user-space code. Re presenting wrong data,
> again, you mean the user-space code or the kernel code sending wrong
> data to user-space? please be precise.

User-space application didn't compile and kernel sent wrong data.

Can you help me to find an answer to my initial question?
Are you using this CMA netlink interface? yes/no?
Do you know anyone who is using this interface? yes/no?

Thanks

>
> Or.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC PATCH] RDMA/cma: Remove netlink interface of CMA statistics
       [not found]                     ` <20171114152350.GA4263-uk2M96/98Pc@public.gmane.org>
@ 2017-11-14 18:02                       ` Leon Romanovsky
  0 siblings, 0 replies; 16+ messages in thread
From: Leon Romanovsky @ 2017-11-14 18:02 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Or Gerlitz, Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Parav Pandit, Moni Shoua

[-- Attachment #1: Type: text/plain, Size: 778 bytes --]

On Tue, Nov 14, 2017 at 08:23:50AM -0700, Jason Gunthorpe wrote:
> On Tue, Nov 14, 2017 at 11:56:05AM +0200, Leon Romanovsky wrote:
>
> > > what didn't work exactly?
> >
> > Started from compilation, continued to wrong data presented.
> > There is no need to carry 7-years old code, which no one cares about it.
>
> If it legiminately doesn't actually work then that is reason enough to
> be able to drop a uAPI, IMHO.

I'm propose proper patch at -rc1 phase. It will give enough time
to test it and revert before next merge window.

Thanks

>
> Jason
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC PATCH] RDMA/cma: Remove netlink interface of CMA statistics
       [not found]                         ` <20171114173516.GZ18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-11-14 21:05                           ` Or Gerlitz
       [not found]                             ` <CAJ3xEMgJJX0FXMK9Rj=kGmNGkF14tBe03zfwzKHnEEp=cEDVxw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Or Gerlitz @ 2017-11-14 21:05 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Jason Gunthorpe, Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Parav Pandit, Moni Shoua

On Tue, Nov 14, 2017 at 7:35 PM, Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> wrote:
> On Tue, Nov 14, 2017 at 06:04:07PM +0200, Or Gerlitz wrote:
>> On Tue, Nov 14, 2017 at 11:56 AM, Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> wrote:
>> > On Tue, Nov 14, 2017 at 10:51:31AM +0200, Or Gerlitz wrote:
>>
>> >> what didn't work exactly?
>>
>> > Started from compilation, continued to wrong data presented.
>> > There is no need to carry 7-years old code, which no one cares about it.
>>
>> The cma kernel code doesn't compile for seven years, impossible.. you
>> are referring maybe to some user-space code. Re presenting wrong data,
>> again, you mean the user-space code or the kernel code sending wrong
>> data to user-space? please be precise.

> User-space application didn't compile and kernel sent wrong data.

Can you answer my question and point out the code that provides wrong
data to user-space?!

> Can you help me to find an answer to my initial question?
> Are you using this CMA netlink interface?
> Do you know anyone who is using this interface?

The rdma netlink code existed way before you got there and it has
various UAPIs that were/are used by multiple vendors..

AFAIK we had @ Voltaire some management/provisioning SW that used these
CMA UAPIs and I am not sure where did it go after the V-acquisition
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC PATCH] RDMA/cma: Remove netlink interface of CMA statistics
       [not found]                             ` <CAJ3xEMgJJX0FXMK9Rj=kGmNGkF14tBe03zfwzKHnEEp=cEDVxw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-11-15  5:29                               ` Leon Romanovsky
       [not found]                                 ` <20171115052926.GN18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Leon Romanovsky @ 2017-11-15  5:29 UTC (permalink / raw)
  To: Or Gerlitz
  Cc: Jason Gunthorpe, Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Parav Pandit, Moni Shoua

[-- Attachment #1: Type: text/plain, Size: 949 bytes --]

On Tue, Nov 14, 2017 at 11:05:51PM +0200, Or Gerlitz wrote:
> On Tue, Nov 14, 2017 at 7:35 PM, Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> wrote:
>
> > Can you help me to find an answer to my initial question?
> > Are you using this CMA netlink interface?
> > Do you know anyone who is using this interface?
>
> The rdma netlink code existed way before you got there and it has
> various UAPIs that were/are used by multiple vendors..
>
> AFAIK we had @ Voltaire some management/provisioning SW that used these
> CMA UAPIs and I am not sure where did it go after the V-acquisition

I got my answers, you are not using this CMA netlink part and don't know
anyone real with real code who uses.

Thanks


> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC PATCH] RDMA/cma: Remove netlink interface of CMA statistics
       [not found]                                 ` <20171115052926.GN18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-11-15  7:50                                   ` Or Gerlitz
       [not found]                                     ` <CAJ3xEMjrTvY+hq=1Q3tmPk_QiZtpO8dLMmCtrPjJgbtOeiU=6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Or Gerlitz @ 2017-11-15  7:50 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Jason Gunthorpe, Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Parav Pandit, Moni Shoua

On Wed, Nov 15, 2017 at 7:29 AM, Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> wrote:
> On Tue, Nov 14, 2017 at 11:05:51PM +0200, Or Gerlitz wrote:
>> On Tue, Nov 14, 2017 at 7:35 PM, Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> wrote:
>>
>> > Can you help me to find an answer to my initial question?
>> > Are you using this CMA netlink interface?
>> > Do you know anyone who is using this interface?
>>
>> The rdma netlink code existed way before you got there and it has
>> various UAPIs that were/are used by multiple vendors..
>>
>> AFAIK we had @ Voltaire some management/provisioning SW that used these
>> CMA UAPIs and I am not sure where did it go after the V-acquisition
>
> I got my answers, you are not using this CMA netlink part and don't know
> anyone real with real code who uses.

This is UAPI, and you want to delete it, so your job is to go through
all the required
procedures for that.

But before that, you ignored my question asking what is broken in the
current code, please don't.

You can't come to someone's code say it's broken without providing the data
and ask to revert it.

Or.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC PATCH] RDMA/cma: Remove netlink interface of CMA statistics
       [not found]                                     ` <CAJ3xEMjrTvY+hq=1Q3tmPk_QiZtpO8dLMmCtrPjJgbtOeiU=6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-11-16 11:53                                       ` Or Gerlitz
       [not found]                                         ` <CAJ3xEMjst4EaFYfUVwqiOzsh5pVPj85joPYsGsap8p6tQYUwew-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Or Gerlitz @ 2017-11-16 11:53 UTC (permalink / raw)
  To: Doug Ledford, Jason Gunthorpe
  Cc: Sean Hefty, Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	Parav Pandit, Moni Shoua, Leon Romanovsky

On Wed, Nov 15, 2017 at 9:50 AM, Or Gerlitz <gerlitz.or-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> But before that, you ignored my question asking what is broken in the
> current code, please don't.

> You can't come to someone's code say it's broken without providing the data
> and ask to revert it.

Doug, Jason,

I have asked multiple times what is broken in the cma netlink code and
no answer.

Please suggest how to proceed with this patch, there's a claim there
that the code
which is removed has issues but no data is given.

Or.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC PATCH] RDMA/cma: Remove netlink interface of CMA statistics
       [not found]                                         ` <CAJ3xEMjst4EaFYfUVwqiOzsh5pVPj85joPYsGsap8p6tQYUwew-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-11-20 19:41                                           ` Jason Gunthorpe
       [not found]                                             ` <20171120194152.GN29075-uk2M96/98Pc@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Jason Gunthorpe @ 2017-11-20 19:41 UTC (permalink / raw)
  To: Or Gerlitz
  Cc: Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Parav Pandit, Moni Shoua,
	Leon Romanovsky

On Thu, Nov 16, 2017 at 01:53:03PM +0200, Or Gerlitz wrote:
> On Wed, Nov 15, 2017 at 9:50 AM, Or Gerlitz <gerlitz.or-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> 
> > But before that, you ignored my question asking what is broken in the
> > current code, please don't.
> 
> > You can't come to someone's code say it's broken without providing the data
> > and ask to revert it.
> 
> Doug, Jason,
> 
> I have asked multiple times what is broken in the cma netlink code and
> no answer.
> 
> Please suggest how to proceed with this patch, there's a claim there
> that the code
> which is removed has issues but no data is given.

Well, I would like to know the issues as well, as I've already said I
think they should be described in the commit message.

But also, at the RFC stage the onus is on other people, particularly
people that want to keep the feature, to explain where it is being
used and why..

We need to decide if we drop the RFC and fix the implementation, apply
the the RFC, or add a deprecation printk warning, or something..

Please try to be productive here and concentrate on adding information
and not nit-picking the process! We all know removing a uapi is a big
deal.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC PATCH] RDMA/cma: Remove netlink interface of CMA statistics
       [not found]                                             ` <20171120194152.GN29075-uk2M96/98Pc@public.gmane.org>
@ 2017-11-20 22:14                                               ` Or Gerlitz
       [not found]                                                 ` <CAJ3xEMhKEXB3-RJFyEh2dE8dr6OOpQPZ2rJ14MoKQ-2sB0GTXg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 16+ messages in thread
From: Or Gerlitz @ 2017-11-20 22:14 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Parav Pandit, Moni Shoua,
	Leon Romanovsky

On Mon, Nov 20, 2017 at 9:41 PM, Jason Gunthorpe <jgg-uk2M96/98Pc@public.gmane.org> wrote:

> Well, I would like to know the issues as well, as I've already said I
> think they should be described in the commit message.

> But also, at the RFC stage the onus is on other people, particularly
> people that want to keep the feature, to explain where it is being
> used and why..

we did it to allow user space track rdma-cm connections through the rdma
subsystem netlink infra-structure, e.g one can come up with netstat like
reporting of rdma listeners and connections, this is it!

> We need to decide if we drop the RFC and fix the implementation, apply
> the the RFC, or add a deprecation printk warning, or something..

right. To my opinion, if there are issues in the implementation, lets fix them,
I don't see why remove this implementation and replace it with a new one
that does the same thing.

> Please try to be productive here and concentrate on adding information
> and not nit-picking the process! We all know removing a uapi is a big
> deal.

Re usage I provided what I know.

When a patch is sent  to remove code "which has problems" and the author
doesn't provide any information on the nature nor the details of the problems
after being asked three times - what this has to do with nit picking
or processes?
it's something totally different, isn't that?

Or.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [RFC PATCH] RDMA/cma: Remove netlink interface of CMA statistics
       [not found]                                                 ` <CAJ3xEMhKEXB3-RJFyEh2dE8dr6OOpQPZ2rJ14MoKQ-2sB0GTXg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-11-21  5:53                                                   ` Leon Romanovsky
  0 siblings, 0 replies; 16+ messages in thread
From: Leon Romanovsky @ 2017-11-21  5:53 UTC (permalink / raw)
  To: Or Gerlitz
  Cc: Jason Gunthorpe, Doug Ledford, Sean Hefty, Hal Rosenstock,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Parav Pandit, Moni Shoua

[-- Attachment #1: Type: text/plain, Size: 2020 bytes --]

On Tue, Nov 21, 2017 at 12:14:01AM +0200, Or Gerlitz wrote:
> On Mon, Nov 20, 2017 at 9:41 PM, Jason Gunthorpe <jgg-uk2M96/98Pc@public.gmane.org> wrote:
>
> > Well, I would like to know the issues as well, as I've already said I
> > think they should be described in the commit message.
>
> > But also, at the RFC stage the onus is on other people, particularly
> > people that want to keep the feature, to explain where it is being
> > used and why..
>
> we did it to allow user space track rdma-cm connections through the rdma
> subsystem netlink infra-structure, e.g one can come up with netstat like
> reporting of rdma listeners and connections, this is it!

And after 7 years did anyone use it? The answer is no and it is because
this interface was added without any real user space application which
was supposed to use it.

>
> > We need to decide if we drop the RFC and fix the implementation, apply
> > the the RFC, or add a deprecation printk warning, or something..
>
> right. To my opinion, if there are issues in the implementation, lets fix them,
> I don't see why remove this implementation and replace it with a new one
> that does the same thing.

Just looking at the code without deep dive.

1. Lack of extensibility, in case of desire to add new field to
rdma_cm_id_stats, you will need to throw away this struct and add new
netlink attribute.
2. Device list lock for data retrieval - user can prevent device from
recovery (maybe).
3. It doesn't return device ID !!!!!
4. Completely unscalable by sending message per-struct and not using
netlink nested tables.
5. No check of device identifiers -> returns everything.
4. There is no nlmsg_end at the end of message.

Are you going to fix it?

>
> > Please try to be productive here and concentrate on adding information
> > and not nit-picking the process! We all know removing a uapi is a big
> > deal.
>
> Re usage I provided what I know.

It is wishful thinking, I'm interested in real users and real applications.
Do you know about such?

Thanks

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-11-21  5:53 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-13 14:40 [RFC PATCH] RDMA/cma: Remove netlink interface of CMA statistics Leon Romanovsky
     [not found] ` <20171113144024.26655-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-11-13 19:24   ` Jason Gunthorpe
     [not found]     ` <20171113192432.GL6918-uk2M96/98Pc@public.gmane.org>
2017-11-14  8:05       ` Leon Romanovsky
     [not found]         ` <20171114080550.GR18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-11-14  8:51           ` Or Gerlitz
     [not found]             ` <CAJ3xEMhfdXz8zQFetjQPfe7HZiCi+N0z6r9XSucuTzQo1--PBg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-14  9:56               ` Leon Romanovsky
     [not found]                 ` <20171114095605.GU18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-11-14 15:23                   ` Jason Gunthorpe
     [not found]                     ` <20171114152350.GA4263-uk2M96/98Pc@public.gmane.org>
2017-11-14 18:02                       ` Leon Romanovsky
2017-11-14 16:04                   ` Or Gerlitz
     [not found]                     ` <CAJ3xEMhM0xfNxRU+37oWKq_w=MGtE3sUXy38bARgX5-3G9zhvw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-14 17:35                       ` Leon Romanovsky
     [not found]                         ` <20171114173516.GZ18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-11-14 21:05                           ` Or Gerlitz
     [not found]                             ` <CAJ3xEMgJJX0FXMK9Rj=kGmNGkF14tBe03zfwzKHnEEp=cEDVxw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-15  5:29                               ` Leon Romanovsky
     [not found]                                 ` <20171115052926.GN18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-11-15  7:50                                   ` Or Gerlitz
     [not found]                                     ` <CAJ3xEMjrTvY+hq=1Q3tmPk_QiZtpO8dLMmCtrPjJgbtOeiU=6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-16 11:53                                       ` Or Gerlitz
     [not found]                                         ` <CAJ3xEMjst4EaFYfUVwqiOzsh5pVPj85joPYsGsap8p6tQYUwew-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-20 19:41                                           ` Jason Gunthorpe
     [not found]                                             ` <20171120194152.GN29075-uk2M96/98Pc@public.gmane.org>
2017-11-20 22:14                                               ` Or Gerlitz
     [not found]                                                 ` <CAJ3xEMhKEXB3-RJFyEh2dE8dr6OOpQPZ2rJ14MoKQ-2sB0GTXg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-21  5:53                                                   ` Leon Romanovsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.