aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/netlink.c
diff options
context:
space:
mode:
authorIsmail, Mustafa <mustafa.ismail@intel.com>2017-06-28 09:02:45 -0500
committerLeon Romanovsky <leon@kernel.org>2017-08-09 16:08:27 +0300
commit9047811b776ce09ba06623dd2a846cc501f0065b (patch)
treeba825bb42162e4ef38a3db80fb1216b70d392290 /drivers/infiniband/core/netlink.c
parentIB/hfi1: Always perform offline transition (diff)
downloadlinux-dev-9047811b776ce09ba06623dd2a846cc501f0065b.tar.xz
linux-dev-9047811b776ce09ba06623dd2a846cc501f0065b.zip
RDMA/core: Add wait/retry version of ibnl_unicast
Add a wait/retry version of ibnl_unicast, ibnl_unicast_wait, and modify ibnl_unicast to not wait/retry. This eliminates the undesirable wait for future users of ibnl_unicast. Change Portmapper calls originating from kernel to user-space to use ibnl_unicast_wait and take advantage of the wait/retry logic in netlink_unicast. Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com> Signed-off-by: Chien Tin Tung <chien.tin.tung@intel.com> Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/core/netlink.c')
-rw-r--r--drivers/infiniband/core/netlink.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/infiniband/core/netlink.c b/drivers/infiniband/core/netlink.c
index 94931c474d41..0fc50e15ae22 100644
--- a/drivers/infiniband/core/netlink.c
+++ b/drivers/infiniband/core/netlink.c
@@ -232,11 +232,21 @@ int ibnl_unicast(struct sk_buff *skb, struct nlmsghdr *nlh,
{
int err;
- err = netlink_unicast(nls, skb, pid, 0);
+ err = netlink_unicast(nls, skb, pid, MSG_DONTWAIT);
return (err < 0) ? err : 0;
}
EXPORT_SYMBOL(ibnl_unicast);
+int ibnl_unicast_wait(struct sk_buff *skb, struct nlmsghdr *nlh,
+ __u32 pid)
+{
+ int err;
+
+ err = netlink_unicast(nls, skb, pid, 0);
+ return (err < 0) ? err : 0;
+}
+EXPORT_SYMBOL(ibnl_unicast_wait);
+
int ibnl_multicast(struct sk_buff *skb, struct nlmsghdr *nlh,
unsigned int group, gfp_t flags)
{