Netdev List
 help / color / mirror / Atom feed
From: "Ruinskiy, Dima" <dima.ruinskiy@intel.com>
To: Andrew Lunn <andrew@lunn.ch>, <netdev-bot+sashiko@kernel.org>,
	"Chia-Lin Kao (AceLan)" <acelan.kao@canonical.com>,
	Narpat Mali <narpat.mali@dell.com>,
	Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
Cc: <anthony.l.nguyen@intel.com>, <davem@davemloft.net>,
	<kuba@kernel.org>, <pabeni@redhat.com>, <edumazet@kernel.org>,
	<andrew+netdev@lunn.ch>, <willemb@google.com>,
	<netdev@vger.kernel.org>, <paweldembicki@gmail.com>,
	<pavankumaryalagada@gmail.com>, <sx.rinitha@intel.com>
Subject: Re: [PATCH net-next 1/4] igc: Support ACPI-based MAC passthrough
Date: Sun, 6 Dec 2026 10:44:04 +0200	[thread overview]
Message-ID: <f39721e8-5944-4c90-95fe-9ce0c03636ac@intel.com> (raw)
In-Reply-To: <671f03a5-8708-42fd-8ee1-2b63ed36d4a4@lunn.ch>

On 04/12/2026 3:28, Andrew Lunn wrote:
>> igc: Support ACPI-based MAC passthrough
>>
>> With this patch, igc_probe() looks for a system MAC address in the ACPI
>> \_SB.AMAC or \MACA objects when the I225/I226 controller is
>> Thunderbolt-attached. If it finds a valid "_AUXMAC_#...#" MAC, that MAC
>> replaces the NVM MAC and the netdev is marked NET_ADDR_STOLEN.
> 
> MAC passthrough is a big can of worms with all sorts of corner cases
> breaking systems. In general, don't do it. If you do do it, expect it
> to get reverted at least once, maybe more times. That is what history
> shows.
> 
>>> +		if (pci_is_thunderbolt_attached(pdev) &&
>>> +		    igc_get_acpi_mac_passthru(hw->mac.addr)) {
>>
>> [Severity: Medium]
>> Can more than one interface end up with the same MAC address here?
>>
>> igc_get_acpi_mac_passthru() evaluates a global ACPI object with a NULL
>> handle:
>>
>> 	status = acpi_evaluate_object(NULL, (char *)sources[i].name,
>> 				      NULL, &buffer);
>>
>> So every caller gets the same 6 bytes.
>>
>> Nothing in igc_probe() ties the NIC to a specific dock. Nothing records
>> that the MAC has already been claimed, and there is no way to opt out.
>>
>> Every probe that passes pci_is_thunderbolt_attached() gets the same
>> dev_addr. igc_reset()->igc_init_rx_addrs()->rar_set() then programs that
>> address into RAR[0] on each device.
>>
>> Some setups where this would happen:
>>
>>    - both ports of a dual-port I225/I226 card in a Thunderbolt PCIe enclosure
>>    - a generic Thunderbolt-attached I225/I226 adapter that is not an OEM dock
>>    - daisy-chained docks that each contain an I225/I226
>>    - an igc dock NIC next to an r8152 dock that also does passthrough
> 
> See the worms wriggling in the can...
> 
> 	Andrew
Hi Andrew,

Indeed, my experience also shows that MAC passthrough is difficult to 
get to work smoothly. That is because it tries to balance ease-of-use 
and "seamlessness" with generality and "not breaking systems".

After trying many approaches, we narrowed down to this particular 
implementation as one that balances these requirements in a way that 
seems, to me, near-optimal.

1. It is driven by a user-configurable BIOS setting stored in the ACPI 
tables. This gives the user (whether an individual or a corporate policy 
driver) full control over it on the system-level.

2. It is tied to a system setting, and not a controller setting, which 
is how it should be for the seamless experience. The goal is to be able 
to connect to any docking station in the environment and retain the 
system MAC. If every LAN controller in every dock has to be explicitly 
primed for it, it defeats the purpose.

3. The ACPI tables have been implemented in this fashion by at least two 
major OEMs, who are the ones driving this request. The igc driver can 
thus piggy-back on an existing infrastructure (same one used by r8152), 
without "reinventing the wheel".

The can of worms you refer to is indeed real. It was spotted by the AI 
at every step of the review. :) Having considered it, I have still 
decided to go forward (with the appropriate limitation of checking 
Thunderbolt docks), mostly because of point 2 above. I just don't see a 
way to protect against every possible corner case, without making the 
feature worthless.

The rationale is that it is all guarded by a single setting in the 
system BIOS. If a user is connecting their system to multiple docks, or 
docks that have multiple NICs, and intends to use several at once, in a 
way that MAC passthrough becomes an issue, then the user should not 
enable MAC passthrough in the BIOS, or else should configure custom MAC 
addresses for specific NICs (which take precedence over system MAC).

I am driving this patch not because it is some cool new feature I came 
up with, but because customers have asked for it, and I understand why 
they want it. I hope I succeeded in explaining why I think the existing 
protections are sufficient.

Thanks!
--Dima

  reply	other threads:[~2026-12-06  8:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03  0:50 [PATCH net-next 0/4][pull request] Intel Wired LAN Driver Updates 2026-12-02 (igc, igb, e100) Tony Nguyen
2026-12-03  0:50 ` [PATCH net-next 1/4] igc: Support ACPI-based MAC passthrough Tony Nguyen
2026-12-04  1:07   ` netdev-bot+sashiko
2026-12-04  1:28     ` Andrew Lunn
2026-12-06  8:44       ` Ruinskiy, Dima [this message]
2026-12-03  0:50 ` [PATCH net-next 2/4] igb: detect M88E1112 100BASE-FX SGMII mode Tony Nguyen
2026-12-04  1:07   ` netdev-bot+sashiko
2026-12-03  0:50 ` [PATCH net-next 3/4] igb: read SFP module EEPROM through igb_read_sfp_data_byte Tony Nguyen
2026-12-04  1:07   ` netdev-bot+sashiko
2026-12-03  0:50 ` [PATCH net-next 4/4] e100: prevent shift-out-of-bounds in EEPROM access Tony Nguyen
2026-12-04  1:07   ` netdev-bot+sashiko
2026-12-05 11:08     ` Yalagada Pavan Kumar
2026-12-03  0:53 ` [PATCH net-next 0/4][pull request] Intel Wired LAN Driver Updates 2026-12-02 (igc, igb, e100) netdev-bot+sinfo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f39721e8-5944-4c90-95fe-9ce0c03636ac@intel.com \
    --to=dima.ruinskiy@intel.com \
    --cc=acelan.kao@canonical.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=jtornosm@redhat.com \
    --cc=kuba@kernel.org \
    --cc=narpat.mali@dell.com \
    --cc=netdev-bot+sashiko@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavankumaryalagada@gmail.com \
    --cc=paweldembicki@gmail.com \
    --cc=sx.rinitha@intel.com \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox