Article View: linux.kernel.netdev
Article #11551Re: [PATCH net-next v8 09/11] net: dsa: realtek: rtl8365mb: refactor L2 MAC handling
From: Linus Walleij
Date: Thu, 05 Nov 2026 09:18
Date: Thu, 05 Nov 2026 09:18
23 lines
9660 bytes
9660 bytes
On Wed, Nov 4, 2026 at 12:35 AM Mieczyslaw Nalewaj <namiltd@yahoo.com> wrote:
> Move the L2 MAC pack/unpack helpers above the family C serializers
> and use them there instead of open-coding the byte packing, since the
> layout of the MAC address words is the same for both families. The
> now unused per-field MAC masks are dropped.
>
> Rename the family C serializers to rtl8365mb_c_l2_*() and keep
> rtl8365mb_l2_{data_to_uc,uc_to_data,data_to_mc,mc_to_data}() as thin
> dispatchers taking priv, so that a following patch can add the family
> D layout without touching the family C code again.
>
> No functional change.
>
> Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Looks reasonable:
Reviewed-by: Linus Walleij <linusw@kernel.org>
Yours,
Linus Walleij
Technical Details
Message-ID:
<CAD++jLn4EnfaU+jVOxx526pfEFcUT44V1voFnw6JwSkr1WAkxQ@mail.gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-357166-linux-kernel-netdev=dewy.ruReferences:
<08611959-c555-46d9-8e7e-20b85d0c4056@yahoo.com> <3685f73e-0c28-4ff1-8c8e-3c39643a6649@yahoo.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-357166-linux-kernel-netdev=dewy.ru
From: linusw@kernel.org (Linus Walleij)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v8 09/11] net: dsa: realtek: rtl8365mb: refactor
L2 MAC handling
Date: Thu, 5 Nov 2026 10:18:18 +0100
Organization: Usenet Network
Message-ID: <CAD++jLn4EnfaU+jVOxx526pfEFcUT44V1voFnw6JwSkr1WAkxQ@mail.gmail.com>
References: <08611959-c555-46d9-8e7e-20b85d0c4056@yahoo.com> <3685f73e-0c28-4ff1-8c8e-3c39643a6649@yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: usenet.network;
logging-data="3599802"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:jrW/7PTpbb5pmmTHKrxfvRP4U6o= sha256:+fwQY8DlRCrNkDYMRT3UR+8/9LQ0Kb7Vd40NqwjZWjc=
sha1:wgXIF3UzuqSX61VxuIsM/WbeEEY= sha256:V0O3+1n0BvGgWt6Jrn/DMoq5er1A5nIrQtWy34WPhs0=
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 15620112EE3; Thu, 5 Nov 2026 12:19:06 +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 E5yZHZpzPTAy;
Thu, 5 Nov 2026 12:19:02 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-357166-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 AC5B6112EE1; Thu, 5 Nov 2026 12:18:54 +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 A659A605CF5; Thu, 5 Nov 2026 09:18:46 +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=1793870318;
b=fqTJp/puQz8TLM6Z5AVx73VWP4Mv7gAeb9N1AnaZJIEBM3CpPsBLRVanqyflZE8vVJNg
TLqMQIaZTjm5CXGYIMIyj4j2hKbfGr0Yc9DpXhylScIyt7JxmUR8TR668iNAvBiMdLF3t
5jq4byEpsGF79A6wcXzKMnXLC52PDfcR2VBR3eHTRp0UphvccV7v3wJw0eBEyv2fTrFKL
TiHsfkium8Gt5f1qakvbqRAXbd0gb5qfIVew5nnLcQ9BL2X4wvkPaREAu0A38BoVKQkOO
2z5Arx/SLmnNWv4dpfaGHEIuhF6nHREipuuqlrPyfi2cpmSWrceeZTj2fpE1m/GkCtw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793870318;
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=B7DWIWEHYIXw7nlh8lbOCJtbur1khzB/9N+8sudt72g=;
b=BfsNzcpAWZKocgV5K+nYNeCPrkJBlKluOT6hpThDTY+b4KesdrUWio5/0Nj7vMne/K0Z
k++lwt3lUfR/RQ1PRkNsBsVTpds4cztt98kPw86I6Sh6gmTrEQNN21SDUj9WNLgnTTrZn
FtWzeZFpTXZuDbrBlXdjov0SfwswXAq/nzwx2BmfDa0/RxbuyegLfO7IWovmzS5aLTC+/
5BC42LicbzKutUggeyWjCCMeNWCa4fBrJMgrAyqidbXUWab3eMDQZiAEtPgpcU4pixJBJ
JKIVT/kcIw4pMT4T0q8pgMKH2Q5M9NduruD3+q6V56dmFA0k112sZYOk8KDvBTNnznw==
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=DJM+BnRY;
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 88A8D606A33E;
Thu, 5 Nov 2026 09:18:38 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=DJM+BnRY
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=1793870312;
b=vkcdA5jCBQOLZuw5cM89FecCW4YJk7ebQ2cBEzdp9aoGcbpFrxtdV/HjQpQGX/jbhfny
jcyW4jx/yJTF0RLIl3WrEr9hQiTW5OeYVyFg5eu+Lz7bkt6a2UisahVVrdF1FFJ8IcvoF
78WwUj/a+UNum9c1EhwKGrUiGcXdNuJMZi4VEtBuga9JXXrUdFjtSXa2iBzt0e2wQ2H6G
FfNTb7KWaVqseosHLEuZ17+O35pIb9B4NAlNHoZ+2jLHuw/TGiyPk9m++9L06HHHTygB/
cGuw+9vmrG+xN10Wxy0ga5RovhDTy6//uafcu/DjDf4V68Mh/iJplAeYIGO3smypFeQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1793870312;
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=B7DWIWEHYIXw7nlh8lbOCJtbur1khzB/9N+8sudt72g=;
b=iUZ+mC8uOTND7pBIXKRjvFvbpFlYQUZ+T6GbVowMMjMh8FfcTs7oQ5HDleCzk3qRbHTR
4TGeLhlhR7JiBhg6bK4OA8meDTAE1ehvcXvez8ApHojp8aFKOveOhJwSWBASI3TjSdaN7
FGwzNSyZuFpsKgVfHfReS3mYNx3FNZE6M3PFdiqrWUHx0MlUa+mQOVKMpFn56vjt9TJo0
efDzFEm4x0crKRvqOZ0Dh6qHPoAfdBU5HTdSnMXiPymb548y1i5XcmLeJQut5C7msswmf
1p0KoOIt8RpRbcGc3zPyXQ9mCRjWtxXS1YR6pTpKjHwTl8DdsSL2xh1s3hFFUqq9hdA==
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=DJM+BnRY;
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 68D2C606A32D
for <netdev@vger.kernel.org>; Thu, 5 Nov 2026 09:18:32 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD5111F00919
for <netdev@vger.kernel.org>; Thu, 5 Nov 2026 09:18:31 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
s=k20260515; t=1793870311;
bh=B7DWIWEHYIXw7nlh8lbOCJtbur1khzB/9N+8sudt72g=;
h=References:In-Reply-To:From:Date:Subject:To:Cc;
b=DJM+BnRY/GLQ9wK/9H14FEMG6nUzugP/2jXedCn1Ffy1htfKtcnP5W3Xc4Kjhg8SL
+WrSWpHtE24X/qOp0BIom2Zy42HkrxXfXcIFD1HwsoJy/ws4XlCuVXeLkBAIGCOktk
ARcFANo8MBcasZpRH4gfMjDLL3q3ug1V0QLozRj9PLA1719giK5JZdUxDcijtV/Kxz
jwDOHgwh1a8BgmGgYGN0BMMpacIov+yEavqmYUUhuCfgA7MvWBL6keXzXj1OcLtFDb
kELGivdCYplEjGXuBAD0bz2S01T3g680pMAB5mgOE8Y4X2NS+Sj+/6nwPqNNgvz2P7
mXD/VNiFHD/WA==
X-Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-5be4b61fd3dso1389580e87.3
for <netdev@vger.kernel.org>; Thu, 05 Nov 2026 01:18:31 -0800 (PST)
X-Forwarded-Encrypted: i=1; AKwUvBxcvhCQ/MJr1QdWWYTMvHWG7h8xF7e8GvJivWv4HNVgNNQt2qFz0owls8JoWzI/DLP08BwE2gY=@vger.kernel.org
X-Gm-Message-State: APuU4Z9J9DfQm6kECrRybPNNdZUNWGFlBcyk2QHfGJ7qoRzneIOWAWK4
hd2B+0e4Fp1xMsDz5yhOWsQ/DnpKgccL0d+Ru9cHPbCIx43Crmf3Ipzl2MQiyhtgUHKPlxlu2Fz
DXtOedFwOO2QthhSMMuLk/IrltG72lR4=
X-Received: by 2002:a05:6512:2316:b0:5bf:e643:cb75 with SMTP id
2adb3069b0e04-5bfe643ccdemr4944705e87.48.1793870310730; Thu, 05 Nov 2026
01:18:30 -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: <3685f73e-0c28-4ff1-8c8e-3c39643a6649@yahoo.com>
X-Gmail-Original-Message-ID: <CAD++jLn4EnfaU+jVOxx526pfEFcUT44V1voFnw6JwSkr1WAkxQ@mail.gmail.com>
X-Gm-Features: AclHuK88ewFmh9vAPMZtxXN7cAVEYnMa8u2jUSdr40HMf_OO8Bh3rYGKrGBiPR0
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