Article View: linux.kernel.netdev
Article #24245Re: [PATCH net-next v16 13/15] net: dsa: realtek: rtl8365mb: refactor QoS priority handling
From: Linus Walleij
Date: Sun, 29 Nov 2026 22:51
Date: Sun, 29 Nov 2026 22:51
29 lines
10299 bytes
10299 bytes
On Sun, Nov 29, 2026 at 4:12 PM Mieczyslaw Nalewaj <namiltd@yahoo.com> wrote: > The shared QoS layer hands the backend internal priorities that are > 802.1Q traffic types, and the backend stores them in the chip as they > are, together with a separate per-port PCP for untagged frames. Family D > numbers its internal priorities differently and has no separate > untagged-PCP register, which the next patch adds. > > Move the conversion between a traffic type and the chip's priority, and > the programming of the PCP of untagged frames, behind three new hooks in > struct rtl8365mb_family_info, as for the VLAN, PVID and L2 helpers: > qos_iprio_to_hw, qos_hw_to_iprio and qos_set_untag_pcp. The existing > behaviour becomes the family C implementation: the traffic type is > stored as it is and the untagged PCP register is written as before. > rtl8365mb_qos_qmap_init() now iterates over the chip's priorities and > converts each one back to its traffic type. Name the qmap index > hw_prio throughout, because it is already in the chip's numbering. > > No functional change. > > Tested-by: Gustavo Foletto Mora <gusfmora@gmail.com> > Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com> Reviewed-by: Linus Walleij <linusw@kernel.org> Yours, Linus Walleij
Technical Details
Message-ID:
<CAD++jL=U2FP+Es0xkowRSkREX7kRvUxnYEYb3WQW-7msdke5PQ@mail.gmail.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373688-linux-kernel-netdev=dewy.ruReferences:
<aebcc7f6-d5f8-4157-b63a-e2e707d9859b@yahoo.com> <bcf290e8-dbd7-408a-bf89-df7b47e6ad92@yahoo.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373688-linux-kernel-netdev=dewy.ru
From: linusw@kernel.org (Linus Walleij)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v16 13/15] net: dsa: realtek: rtl8365mb: refactor
QoS priority handling
Date: Sun, 29 Nov 2026 23:51:52 +0100
Organization: Usenet Network
Message-ID: <CAD++jL=U2FP+Es0xkowRSkREX7kRvUxnYEYb3WQW-7msdke5PQ@mail.gmail.com>
References: <aebcc7f6-d5f8-4157-b63a-e2e707d9859b@yahoo.com> <bcf290e8-dbd7-408a-bf89-df7b47e6ad92@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
logging-data="1278836"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:BRtcA/9vgSpyq7TRQ1TKZ6uyhtc= sha256:uEqRZlnSfntE3NJERCdEZWReftyJhT38exGmnXocnac=
sha1:F5uKBtN3RGEC1pcx57kLcRuawAc= sha256:RZhT9dv97ZuZUakPXj6k1qo4YmzyT36RG+Q3Duh+YeU=
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 647AC125FB1; Mon, 30 Nov 2026 01:52:27 +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 GVXQZ3A2Kp1k;
Mon, 30 Nov 2026 01:52:24 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-373688-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mail.dewy.ru (Postfix) with ESMTPS id 4779F125FB0; Mon, 30 Nov 2026 01:52:15 +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 D258823130; Sun, 29 Nov 2026 22:52:11 +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=1795992728;
b=n/gWjQGGo3qnyhD/NRWYpHZOjNd3Wq1VwxPzQEeJxXdV0Ljgh4bcOfGrzMvECOj8Ggsq
vKn1/OVhdhsEcyGk+So+q6SuczAJGohoCI5KHKdmFbEQrSy2LhAxEjC6QSTLa3gfaN57U
xRXqyeqEy6mdoFaQWz+cXEWgT0Y63AKJdwkeVUM5wvB7N8lQ6YXp7vJJVP9/VAXJ1EKIF
NJZVvjD/wW4qXyZGVLeNreMbRUF6omxY2Jh547KFp6oDFXdVBmZx71GfyON0XkanHsoaz
liqLW/J9R+x/n4pc/MQMGCIifmhZQOfrWzD5qLmDBM0CKl5ZgArrfJm3gCfm81nZwmQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795992728;
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=pxRD1zmK/T4XPNsCNZ4Jb+8gVhR8pBIdGTxdG8C+dSc=;
b=WbNW3QvqJ2mAL2SFXbueX+0VFHH6wxQ2SqTlMtepWo0NORT7LNjOQ8Oq40U1xqjNkirF
fgr7Sm4sBtGh59HvwOIqhQJ/gDpGB1d40Gfi6koVZU69Co9yIaFdIn3BfaWrg1y6mCF/n
omr4nMby5nKqpfgrLTDi634RRNqEyGiS9lL0YEiRnDK+OOGWQhTY7Nv8mb09eld6eoXoe
2V1YFg25B2OQXO3Ptfmh2gDqxcK1sj1SCtUE3G53xXiZb7WIzNvMieuPYuOueVSs9y3Ct
DHyApHE2WNnEvy7FsuGJflZV/pbMyJqcRSXL84pMWjBGPUNWyi99YpwrEvmkPDLvFuA==
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=Ol1A82NF;
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 522B2606A335;
Sun, 29 Nov 2026 22:52:08 +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=Ol1A82NF
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=1795992727;
b=VUv1KTT0pSypeRKr6cvLFQpSgrBfNzU0yWnx/PVbrGN1WRknlKGvXA10ctRfz3nBIWW4
bsTGIC4vsLuAIuuP1ILd7WKcG81KcoB29e1bZehcnxjEf0ae2ABv5R1EOUW8gcow4NrOM
usWaoISMPj4I1L/682MLP5oT81rr57pGcuuojDZaG05RpjthQEuS4J7R7G7AK49eSPFoy
hehkIf49Q6R/51M3dPdnifRXUQfoI40rj/lNNUMOjOe9wZk+a1EMh12JE7SEZ5kMrupQ4
MIPMQalIV1VQ7wTLHaJt2GE0X1ZnobdBvQLLzLkM5/YTeQmk8FqE1QCVwUIYt/uHLxQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795992727;
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=pxRD1zmK/T4XPNsCNZ4Jb+8gVhR8pBIdGTxdG8C+dSc=;
b=WclpkwyYI3bXWn6fCjAVaY2hLEZaTUyqmnkvLHmVWlcyAj+2HdBwiMEesb7Y5kFOP4Zl
S3NaqIncJQto3EGldJMqwXnjezJZDFTCS5x8ZHn62C8fOcNKd0RP+HrFOpG4hTNhuBdRv
Ke2iWVsrAoR3f70xqT3umdIrmL543L6M1Cr62kXL6zLLuX+9qs4NU1EeV2HT+vJKvUSFS
gFNNjasV41++hPvLBKK71Wg5G/JZZ4bbQD9ROFf3NUAlfN1DiR91AfEQYLPHxYknzgGo7
11LgcBoEVDPdHzpPvjqDUWiIbGooYj17tAHt1QGxmrAcAe8NXHQ/deZTrD6JgqhSlaw==
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=Ol1A82NF;
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 6D43A606A327
for <netdev@vger.kernel.org>; Sun, 29 Nov 2026 22:52:07 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5E691F0089F
for <netdev@vger.kernel.org>; Sun, 29 Nov 2026 22:52:06 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
s=k20260515; t=1795992726;
bh=pxRD1zmK/T4XPNsCNZ4Jb+8gVhR8pBIdGTxdG8C+dSc=;
h=References:In-Reply-To:From:Date:Subject:To:Cc;
b=Ol1A82NFwHmG6eAqdEFISM8/zmD9GnGqoNbqfAsOY+IaYZHXMct8m1sB/qQ2MIxLG
7MNK9CjRbQ5QZoNcFPXT6mWqjkEBBBk/y9u+Cmw7f0YUqwJ9FKiyTpP2a0B7vcxsjt
1f2PfMxRwN+34NSvBkcwSfqde8IZZvV7uu16okWRXsakdrq5GwT+MD4UH4BYooy1Se
4ywguzlqsZNfLx/kYnfY2ExG5kfSvFSPn/+kIPlYibdreSyVcmBpgEvPVDdxJPpjUq
KPpFfujoCD3gRUbElQlDOm8prr42EBFs8r7HHocqNT+jWvwjwPw5t66ScnxDgr/CGC
ZPq0yLdBnb9tw==
X-Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-5bfa65c8617so2164695e87.0
for <netdev@vger.kernel.org>; Sun, 29 Nov 2026 14:52:06 -0800 (PST)
X-Forwarded-Encrypted: i=1; AL+hErGTkcusOQM7Yi0QtFTtz5agKSIQ9XdtN4Lx23j6nVIglU9ghUcNA5448w0B1HjE92tYmm0DzPg=@vger.kernel.org
X-Gm-Message-State: APuU4Z+87G/q/jUkDcDVcZTFCwSC6JVCpc48zq4Qql0RCFuJWYpdrjPW
7ULjNyLgrvpvdrkO69TziUprLbGJO2E4/LBohNTaoHfpBAcBm+8oRJm2d2CJkBazwHJTcohU9mx
N2JZYp5b+wq24/2TNbvc3NDF2cMHMILA=
X-Received: by 2002:a05:6512:4018:b0:5c3:390f:eadc with SMTP id
2adb3069b0e04-5c3390fec8amr3038867e87.36.1795992725440; Sun, 29 Nov 2026
14:52:05 -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: <bcf290e8-dbd7-408a-bf89-df7b47e6ad92@yahoo.com>
X-Gmail-Original-Message-ID: <CAD++jL=U2FP+Es0xkowRSkREX7kRvUxnYEYb3WQW-7msdke5PQ@mail.gmail.com>
X-Gm-Features: Aa3M54oGX_xZFjMFfI6D8N0V-zwvg2_XEdYIYu4n_czBkL7Mhy0JmCd0fZcJyHg
X-Cc: andrew@lunn.ch, olteanv@gmail.com, kuba@kernel.org, davem@davemloft.net,
edumazet@google.com, pabeni@redhat.com, linux@armlinux.org.uk,
luizluca@gmail.com, maxime.chevallier@bootlin.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, alvin.sipraga@analog.com, gusfmora@gmail.com,
kuncy7@gmail.com, fabianotassotti@gmail.com, gabonpivovich@gmail.com,
contact@c127.dev, o.rempel@pengutronix.de