From mboxrd@z Thu Jan 1 00:00:00 1970 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 8D2DA13FD72; Tue, 28 Jan 2025 16:12:39 +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=1738080759; cv=none; b=At8j4asR99dihdUSE8+rOpqJBRU/RtgzFRQ7s18oIfgjL1PGU2tT/aOHIiTLN+vUNXmTtR0ELhIZggJjm+fTEh98JRPmA7WbR0n/4xhOgOqJuFC7uSdXLwLx4xBCWIvOvvQfkHUngvaRp0Z0gS9Onrk9sikovknLKSI2II3m7zY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738080759; c=relaxed/simple; bh=QWZ2A/7lG2ISbMmNG34nmuDjqzbZkZ7VV3VfzIHM7Zs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XjnLEBiiVTjDQo1uAa1Xs86/SexXrdXVjEaFS1gGl2DY22J323foQFN/PK0qHIH2LosxFV1Vj0BYUzw1qLGnyzpT29do1bdMO/b2+5DJ+GcMbams3bpiWvQ0/101mQnkoio1Gzj0iO/t9eBX8Tl6BQas9GP+ZjbaJXvOiz3J7UA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HTZ6IGfe; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HTZ6IGfe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5CC49C4CED3; Tue, 28 Jan 2025 16:12:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1738080759; bh=QWZ2A/7lG2ISbMmNG34nmuDjqzbZkZ7VV3VfzIHM7Zs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HTZ6IGfeQON5LKNDY2XXFHnUXrfy+hgt0esoeftKhRHAkc2UY4+HqZMIZMKH0LU5/ eyQDb+ZLV8196OIq/u9R2Kf+da7DmD4E5eVRnAjAuvAcgAPh9kpo8FygYMMOMvetZW sf5jS/LZE5i3THfuSedweO2MeZqe51MbsI65mbKTm7NQJCtEbYbRPbSFS8igFAFg7B t7FQGLbVRQuNdbRrhDeSkeqgcjJ0NTL4BrVXSFtFUzyacwAqjtoQzqLx1tunZcKtkt vTBN/VTMyBYzP31+l7rrfK1695I5r//xCv/qcF8Ovspl3v5hplqYpq53V63VUjh+4u qamK4avc/NO0Q== Date: Tue, 28 Jan 2025 16:12:34 +0000 From: Simon Horman To: Breno Leitao Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Shuah Khan , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, rdunlap@infradead.org, kernel-team@meta.com Subject: Re: [PATCH RFC net-next v3 4/8] netconsole: Introduce configfs helpers for sysdata features Message-ID: <20250128161234.GC277827@kernel.org> References: <20250124-netcon_cpu-v3-0-12a0d286ba1d@debian.org> <20250124-netcon_cpu-v3-4-12a0d286ba1d@debian.org> Precedence: bulk X-Mailing-List: linux-doc@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: <20250124-netcon_cpu-v3-4-12a0d286ba1d@debian.org> On Fri, Jan 24, 2025 at 07:16:43AM -0800, Breno Leitao wrote: > This patch introduces a bitfield to store sysdata features in the > netconsole_target struct. It also adds configfs helpers to enable > or disable the CPU_NR feature, which populates the CPU number in > sysdata. > > The patch provides the necessary infrastructure to set or unset the > CPU_NR feature, but does not modify the message itself. > > Signed-off-by: Breno Leitao > --- > drivers/net/netconsole.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 81 insertions(+) > > diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c ... > @@ -792,7 +817,62 @@ static ssize_t userdatum_value_store(struct config_item *item, const char *buf, > return ret; > } > > +/* disable_sysdata_feature - Disable sysdata feature and clean sysdata > + * @nt: target that is diabling the feature nit: disabling > + * @feature: feature being disabled > + */ > +static void disable_sysdata_feature(struct netconsole_target *nt, > + enum sysdata_feature feature) > +{ > + nt->sysdata_fields &= ~feature; > + nt->extradata_complete[nt->userdata_length] = 0; > +} ...