Re: [PATCH V3] Add flow control to the portmapper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 28, 2016 at 03:02:26PM -0500, Shiraz Saleem wrote:
> From: Mustafa Ismail <mustafa.ismail@xxxxxxxxx>
> 
> 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@xxxxxxxxx>
> Signed-off-by: Faisal Latif <faisal.latif@xxxxxxxxx>
> Signed-off-by: Shiraz Saleem <shiraz.saleem@xxxxxxxxx>
> ---
> 
> V3: update to use blocking ver. of netlink_unicast() in 
> ibnl_unicast(), instead of creating new function in 
> netlink header for this purpose; as was done in V1.
> 
> V2: update commit message with justification for flow control. 
> CC'ing linux-netdev mailing list.
> 
>  drivers/infiniband/core/netlink.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/core/netlink.c b/drivers/infiniband/core/netlink.c
> index 9b8c20c..a6b3acb 100644
> --- a/drivers/infiniband/core/netlink.c
> +++ b/drivers/infiniband/core/netlink.c
> @@ -229,7 +229,13 @@ static void ibnl_rcv(struct sk_buff *skb)
>  int ibnl_unicast(struct sk_buff *skb, struct nlmsghdr *nlh,
>  			__u32 pid)
>  {
> -	return nlmsg_unicast(nls, skb, pid);
> +	int err;
> +
> +	err = netlink_unicast(nls, skb, pid, 0);
> +	if (err > 0)
> +		err = 0;
> +
> +	return err;

It can be simplified a little bit to remove number of lines.
4 last lines can be replaced to be one in ANSI C.

return (err < 0)?:0;

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux