From patchwork Tue Aug 23 17:55:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 9296135 X-Patchwork-Delegate: Trond.Myklebust@netapp.com 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 4045F60574 for ; Tue, 23 Aug 2016 17:56:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 349CC288B1 for ; Tue, 23 Aug 2016 17:56:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 294A928C8C; Tue, 23 Aug 2016 17:56:51 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable 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 64AA428AE9 for ; Tue, 23 Aug 2016 17:56:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751392AbcHWR4l (ORCPT ); Tue, 23 Aug 2016 13:56:41 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:32835 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932342AbcHWR4j (ORCPT ); Tue, 23 Aug 2016 13:56:39 -0400 Received: by mail-it0-f65.google.com with SMTP id d65so8830004ith.0; Tue, 23 Aug 2016 10:55:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:from:to:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=YmeWplBaNSrc9TiVzJRQEu8cBIBx07IgtqwpipSnyNc=; b=EAzLgYla5zuuozax4pcwadv5Oqxp7iXqBxFsF1OCA7isEE7ZL/doDL6/QoRxSXBG5Z e6LRLKmKGEvzlIAv4CTSIQyLdT4JZDLkqPkyrA4E9OpOdYCXwn7ZzigAxpyH2ChTZA6o XJIOmJ2F+lAFNp8zjnyzne2zhX3scgTwE99O1zBgex9tJOboQf6teSWasn9laJ/5hQyK LdppR2Px4bss/1jz5Lkb+DClC/7J51SW8j/awDnrh5kYyehS78Cwk/xeEhDbE9j8Z8Ip cNNtGHyMeAx/M+C/2yJmIVftlVCvbHySNsHT1stbSHh24mvRI/SSYQrsfW18aIZ1iOmi 9ZWw== 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:date:message-id :in-reply-to:references:user-agent:mime-version :content-transfer-encoding; bh=YmeWplBaNSrc9TiVzJRQEu8cBIBx07IgtqwpipSnyNc=; b=g2KwjOGd4m/lF0nl5Vc77alow48uFagNWWdbBrU20QecaPjSaEpA7YyMgFL+xu//oj Hg0tIYC/mPKXx0qdkEBd1plJdMTh+vPChKIxfHGugrGC1+pkBImJPJ/voA34CqPMJJDS vjm7EfHXDAsKl9FMSxBGwYz4UQHHSSjQxWt3hgRlvJcB+jeMb9taeqmN09W/DGSSa463 /DMxcUx2FSmR/byI3DVN5Ncc8TC29g+Tgz5QhJBOrYiOWgxQ6niwCO1I9p0h6YDYa5as Fc4nztcM1sRfua5PYG+ND55xVkOuqWeLSCCYtofDKwCl9PMpgrgv96GByUwALky4CfAO toUw== X-Gm-Message-State: AEkoouu8svurlU3+tLVus1Z/tv/JzCKFZ/QGEDf1TF7P3YHXokpqbu/v3vU8nle/9Ziihg== X-Received: by 10.107.21.134 with SMTP id 128mr29802694iov.59.1471974904523; Tue, 23 Aug 2016 10:55:04 -0700 (PDT) Received: from manet.1015granger.net ([2604:8800:100:81fc:ec4:7aff:fe6c:1dce]) by smtp.gmail.com with ESMTPSA id 97sm1775828ioi.12.2016.08.23.10.55.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Aug 2016 10:55:04 -0700 (PDT) Subject: [PATCH v2 22/22] xprtrdma: Eliminate rpcrdma_receive_worker() From: Chuck Lever To: linux-rdma@vger.kernel.org, linux-nfs@vger.kernel.org Date: Tue, 23 Aug 2016 13:55:03 -0400 Message-ID: <20160823175503.13038.17633.stgit@manet.1015granger.net> In-Reply-To: <20160823174402.13038.84561.stgit@manet.1015granger.net> References: <20160823174402.13038.84561.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 20115ad..e210fe6 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 83f7886..4a1b341 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c @@ -128,15 +128,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. */ @@ -918,7 +909,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 0278f38..94c7ab5 100644 --- a/net/sunrpc/xprtrdma/xprt_rdma.h +++ b/net/sunrpc/xprtrdma/xprt_rdma.h @@ -534,7 +534,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