From patchwork Mon May 29 08:26:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 9752865 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F1A4A602CC for ; Mon, 29 May 2017 08:26:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1D2F2811E for ; Mon, 29 May 2017 08:26:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D6B662833B; Mon, 29 May 2017 08:26:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 824F82811E for ; Mon, 29 May 2017 08:26:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751057AbdE2I0d (ORCPT ); Mon, 29 May 2017 04:26:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:51068 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750907AbdE2I0d (ORCPT ); Mon, 29 May 2017 04:26:33 -0400 Received: from localhost (unknown [193.47.165.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DC16F23953; Mon, 29 May 2017 08:26:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC16F23953 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=leon@kernel.org From: Leon Romanovsky To: Doug Ledford , Mustafa Ismail , Faisal Latif , Shiraz Saleem Cc: linux-rdma@vger.kernel.org, Leon Romanovsky Subject: [PATCH rdma-next] Revert "IB/core: Add flow control to the portmapper netlink calls" Date: Mon, 29 May 2017 11:26:24 +0300 Message-Id: <20170529082624.1689-1-leon@kernel.org> X-Mailer: git-send-email 2.12.2 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Leon Romanovsky The commit cea05eadded0 ("IB/core: Add flow control to the portmapper netlink calls") changed netlink to be blocked for all RDMA clients. This workaround worked perfectly for portmapper, but is not correct for the whole NETLINK_RDMA family. The request/response should always be blocking and asynchronous notification should always be non-blocking. It is library and user-space application to chose how to handle recvmgs, as an example see nl_recvmsgs() and nl_socket_set_nonblocking() calls of libnl library. Send timeout is not needed too and can be configured with SO_SNDTIMEO socket option. This reverts commit cea05eadded0d4eb59f7be6e1f1560eb6bfde2bf. Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/netlink.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) -- 2.12.2 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/infiniband/core/netlink.c b/drivers/infiniband/core/netlink.c index b784055423c8..fcc9702efd38 100644 --- a/drivers/infiniband/core/netlink.c +++ b/drivers/infiniband/core/netlink.c @@ -230,10 +230,7 @@ static void ibnl_rcv(struct sk_buff *skb) int ibnl_unicast(struct sk_buff *skb, struct nlmsghdr *nlh, __u32 pid) { - int err; - - err = netlink_unicast(nls, skb, pid, 0); - return (err < 0) ? err : 0; + return nlmsg_unicast(nls, skb, pid); } EXPORT_SYMBOL(ibnl_unicast); @@ -256,7 +253,6 @@ int __init ibnl_init(void) return -ENOMEM; } - nls->sk_sndtimeo = 10 * HZ; return 0; }