Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp552294rdb; Tue, 5 Dec 2023 12:37:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IEv3MazUbZKcPem9o4mUvKenWM8ePyTiOAGDj9jKh2c9pes4yavIfq3IH2NxhaPm7Cbf/su X-Received: by 2002:a17:902:d2c1:b0:1d0:c849:7a0 with SMTP id n1-20020a170902d2c100b001d0c84907a0mr1278783plc.19.1701808662261; Tue, 05 Dec 2023 12:37:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701808662; cv=none; d=google.com; s=arc-20160816; b=HbowYDSgX/S/j2PuKtZ7f/xgczpapDxjpKToMRzfNrImtRmVAz/O3hmk1km/lh1Ptj Bl9ww+WIMPZDz6fj7j4p+VAmQgpsL1mLd9rosyuns8kLE6EjoDMzNKzW/S8OdItJNOxl BJ26x+SS4YiN5rs+tArBN0X2jq7axWaW5wY09GrASYcsDI+yJBqJgXfxzWcU3XdzKM/k 5vPjnSjeIl+MCZC4kQH/4P5yrwzy+N/SOFynRSZvv1ThOWAX5cR18dBdmlftsQtPbpTL W8TJfymm7+4QO2VKQ8wDo53jxSkfoYOeWC9dPRFVQI80gxQuRtoW6S5xLrE3vYLUIavb xa5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=TlLAUkqssKpuePDl2w+DNKTMWauZoLs6mNOvqWibz/s=; fh=ytDvhVXEt6P0j1UPLG2mxlF5BMmj+u7bueam7BMf2m0=; b=fgnhj4Wce+uUJPA5clToDMT4dHuRbSUE0ZiC5AEFilAN0mh27wGw2rTLGZ9WzZSpWd 7/oSba1JuC0zgRprQpXHCQLubYyoCxgqETcHmvc52gZdLFP4h3JmEtdrnoCHSfIhdPeY NuSJg0yBmCZhbx1LsVaPVoItAGdtusAuJUPsL1h9G1QwovXJOYRL0z1LTaN7vPk3gAXG EZqpluJWrwiDgfsyKT15NF3ECDvRCBX1f6Sipih5VWvYbZOakvuqx2F35SS+sTNloIX5 JUhWSqcsxC39DNz6V/iY3pk9LDlmxhBYkbIJnBo0MQNAmz1K9Jv0r+N4hrATP4wHWAC+ JQTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XTHK0o14; spf=pass (google.com: domain of linux-nfs+bounces-343-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-nfs+bounces-343-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q6-20020a17090311c600b001cfb5471961si10237655plh.274.2023.12.05.12.37.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 12:37:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-343-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=XTHK0o14; spf=pass (google.com: domain of linux-nfs+bounces-343-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-nfs+bounces-343-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id BD4BA281F4A for ; Tue, 5 Dec 2023 20:37:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 50DF868B7E; Tue, 5 Dec 2023 20:37:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XTHK0o14" 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 2F26C6125; Tue, 5 Dec 2023 20:37:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03DBFC433C7; Tue, 5 Dec 2023 20:37:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701808657; bh=OOpK2VzUpLEhcbmCfMt2V+OUAFcy+LXgUCtHVEBz46I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XTHK0o14SjupMjPILWJK+XCrbZDOgfLiqw12ZMZqUi0D3pGhZol2G1/Von9on7EKn X6qgndGQz5feG03hUj8GptuXUWN+DnlmAmmpcOkOKhPAktAcI+brqn8bS7rJ8o+VkQ XFf3cWagaieO5yuPxTfcAT4x7L0lAkLfVNn+laSlyVo4X1iU7T2+3k8J6Pgdpri2eU FRkmGxgiaOhG8Meq76XId+OT8bIw8EWMIbRYr4Ro9T1vPT83PMJNP6Mn2fdiO2SFOJ LWh/fbUal+uQBeKp1OrCpbxP7er2BMLil/lUFvGQwPYrytzdbp3FhJTckJfKbIkmD9 lza5FVZ5oX9GA== Date: Tue, 5 Dec 2023 20:37:33 +0000 From: Simon Horman To: Lorenzo Bianconi Cc: linux-nfs@vger.kernel.org, lorenzo.bianconi@redhat.com, neilb@suse.de, netdev@vger.kernel.org, jlayton@kernel.org, kuba@kernel.org Subject: Re: [PATCH v5 3/3] NFSD: convert write_ports to netlink command Message-ID: <20231205203733.GW50400@kernel.org> References: <67251eabfbbccb806991e6437ebcf1cf00166017.1701277475.git.lorenzo@kernel.org> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <67251eabfbbccb806991e6437ebcf1cf00166017.1701277475.git.lorenzo@kernel.org> On Wed, Nov 29, 2023 at 06:12:45PM +0100, Lorenzo Bianconi wrote: > Introduce write_ports netlink command similar to the ones available > through the procfs. > > Signed-off-by: Lorenzo Bianconi Hi Lorenzo, some minor feedback from my side. ... > @@ -1862,6 +1871,87 @@ int nfsd_nl_version_get_dumpit(struct sk_buff *skb, > return ret; > } > > +/** > + * nfsd_nl_listener_start_doit - start the provided nfs server listener > + * @skb: reply buffer > + * @info: netlink metadata and command arguments > + * > + * Return 0 on success or a negative errno. > + */ > +int nfsd_nl_listener_start_doit(struct sk_buff *skb, struct genl_info *info) > +{ > + int ret; > + > + if (GENL_REQ_ATTR_CHECK(info, NFSD_A_SERVER_LISTENER_TRANSPORT_NAME) || > + GENL_REQ_ATTR_CHECK(info, NFSD_A_SERVER_LISTENER_PORT)) > + return -EINVAL; > + > + mutex_lock(&nfsd_mutex); > + ret = ___write_ports_addxprt(genl_info_net(info), get_current_cred(), > + nla_data(info->attrs[NFSD_A_SERVER_LISTENER_TRANSPORT_NAME]), > + nla_get_u32(info->attrs[NFSD_A_SERVER_LISTENER_PORT])); gcc-13 and clang-17 W=1 builds warn that ret is set but otherwise unused in this function. > + mutex_unlock(&nfsd_mutex); > + > + return 0; > +} > + > +/** > + * nfsd_nl_version_get_dumpit - Handle listener_get dumpit nit: nfsd_nl_listener_get_dumpit > + * @skb: reply buffer > + * @cb: netlink metadata and command arguments > + * > + * Returns the size of the reply or a negative errno. > + */ > +int nfsd_nl_listener_get_dumpit(struct sk_buff *skb, > + struct netlink_callback *cb) ...