Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp345436rdb; Thu, 5 Oct 2023 07:38:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEDKJqD8F5jimyzdGJi5hPB+beZVmns10+I2FYKG7xxxoEzIO0/kUekBPBb4P/a8mOpS+Ia X-Received: by 2002:a17:90b:1b0e:b0:274:6839:6a89 with SMTP id nu14-20020a17090b1b0e00b0027468396a89mr4706110pjb.27.1696516728853; Thu, 05 Oct 2023 07:38:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696516728; cv=none; d=google.com; s=arc-20160816; b=Bx80c9mqvJQPu2Te0vwra/X1w5JeoAwvUE3XBNyS0NQpTud+bQqRr7RGE87+zc7xLZ o26xN2JXmcp+CI9wDh6GEfkMGhrcuqXNhvGqA+Gjxr1RC3W8avI6UaeWtaY2XomEIRMD ovqRymsrNnnAeSSP1jkIgdHAIcep6r1wEKyU45vLQBcVGpdm9asDz7b5CBWVqvjHlLnq yRJG76Nx+t2GUQ/caKedJJHO+SThdMYjdRgHHTmTvFdNSfbTs5QHgt08BLdX5oTFtOJV KIn9Da5iFJ9WA2VF+zyqNUcVvhN4e6eIVOBc10xIWG5qYA7AuAMSGnnb/VmZcWf4sBDh wTKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=LTma9nOdd7miP747uWf012/X4qj2VCvWacA0CPBMb6I=; fh=Y8M2sZ2XO+pZt/BBlIAACnnh4xUE6kU0kxeA2C14q1Q=; b=NH8ZJqgc9ZQOqWAXuk6YyqBKuL+Mz245SQysz+9zM6hCoKbRfW7r5t12/LpSvNlnw1 yBbz3n412lEMQq3Uzlu8S0yzOP22VsberTl8CFj/W89KKCl57DOBNlGUiX/vSiG+e91E 016pynY2pPpHf1zbmwAUkl5sHFWfg9Vv0++kBaDluPhJ6fNSmhDpa2MjjWCZ6L3Wm5M9 VNMareToDy6AiAP96KbhSnQnw5isnFGSVoqcirHc6Srdzn9sHw1vhD/CovMs1oOd9Wxz Qa62RUMG2jJVqPa+CGjqtpETl98qJpv7Le8B+cZdu+pL8GS7g1qBXqnANEiLCEBW8JhP g1Eg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id o8-20020a17090a420800b0026b6a7d9e43si1687456pjg.14.2023.10.05.07.38.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 07:38:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id DE6D180A97C4; Thu, 5 Oct 2023 07:38:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234953AbjJEOe6 (ORCPT + 99 others); Thu, 5 Oct 2023 10:34:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235014AbjJEOcn (ORCPT ); Thu, 5 Oct 2023 10:32:43 -0400 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B2B426A4D; Thu, 5 Oct 2023 05:37:13 -0700 (PDT) Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-53627feca49so1509150a12.1; Thu, 05 Oct 2023 05:37:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696509429; x=1697114229; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LTma9nOdd7miP747uWf012/X4qj2VCvWacA0CPBMb6I=; b=C7A5HNVl1lcPrAJtq7Zxczqs9a19aUOiW6LZ8RxM2HjzFb+1kzD1PYlf9hYJev+dm9 MHFV0dmGuBQBR4az1VdtUUEz4rxGYvYeZdEQOI7ENSeUbMQaG/INGm5YCQLvs9SRV+RI a8fQmK5CB9upDoc5ZJR9fc4DvPIY76JCPXLM/noNX1gAhFBkOuJ6gRCokuszrOOBPAR3 Br5qiDYl7clZQlCzQL270CZJ5cGfdzu5VkI9tmUCDG6ODct8FsFRQ1hGA0J4YyI4k/xJ 3LinJZWoJBRr+PwN4ECVFOLxvEI6V/TiR8i1GpEoM3Tns0rmhkNBXeZoVdTveJVjQNe7 UUOA== X-Gm-Message-State: AOJu0YzdRE0Nz+1h1iiZvfeDMeCi1scH/y/yfBfs5uq2Ogn4RWgQ6tTg 4mMKo1jRjAxXmz0TPODAX3g= X-Received: by 2002:a17:906:15d:b0:9ae:546b:786b with SMTP id 29-20020a170906015d00b009ae546b786bmr4033344ejh.33.1696509429203; Thu, 05 Oct 2023 05:37:09 -0700 (PDT) Received: from localhost (fwdproxy-cln-120.fbsv.net. [2a03:2880:31ff:78::face:b00c]) by smtp.gmail.com with ESMTPSA id u14-20020a170906c40e00b009920a690cd9sm1142813ejz.59.2023.10.05.05.37.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 05:37:08 -0700 (PDT) From: Breno Leitao To: jlbec@evilplan.org, kuba@kernel.org, davem@davemloft.net, pabeni@redhat.com Cc: hch@lst.de, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, horms@kernel.org Subject: [PATCH net-next v2 0/3] net: netconsole: configfs entries for boot target Date: Thu, 5 Oct 2023 05:36:33 -0700 Message-Id: <20231005123637.2685334-1-leitao@debian.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=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 groat.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 (groat.vger.email [0.0.0.0]); Thu, 05 Oct 2023 07:38:17 -0700 (PDT) There is a limitation in netconsole, where it is impossible to disable or modify the target created from the command line parameter. (netconsole=...). "netconsole" cmdline parameter sets the remote IP, and if the remote IP changes, the machine needs to be rebooted (with the new remote IP set in the command line parameter). This allows the user to modify a target without the need to restart the machine. This functionality sits on top of the dynamic target reconfiguration that is already implemented in netconsole. The way to modify a boot time target is creating special named configfs directories, that will be associated with the targets coming from `netconsole=...`. Example: 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 cmdline1 $ cat cmdline1/remote_ip 10.0.0.3 $ echo 0 > cmdline1/enabled $ echo 10.0.0.4 > cmdline1/remote_ip $ echo 1 > cmdline1/enabled Change Log: =========== * V1 -> V2: * Replaced the name of the NETCONSOLE_PARAM_TARGET_NAME macro * Improved the code documentation * Improved the user documentation Breno Leitao (3): netconsole: Initialize configfs_item for default targets netconsole: Attach cmdline target to dynamic target Documentation: netconsole: add support for cmdline targets Documentation/networking/netconsole.rst | 22 ++++++++-- drivers/net/netconsole.c | 55 ++++++++++++++++++++++++- 2 files changed, 72 insertions(+), 5 deletions(-) -- 2.34.1