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 3E0B81BD4F7; Thu, 30 Jan 2025 10:38:38 +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=1738233518; cv=none; b=raUyqkI6Ykzu65WASAc6j0xuoI/ax2ciBPuhSjjHTmBLiXI4ywe7vabw3r39kAm6wSLELLEIoK1mMZPUDQmkDezLECVy5AgHStrcBILdOgx5s56kH3WH4h1ZEcpdBc1Mc54vtb/D6CYEmZCRcGIYq1KWOj1YWA5Q42bHZd1fpM8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738233518; c=relaxed/simple; bh=cfJeMk0lgbXzXSzjGO2awe3WVWHNIxywXG1all8Lc/U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ctmlNankhdMDstjgQcgoHluoy4NIcHA8N92fr001gOdSjvNT5bSheLNGlTywi3dTjbAp71dla+a7TkbAG1EB4Wx6ZbG+bpRm+eW3ZA0Uj8CU8+HsLC1ojo2NnJGgRAEh4e2FT92jrnJxp/OSG9zGo/HZsCP72ZkLYJ9B6gAsQnM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gJI3mmRS; 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="gJI3mmRS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52CCDC4CED2; Thu, 30 Jan 2025 10:38:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1738233518; bh=cfJeMk0lgbXzXSzjGO2awe3WVWHNIxywXG1all8Lc/U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gJI3mmRSFoP2z8OXjYcF4y0bV3odPwW720Ux2YN0pFLSqBO83tNuDVHiskqqW8yRL OZPFI/dGiy2RO584DdHlZCwGR6YFFZNaIHlRWEgA/8+/ZqdX6hdhdmUYYYcBFXn73t JpQHxBDqAfp2QXuNhzn0ez5ieT/HxM1SaVOdoEMRePQQh0VAzqezcAQs75fFgpBByZ FOBH7S+8JOP2i5S8zTojDw3+hD9lzVOJeNvsH3ngsSDcjM9xgi+jelCXJnvcJzDihA QOZbMBiCaaq4yoQ4ArCKAW9MtECgMwEBTGM4x/if+T4c4Db/SEZRkqaop+As/SXItX +piET7fjx3eOA== Date: Thu, 30 Jan 2025 10:38:33 +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 6/8] netconsole: add support for sysdata and CPU population Message-ID: <20250130103833.GJ113107@kernel.org> References: <20250124-netcon_cpu-v3-0-12a0d286ba1d@debian.org> <20250124-netcon_cpu-v3-6-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-6-12a0d286ba1d@debian.org> On Fri, Jan 24, 2025 at 07:16:45AM -0800, Breno Leitao wrote: > Add infrastructure to automatically append kernel-generated data (sysdata) > to netconsole messages. As the first use case, implement CPU number > population, which adds the CPU that sent the message. > > This change introduces three distinct data types: > - extradata: The complete set of appended data (sysdata + userdata) > - userdata: User-provided key-value pairs from userspace > - sysdata: Kernel-populated data (e.g. cpu=XX) > > The implementation adds a new configfs attribute 'cpu_nr' to control CPU > number population per target. When enabled, each message is tagged with > its originating CPU. The sysdata is dynamically updated at message time > and appended after any existing userdata. > > The CPU number is formatted as "cpu=XX" and is added to the extradata > buffer, respecting the existing size limits. > > Signed-off-by: Breno Leitao Reviewed-by: Simon Horman