* [PATCH rdma-next v2] RDMA/netlink: Reduce exposure of RDMA netlink functions
@ 2017-05-14 12:49 Leon Romanovsky
[not found] ` <20170514124957.964-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Leon Romanovsky @ 2017-05-14 12:49 UTC (permalink / raw)
To: Doug Ledford
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky, Yuval Shaia
From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
RDMA netlink is part of ib_core, hence ibnl_chk_listeners(),
ibnl_init() and ibnl_cleanup() don't need to be published
in public header file.
Let's remove EXPORT_SYMBOL from ibnl_chk_listeners() and move all these
functions to private header file.
CC: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
Changes from v1:
* Include core_priv.h file and get rid from sparse errors.
Changes from v0:
* Move ibnl_init(), ibnl_cleanup() and ibnl_chk_listeners() functions to private header.
* Change titile and commit message to reflect that change
---
drivers/infiniband/core/core_priv.h | 10 ++++++++++
drivers/infiniband/core/netlink.c | 2 +-
include/rdma/rdma_netlink.h | 10 ----------
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/infiniband/core/core_priv.h b/drivers/infiniband/core/core_priv.h
index cb7d372e4bdf..d92ab4eaa8f3 100644
--- a/drivers/infiniband/core/core_priv.h
+++ b/drivers/infiniband/core/core_priv.h
@@ -169,6 +169,16 @@ void ib_mad_cleanup(void);
int ib_sa_init(void);
void ib_sa_cleanup(void);
+int ibnl_init(void);
+void ibnl_cleanup(void);
+
+/**
+ * Check if there are any listeners to the netlink group
+ * @group: the netlink group ID
+ * Returns 0 on success or a negative for no listeners.
+ */
+int ibnl_chk_listeners(unsigned int group);
+
int ib_nl_handle_resolve_resp(struct sk_buff *skb,
struct netlink_callback *cb);
int ib_nl_handle_set_timeout(struct sk_buff *skb,
diff --git a/drivers/infiniband/core/netlink.c b/drivers/infiniband/core/netlink.c
index 10469b0088b5..de90f5307ac7 100644
--- a/drivers/infiniband/core/netlink.c
+++ b/drivers/infiniband/core/netlink.c
@@ -37,6 +37,7 @@
#include <net/net_namespace.h>
#include <net/sock.h>
#include <rdma/rdma_netlink.h>
+#include "core_priv.h"
struct ibnl_client {
struct list_head list;
@@ -55,7 +56,6 @@ int ibnl_chk_listeners(unsigned int group)
return -1;
return 0;
}
-EXPORT_SYMBOL(ibnl_chk_listeners);
int ibnl_add_client(int index, int nops,
const struct ibnl_client_cbs cb_table[])
diff --git a/include/rdma/rdma_netlink.h b/include/rdma/rdma_netlink.h
index 585266144329..348c102cb5f6 100644
--- a/include/rdma/rdma_netlink.h
+++ b/include/rdma/rdma_netlink.h
@@ -10,9 +10,6 @@ struct ibnl_client_cbs {
struct module *module;
};
-int ibnl_init(void);
-void ibnl_cleanup(void);
-
/**
* Add a a client to the list of IB netlink exporters.
* @index: Index of the added client
@@ -77,11 +74,4 @@ int ibnl_unicast(struct sk_buff *skb, struct nlmsghdr *nlh,
int ibnl_multicast(struct sk_buff *skb, struct nlmsghdr *nlh,
unsigned int group, gfp_t flags);
-/**
- * Check if there are any listeners to the netlink group
- * @group: the netlink group ID
- * Returns 0 on success or a negative for no listeners.
- */
-int ibnl_chk_listeners(unsigned int group);
-
#endif /* _RDMA_NETLINK_H */
--
2.12.2
--
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] 3+ messages in thread
* Re: [PATCH rdma-next v2] RDMA/netlink: Reduce exposure of RDMA netlink functions
[not found] ` <20170514124957.964-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
@ 2017-05-14 18:24 ` Yuval Shaia
2017-06-01 22:17 ` Doug Ledford
0 siblings, 1 reply; 3+ messages in thread
From: Yuval Shaia @ 2017-05-14 18:24 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Doug Ledford, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky
On Sun, May 14, 2017 at 03:49:57PM +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
>
> RDMA netlink is part of ib_core, hence ibnl_chk_listeners(),
> ibnl_init() and ibnl_cleanup() don't need to be published
> in public header file.
>
> Let's remove EXPORT_SYMBOL from ibnl_chk_listeners() and move all these
> functions to private header file.
>
> CC: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---
> Changes from v1:
> * Include core_priv.h file and get rid from sparse errors.
Reviewed-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Changes from v0:
> * Move ibnl_init(), ibnl_cleanup() and ibnl_chk_listeners() functions to private header.
> * Change titile and commit message to reflect that change
> ---
> drivers/infiniband/core/core_priv.h | 10 ++++++++++
> drivers/infiniband/core/netlink.c | 2 +-
> include/rdma/rdma_netlink.h | 10 ----------
> 3 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/infiniband/core/core_priv.h b/drivers/infiniband/core/core_priv.h
> index cb7d372e4bdf..d92ab4eaa8f3 100644
> --- a/drivers/infiniband/core/core_priv.h
> +++ b/drivers/infiniband/core/core_priv.h
> @@ -169,6 +169,16 @@ void ib_mad_cleanup(void);
> int ib_sa_init(void);
> void ib_sa_cleanup(void);
>
> +int ibnl_init(void);
> +void ibnl_cleanup(void);
> +
> +/**
> + * Check if there are any listeners to the netlink group
> + * @group: the netlink group ID
> + * Returns 0 on success or a negative for no listeners.
> + */
> +int ibnl_chk_listeners(unsigned int group);
> +
> int ib_nl_handle_resolve_resp(struct sk_buff *skb,
> struct netlink_callback *cb);
> int ib_nl_handle_set_timeout(struct sk_buff *skb,
> diff --git a/drivers/infiniband/core/netlink.c b/drivers/infiniband/core/netlink.c
> index 10469b0088b5..de90f5307ac7 100644
> --- a/drivers/infiniband/core/netlink.c
> +++ b/drivers/infiniband/core/netlink.c
> @@ -37,6 +37,7 @@
> #include <net/net_namespace.h>
> #include <net/sock.h>
> #include <rdma/rdma_netlink.h>
> +#include "core_priv.h"
>
> struct ibnl_client {
> struct list_head list;
> @@ -55,7 +56,6 @@ int ibnl_chk_listeners(unsigned int group)
> return -1;
> return 0;
> }
> -EXPORT_SYMBOL(ibnl_chk_listeners);
>
> int ibnl_add_client(int index, int nops,
> const struct ibnl_client_cbs cb_table[])
> diff --git a/include/rdma/rdma_netlink.h b/include/rdma/rdma_netlink.h
> index 585266144329..348c102cb5f6 100644
> --- a/include/rdma/rdma_netlink.h
> +++ b/include/rdma/rdma_netlink.h
> @@ -10,9 +10,6 @@ struct ibnl_client_cbs {
> struct module *module;
> };
>
> -int ibnl_init(void);
> -void ibnl_cleanup(void);
> -
> /**
> * Add a a client to the list of IB netlink exporters.
> * @index: Index of the added client
> @@ -77,11 +74,4 @@ int ibnl_unicast(struct sk_buff *skb, struct nlmsghdr *nlh,
> int ibnl_multicast(struct sk_buff *skb, struct nlmsghdr *nlh,
> unsigned int group, gfp_t flags);
>
> -/**
> - * Check if there are any listeners to the netlink group
> - * @group: the netlink group ID
> - * Returns 0 on success or a negative for no listeners.
> - */
> -int ibnl_chk_listeners(unsigned int group);
> -
> #endif /* _RDMA_NETLINK_H */
> --
> 2.12.2
>
--
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] 3+ messages in thread
* Re: [PATCH rdma-next v2] RDMA/netlink: Reduce exposure of RDMA netlink functions
2017-05-14 18:24 ` Yuval Shaia
@ 2017-06-01 22:17 ` Doug Ledford
0 siblings, 0 replies; 3+ messages in thread
From: Doug Ledford @ 2017-06-01 22:17 UTC (permalink / raw)
To: Yuval Shaia, Leon Romanovsky
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Leon Romanovsky
On Sun, 2017-05-14 at 21:24 +0300, Yuval Shaia wrote:
> On Sun, May 14, 2017 at 03:49:57PM +0300, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> >
> > RDMA netlink is part of ib_core, hence ibnl_chk_listeners(),
> > ibnl_init() and ibnl_cleanup() don't need to be published
> > in public header file.
> >
> > Let's remove EXPORT_SYMBOL from ibnl_chk_listeners() and move all
> these
> > functions to private header file.
> >
> > CC: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> > Signed-off-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> > ---
> > Changes from v1:
> > * Include core_priv.h file and get rid from sparse errors.
>
> Reviewed-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Thanks, applied.
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG KeyID: B826A3330E572FDD
Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD
--
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] 3+ messages in thread
end of thread, other threads:[~2017-06-01 22:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-14 12:49 [PATCH rdma-next v2] RDMA/netlink: Reduce exposure of RDMA netlink functions Leon Romanovsky
[not found] ` <20170514124957.964-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-05-14 18:24 ` Yuval Shaia
2017-06-01 22:17 ` Doug Ledford
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.