Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp433143rdb; Thu, 5 Oct 2023 09:59:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHfuYFwLp4Qcj6q2YTos7MubZS+4jAPS0PmM4MrIzS6VtxYPDs8JJQEn8Dfceyk30i+rPql X-Received: by 2002:a05:6830:6b44:b0:6b7:4af2:492d with SMTP id dc4-20020a0568306b4400b006b74af2492dmr5228174otb.38.1696525184186; Thu, 05 Oct 2023 09:59:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696525184; cv=none; d=google.com; s=arc-20160816; b=G1AaZKIS+sFuVvT54MdLvqx1HJ7cK/vreuVBPk9ohsZ/UnyNjs+gDQy74ZP/igSQgO tcEw43EXJkOZygJvY2345+139aGCzNSrxW2f0ILavpv6KtRK11LpKcuECs81egCl8bqy ffojrOT78h4cwkVF2FcqmY826XbXK52kNjQiuCm4hoNETvHRcfMCgvFmZUekCl5EQz50 cGOa1I06c8L++00ih0fRinbVZ5bOMwM5R9ufaTgZ4yWIOpLNOJbUVLPupnmH8WiI+3HA X/KmbInuchjajo5G2pI1ogXnj8Xz/Pj8zzVAn0gqvrkYhwq07JDa5EW+EtJ0t3HMCWmT ov+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vpuNxvGuf5h9MyAwxnLUEih2c5ztpYqIVn8W4ChtbqQ=; fh=a9agR8h3cIND57TDT47aKsPMffujH6FyF44+PDEXxts=; b=FSDkN+I/HRon/g14Xb0pk1Je0KOJZB+uQelb4J4riBOpxD+A1LpXCOXHaHVYOIsfgM xxVOmvuirm/9fPBsOhJ87oWYyI1DhPVMUbvbJ3rgJ5IE37+h+beU3J8Os8yMkzE/UIzU oPRJuPvexLyqubDSCo8gHaXaZd87ugjQ+wVO92H7Ou/2y1LDfgQ3q7Xe3FAr3irYEV8s wFQhmFlk7EArLf2UXrFfeWIA8eybN8jMpk+UE402Q2/NMXNDJg5Ojj5OfVs6hwtamQkR nduAIIkXgdCW75I/tkJ0ODjGR6muBgwH2NZ+IMr63Ca+LwrMK5c3psC1yY/xkDrNhzv+ n1RA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZsHEmEf1; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id m1-20020a656a01000000b00585adc52bd5si2024457pgu.730.2023.10.05.09.59.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 09:59:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZsHEmEf1; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 4EA758343515; Thu, 5 Oct 2023 09:59:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233133AbjJEP6F (ORCPT + 99 others); Thu, 5 Oct 2023 11:58:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234353AbjJEP4p (ORCPT ); Thu, 5 Oct 2023 11:56:45 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B9DC4C3A for ; Thu, 5 Oct 2023 06:52:31 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5CC60C116B7; Thu, 5 Oct 2023 09:03:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696496636; bh=YW6AMXhottZLumoHEFW7rvYANSuUdiOjTDc6Qo0lWAQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZsHEmEf1MGy/Jj7Imi0CDQiWuMUVS6WhBd8F+dN6SbaIM2InUesrbdUIBzVDaVZ5E vX1DXxcbtAGT2JsTUKSJVYsqWcKzSMf/D8FQZJztjkf/7CtjO62syY68dZpjXjemMB eqMH7mGsFxYzwtnpEoaVqUziagOYtELKouDwJPLF69tnixkTb37wT1lWO7LO6J3IeG 5eCGOnZd/FOdSwjM7dVLZYRpL/Yu/J+aUOXaoxC6Py4NN6mzv8hdubxpWiqRgITiTt XzrOXcasrA0Rl4OdzUzETr7u2u6hjD3c9kmcePuzJvEXgxE0xqYig/k6a8jWbZhRSx LMrLZor4aETfg== Date: Thu, 5 Oct 2023 11:03:53 +0200 From: Lorenzo Bianconi To: Jakub Kicinski Cc: linux-nfs@vger.kernel.org, lorenzo.bianconi@redhat.com, jlayton@kernel.org, neilb@suse.de, chuck.lever@oracle.com, netdev@vger.kernel.org Subject: Re: [PATCH v3] NFSD: convert write_threads, write_maxblksize and write_maxconn to netlink commands Message-ID: References: <27646a34a3ddac3e0b0ad9b49aaf66b3cee5844f.1695766257.git.lorenzo@kernel.org> <20231004100955.32417c33@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="wwNqDGKJgf2QrUnW" Content-Disposition: inline In-Reply-To: <20231004100955.32417c33@kernel.org> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 05 Oct 2023 09:59:41 -0700 (PDT) --wwNqDGKJgf2QrUnW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > On Wed, 27 Sep 2023 00:13:15 +0200 Lorenzo Bianconi wrote: > > +int nfsd_nl_threads_set_doit(struct sk_buff *skb, struct genl_info *in= fo) > > +{ > > + u32 nthreads; > > + int ret; > > + > > + if (!info->attrs[NFSD_A_CONTROL_PLANE_THREADS]) > > + return -EINVAL; >=20 > Consider using GENL_REQ_ATTR_CHECK(), it will auto-add nice error > message to the reply on error. ack, I will fix it. >=20 > > + nthreads =3D nla_get_u32(info->attrs[NFSD_A_CONTROL_PLANE_THREADS]); > > + > > + ret =3D nfsd_svc(nthreads, genl_info_net(info), get_current_cred()); > > + return ret =3D=3D nthreads ? 0 : ret; > > +} > > + > > +static int nfsd_nl_get_dump(struct sk_buff *skb, struct netlink_callba= ck *cb, > > + int cmd, int attr, u32 val) >=20 > YNL will dutifully return a list for every dump. If you're only getting > a single reply 'do' will be much better. ack, I will fix it. Regards, Lorenzo --wwNqDGKJgf2QrUnW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCZR57+QAKCRA6cBh0uS2t rKI1AP9YnWau62lwbFjDZnsQcxH8VUlxuKPPjUzqvmgU3w9e7QD/Wy7QqL2w2EXT J+3t8IEkfYq6GO9AVb+bMEolnsU/ZwY= =3tsm -----END PGP SIGNATURE----- --wwNqDGKJgf2QrUnW--