Skip to content

Commit cea05ea

Browse files
mustafakismaildledford
authored andcommitted
IB/core: Add flow control to the portmapper netlink calls
During connection establishment with a large number of connections, it is possible that the connection requests might fail. Adding flow control prevents this failure. Change ibnl_unicast to use blocking to enable flow control. Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com> Signed-off-by: Faisal Latif <faisal.latif@intel.com> Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
1 parent 3b8fb4b commit cea05ea

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/infiniband/core/netlink.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,10 @@ static void ibnl_rcv(struct sk_buff *skb)
229229
int ibnl_unicast(struct sk_buff *skb, struct nlmsghdr *nlh,
230230
__u32 pid)
231231
{
232-
return nlmsg_unicast(nls, skb, pid);
232+
int err;
233+
234+
err = netlink_unicast(nls, skb, pid, 0);
235+
return (err < 0) ? err : 0;
233236
}
234237
EXPORT_SYMBOL(ibnl_unicast);
235238

@@ -252,6 +255,7 @@ int __init ibnl_init(void)
252255
return -ENOMEM;
253256
}
254257

258+
nls->sk_sndtimeo = 10 * HZ;
255259
return 0;
256260
}
257261

0 commit comments

Comments
 (0)