From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF63A480DE4 for ; Wed, 6 May 2026 15:22:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778080936; cv=none; b=IhskScpqk85GvfQCnwBzO9RLvtYQoXLAvF5jrq3Eny/2YslENV29hyJPKxQLSLk/K7mypF5nw+vIy2BZg50p7s1TGlXbASqXDe8hVhaNGU6RxEAz6EqiDrNFzTGbZXmJMBwy3DPA1nGR5Kk+ZJ1IbPjgItrJBBe+pDM0ZbNLROM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778080936; c=relaxed/simple; bh=PZt87gsUS+Wgo4zfaqwWXZGdWegl3vlb2EK9YGH238M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lnxQhugULHrrB1PrQoyrFVaDNw4S4OEGNnLN67JNUvuwp+8ZT9fljkTk/8S7Jc0ENDWy0EFsn0H5EL4rIqY0s2Z4dCv5d4vatOGAbxOdfzgTKjNZIdwN0jEseV7nHk3hVLFe+PtZcL78BU1oF26lMPeB/11ErJQbwSkQtcfjRm4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=resnulli.us; spf=none smtp.mailfrom=resnulli.us; dkim=pass (2048-bit key) header.d=resnulli-us.20251104.gappssmtp.com header.i=@resnulli-us.20251104.gappssmtp.com header.b=q1H8/0zx; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=resnulli.us Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=resnulli.us Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=resnulli-us.20251104.gappssmtp.com header.i=@resnulli-us.20251104.gappssmtp.com header.b="q1H8/0zx" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4891b0786beso43394325e9.1 for ; Wed, 06 May 2026 08:22:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20251104.gappssmtp.com; s=20251104; t=1778080927; x=1778685727; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=f2otLqzL5UIwKJGEw7GU0/viRo2RnqRLXcAGMdCXHaA=; b=q1H8/0zxTASA4aBVYQKqHcEePfrxTpKDgm7SM4meO4nF/VtG5mRlWWg769m8cnyJpd UKNz0ti95hz5Bp8K+souRyejdRtmHNS5v/W9vE8bUi32krABp1iE1H7lxsuJxUzsBerh oiYYHm2yR0nkl5on7Xm/zqLTaXq/J7M0OsyhmbiAMU6UAK/4nKNXeKzltC/Gcb3rVCcJ ixD3vYj1DoWgY1/D+fL+q2jPvmAKkFI5J0lxZVxspIWkF2hn2cjNinY4QtKlPcW1SfZ9 OqzVonpDqa323pF2Cvjpc0hKhy+Q3syiuJD7ZRIqc9mudLk7m7eyDQ8nAyW2eF1t4/pu zm3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778080927; x=1778685727; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=f2otLqzL5UIwKJGEw7GU0/viRo2RnqRLXcAGMdCXHaA=; b=NzEdCKVRNEW70dKS1MSfzO+nKay3TAPC3qPShTu+UXO+yQoUOMhxyw0MU3/v4QfrFM ZGPaMcJgmtrBjLFe8p89yipgvO2KBegxCEfx3tbyT+8g6RjBiF/BVNmMdVa3bPcz57pg Lq0SS57RiUaFqzK7D2uF8UQg4II/eFFXqdNPgDFmrOM2eHwFS6zWdsiov/nLA5ajSdmT i1wVWUAmOePfVBgRpZhiAewSkMoud7jq2knZKlQtGNcv9/ZwzSV4oCc5qWRnFQg+g0Ly A7ivEdsNpR7Bg9LPpq4LOKw4iw6BjeKCje9NnU+v10NTwbECb3s/mROnK9cC9j49drIs hDqA== X-Forwarded-Encrypted: i=1; AFNElJ87R7o421SMBc4xYKciKrDsV4oOP0btZQtMEo9Qx/GrN940V8sMK9qR1hd1T0RTOGme9XaRFR1y+8j8D1A=@vger.kernel.org X-Gm-Message-State: AOJu0YyMpnlemBq94yLBOFEZx6t+iZsChssMwDS3SUaQTc1iVS7aLz1u 3eXirfS93dI7VpUezY2bkLLXzPJ3DMKL6W3h3YqwqPuTMMAdSxjAuff6/MUI5Ih1oyo= X-Gm-Gg: AeBDieuTstJY9l5TCLFdFnUFEOW8rLtMrsf0nBt7erbtVXiwvYRXTydqFfsQi7Nr2o6 sLrlGivK5Qbds7N4R2bLahTMcq/9LgGHHrb/BuO2a6v9rr7QAVvbcZzrG80KpFsRTSufe23wTYz R2LGvmMStScZXuLSwWLBug1NBY4lvEyiFc5FHdyb5OeQYdoYKFOAC0ivZRWX3jG6rQiz4iXVCi0 RoZA2TlRokXWDXu3poTTK8+FuFcHwNzX8AHpyR2d4DXziiXXulPZLfF9LMw7Ew9k6nCk9GxM/Je DHdsJ1zUgvPWffNvold8Qso859WdJ8a0/xJZOSyuIehIdXgyQ+S/M4joq14PnH+nEUxbxDVAiH/ nsQYH0uTdtZcMId13IsiAKXY2SHB3LyiBoV0fhBKTsm/fy7nN7rF/r4c7zOUBGyl9NcQy8pAAut llXf6y9a365gRbcMHo0r9pgExTrUmBhis5ZGvnULOIUK0E91mHI2mMwQ== X-Received: by 2002:a05:600c:a111:b0:489:19e9:b139 with SMTP id 5b1f17b1804b1-48e51e0bb78mr54150665e9.1.1778080927453; Wed, 06 May 2026 08:22:07 -0700 (PDT) Received: from FV6GYCPJ69 ([2001:1ae9:6084:ab00:8c0b:afdd:3d9d:e976]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4504f4857ffsm12838076f8f.0.2026.05.06.08.22.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2026 08:22:06 -0700 (PDT) Date: Wed, 6 May 2026 17:22:03 +0200 From: Jiri Pirko To: Mark Bloch Cc: Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , "David S. Miller" , Jonathan Corbet , Shuah Khan , Simon Horman , Saeed Mahameed , Leon Romanovsky , Tariq Toukan , Andrew Morton , "Borislav Petkov (AMD)" , Randy Dunlap , Dave Hansen , Christian Brauner , Petr Mladek , "Peter Zijlstra (Intel)" , Thomas Gleixner , Pawan Gupta , Dapeng Mi , Kees Cook , Marco Elver , Eric Biggers , Li RongQing , "Paul E. McKenney" , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-rdma@vger.kernel.org Subject: Re: [RFC net-next 0/4] devlink: Add boot-time defaults Message-ID: References: <20260506123739.1959770-1-mbloch@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@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: <20260506123739.1959770-1-mbloch@nvidia.com> Wed, May 06, 2026 at 02:37:35PM +0200, mbloch@nvidia.com wrote: >This series adds a devlink= kernel command line parameter for applying >selected devlink settings during device initialization. > >Following a discussion with Jakub[1], I am sending this RFC to get the >conversation moving. I started from Jakub's example/request and extended >it to cover requirements from production systems and configurations that >customers use. > >One important caveat is that the parsing logic in this RFC was written >with AI assistance. I am also not sure whether the resulting syntax and >parser are too complex for a kernel command line interface. This is part >of why I am sending it as an RFC: to understand what direction and level >of complexity would be acceptable to people. > >The implementation is intended to support the following properties: > >- A system may have multiple devlink devices that usually need the same > configuration. For a configuration such as eswitch mode switchdev, a > user should be able to specify multiple devices to which that > configuration applies. > >- There may be ordering dependencies between options. For example, in > mlx5, flow_steering_mode should be set before moving to switchdev. > With this in mind, defaults are applied per device in the left-to-right > order in which they appear on the command line. > >The intent is to let deployments set devlink defaults before normal >userspace orchestration runs, while still using devlink concepts and "defaults before normal userspace orchestrarion". I read it as config before config, which eventually could be skipped. >driver callbacks rather than adding driver-specific module parameters. >A default is scoped to one or more devlink handles, for example: > > devlink=[pci/0000:08:00.0]:esw:mode:switchdev > devlink=[pci/0000:08:00.0]:param:flow_steering_mode:smfs > devlink=[pci/0000:08:00.0,pci/0000:08:00.1]:param:flow_steering_mode:hmfs,[pci/0000:08:00.0,pci/0000:08:00.1]:esw:mode:switchdev I don't like this. What you do, you are basically introducing user configuration tool on kernel cmdline. The same you would achieve with a proper userspace tool/daemon. I did try to come up with it and push it here: https://github.com/systemd/systemd/pull/37393 That didn't get merged for unknown reason, but the idea is sound. You provide configuration files for devlink object and systemd-devlinkd will apply when they appear. Wouldn't this help your case? [..]