Received: by 2002:ab2:7988:0:b0:1f4:b336:87c4 with SMTP id g8csp103561lqj; Thu, 11 Apr 2024 11:02:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVkS1QjF7ou5FPXNC4lcEL7KnfKEmOoW9qHSquyF+IEqca4l56/aaYyGToQhavk8feDttJ/P/QgNtN3hRK44P0SwCNVJI9SAexbn/0d2A== X-Google-Smtp-Source: AGHT+IHD1ID/MyQwAerP1+RqYVUm+ZIg1O8rKyiNtMsGb56hZjP6EiMklDP/zUY5VDaXPyWh7ua7 X-Received: by 2002:a05:620a:4784:b0:78d:39f7:1d16 with SMTP id dt4-20020a05620a478400b0078d39f71d16mr449206qkb.31.1712858573209; Thu, 11 Apr 2024 11:02:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712858573; cv=pass; d=google.com; s=arc-20160816; b=fClBjhtFFKreu7BiQPTC0fHdcWRUBYGj/W7bADSFEokvDAFyfmnLtSMCh8pPNOeCqb lCpDk7viNgsTF9wlHqPWSO2Par7TFQtxlJlUU5Bf6+YpsmTX5x8luugxqtxNKEvCSZIL KlWYHlkrax8JkIokC8fSENuTYcx+Dc3EyF1DVnjhDMLe2g5DoaqpGDH81doB8cZ+iHif n7FDNGXnpP8IuWuB27zoYMBESG+H7CsXoAvSmDjMmNk4iGQ/9cbOyXvmdB6ngYxnT/T/ HcKltmqGPk9lKk75xNUTDCJA5LqSlOZJpmhKNf/fQXy7yMwuNfhhwhrQLS9SGMigR+uf MAYA== 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=h1iWhlNW41x7/SnU3ZyaEOux24iLXXHnMwR9JMXlY8I=; fh=lwzJGo5ag1FZ5hWsz+EW0lAo0lCl26zLhhd6ZvjTbuo=; b=xkAnAjac4n+MypM0fnV1I/gI/OBdyErTRF98Co34lvepozLEQNHxVfmBqMIm7JtbS/ ay8NURlk+zvnmMbW8d5wJJb5nRqWfRxsRN+Y6j2qqWIuLAZfOP1DJ/cp+M+eaTV4c6Ur 0w113nUV2RlPADytcRl7/zCDCBav04gIBL6+Hp5wbjOMeh0CCqcRiNqhv7wVNIh8nBsQ DT+4v/T3uRPBHGJniDoKhkrFCq4ZtX2pg77pX9Ry6mTRkpKhDQ7WZnx8bv6DU1GIr48e 4NfoJUunfh0vC5ZAaRCaGHEdp8redOBaFNh1YWjIzeayf+R32rGBkvHtywnXTgzK8mSD 3WfA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="VgN4az/L"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-2760-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2760-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 c5-20020a05620a134500b0078be905f307si1990600qkl.660.2024.04.11.11.02.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 11:02:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-2760-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="VgN4az/L"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-2760-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2760-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 E71FD1C23CEB for ; Thu, 11 Apr 2024 18:02:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AD8AC1C8FD1; Thu, 11 Apr 2024 16:47:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VgN4az/L" 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 832074776A; Thu, 11 Apr 2024 16:47:51 +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=1712854071; cv=none; b=Awgj0IB0J95pR6IyT+u0xej9oTKQzkSvwv0wwuQZahe9mVrfKrMYVQdTqwIEdhYq6SoyrR55rr2sqW1kC3GhQ51rUT+L79F1W/J2vfY+zncEU/SUciUu+FTO6g6F+9BuGKjxPOqc2iK+t5O4tkgmUj+2DQIdjn2Itf9hp7lVs94= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712854071; c=relaxed/simple; bh=Tsp7fVDAL7sxwe0z4KoaIWlEorLoi8doWzqxnvhLZvE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ryDzd7+0+P8lQTcWu4QgEylYJou4DYnmFNke9j/bI/295aYWrVEZg6iJFX+n3U/lxKaB3w0poXX4R+hJfQpBzJfc9g1OAevSllLBZN4MYFoPKd/QyoVBIZhiyYYlbzWLjc8gz4s+wGxslUZB6pHhEv6fbz0rm7i3mhvFSkW1ZkU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VgN4az/L; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3C6DC072AA; Thu, 11 Apr 2024 16:47:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712854071; bh=Tsp7fVDAL7sxwe0z4KoaIWlEorLoi8doWzqxnvhLZvE=; h=From:To:Cc:Subject:Date:From; b=VgN4az/LIeyBmae3lQp+lGgejFgVdti6XAFXcVkju9bvWOu95ussGKwc1nBV0lLQ4 sbokR5XJNK8oVrO0kWXnRjrbuUQQKwhAR5KqjCzZJzbn7v263Dv01+eyLhw0S77ry7 2WyBjaccpkesQwgtOSNKJTWHAsFGndVmS+FgOaX50SMD2DVZ5BAPw/BcSPK7pAYGmP XLcu5wpGzJLWTWotwzOOtyXTdKYO9aMx2khzsSnuhCU/yIWdxBi3eVKV1/X7Eo0Qkd YlmZoynQJwn4/IfzIsgT1Oj5Mb6y8nU/ovyFwo+7qw20CZuzvLyxcIbYeAwKwUForP 2KbX3IFaAptFA== From: Lorenzo Bianconi To: linux-nfs@vger.kernel.org Cc: lorenzo.bianconi@redhat.com, chuck.lever@oracle.com, jlayton@kernel.org, neilb@suse.de, netdev@vger.kernel.org, kuba@kernel.org Subject: [PATCH v7 0/5] convert write_threads, write_version and write_ports to netlink commands Date: Thu, 11 Apr 2024 18:47:23 +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 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://github.com/LorenzoBianconi/nfsdctl Jeff Layton (1): 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 | 94 ++++++ fs/nfsd/netlink.c | 63 ++++ fs/nfsd/netlink.h | 10 + fs/nfsd/netns.h | 1 + fs/nfsd/nfsctl.c | 433 ++++++++++++++++++++++++++ fs/nfsd/nfssvc.c | 3 +- include/linux/sunrpc/svc_xprt.h | 5 + include/uapi/linux/nfsd_netlink.h | 44 +++ net/sunrpc/svc_xprt.c | 167 ++++++---- 9 files changed, 760 insertions(+), 60 deletions(-) -- 2.44.0