Article View: linux.kernel.netdev
Article #17352Re: [PATCH net-next v21 07/15] net: phylink: add capabilities helper and track modified advertising
From: Christian Marangi
Date: Mon, 16 Nov 2026 16:37
Date: Mon, 16 Nov 2026 16:37
41 lines
12756 bytes
12756 bytes
On Mon, Nov 16, 2026 at 05:33:50PM +0100, Christian Marangi wrote: > In preparation for PCS release/late attach, it's needed to introduce an > helper to calculate the capabilities after a PCS is removed/added and it's > needed to track the advertising in link_config changed by the user compared > to the originally one calculated in phylink_create(). > > To archieve this, introduce dedicated advertising variables in phylink > struct and update it when the new phylink_update_capabilities() is called > or advertise is updated in link_config. > > In phylink struct the new advertising will contain the full advertising > bits right after a phylink_validate and the new user_disabled_advertising > will be the mask of modes that were disabled from an ethtool ksettings > (with the parsing done in phylink_update_user_disabled_advertising()). > > This double reference is needed to account case when a PCS gets removed and > attached again to preserve user-defined advertising rules. > > phylink_update_capabilities() will calculate the new supported modes and > the new capabilities, update the full advertising in phylink and restore > the user-disabled modes. > > phylink_create() is also updated to init the phylink advertising and > link_config advertising. > > phylink_update_mac_pause_capabilities() is updated to use the new > phylink_update_capabilities() to account for user-disabled advertising > modes and update the full advertising in phylink. > > phylink_sfp_set_config() and phylink_choose_sfp_interface() are updated to > account for the user-disabled modes, first in the > phylink_sfp_interface_preference loop and then on updating the link_config > advertising. > > Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> This is a leftover from the title rename... Please ignore. -- Ansuel
Technical Details
Message-ID:
<6afb315f.7f974077.2e08bb.6940@mx.google.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364577-linux-kernel-netdev=dewy.ruReferences:
<20261116163412.551438-1-ansuelsmth@gmail.com> <20261116163412.551438-8-ansuelsmth@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-364577-linux-kernel-netdev=dewy.ru
From: ansuelsmth@gmail.com (Christian Marangi)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v21 07/15] net: phylink: add capabilities helper
and track modified advertising
Date: Mon, 16 Nov 2026 17:37:47 +0100
Organization: Usenet Network
Message-ID: <6afb315f.7f974077.2e08bb.6940@mx.google.com>
References: <20261116163412.551438-1-ansuelsmth@gmail.com>
<20261116163412.551438-8-ansuelsmth@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
logging-data="2113209"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:JX7Q/7090c4QB42Z4XS8DghSb60= sha256:lW+hd619rSzxwR03udm91m4l0D0lN71/hzibVOGZ5Kc=
sha1:3vPeoVYEJpcLPJbKg+udohuo+ps= sha256:r0CwOVFSBHfonhsYfZYoY4jtEC97pOIaKLtJLN2UUJM=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 3D20D114CF8; Mon, 16 Nov 2026 19:38:08 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id lmrBoNzHimPD;
Mon, 16 Nov 2026 19:38:05 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-364577-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mail.dewy.ru (Postfix) with ESMTPS id 23CCA114CCF; Mon, 16 Nov 2026 19:37:57 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by tor.lore.kernel.org (Postfix) with ESMTP id 9A281276DD; Mon, 16 Nov 2026 16:37:55 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1794847074;
b=nQrWCZOHAXRJKF5JsaKKpT+oxG89/NSy+39Ie0kMfPgOlalzxsqt2C/GQMmRuIuDDX5K
o6ngbctfti5JLRuNEQXQ50ij1XHcyApQQYExVE3b2rh8c7vpsih3+hLogPeM6BArTXXuh
dDVRYnikYylSBC0owBDWpT0RxPbLTcjBmMN46Q5Fyb+BxEcscW/e0TtQi5IzTmqfBeGJU
vPv6fNKzEWpq6diwC4xQesJWqOIVJDNuWqcv1u27S7Hzjch01YcSo7wC2dhWy3AFSVwex
QoYtcbO8+R7oEZ5hFKO/Z7MVl1oPieyBETHQpUpkEcg//HZZ0noOG47+qOPSM/9FVdg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794847074;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Forwarded-Encrypted:X-Gm-Message-State:
X-Gm-Gg:X-Received:Received:Message-ID:X-Google-Original-Message-ID:
Date:From:To:Subject:References:X-Mailing-List:List-Id:List-Post:
List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
bh=DFx9VNe+QiyXsTiYK+4RI8C7x8ltmh7n6mja+3S/b68=;
b=T2eRXUzLuqUp1KVhLsZA1K2NES4UJq0LnNWWxz2YAS0stXVs589hKBsFiitiWOzfnxE4
sNfO2DJaSPm4okQ2wOJXGFeGC40nTGpj9ZKhT59lTNwfeUBskWREsT3E1mRMpocvrjRf4
hm5YKMC6/lZViGNYzrWVfz9jyK8rRq76G5CHDHPhiIxzmiXiQG1S2jTT4JSk03NDyM6k8
HaPMmh7TcyKb2aFfVvkrW8USAG18AZR6YXvGren/dyFZanQmbiil25dHmZ92argU65+2Z
oAJ9Fb626PADBPwKgZXD5dJkJ9zweOeg88WxJ4rDSHGVlWB+E/j5no5PqdKzT1hBQtA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=eNqMq4pd;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D6014606A880;
Mon, 16 Nov 2026 16:37:54 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=eNqMq4pd
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.43
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1794847074;
b=sfrtrn9acQE/CFEBq7paBLWnGA6fDwnXYXdrrrtM5/yyxOirnpBO6A+lrjNundcTilZS
X2FwPXeZQXtGtzfRN48tyFndMIQoOmrfl/SP1IgBl4UkHhz2o+liJOMuBrFSuAi4J8R29
JqpmrL1biJkcqM+c0Kct0n6pFcZuykxg+hgGqKozgJ1DYDWz7nKzusRJkvwvQqyeDBixA
fGAFFtM474mc7EzKLbqC1uEcObo3Nnxde678R0hcmovj1eMzEfblSokHBRvxZwwYOlXtk
J6DO4kG3T8Kkzl6r8wrbY6pfqITBZ6G5Lg1bAoY8TmoDDhLvGJnaQHFgd7rhgQUrGsA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794847074;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received:
Message-ID:X-Google-Original-Message-ID:Date:From:To:Subject:
References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
bh=DFx9VNe+QiyXsTiYK+4RI8C7x8ltmh7n6mja+3S/b68=;
b=R/grfdWfEtGxpog+Er0iwQM4TvigVHLw9gIKr7vnPtlmlTTJNpfv9Q8EMVkgP7yUIeck
AOcP6kiUDKAgvjRq/LhBCc3eTFwgsnET5qRwecSRLXPCcShORZsEngFWYq5U5ic+i8u1p
0I27JL02e2koOca+Ks3NtqqCHqBnq9IFEaw0sm0htfiU1CMTM0CL+YTIVO3RJkJK2h8G8
LnwulGzwjGfCqsd0X+fA6E9/bpsfOXMOb5YlzHOfhDzIk+KdiR747SEZ5cqqAArwGR+zY
cltJbBnw2QDjAmKyvWQtWKwrYYs/B2m0Y0ceK7cboS9PDi72iuxtnSVtBh2UEROcR3w==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=eNqMq4pd;
arc=none smtp.remote-ip=209.85.221.43
X-Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A93FD606A32F
for <netdev@vger.kernel.org>; Mon, 16 Nov 2026 16:37:53 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A93FD606A32F
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-48e09aa5264so1758453f8f.2
for <netdev@vger.kernel.org>; Mon, 16 Nov 2026 08:37:53 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1794847072; x=1795451872; darn=vger.kernel.org;
h=in-reply-to:content-disposition:content-type:mime-version
:references:subject:to:from:date:message-id:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=DFx9VNe+QiyXsTiYK+4RI8C7x8ltmh7n6mja+3S/b68=;
b=eNqMq4pdG7+RtREnW0nLtbAhfw8loOwD8ch/NLM+mhlO9edO9Xpuh8aJi6/ITtGecp
SN5fptk7D0/UooZZhSLhlEfkd024Hbrq8zj1AoWJH6DXOsRvSXZ7CpdvuM/cLqVATFcx
2BKKTLjWXhEvZPkxdUO3iReMBvWvi/3LRR+U5SrooY0v1uRabJ+zptC8o7Gt02M3Egis
TSW9HwosoAUxvxas8Oqp6Wg+kevVJHOZVQqrkA6N7+U/g6/Js/3IkmN1DGa1UQruVY4H
cpSmDdTkTw+Qf7cBPBY6VP4Ej5rn9x09uZyaCeQql8eSz30sM/zAD9iliCtW1VhTQCl4
lghg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1794847072; x=1795451872;
h=in-reply-to:content-disposition:content-type:mime-version
:references:subject:to:from:date:message-id:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=DFx9VNe+QiyXsTiYK+4RI8C7x8ltmh7n6mja+3S/b68=;
b=nTldzV0DVhHzN5BtmeBghcUaGSiWuVXTYhPufk8YzAov5gvyd0WC2nLS2F1D1xzFDV
SXidTV2xVsVSbLCL3bPs261OvH2WYSmMH5PSD0m3EM0hPCI4MHz0RBetzFx+NUCtv2UO
4lUNOiNjCXdDZR9UqGw+ZrKrmNGsxH/lqnYrX/3IdMlPKe3ZvbmxqmVDDsOtO7fLgNlE
7AseQ/0y5cZfmNaRXsHh9Z0StrIW3g7zOrBx8MssAc3l+akkU2dIPe5VIZfIN0q4SSTZ
r7QbyeigB8zHDqhkH4ItmtyognTKb7oJ6qmqhXEzq6dlJaUyhF9jptXSrGh5502ROT49
g2Ow==
X-Forwarded-Encrypted: i=1; AL+hErEmTKhRynMU7SaxW4FevWTi/pF80aBylkhEdaFNL031nYgDjcp1/7o1i2lnubc1xRrc7EhoABQ=@vger.kernel.org
X-Gm-Message-State: APuU4Z9CZjxsslpCD5YspEa5DANtz+/UDwosUcEA0Jr1ASDS7Rnmv7h9
a2eoSFQ0PfWuEvzWQuiUSbU+eYrXplwoeYxaEsAFojdEVGt3g0Q7EUt7
X-Gm-Gg: AZFdTZf5MT2WeQqBHA1SruAMvpD5dNjnLAImEJGyAJYECEd6vilGLwO8arLuAY+jKk4
FGBqi90Z1+cjid13I+0vlCzH3OlHOMnICoHWuVBCi5pbdjJJSgVMlAJhyaWWus/CngOU4SRemC2
/hhmhGzHjWBGJOY9+mJyJi0PnQPU2neldUfqvUqJLn/70rcJrySn4v5K5XSrNrX/0xTuA5bQtaI
y6JyhWU0CROHA39/e89lgA/BkMxkznx7KW37IIbJ+JRzDTuSqrWBOFlAHGBzxLhiOhmrFD/r0Ft
4p0ZN9szFIG+InATLCfIAouGVtOrF9FxgbtJY8vFzUqw2sjspi/rnd0rrSVpmiFAHFyDWo+S5f6
zwHi1tVp4ZaH3s3OMl4fr3RaBYPAXhfjMUlmyu3DlXKQUjBWqCPtCpyenFrYQUWf0ZURaQCOEdE
l9FqN4TWllveyEIEXmrSRSkCsMdWo8BtxSG+siPSG3458vlUS6LA9BQ1IItmBTubmFmqKRt9ZrR
HQUfNm6Hoql6KfYS0cyf3+DOxL24NLQ2d+UNCGf2HGHRxAsY4IRVAZ3nRxCaN6K22nSqJ3aA1yF
spUzeKd3CCd7/gIAiqErJ5EcUFuVNORUGVXnlPCDeWwnWgGG3jdJdT9E8f0/stqQ6Jq1LZhSkx6
3FF+C2jHnJqEiMM1p
X-Received: by 2002:a05:6000:4289:b0:492:b221:ac38 with SMTP id ffacd0b85a97d-49c7381b4e2mr22865762f8f.26.1794847071978;
Mon, 16 Nov 2026 08:37:51 -0800 (PST)
X-Received: from Ansuel-XPS. (93-34-92-103.ip49.fastwebnet.it. [93.34.92.103])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-49c5a32d336sm25103969f8f.0.2026.11.16.08.37.50
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Mon, 16 Nov 2026 08:37:51 -0800 (PST)
X-Google-Original-Message-ID: <avsxW86_xeNrm6Dz@Ansuel-XPS.>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261116163412.551438-8-ansuelsmth@gmail.com>