Article View: linux.kernel.netdev
Article #22330Re: [PATCH net-next v3 4/5] net: rnpgbe: Allow changing the primary MAC address
From: netdev-bot+sashiko
Date: Wed, 25 Nov 2026 06:36
Date: Wed, 25 Nov 2026 06:36
86 lines
11034 bytes
11034 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] rnpgbe_set_mac_address() in
drivers/net/ethernet/mucse/rnpgbe/rnpgbe_chip.c checks the new address…
--
net: rnpgbe: Allow changing the primary MAC address
This adds ndo_set_mac_address support to rnpgbe so the primary MAC address
can be changed while the interface is up or down. The new address is
validated, written to the primary receive address filter (RAR0), and then
committed to the netdev. It also wires up eth_validate_addr as
ndo_validate_addr.
> diff --git a/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_chip.c b/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_chip.c
> index 3a2f62f0630da..f25cca98878ef 100644
> --- a/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_chip.c
> +++ b/drivers/net/ethernet/mucse/rnpgbe/rnpgbe_chip.c
[ ... ]
> +int rnpgbe_set_mac_address(struct net_device *netdev, void *addr)
> +{
> + struct mucse *mucse = netdev_priv(netdev);
> + struct sockaddr *sa = addr;
> + int err;
> +
> + err = eth_prepare_mac_addr_change(netdev, addr);
> + if (err)
> + return err;
> +
> + rnpgbe_set_rar(&mucse->hw, 0, sa->sa_data);
> + eth_commit_mac_addr_change(netdev, addr);
[Severity: Low]
Is updating only the ETH-block RAR0 entry enough here? Would the GMAC
station address and the firmware still hold the old MAC after this runs?
As far as I can tell, rnpgbe_hw.h defines no GMAC station address
register, and the driver never writes one. The GMAC would then keep
whatever address firmware programmed at reset.
The GMAC block looks like the Synopsys DWC GMAC layout:
#define MUCSE_GMAC_OFF(_n) (0x20000 + (_n))
#define GMAC_CONTROL_RE 0x00000004
#define GMAC_CONTROL MUCSE_GMAC_OFF(0)
#define GMAC_RX_ALL (BIT(31) | BIT(0))
#define GMAC_FRAME_FILTER MUCSE_GMAC_OFF(0x4)
On that IP, MAC Address0 High/Low is the source address of the PAUSE
frames the MAC generates. RNPGBE_LINK_ST reports pause state in bits
25:24. If TX pause is active after "ip link set dev X address ...",
could those PAUSE frames carry an address the host no longer uses?
The mailbox command set in rnpgbe_mbx_fw.h also has only
GET_MAC_ADDRESS and no set command. So any firmware-side copy of the
MAC, for example for NCSI (which owns RAR entries 30-31), would also be
stale.
Receive is not affected. rnpgbe_set_link() puts the GMAC in receive-all
mode, and filtering is done by the ETH-block RAR/MTA tables. The concern
only covers frames the hardware generates and firmware state.
This is inferred from the IP family and would need to be checked against
the Mucse datasheet or vendor driver. Later patches in the series don't
seem to add a GMAC address register write or a firmware set-MAC command
either.
Does the GMAC station address need to be programmed here, or the
firmware notified, when the address changes?
> +
> + return 0;
> +}
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/6C54E9FB2E95869E%2B20261124060436.410989-1-dong100%40mucse.com
Technical Details
Message-ID:
<179558856439.3135.10366216867025200313@kernel.org>Path:
mbox-mo1.pugleaf.net!news-can.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371070-linux-kernel-netdev=dewy.ruReferences:
<4EBB27E12BC81D8D+20261124060613.411393-1-dong100@mucse.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-can.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-371070-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v3 4/5] net: rnpgbe: Allow changing the primary MAC address Date: Wed, 25 Nov 2026 06:36:04 +0000 Organization: Usenet Network Message-ID: <179558856439.3135.10366216867025200313@kernel.org> References: <4EBB27E12BC81D8D+20261124060613.411393-1-dong100@mucse.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="133983"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:NoIY1PootiFgA5RzCq0vWSggPO8= sha256:9zDRaW8e6+Mc/zWY/w1Hs2ZuId91KPOXkTBc41JoGSQ= sha1:rr4Q1bA7Wk5rFtrji/oRz0087xo= sha256:CUmfRgVuzgakapv/En1VmTtoxk35OUXL9/94hbGvXO8= 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 B49A6125E3F; Wed, 25 Nov 2026 09:36:38 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.4 X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, 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, URIBL_BLOCKED=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 1qxaSOg1zlne; Wed, 25 Nov 2026 09:36:35 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-371070-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 sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 06D7A125E35; Wed, 25 Nov 2026 09:36:27 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 954D93E30D; Wed, 25 Nov 2026 06:36:13 +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=1795588571; b=LC4139J5j2EquiwxeNZ/cy+xHzsity6oE+nJlGSoJef1Hb0gVxnE8ZPGNU9lT0B0fxeA kTX65LRaHexUQXO4p2iYLqa/YH2J7ANGXhAXQeFEWRCX4TGCEOlzwKwOExlCY/oKNKoMs XMw7UTwlou3KlQr7MkU5WGRw8U2VtK0Ri52KUH7RDyQ94YtYquTuwuEM7d7Ef2MTL86se fGXaPrbgquRQ/6LhGQ9tIUKr2crp119IV+NZWrHPv1cmE3oqmmccyDe2yDb3/nq/B++4o 0PvkeSccqAaGXZo4s0tAU0akUQqLurtF6FVMLSM/7LuvR1MHdzPnTI3+n30oG4KwfXA== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795588571; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=WmUfzwma93rg6Bml2GYK77+Ze3Dw48MIC5lQRVm2SRU=; b=3Az4+lWzCEA+qEkJpGHqvJEuS9FCxL3TkCCcWWhybfCmTtIY84cOP/w9RcRtkl/CNmQU 6AzLZqbPneGmqGVdaPn3H9Ee7lJsdvUrrHmAN+vq7FrbrdC4zSzbOGoMbK28U6swady7e hZgwHjPFl+iX6MJ0KZP06Mq4u9otiohxFhNiBhxHBukB7whKTccl4oip+zQS8ymFdGgk1 hluocOIxLQ8VNcjRnV+FZbL5VB8rInBouK6FJyOSXUEntdigyBSe7mkIXk9zh9epOtI4f RpOrHuNq9BhFWYxXkcTFTsrYqiR/VRawzm4iZ21WkhK8TQ4O8fe9i6v89z0Kzez5REg== 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=XvvIjNiD; 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 D3783606A329; Wed, 25 Nov 2026 06:36:11 +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=XvvIjNiD 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=1795588566; b=ZElTV349hKy2RXGYap/9epjil5UyEyjx3kk0vjwz6j1CuNcXjKRPIthW+FIgJS+9s0aY jc3AyHoT9cxhAfQUy9aG0LWOLZG5ktAYA7y9LiUgTsAcVGUrw7uz+rfK6Se+hxlAMaN7N gY3/gVSbAnPF/STiSQm3Nzhl6/by56qaI8dvWTSCRQlHifJOPORBf+9vggGRiNkdhurJ9 AJZqedYCZssbC4lwtwYb3rYhzRhrSSc22EO4accYJFDrHDo/R/nDn1vtDIptzqzP1bNQB iTthZaUU/DwBAoi354Lgl+uNEKB0llB4vmpP1dXkzKeQUmPG/UQa7kzOWRgPXgNW4CQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795588566; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=WmUfzwma93rg6Bml2GYK77+Ze3Dw48MIC5lQRVm2SRU=; b=ehKPY0uJM8gq9dtLwB2W1W3vcHSPQDbl1gGEgCrMaxKzrGF8iGmgF3Y1sZPSZnVW1gxr KEjQquhJ5XsQ8ngE8b5xj4Fc+TsuZKWX2JjtakKyGz8XxyjLrfUCvWVBTpDp2ZKNVManO vXe0PYuLAwMMqi1udbdgZED36hpx3OXcwPHpq2iYBMGj2IcBeHLjq7yG2t8yE+RhX5BZm 5lclEmzS/dUY2rnZLCAI2eKK0wzBEOQ6b3UudwPkKyGHeQM4w3+iFumKfzVfLU8cqGhNI Bu4JalHMlvBMgw32HwIG2I5iHdCs2o8Tj3POJQXtMhdU85bH8vx6wF5XWDW9zexmk5A== 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=XvvIjNiD; 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 01CCE606A691; Wed, 25 Nov 2026 06:36:06 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id C64211F000D2; Wed, 25 Nov 2026 06:36:04 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795588565; bh=WmUfzwma93rg6Bml2GYK77+Ze3Dw48MIC5lQRVm2SRU=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=XvvIjNiDHjnApn8vI9+HyWi5LD2leABp21biRKbhjWlHRQxGRDt+lVdJ0FdP4lOCH z9+cql85tVualjEmGfuqh0QnBnm0SCoN8u6rvhxAMuxiGK5rAgGjob1oKOu31TYsmK DydGTAs6eRA6HKDTCztBFFvEyCHik0+MsTJdnWqYHn15ZMypscn4z/gMPdsu3e8OKM wM2AawW8xC0xef1ODo6Fvor1Yn66OK+pdtL2IhLMWiymoQG2iSmBN5U79hjIRoizxP ZBBHwxR36hVFNFSidFc/eXHIrXyZ9SrrWyOE18Q1P0k/4AxxFwQOSJgM9zxc8ZMJ/r mOaDe0Rggs3Ig== X-Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, yaojun@mucse.com X-In-Reply-To: <4EBB27E12BC81D8D+20261124060613.411393-1-dong100@mucse.com> X-sashiko-severity: Low 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