Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1656270lqp; Mon, 15 Apr 2024 12:51:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWK3h5ZDNOVMWtVMBXya30WHFWJnlnVgjjStLIwE7PhPimT7nHtnFOjrXfEDR+fZyqolSYIrs7x9wOVNQsVZqLxi8pNEJ4586yFTCQyPg== X-Google-Smtp-Source: AGHT+IHEIwOZyBNEWy6YAwj1dlrGk07BhcGbbMx+ZaFrMjSTFnu+dtyf/+KKBfFml5tBRJraIrFM X-Received: by 2002:a05:6102:5093:b0:47a:424a:6df0 with SMTP id bl19-20020a056102509300b0047a424a6df0mr13156120vsb.9.1713210661959; Mon, 15 Apr 2024 12:51:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713210661; cv=pass; d=google.com; s=arc-20160816; b=qymEQ5KBJ9a8UwjHm4XC17CjWDJKZ6cS8+7k0HK1S5OSvGf5qudwceJfgsTE1q5XnD LWEMtWxb81hsbPD+P/cyqImIa75Qj6WY98ujWfF430JnLFlS1zCt9MiBlsVLcR9uGmFw KaoahzTzyklIXRQxPxaI5LB6wpwlRhIO6mY01UggdOiyoHid3+80n5rFi5C6g7xYIy56 x164Za4LA8q4Z3tp7GvCR3UN2/VHPUbsxaJlPXvbTjnHdrq5m8IdgXAy6CYF5JpwnbR9 +N0dfGkVZuZZlu5ALQ8LTkVlJGUaz0juTYKHuTwVZQVgfOaaCJj8ySAXFbH5Tijt/JEP Kk6w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=sCliW6BSUqhAiUkew+BxCoXleTJqVDJXHDZMFgMG6CE=; fh=uaqw4UYaONZI1vwXmlZ+vlVmGAaApYn8V3wDqNrAb2o=; b=nhoJ8HOr52Cb+3mxkHmBr5O4Y7s9f+K1ZtadldyQnRG0848mpqPqCmSHwCUJJHibQa Nqg50mpFCqGanHt49Yp3ZgKWB/q+4O6Fbp5Aqd9f4FhBJubgRFnVtkjFCAAzGJBYpx0S xaZ5rJwzVCf57+kGGLmiJ+ABLvYrOVvxzSbljp0rCUQ4gBqrDFQIDKlXGQvzFi/6ceFP e3MCbOAiELAEpKVCzrGODCEIMYuW5kC4Qdd8Y3vbqCVL5EtCZF7HutTDE32jvz8ytjdG AVlbMPR3VMAR4BF4x1pZ59aqTL9AnF614OH309TX05nLR7HLbZ1CXHOpt183inoJJ/mE SqUA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mZZuN2FM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-2820-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2820-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id x3-20020a05622a000300b00436808b3aa6si9475214qtw.704.2024.04.15.12.51.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:51:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-2820-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mZZuN2FM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-2820-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2820-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 91E4D1C20C70 for ; Mon, 15 Apr 2024 19:51:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0EC3A156677; Mon, 15 Apr 2024 19:45:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mZZuN2FM" X-Original-To: linux-nfs@vger.kernel.org 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 DB40715666F; Mon, 15 Apr 2024 19:45:06 +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=1713210306; cv=none; b=XoRgrCN96POhV5u3+Hwjc76FJ/Jd2QDwUIoyBWhqB1tlbhCjAyWXpE9fvezxcHqEygKA4efuynyj20aJr/+Fvmu7TboYRHQUQ09j++Q4vq8qKj97bWYlrbDn8UioUwAkfk1VFk0RiB5CeCr8kLX8xkKML4N/8EjUZ++NfjjqqQQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713210306; c=relaxed/simple; bh=vIL46l7iKkKeFHTEjgaZNncOlDosmXcACT56qzJwRfA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=STmi0tB0CXFR1lJ+OgbWZyawCAUEtfcEX/lfb2IhCbfhlEpwZvxRkWLgRAvVj0zsIaGt5hOKixYvLCGGqI6tnMhzQyQBw5+iew/XMgQJ0ubLQHE/gjdhbG2PEZUKq24NXvyl6Y644OVM1+lrHEK1H3Zo0CZ6Cqk7nYkMFoeelqU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mZZuN2FM; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A4CFC2BD11; Mon, 15 Apr 2024 19:45:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713210306; bh=vIL46l7iKkKeFHTEjgaZNncOlDosmXcACT56qzJwRfA=; h=From:To:Cc:Subject:Date:From; b=mZZuN2FM6tkB8wALK+3LtA3Q0a2JoOF+y5F3zx1o26MqZXoHtq/vzg2+r8HMIuYhF VUKY3gsAFkV3aRxGdMWj9cMyJK66gyb22BFW0VS1HKMlU2NXbZDtASlt1tvvCje9nJ HCTn67866liMFVcIst8zoJ1qGPTkExCUIYF8TUjpQDnSB3uZ2ICZzSx8dMGEbdB/Ps +U1NWhH5lQ93Ve8ycsy1Tvj74vnQb721hh2+KiVu/O+1rCbvQHMr808kdIRKnAhtHW 37BUA31l8FXO6Pi5+fmrdKMapBmvVwIPuP9PKzp23ifl3lWN1ULBnTfgtvwXfYbzdM /hcRAYMlXyz8A== From: Lorenzo Bianconi To: linux-nfs@vger.kernel.org Cc: lorenzo.bianconi@redhat.com, chuck.lever@oracle.com, neilb@suse.de, netdev@vger.kernel.org, kuba@kernel.org, jlayton@kernel.org Subject: [PATCH v8 0/6] convert write_threads, write_version and write_ports to netlink commands Date: Mon, 15 Apr 2024 21:44:33 +0200 Message-ID: X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Introduce write_threads, write_version and write_ports netlink commands similar to the ones available through the procfs. Changes since v7: - add gracetime and leasetime to threads-{set,get} command - rely on nla_nest_start instead of nla_nest_start_noflag Changes since v6: - add the capability to pass sockaddr from userspace through listener-set command - rebase on top of nfsd-next Changes since v5: - for write_ports and write_version commands, userspace is expected to provide a NFS listeners/supported versions list it want to enable (all the other ports/versions will be disabled). - fix comments - rebase on top of nfsd-next Changes since v4: - rebase on top of nfsd-next tree Changes since v3: - drop write_maxconn and write_maxblksize for the moment - add write_version and write_ports commands Changes since v2: - use u32 to store nthreads in nfsd_nl_threads_set_doit - rename server-attr in control-plane in nfsd.yaml specs Changes since v1: - remove write_v4_end_grace command - add write_maxblksize and write_maxconn netlink commands This patch can be tested with user-space tool reported below: https://patchwork.kernel.org/project/linux-nfs/cover/20240412-nfsdctl-v1-0-efd6dcebcc04@kernel.org/ Jeff Layton (2): nfsd: move nfsd_mutex handling into nfsd_svc callers SUNRPC: add a new svc_find_listener helper Lorenzo Bianconi (4): NFSD: convert write_threads to netlink command NFSD: add write_version to netlink command SUNRPC: introduce svc_xprt_create_from_sa utility routine NFSD: add listener-{set,get} netlink command Documentation/netlink/specs/nfsd.yaml | 104 ++++++ fs/nfsd/netlink.c | 65 ++++ fs/nfsd/netlink.h | 10 + fs/nfsd/netns.h | 1 + fs/nfsd/nfsctl.c | 476 ++++++++++++++++++++++++++ fs/nfsd/nfssvc.c | 7 +- include/linux/sunrpc/svc_xprt.h | 5 + include/uapi/linux/nfsd_netlink.h | 46 +++ net/sunrpc/svc_xprt.c | 167 +++++---- 9 files changed, 819 insertions(+), 62 deletions(-) -- 2.44.0