Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1772692rdg; Sat, 14 Oct 2023 17:56:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFlQDlSF/jLg7ysn1FUbNOYi7h5DciW2axXQP+d4IiF2BI/glgF12Gvpk+qRCf7JwWpuN2G X-Received: by 2002:a17:90b:4d90:b0:27c:fa8f:4e91 with SMTP id oj16-20020a17090b4d9000b0027cfa8f4e91mr5975565pjb.23.1697331390638; Sat, 14 Oct 2023 17:56:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697331390; cv=none; d=google.com; s=arc-20160816; b=e3k9bkH4+LM1nkHyyvIRZsm9IzxteYuCJkeY6uXPE3SuaD2KgTJFDzJw59DjuMs2Nx ATn9JIA2dr9r4204oB49hoSPF3E3xE0z9QK98OSnhUTaRYClflRP8S4QLKZlxpTNADou npE1sAFR7ONNJjQGV3G3RsKsupRriW9ccnSq9HNbIgRinNRReWYxAHWMELps+9c2opbC aWTr0pNkqq/vpiZzBR+i7g260lU1drDR0tQ70Xa6HbC7N5ReFv4lE4uEmmB35VvTmYma fy2v3PEefASi0G/nddrAPB1qNguOVNGpkGyr/Esd8Du3f69hoeWk9M339G3XsobcTxin B0SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date:dkim-signature; bh=buvwUM+XiSCd2oFM3rzPwIQXJWev79VEmd/6ZAGstBE=; fh=QmEwiRICfcRqkzmVMtoGIU4YXO2DGSegRl2bk+jP2rE=; b=w/9T2yth8Zga2fIr2BSf42+gvI2z8T/lDJx/rvXkusscr0p2cYRUtGFBHRVpdLFJ0j EToYKy62ID6qwlFhMFDoGnLtAoh2F6Xg5oLCGSW0Pz9CNFLVcRKSjARGTYwBg1yWBIJc NRCe4v4pWCkSjFQCS8sgn7zLwtim8uMWD7cg7eQTs+nwRqFzmoic3Ie5NIBeNsGHBPEm muh+vn9DcXSemwhXiViWiyGo8bfbXipmwdTV+mSFBBUdP/w0qr394b4ymtzIqzlqZLE9 ZUQ1UjMl+T1e3VOXadJh8pqJRKNmJ46/6Yaoaq+RGQwN/wJo3yGcYdQtqsjiusgHHg/s Qx9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@infradead.org header.s=zeniv-20220401 header.b=oHB5GN3A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id a2-20020a17090a854200b00268278c51e3si3226960pjw.49.2023.10.14.17.56.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Oct 2023 17:56:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=temperror (no key for signature) header.i=@infradead.org header.s=zeniv-20220401 header.b=oHB5GN3A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id E43F9804BB7D; Sat, 14 Oct 2023 17:56:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233380AbjJOAzz (ORCPT + 99 others); Sat, 14 Oct 2023 20:55:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229733AbjJOAzy (ORCPT ); Sat, 14 Oct 2023 20:55:54 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33D50CC; Sat, 14 Oct 2023 17:55:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=buvwUM+XiSCd2oFM3rzPwIQXJWev79VEmd/6ZAGstBE=; b=oHB5GN3AQhXonpj3gZeVdTS9S9 t5hxo04NmbJrxNy9T67Lj3Wgfz0T4z/NrPI3dDwiqF8kbUOS8Yr2Cd5dl6x0bUTYu9mHkhkAC1x4H y6cyZhzBZb4qcerrORHd9E9PHtapx6noke3iX+miXAeVhTaeFf8K4o6Y7KLIjX0MSbxQMtbHwQWL4 ZbAAMtvPhyfdhSMZifVT9dht6K3YYN6RG4aVxoIMtI46iARRmzFapYAepOZBExQo1G9ohd/0j+UeK P7bfLmiUe+gCiwCvUXYVekIqHoxAY/7ytUZhOhd0SEKLdd09EXs+JErrRAOa8VNRwzBfFu9ggarlG KhZVcKVw==; Received: from jlbec by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1qrpPp-001KfZ-1t; Sun, 15 Oct 2023 00:55:33 +0000 Date: Sat, 14 Oct 2023 17:55:30 -0700 From: Joel Becker To: Breno Leitao Cc: kuba@kernel.org, davem@davemloft.net, pabeni@redhat.com, Eric Dumazet , Jonathan Corbet , hch@lst.de, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, horms@kernel.org, "open list:DOCUMENTATION" Subject: Re: [PATCH net-next v4 4/4] Documentation: netconsole: add support for cmdline targets Message-ID: Mail-Followup-To: Breno Leitao , kuba@kernel.org, davem@davemloft.net, pabeni@redhat.com, Eric Dumazet , Jonathan Corbet , hch@lst.de, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, horms@kernel.org, "open list:DOCUMENTATION" References: <20231012111401.333798-1-leitao@debian.org> <20231012111401.333798-5-leitao@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231012111401.333798-5-leitao@debian.org> X-Burt-Line: Trees are cool. X-Red-Smith: Ninety feet between bases is perhaps as close as man has ever come to perfection. Sender: Joel Becker X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sat, 14 Oct 2023 17:56:28 -0700 (PDT) On Thu, Oct 12, 2023 at 04:14:01AM -0700, Breno Leitao wrote: > With the previous patches, there is no more limitation at modifying the > targets created at boot time (or module load time). > > Document the way on how to create the configfs directories to be able to > modify these netconsole targets. > > The design discussion about this topic could be found at: > https://lore.kernel.org/all/ZRWRal5bW93px4km@gmail.com/ > > Signed-off-by: Breno Leitao Reviewed-by: Joel Becker > --- > Documentation/networking/netconsole.rst | 22 +++++++++++++++++++--- > 1 file changed, 19 insertions(+), 3 deletions(-) > > diff --git a/Documentation/networking/netconsole.rst b/Documentation/networking/netconsole.rst > index 7a9de0568e84..390730a74332 100644 > --- a/Documentation/networking/netconsole.rst > +++ b/Documentation/networking/netconsole.rst > @@ -99,9 +99,6 @@ Dynamic reconfiguration: > Dynamic reconfigurability is a useful addition to netconsole that enables > remote logging targets to be dynamically added, removed, or have their > parameters reconfigured at runtime from a configfs-based userspace interface. > -[ Note that the parameters of netconsole targets that were specified/created > -from the boot/module option are not exposed via this interface, and hence > -cannot be modified dynamically. ] > > To include this feature, select CONFIG_NETCONSOLE_DYNAMIC when building the > netconsole module (or kernel, if netconsole is built-in). > @@ -155,6 +152,25 @@ You can also update the local interface dynamically. This is especially > useful if you want to use interfaces that have newly come up (and may not > have existed when netconsole was loaded / initialized). > > +Netconsole targets defined at boot time (or module load time) with the > +`netconsole=` param are assigned the name `cmdline`. For example, the > +first target in the parameter is named `cmdline0`. You can control and modify > +these targets by creating configfs directories with the matching name. > + > +Let's suppose you have two netconsole targets defined at boot time:: > + > + netconsole=4444@10.0.0.1/eth1,9353@10.0.0.2/12:34:56:78:9a:bc;4444@10.0.0.1/eth1,9353@10.0.0.3/12:34:56:78:9a:bc > + > +You can modify these targets in runtime by creating the following targets:: > + > + mkdir cmdline0 > + cat cmdline0/remote_ip > + 10.0.0.2 > + > + mkdir cmdline1 > + cat cmdline1/remote_ip > + 10.0.0.3 > + > Extended console: > ================= > > -- > 2.34.1 > -- f/8 and be there. http://www.jlbec.org/ jlbec@evilplan.org