From patchwork Tue Oct 22 17:43:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13846008 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8AC191BFE1F for ; Tue, 22 Oct 2024 17:43:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729619036; cv=none; b=i6RJlncYX27PuPu3aqXPXiM2nkOUTTtLMaQwXAsWtz6P3SuHQ7FAsFam0SZ2YJEiz8NdRJjk/yWW4LLYIxDGg6En4pyluNsTwYR8AyOqZnov8DBltS3BHrYEjCDEUuDtpF3LhJMjSpAoZEIJ7TQ5fRVYpgga2ukyMjhlOyporTs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729619036; c=relaxed/simple; bh=ONXMGBOwscW3Oa8N9oi6m2dARmqurG+/jgzEWMo28mU=; h=Subject:From:To:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ZoWe5B7g6mjL2iu1t8DImFUugbOgX7RtPg6kmKNuiks5oYwC4OYdu1/FELD5tFuuowEyHkXDKTI+4m6TPnx/oUjQOZo1M9QVyj6dLM+OsyZ2hR/Eg7FNC8lHusjgB2FrvxeQfu5b48k+4hC/WO4I2b+JU2HsCJ7gLboMQQpfywk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pAGpus4n; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pAGpus4n" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1ECA6C4CEC7 for ; Tue, 22 Oct 2024 17:43:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729619036; bh=ONXMGBOwscW3Oa8N9oi6m2dARmqurG+/jgzEWMo28mU=; h=Subject:From:To:Date:In-Reply-To:References:From; b=pAGpus4n/nZnrqsI9h2joIZa7o3r1+lWbSwd4rdJsf/IPjSMvmJEQIGP1oHkAUVK8 bfpbDSvlQsYiDKW39wWyaUvUgqv4ffgbANjvoQ+nAyylkTfGvcgMH+nepM339rXR9G 4fZBRTEg3ww0WXi31xMLew/cAaXgj9wqBh2luWvy0ndYlna+Vn4Ov9mt5a217BjLyE B/oy4I3mKuW65rOkYXWC1228df4XR9Je8ewZe46XwA3zz/anvseG4uQuvcZBYpeD4c 0BEFany1vzEae2t8cNN5qAFDsBpBYRv+FElRD5GQJlXFVK5dBnwHCto6YZpaskkWZh oUdxQw3sytmJQ== Subject: [PATCH 1/4] xdrgen: Remove tracepoint call site From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Tue, 22 Oct 2024 13:43:54 -0400 Message-ID: <172961903460.5686.4793239936310073455.stgit@oracle-102.chuck.lever.oracle.com.nfsv4.dev> In-Reply-To: <172961889678.5686.2180145399460027810.stgit@oracle-102.chuck.lever.oracle.com.nfsv4.dev> References: <172961889678.5686.2180145399460027810.stgit@oracle-102.chuck.lever.oracle.com.nfsv4.dev> User-Agent: StGit/1.5 Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Chuck Lever This tracepoint was a "note to self" and is not operational. It is added only to client-side code, which so far we haven't needed. It will cause immediate breakage once we start generating client code, though, so remove it now. Signed-off-by: Chuck Lever --- .../xdrgen/templates/C/program/decoder/result.j2 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/net/sunrpc/xdrgen/templates/C/program/decoder/result.j2 b/tools/net/sunrpc/xdrgen/templates/C/program/decoder/result.j2 index d304eccb5c40..38c31b3f0589 100644 --- a/tools/net/sunrpc/xdrgen/templates/C/program/decoder/result.j2 +++ b/tools/net/sunrpc/xdrgen/templates/C/program/decoder/result.j2 @@ -13,10 +13,8 @@ static int {{ program }}_xdr_dec_{{ result }}(struct rpc_rqst *req, if (!xdrgen_decode_{{ result }}(xdr, result)) return -EIO; - if (result->stat != nfs_ok) { - trace_nfs_xdr_status(xdr, (int)result->stat); + if (result->stat != nfs_ok) return {{ program }}_stat_to_errno(result->stat); - } {% endif %} return 0; } From patchwork Tue Oct 22 17:44:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13846009 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71C8A1BFE17 for ; Tue, 22 Oct 2024 17:44:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729619043; cv=none; b=E3jQ0IIG8C7ulwze/9inMl9REGztzewn/Zdzu52Zo92WdJCiqcS4zo6G60Syc9AZngP5WlApWjPs3rim6PPt7qTGnmBuF8XC98wqCvVkc6FwMV9eEthZYJ2ba7No8iOE335Xg7ZwN15pq9XYPd9MvUvO+0buB+XCzCIJpdLlpuk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729619043; c=relaxed/simple; bh=ciucI8FvbZPaW0cGf24gBODkR68749MkwTHa0yPrhho=; h=Subject:From:To:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Sj24YjhlnstJ8piqxxk66cfkvskX5pC/mnTfYUxAnKy8nfp7++VAaoWP/6U7Fg+mvUUbHtnmGwk3bWgKdHVQfAlgG1xgOY+BKDmfr/wM1r/5IUV9+bIIQGj0FQhQOVnC0+ezFTyo/3FawQjiStQJUG/nU0pwpdYkHsyBeCq3ARw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bJGXIxFE; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bJGXIxFE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15999C4CEC7 for ; Tue, 22 Oct 2024 17:44:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729619043; bh=ciucI8FvbZPaW0cGf24gBODkR68749MkwTHa0yPrhho=; h=Subject:From:To:Date:In-Reply-To:References:From; b=bJGXIxFE8PA5ymfOK9m8rUAUKCLdSwTYNYR/fv0kaemQN1fWHnH5vTFPNq2saUoU5 JRuZS8n+2p3AW3/rSgSoWxmxE5wBL9u2kfcHM+5PLU8P2uq7b0k7fjQb51HSSqfBrn P67PLV4DU6pGRA/GewNbAqus1jw9rmpUURjt08BOsCOPKKb/8T0WDKtLr+qddDNOqS p/bI5cAOXjis0oS91qij+CXY0pl5OGFxpwj4XpWK0xbkkoqgg0CPiLD78Qpfd1q8uf gJq28qlNSAmvz1CeshiBy29a4k6Lx05nF0Ye/IA/GeveIupa8Ahg0zv1tqpj1em0Wf eWA5aOO3xGFBQ== Subject: [PATCH 2/4] xdrgen: Remove check for "nfs_ok" in C templates From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Tue, 22 Oct 2024 13:44:01 -0400 Message-ID: <172961904156.5686.14525304420262960936.stgit@oracle-102.chuck.lever.oracle.com.nfsv4.dev> In-Reply-To: <172961889678.5686.2180145399460027810.stgit@oracle-102.chuck.lever.oracle.com.nfsv4.dev> References: <172961889678.5686.2180145399460027810.stgit@oracle-102.chuck.lever.oracle.com.nfsv4.dev> User-Agent: StGit/1.5 Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Chuck Lever Obviously, "nfs_ok" is defined only for NFS protocols. Other XDR protocols won't know "nfs_ok" from Adam. Signed-off-by: Chuck Lever --- .../xdrgen/templates/C/program/decoder/result.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/net/sunrpc/xdrgen/templates/C/program/decoder/result.j2 b/tools/net/sunrpc/xdrgen/templates/C/program/decoder/result.j2 index 38c31b3f0589..4ce4cc9fab79 100644 --- a/tools/net/sunrpc/xdrgen/templates/C/program/decoder/result.j2 +++ b/tools/net/sunrpc/xdrgen/templates/C/program/decoder/result.j2 @@ -13,7 +13,7 @@ static int {{ program }}_xdr_dec_{{ result }}(struct rpc_rqst *req, if (!xdrgen_decode_{{ result }}(xdr, result)) return -EIO; - if (result->stat != nfs_ok) + if (result->stat) return {{ program }}_stat_to_errno(result->stat); {% endif %} return 0; From patchwork Tue Oct 22 17:44:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13846010 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E33D1BC078 for ; Tue, 22 Oct 2024 17:44:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729619050; cv=none; b=gVuZkTl2DuiXgMYIYoztQlOhNvYuNmuUgPlLDiZ16q2/HxHBE2ST3fbg4KimUbDQjmCq68790qgfUjMD2Ux6tzvXSx+aPrbtHp/fAaAo3H/UxaIE/sj7vpL7HstRPiGVHvKbDbbZdiV7FYz42QQnX8X8J7M8A8dQe+PhqOx/S+0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729619050; c=relaxed/simple; bh=8QzON+gDjgE+tzljL5mmtNzMvTUXr0Ifdp2X7UBE5uA=; h=Subject:From:To:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=JHxS+25QSCt6UvxWtZ0YszTcHh65TYXkA+YHCZDnc4qpWbHSSJDSOlppkcQSEhgJp720/LQUOGxkIaYKJHoLkc+FRb2Vu3r9EvTHXiT3VQNGludI0UOqtr/HcNV2aDlFcWRlDjxLXEJwB4YYw0V6dh2NcnJBEQiHSHxjhBoAt7A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YGYLWIiC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YGYLWIiC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EEEF9C4CEC3 for ; Tue, 22 Oct 2024 17:44:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729619050; bh=8QzON+gDjgE+tzljL5mmtNzMvTUXr0Ifdp2X7UBE5uA=; h=Subject:From:To:Date:In-Reply-To:References:From; b=YGYLWIiCJjs7VhFoPy4EiFDxNpNDdDcUK58e3ccecuBBF7lfgKJ9RmI0Jej6+Yf/E hy2nW47Lltu9/E4RXh/v54YyW+aYxmvECJnBd0v8EK870gvs8URxyj91jBA8dwibo3 KApxnkWkhv5MR+x7FqKWOoQlD7BzCNlxB2FArMZQBOHpK6rt6nyOfmoewFebz3/PPm VNFIwdlfcwWz2H6V0W0028FrCxKFR5mMELc50PcL8bx9nqxiVy5G1kQztCikghhyzM O0vUqwtw9/nRo8CvK6rbKtnC6NKiA3jkb7UirL/IXshFozOlup/fq1KRUQ88JuJpcD gD48c6Bfa7P9g== Subject: [PATCH 3/4] xdrgen: Update the files included in client-side source code From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Tue, 22 Oct 2024 13:44:08 -0400 Message-ID: <172961904845.5686.11045358540704984065.stgit@oracle-102.chuck.lever.oracle.com.nfsv4.dev> In-Reply-To: <172961889678.5686.2180145399460027810.stgit@oracle-102.chuck.lever.oracle.com.nfsv4.dev> References: <172961889678.5686.2180145399460027810.stgit@oracle-102.chuck.lever.oracle.com.nfsv4.dev> User-Agent: StGit/1.5 Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Chuck Lever In particular, client-side source code needs the definition of "struct rpc_procinfo" and does not want header files that pull in "struct svc_rqst". Otherwise, the source does not compile. Signed-off-by: Chuck Lever --- .../sunrpc/xdrgen/templates/C/source_top/client.j2 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/net/sunrpc/xdrgen/templates/C/source_top/client.j2 b/tools/net/sunrpc/xdrgen/templates/C/source_top/client.j2 index e3a802cbc4d7..c5518c519854 100644 --- a/tools/net/sunrpc/xdrgen/templates/C/source_top/client.j2 +++ b/tools/net/sunrpc/xdrgen/templates/C/source_top/client.j2 @@ -3,6 +3,11 @@ // XDR specification file: {{ filename }} // XDR specification modification time: {{ mtime }} -#include +#include -#include "{{ program }}xdr_gen.h" +#include +#include +#include +#include + +#include From patchwork Tue Oct 22 17:44:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13846011 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C0F81C0DCC for ; Tue, 22 Oct 2024 17:44:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729619057; cv=none; b=Yjm+EI8977mZi1tgFUM0XomPSWWiMjMC04bKFVqnzs7fvuBM0RqZgRkrd9Kv242ucsIztQgrB28J2EVQ/FflXhPcwHxZ82rZwTeD+HvBbwIs40ckg11BENqkisfnh6+1t3euP9A2Sr+xXC1nUUwGCOoSsac2MXKVK4eIex2XYj0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729619057; c=relaxed/simple; bh=0eazUNUpEoRED7PmgB7IN+L1GZnTWcdqEW0tFW7c6jQ=; h=Subject:From:To:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kynWksOgtpwmL9PS7Tf+pgMe6sonqj/zoLyqmfLUPvqCBlX2dj5XFcd03+3d+oNtAK4j/HT1Pad8iI3PUSz79zdFNxbCGPvxjrgcCcvvBoEi/Tk7lzi6GWd3tpgKMdedo3U5xBio7T27MIwn6rfghbsNr9Wasju5dBcqSVFxBT0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TGNYvcwt; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TGNYvcwt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DCA27C4CEC7 for ; Tue, 22 Oct 2024 17:44:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729619057; bh=0eazUNUpEoRED7PmgB7IN+L1GZnTWcdqEW0tFW7c6jQ=; h=Subject:From:To:Date:In-Reply-To:References:From; b=TGNYvcwtFbzeQlH1cbmaien4m6swHCnFYHBvJMJcwCU/K8SUKdQcD2ZExnIXeRQJI +siMil4yyASF+4/R3G25fvdpoBV7CruZ5UExBIYoaULr4Jvo4gUp8e39+/aAkmpW7G 5ehjakMwHwC7xPdnSNyq1X6MbSiums/pi2SeQGviOhND7dsy7sGN/035cn8yrBcfMC JP1k/6F6hlUHl5agw79pJZGzVN9ezPh5RPUEGsNnflrgRIg6m/kMO7t/yRwo3Lq7X0 iQ/7hUrnaakg4kXAzU3sBqAZCPzPzDHmYR4h0u/ub612KtWXcmt8sXBs9e4YBB2T+2 W2B99QnulZKbQ== Subject: [PATCH 4/4] xdrgen: Remove program_stat_to_errno() call sites From: Chuck Lever To: linux-nfs@vger.kernel.org Date: Tue, 22 Oct 2024 13:44:15 -0400 Message-ID: <172961905535.5686.5712413032264720344.stgit@oracle-102.chuck.lever.oracle.com.nfsv4.dev> In-Reply-To: <172961889678.5686.2180145399460027810.stgit@oracle-102.chuck.lever.oracle.com.nfsv4.dev> References: <172961889678.5686.2180145399460027810.stgit@oracle-102.chuck.lever.oracle.com.nfsv4.dev> User-Agent: StGit/1.5 Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Chuck Lever Refactor: Translating an on-the-wire value to a local host errno is architecturally a job for the proc function, not the XDR decoder. Signed-off-by: Chuck Lever --- .../xdrgen/templates/C/program/decoder/result.j2 | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/net/sunrpc/xdrgen/templates/C/program/decoder/result.j2 b/tools/net/sunrpc/xdrgen/templates/C/program/decoder/result.j2 index 4ce4cc9fab79..aa9940e322db 100644 --- a/tools/net/sunrpc/xdrgen/templates/C/program/decoder/result.j2 +++ b/tools/net/sunrpc/xdrgen/templates/C/program/decoder/result.j2 @@ -13,8 +13,6 @@ static int {{ program }}_xdr_dec_{{ result }}(struct rpc_rqst *req, if (!xdrgen_decode_{{ result }}(xdr, result)) return -EIO; - if (result->stat) - return {{ program }}_stat_to_errno(result->stat); {% endif %} return 0; }