From patchwork Thu Sep 15 14:57:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 9333969 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 39965607FD for ; Thu, 15 Sep 2016 14:58:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E839298E6 for ; Thu, 15 Sep 2016 14:58:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 235AF298F9; Thu, 15 Sep 2016 14:58:03 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 0F751298E6 for ; Thu, 15 Sep 2016 14:58:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751469AbcIOO57 (ORCPT ); Thu, 15 Sep 2016 10:57:59 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:35402 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751085AbcIOO56 (ORCPT ); Thu, 15 Sep 2016 10:57:58 -0400 Received: by mail-it0-f66.google.com with SMTP id e20so4697293itc.2; Thu, 15 Sep 2016 07:57:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:from:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=McCvA1J8RlO/u/sbQ4cgbW0ex6b5NoJNV7ZpDUzYd2Q=; b=EE41AkbXKNwmr5YTZW700xMmIyjekAmFFXFPVLiMm0cK226A20V1+cKKshchFrKO2i IXbHlzqVKQGWWRr5Gp1tEZwka2oLRzF+kke5gX65NrVAHtzw6LLavRWaVmWW6WChETZW IxgStJ+17ZXcIb6f6Y7ha9YbRkgtk9yxy3ihnmOSYM6cWCFUa6M1tBLBjFGJ4yYD5jdr rtNLHqDpnqt4+NR5OS1At5Usf0uYVdGz2axj3g+nJuuyl/6iygjrHDD7Jr2x74aCXOD9 w0QBHBTwjBZnFOaA8a3IxH+aGTw7h+yuif8hhqSZnj7hLyXe2oLEI61wEz/SKRdHxK4/ w6Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:from:to:cc:date:message-id :in-reply-to:references:user-agent:mime-version :content-transfer-encoding; bh=McCvA1J8RlO/u/sbQ4cgbW0ex6b5NoJNV7ZpDUzYd2Q=; b=kww/U8uh5EWfuFStlktM4z0jiBeDaU5dp4MvHFy7P62RTjX/yNY/9T9NiY7n9o1sGS CotwyW7eabJgvC+BUj+plcCz5FAChmOS2huavkoomhsZ7cPsBHgjq/WrcYKM2m5VpQdD uFpebYy6/G5wkN2dRnMrQODBkCpTLdZ3MYDCk8BZ6F7jz9MOVKG6SNEziFGElSWcagXn n1jeFZ7mKbFC5KeuC7BEjLF3YOuxYO1CHtQfdHQop9tyeB8kCyws5h0T08qnCdXHdq3g E3GzLEDbenlu1LzkFpGKMyytWd1ZN/wdgIKvoqrytUgD1oGN79mp1VumLhkG4d8Z5Zmq z8pw== X-Gm-Message-State: AE9vXwPvn2Yve9b5/iHwp7A7Bwr0lBzgDjTMk/Lev0ArZCPloL5+5Mc6KBc8hGR06VUOUg== X-Received: by 10.107.151.198 with SMTP id z189mr17028951iod.39.1473951478206; Thu, 15 Sep 2016 07:57:58 -0700 (PDT) Received: from manet.1015granger.net ([2604:8800:100:81fc:ec4:7aff:fe6c:1dce]) by smtp.gmail.com with ESMTPSA id l15sm1809278ioe.14.2016.09.15.07.57.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Sep 2016 07:57:57 -0700 (PDT) Subject: [PATCH v3 22/22] xprtrdma: Eliminate rpcrdma_receive_worker() From: Chuck Lever To: anna.schumaker@netapp.com Cc: linux-rdma@vger.kernel.org, linux-nfs@vger.kernel.org Date: Thu, 15 Sep 2016 10:57:57 -0400 Message-ID: <20160915145757.11080.61796.stgit@manet.1015granger.net> In-Reply-To: <20160915143440.11080.89241.stgit@manet.1015granger.net> References: <20160915143440.11080.89241.stgit@manet.1015granger.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Clean up: the extra layer of indirection doesn't add value. Signed-off-by: Chuck Lever --- net/sunrpc/xprtrdma/rpc_rdma.c | 4 +++- net/sunrpc/xprtrdma/verbs.c | 11 +---------- net/sunrpc/xprtrdma/xprt_rdma.h | 2 +- 3 files changed, 5 insertions(+), 12 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" 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/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c index 63bf011..d987c2d 100644 --- a/net/sunrpc/xprtrdma/rpc_rdma.c +++ b/net/sunrpc/xprtrdma/rpc_rdma.c @@ -977,8 +977,10 @@ rpcrdma_conn_func(struct rpcrdma_ep *ep) * allowed to timeout, to discover the errors at that time. */ void -rpcrdma_reply_handler(struct rpcrdma_rep *rep) +rpcrdma_reply_handler(struct work_struct *work) { + struct rpcrdma_rep *rep = + container_of(work, struct rpcrdma_rep, rr_work); struct rpcrdma_msg *headerp; struct rpcrdma_req *req; struct rpc_rqst *rqst; diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index 48a2b67..cbab98b 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c @@ -129,15 +129,6 @@ rpcrdma_wc_send(struct ib_cq *cq, struct ib_wc *wc) wc->status, wc->vendor_err); } -static void -rpcrdma_receive_worker(struct work_struct *work) -{ - struct rpcrdma_rep *rep = - container_of(work, struct rpcrdma_rep, rr_work); - - rpcrdma_reply_handler(rep); -} - /* Perform basic sanity checking to avoid using garbage * to update the credit grant value. */ @@ -919,7 +910,7 @@ rpcrdma_create_rep(struct rpcrdma_xprt *r_xprt) rep->rr_device = ia->ri_device; rep->rr_cqe.done = rpcrdma_wc_receive; rep->rr_rxprt = r_xprt; - INIT_WORK(&rep->rr_work, rpcrdma_receive_worker); + INIT_WORK(&rep->rr_work, rpcrdma_reply_handler); rep->rr_recv_wr.next = NULL; rep->rr_recv_wr.wr_cqe = &rep->rr_cqe; rep->rr_recv_wr.sg_list = &rep->rr_rdmabuf->rg_iov; diff --git a/net/sunrpc/xprtrdma/xprt_rdma.h b/net/sunrpc/xprtrdma/xprt_rdma.h index b2823d9..0d35b76 100644 --- a/net/sunrpc/xprtrdma/xprt_rdma.h +++ b/net/sunrpc/xprtrdma/xprt_rdma.h @@ -535,7 +535,7 @@ rpcrdma_data_dir(bool writing) */ void rpcrdma_connect_worker(struct work_struct *); void rpcrdma_conn_func(struct rpcrdma_ep *); -void rpcrdma_reply_handler(struct rpcrdma_rep *); +void rpcrdma_reply_handler(struct work_struct *); /* * RPC/RDMA protocol calls - xprtrdma/rpc_rdma.c