Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1559878pxb; Tue, 8 Feb 2022 22:18:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwhWFqLHitTr6Znywx1C4zwpJJv1QYR6hxYXnJNR+5vAYAPyKHIeCFFM7CZmuiVmoUCZQy/ X-Received: by 2002:a05:6a00:841:: with SMTP id q1mr675510pfk.21.1644387482386; Tue, 08 Feb 2022 22:18:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644387482; cv=none; d=google.com; s=arc-20160816; b=sktEkr6qPmdcdxD2+mqArjbQL+zQ6Apr0uU1v7TQftYtCJ/G+N6vn0C/UxTCETy67C vRGhmpA9c26f9GZQhPeyEIuayhpH9uwp9WgOFNvdaSgVvUYCqMjf2x1UWXMBYl5FRo7M HmswfSl4DP34soRZ4xMU2+GAN6EGfYJT4G8Ldw27C/NZQYjpYg9++TDT68WESVsuVdun 9/Ytbw1lkpRTUWPwknK75GQ3QNlYmXUfn0vKrDUbqvZJiBJ/raH12xQ0zJHxUeGXsei8 oK9TSMfhGg/tBvREJAwlGSHZAC4BLQ5s4KK56oDDhBO4wcM0yVoIZFYVfyAHg0BIyjzs enUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=k+mMdNnm7HKFTIrUj1nOK8+X6pCXXVXHw2qYRbBr0ns=; b=TySA+mNtcbdM5clTEBF87eKJgWuAJYcokXlAJLAQM15lYFlMXtR5UpmMUwm8dzVWWF Pf88Bo3ARAu5xTcTvrSNF5Yzb5Wv6/wanfbzEvccjEq424eINDXMpKoQTp8N7sosbA5m KjZQBRovNEscnJXvMsgmqZ4tmiSCkNvcbK+ZYyv3ujPjsF8XxN4xJ8JqV1kxsu/nlkeb xGjv1dPpaMxb2IcICH0qkl2GfBkVr2P8vQ9YDg/yRlp7S4fNSXDotY2XY0E2nGBTC4n9 bkvOju/dvO/tQENl1Hn2VYDBlaskcVT5PD4J/UmhA98q7WQrv/m0u3Bq1ZL/azQjp+vB xnVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=aYA6DM+K; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id k185si15082054pgd.783.2022.02.08.22.18.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 22:18:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=aYA6DM+K; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DA9B1E036C16; Tue, 8 Feb 2022 21:59:24 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240035AbiBGQSJ (ORCPT + 99 others); Mon, 7 Feb 2022 11:18:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1391843AbiBGQEN (ORCPT ); Mon, 7 Feb 2022 11:04:13 -0500 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7BAEC0401D3 for ; Mon, 7 Feb 2022 08:04:06 -0800 (PST) Received: by mail-wr1-x434.google.com with SMTP id c19so10934255wrb.10 for ; Mon, 07 Feb 2022 08:04:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=k+mMdNnm7HKFTIrUj1nOK8+X6pCXXVXHw2qYRbBr0ns=; b=aYA6DM+K1Tui7yR3L3sI6xyVc7mtnVJ1xUcKnoyKYOrjnahOIj93lum+eXnubZ6LoX aA8+AFYjVUJHwNPWZglrDX1OyqtQqxI9laeroTnf4jLEyfPgs5hXzJj3k6AtJbbQyk6G A6M5nv4iYAFdSClItnoUb27mXP4aaql5en2yNrtkuE7KCGeiG4utABA1suD7YKomF+HS +2Y/0O8AWT0+tTOnWMi3LxX+Ug1NNmYu/lDpVwff0f2U21UZyj0OVKL4qgJp7CB6cM7H Uiq+MsPhu40qG+k5U0N/rAfhgR2NZz4NcCaPV4nj7kD+TfIjhFNjOyFT0WE6sbPeojJq p1vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=k+mMdNnm7HKFTIrUj1nOK8+X6pCXXVXHw2qYRbBr0ns=; b=Ops4Uv6mQRLBk4hO7Zf+s+xBINNF7Kq2T/B+LtoiOYh+6zxj7As2gvurdb57uvtlj7 l6UzGHXTUigTVTZDfe6NtfR25jIkv8yOzlldKW09VJa9dYKOpwZpdWYCt0HaLJina1Ge eSfjBsgRYFZaa/3o3ERbG+TWlMZU11HekF8xzjcdFLYMsEfVb3ksAQaouhcLWNQPbn6h UIx1N7Fy3Fh3Txu21r5RPnksyqjdPCnU2WwCFxZE25KjeAco6lVUnPnD67zAy3BLbpXP 6+RR4ravfK7O7MtR8KT525E0SWOgt7El2wQD5c7yPe3extvjXEU3Abp5Tw5UTSpq50KX dgUw== X-Gm-Message-State: AOAM533CYf+j7sG9wO84bsS/c3BIYc7JaWhJp1c5fD/uE8UNESkH83jt K8FnyhbxFfZ3jDe0U72ugV/vzkbHDZg2C6o8kiKZg6tjRO8= X-Received: by 2002:a05:6000:3cf:: with SMTP id b15mr147758wrg.82.1644249845320; Mon, 07 Feb 2022 08:04:05 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Anna Schumaker Date: Mon, 7 Feb 2022 11:03:48 -0500 Message-ID: Subject: Re: Testing Results - Add a tool for using the new sysfs files - rpcctl To: Rahul Rathore Cc: Linux NFS Mailing List , Schumaker Anna Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Hi Rahul, Thanks for testing! On Sat, Feb 5, 2022 at 7:19 AM Rahul Rathore wrote: > > Hello Ana, > > I have done some more testing. > > Kindly look into it. > > Setup > > NFS Server IP:192.168.122.127 > NFS Client IP:192.168.122.125 > > > 1- Transport Viewing > > # ss > Netid State Recv-Q Send-Q Local > Address:Port Peer Address:Port Process > tcp ESTAB 0 0 > 192.168.122.125:872 192.168.122.127:nfs > > > [root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py xprt > xprt 1: tcp, 192.168.122.127, port 0, state , main > Source: (enoent), port 872, Requests: 2 > Congestion: cur 0, win 256, Slots: min 2, max 65536 > Queues: binding 0, sending 0, pending 0, backlog 0, tasks 0 > > > > Here port 0 is seen for Remote which is wrong. It should be nfs(2049). Can I ask what kernel you are running? This was a kernel-side issue that was fixed in v5.15 with this patch: commit 5d46dd04cb68771f77ba66dbf6fd323a4a2ce00d Author: Anna Schumaker Date: Tue Jul 20 16:04:42 2021 -0400 sunrpc: Fix return value of get_srcport() Since bc1c56e9bbe9 transport->srcport may by unset, causing get_srcport() to return 0 when called. Fix this by querying the port from the underlying socket instead of the transport. Fixes: bc1c56e9bbe9 (SUNRPC: prevent port reuse on transports which don't request it) Signed-off-by: Anna Schumaker > > And I guess the name is also wrong. it should not be enoent. It should be > ens3. enoent in this case means the file it was trying to read doesn't exist. Probably you need this patch (also in v5.15): commit e44773daf851dc2755144355723c1c305e7246a1 Author: Anna Schumaker Date: Thu Jul 29 16:45:23 2021 -0400 SUNRPC: Add srcaddr as a file in sysfs I don't support changing it right now, but it could be useful information for clients with multiple network cards. Signed-off-by: Anna Schumaker > > > 2- I made the NIC down on the Server. And can see call traces as in the > attached image. (taken from console so can't paste here) I think this was the same bug that was fixed with this patch (which went into v5.15-rc3): commit 17f09d3f619a7ad2d2b021b4e5246f08225b1b0f Author: Anna Schumaker Date: Thu Oct 28 15:17:41 2021 -0400 SUNRPC: Check if the xprt is connected before handling sysfs reads xprts don't immediately reconnect when changing the "dstaddr" property, instead this gets handled the next time an operation uses the transport. This could lead to NULL pointer dereferences when trying to read sysfs files between the disconnect and reconnect operations. Fix this by returning an error if the xprt is not connected. Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust > > 3- By client I understand RPC Client and if I tune the value of > tcp_slot_table_entries I should see an increase in number of RPC Client as > I would increase parallel connection of RPC Clients. I don't remember offhand how using the tcp_slot_table_entries works for increasing RPC clients, so there might be some other trigger you're missing. Try using the nconnect=N mount option instead, since extra connections are set up at mount time. > > # ./tools/rpcctl/rpcctl.py client > client 0: switch 0, xprts 1, active 1, queue 0 > xprt 1: tcp, 192.168.122.127 [main] > client 3: switch 0, xprts 1, active 1, queue 0 > xprt 1: tcp, 192.168.122.127 [main] > # sysctl -a | grep tcp_slot_table_entries > sunrpc.tcp_slot_table_entries = 2 > > [root@rrathore-upstream-sysfs nfs-utils]# sysctl -w > sunrpc.tcp_slot_table_entries=8 > sunrpc.tcp_slot_table_entries = 8 > [root@rrathore-upstream-sysfs nfs-utils]# > [root@rrathore-upstream-sysfs nfs-utils]# sysctl -a | grep > tcp_slot_table_entries > sunrpc.tcp_slot_table_entries = 8 > [root@rrathore-upstream-sysfs nfs-utils]# > [root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py client > <----------------------- Change in value of tcp_slot_table_entries doesn't > seem to have an effect > client 0: switch 0, xprts 1, active 1, queue 0 > xprt 1: tcp, 192.168.122.127 [main] > client 3: switch 0, xprts 1, active 1, queue 0 > xprt 1: tcp, 192.168.122.127 [main] > > Later I started nfs and used this server as an NFS Server, then I could see > an increase in number. > > # ./tools/rpcctl/rpcctl.py client > client 0: switch 0, xprts 1, active 1, queue 0 > xprt 1: tcp, 192.168.122.127 [main] > client 1: switch 1, xprts 1, active 1, queue 0 > xprt 0: local, /var/run/rpcbind.sock [main] > client 2: switch 1, xprts 1, active 1, queue 0 > xprt 0: local, /var/run/rpcbind.sock [main] > client 3: switch 0, xprts 1, active 1, queue 0 > xprt 1: tcp, 192.168.122.127 [main] > client 4: switch 2, xprts 1, active 1, queue 0 > xprt 2: local, /var/run/gssproxy.sock [main] > client 5: switch 3, xprts 1, active 1, queue 0 > xprt 3: tcp, 192.168.122.29 [main] > > > 4- I am not sure if I am making a mistake or if it's the error due to which > value is not getting set. > > [root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py xprt > xprt 0: local, /var/run/rpcbind.sock, port 0, state , main > Source: (enoent), port 0, Requests: 8 > Congestion: cur 0, win 256, Slots: min 8, max 65536 > Queues: binding 0, sending 0, pending 0, backlog 0, tasks 0 > xprt 1: tcp, 192.168.122.127, port 0, state , main > Source: (enoent), port 813, Requests: 2 > Congestion: cur 0, win 256, Slots: min 2, max 65536 > Queues: binding 0, sending 0, pending 0, backlog 0, tasks 0 > xprt 2: local, /var/run/gssproxy.sock, port 0, state , main > Source: (enoent), port 0, Requests: 8 > Congestion: cur 0, win 256, Slots: min 8, max 65536 > Queues: binding 0, sending 0, pending 0, backlog 0, tasks 0 > xprt 3: tcp, 192.168.122.29, port 0, state , main > Source: (enoent), port 0, Requests: 8 > Congestion: cur 0, win 256, Slots: min 8, max 8 > Queues: binding 0, sending 0, pending 0, backlog 0, tasks 0 > > *None of the operation work* > > [root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py xprt set > -h > usage: rpcctl.py xprt set [-h] --id ID [--dstaddr dstaddr] [--offline] > [--online] [--remove] > > options: > -h, --help show this help message and exit > --id ID Id of a specific xprt to modify > --dstaddr dstaddr New dstaddr to set > --offline Set an xprt offline > --online Set an offline xprt back online > --remove Remove an xprt > [root@rrathore-upstream-sysfs nfs-utils]# > [root@rrathore-upstream-sysfs nfs-utils]# > [root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py xprt set > --id 3 --offline > [Errno 22] Invalid argument > [root@rrathore-upstream-sysfs nfs-utils]# > [root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py xprt set > --id 3 192.168.122.29 --offline > usage: rpcctl.py [-h] {client,switch,xprt} ... > rpcctl.py: error: unrecognized arguments: 192.168.122.29 > [root@rrathore-upstream-sysfs nfs-utils]# > [root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py xprt set > --id 3 --dstaddr 192.168.122.29 --offline > [Errno 95] Operation not supported > [root@rrathore-upstream-sysfs nfs-utils]# > [root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py xprt set > --id 3 --dstaddr 192.168.122.29 --online > [Errno 95] Operation not supported > [root@rrathore-upstream-sysfs nfs-utils]# > [root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py xprt set > --id 3 --dstaddr 192.168.122.29 --remove > [Errno 95] Operation not supported > [root@rrathore-upstream-sysfs nfs-utils]# > [root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py xprt set > --id 1 --dstaddr 192.168.122.127 --offline > [Errno 22] Invalid argument > [root@rrathore-upstream-sysfs nfs-utils]# > [root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py xprt set > --id 1 --offline > [Errno 22] Invalid argument The commands themselves look okay. Can you update to a kernel that has the other fixes and let me know if it's still a problem? Thanks, Anna > > > 5-* And it's similar If I do with switch* > > [root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py switch > switch 0: xprts 1, active 1, queue 0 > xprt 1: tcp, 192.168.122.127 [main] > switch 1: xprts 1, active 1, queue 0 > xprt 0: local, /var/run/rpcbind.sock [main] > switch 2: xprts 1, active 1, queue 0 > xprt 2: local, /var/run/gssproxy.sock [main] > switch 3: xprts 1, active 1, queue 0 > xprt 3: tcp, 192.168.122.29 [main] > > [root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py switch > set --id 3 --dstaddr 192.168.122.30 > [Errno 95] Operation not supported > [root@rrathore-upstream-sysfs nfs-utils]# > [root@rrathore-upstream-sysfs nfs-utils]# ./tools/rpcctl/rpcctl.py switch > set --id 3 --dstaddr 192.168.122.29 > [Errno 95] Operation not supported > > Regards, > Rahul