Article View: linux.kernel.netdev
Article #15398Re: [PATCH net-next v2 09/10] net: dsa: realtek: rtl8365mb: offload DCB apptrust
From: Linus Walleij
Date: Thu, 12 Nov 2026 20:35
Date: Thu, 12 Nov 2026 20:35
40 lines
10971 bytes
10971 bytes
On Thu, Nov 12, 2026 at 9:38 AM Oleksij Rempel <o.rempel@pengutronix.de> wrote: > Wire up port_get_apptrust and port_set_apptrust. The admin can then > choose through dcbnl apptrust which ingress classification a port trusts > for its priority: 802.1p (PCP), DSCP or both. A port that trusts nothing > keeps the port default priority. > > In the driver's model of the hardware, the trusted priority-decision > table is switch-wide, so all ports that trust something must trust the > same selectors. While another port trusts a set of selectors, a request > to trust a different set is refused with -EBUSY. > > When both are trusted, DSCP must come first. When PCP is trusted, the > switch classifies an untagged frame by the PCP given to untagged > frames. A PCP source ranked above DSCP would then hide DSCP from > untagged IP frames. Refuse the order pcp dscp and any unknown selector > with -EOPNOTSUPP. > > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> > --- > Changes in v2: > - move selector and precedence validation into rtl83xx-qos.c behind new > qos_get/set_apptrust callbacks; weights and -EBUSY stay here (Linus) > - use one-hot decision weights; in the driver's model, the v1 linear > weights could tie PCP with DSCP (Linus) > - define the apptrust slot order once (enum rtl83xx_apptrust_slot) for > the shared selector table and the backend source table > - write the PCP and DSCP weights with one register update, so a failed > write cannot leave the trusted table half programmed (sashiko) > - check that all apptrust sources share the one register that is updated > - rank DSCP above PCP and refuse pcp dscp with -EOPNOTSUPP, because > with PCP first, untagged IP frames never reach DSCP Very thorough and resolves my issues! Reviewed-by: Linus Walleij <linusw@kernel.org> Yours, Linus Walleij
Technical Details
Message-ID:
<CAD++jL=EGaGXJCMGoTX-R5YU+OSU26NpbO3MBbr+yWBO0q6-yA@mail.gmail.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-362208-linux-kernel-netdev=dewy.ruReferences:
<20261112-rtl8365mb-dcb-ingress-v2-0-f8e6fbdf8c99@pengutronix.de> <20261112-rtl8365mb-dcb-ingress-v2-9-f8e6fbdf8c99@pengutronix.de>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-362208-linux-kernel-netdev=dewy.ru
From: linusw@kernel.org (Linus Walleij)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v2 09/10] net: dsa: realtek: rtl8365mb: offload
DCB apptrust
Date: Thu, 12 Nov 2026 21:35:42 +0100
Organization: Usenet Network
Message-ID: <CAD++jL=EGaGXJCMGoTX-R5YU+OSU26NpbO3MBbr+yWBO0q6-yA@mail.gmail.com>
References: <20261112-rtl8365mb-dcb-ingress-v2-0-f8e6fbdf8c99@pengutronix.de> <20261112-rtl8365mb-dcb-ingress-v2-9-f8e6fbdf8c99@pengutronix.de>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
logging-data="1178973"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:U1ANrcwYRwkmZur4ZtxDTSkoRxo= sha256:qcLbN1HiPJajuiDLjtsd6x5NT3JRkqzJ9C4pvO0a324=
sha1:BPVAvYHtaOFDtGzFsyNQ9VSZuQs= sha256:HIHtiKkLnwAr7h0FdRxi11MSkckOOiCiGxF97QFJe8Y=
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 A2537114096; Fri, 13 Nov 2026 00:13:26 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.501
X-Spam-Status: No, score=-3.501 tagged_above=-9999 required=6.31
tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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=kernel.org
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 flVNeItrp2iX;
Fri, 13 Nov 2026 00:13:23 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-362208-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
by mail.dewy.ru (Postfix) with ESMTPS id 6DEF3114010; Fri, 13 Nov 2026 00:13:15 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sto.lore.kernel.org (Postfix) with ESMTP id E70396A564C; Thu, 12 Nov 2026 20:36:01 +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=1794515757;
b=BFOnm/8yI/slzlqv/tQySqBJYD8MLJ8X8WsY3T1DGlcGGX1h9mEmyhUCJesRbUOB+1Ko
AaEvocdt6v2LS2nfOTTanrgPnfrVMPp556S0XmGacEb0ZPEFckGmeMqATTi2XXBUipFl3
2esyYtj9luhTRLm61If9jFmVKZLuDUaFzWugZBIFIqsWjw/w0GCNUI+sxQabL4lcWxiow
9812+KNo2yZasw8TR08MO4J2wPXbCREHGbqSxqvm4C3R4c6n03VGrQfvZo/+cbldZcHMq
Eyo2mH/DyhvY2menV4Xy5UD+to9WSfcCsGpWu2RGtTbiz+z3chDdIqKNgbnNcb0FsFA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794515757;
h=X-Original-To:Received:Received:DKIM-Signature:Received:
X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:X-Mailing-List:
List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
List-Owner:Precedence:MIME-Version:References:In-Reply-To:From:Date:
X-Gmail-Original-Message-ID:X-Gm-Features:Message-ID:Subject:To:Cc:
Content-Type:Content-Transfer-Encoding;
bh=6nnQnFl772x0ttUe5n0YYK5lmJ4sIS9Uyk55NkUhIc4=;
b=GXTnWRcYbBaKFPnVLTtgWkwBHgOVBSO1QodXjfxD42/qGPJ1MF6bOUsdBqjsCtXG/Myj
S3nPfmMu+lDOyqg8X9yN2RykX+qsz4v+pJG8k8TJd2r2pjsuTJ6bhTF/Q8KhVrRMBea1C
6voRY0+otbGLmbxlYtYjHtAcNBxzlWoywNjcXXUY8Go/Tw/FQGcLlbKbik7wAN9Qf2367
B5tCDsdwGw3k4wZunycG2/886gmncZUIxD7REHbNbObseXknEIHc2Qzf6Ue2hDhEPUzuZ
iaH8wLvK/+lbX06ALurf7uXmzIwPk62dFD7BBoUYMpeXPudRH1HCwqJ4eNjC7DN/jfw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bcbRho79;
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 A2939606A336;
Thu, 12 Nov 2026 20:35:57 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bcbRho79
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1794515756;
b=ySimua4+WWfy5bmmrUlvOAvxFQg6TWRHEr/ZhYoXUT+rGZdk0T+/Vg37LCkBOkzGuAkn
GsN3k7ArPhDLtmpVHUuUSmTAl4vPPHP4Bgxn0Pk2TpOMfF4kmo+nNaQFbcl0fPmHFWJ8D
c78GSbWvrqlKWBlm3q7XOPiQzVR8QZEuQntws9Te6qfHTO95sg4sG50e6XrZ8p4ZK4hHf
ALF+FbDww7NfMkw+x4RUL5Roi/0Xk/ItfDmThcR+sBxez8Q2lQYc7DuL3Wdj1wZ4dwHS9
s7Wp3Iqn8R8GUV1OvGsn2LcKQL/oOK5zskcMnFlclg/dp6matgEFCdLgydR9KzA2XsQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794515756;
h=Received:DKIM-Signature:Received:X-Forwarded-Encrypted:
X-Gm-Message-State:X-Received:MIME-Version:References:In-Reply-To:
From:Date:X-Gmail-Original-Message-ID:X-Gm-Features:Message-ID:
Subject:To:Cc:Content-Type:Content-Transfer-Encoding;
bh=6nnQnFl772x0ttUe5n0YYK5lmJ4sIS9Uyk55NkUhIc4=;
b=5UUg6pvvykURfiWgwH0uzi2WinWgRjGkfQQc7mBUCLEuiXcMhxWK/mT7YpdbMTNarNyB
nWhAbeEkh/AcH8H84GBr7/3Ds4yrTyAuFJRYjx7XWD+xGPkh3j7AfuSwGHmPlDMfJZL/V
X6U3V07g8c+D5vu6FciA/4ZVfI1Y3YD6cWLChGZVz/0NkSE2syrQtSZLLO/YuuffuAsls
KnLXK8iZ7YrYAjly3CH1FAN2IIaWveEwe8Ucx5ZSRA+6z/hKtugWBIDkzOdu1HJp1QOWt
qGEGzwXDII19IvE6MYN4ZSPtytuuEhpgCKnv2AUlqCecJ0+UXoK+C2bO5iGy2h1mWTg==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bcbRho79;
arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (prime256v1))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id BDADE606A323
for <netdev@vger.kernel.org>; Thu, 12 Nov 2026 20:35:56 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 927E31F000CA
for <netdev@vger.kernel.org>; Thu, 12 Nov 2026 20:35:56 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
s=k20260515; t=1794515756;
bh=6nnQnFl772x0ttUe5n0YYK5lmJ4sIS9Uyk55NkUhIc4=;
h=References:In-Reply-To:From:Date:Subject:To:Cc;
b=bcbRho79og5+TrQo9mGVyPrV7+u0qubmPkZytHvLGZsm9an4QzBix04Di/VU6UVeI
y8mIow9HaoTxdGPzeJBHdyQytGyy7AM9YZepZrfQ/dB/qrOOtGC+lmwkDvBtiwrRfj
Ic3eZVTMc27Ij82dz3cDaxyApb+CVN0fsA90FYV9KXGCShqccyWQ8HUrebqOPf1V77
kCcP7AMu/NcbzhHfJRyOwJVvAEHvGyW46jfUgK8h+Pf58LMbxqm+ZaMqUQWF/7c/Dg
JL3zP5AvQFqg8LTH67rkx5LBCus/aQRR9wFnfQdePozRbZ+aCA8F1Mf/ZA5bVIGkLT
XhFFLamz/hhhA==
X-Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-5bfa7c09c9eso218354e87.2
for <netdev@vger.kernel.org>; Thu, 12 Nov 2026 12:35:56 -0800 (PST)
X-Forwarded-Encrypted: i=1; AL+hErGXXU5JlnjQAJgei7mW/F9Wu9LBw0vi2s/RhZfnqAqPQ/IDZ5TKAlfXr6BPvZpkE5XnuBBFwk8=@vger.kernel.org
X-Gm-Message-State: APuU4Z+MdZWOvP+Bg+aP35sYNUB2G4QVvExSljzN66ax4+QUDGkOCcAJ
SPQHjxadf6CDFIM5eIbnwEASwxGpmGHmUZA3D0hlnbuWzYldg2tOlR4YuVqPeE3Nfxzc7LpUoZa
mTLDnjZnSUpyby9tYUY4AuYSAaCmzZyE=
X-Received: by 2002:a05:6512:1192:b0:5c1:5703:46f4 with SMTP id
2adb3069b0e04-5c1705d8515mr195706e87.7.1794515755373; Thu, 12 Nov 2026
12:35:55 -0800 (PST)
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: <20261112-rtl8365mb-dcb-ingress-v2-9-f8e6fbdf8c99@pengutronix.de>
X-Gmail-Original-Message-ID: <CAD++jL=EGaGXJCMGoTX-R5YU+OSU26NpbO3MBbr+yWBO0q6-yA@mail.gmail.com>
X-Gm-Features: AclHuK-MB5ZypNmDSpTL7UbjyzH-7DqQYw4we94SaKV5K5KPZVzBJ2hsaKf5r_8
X-Cc: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Luiz Angelo Daros de Luca <luizluca@gmail.com>, Alvin Šipraga <alvin.sipraga@analog.com>,
Andrew Lunn <andrew@lunn.ch>, Vladimir Oltean <olteanv@gmail.com>, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel@pengutronix.de