From: Jakub Kicinski <kuba@kernel.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: David Howells <dhowells@redhat.com>,
Jedrzej Jagielski <jedrzej.jagielski@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Paulo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Is it possible to undo the ixgbe device name change?
Date: Thu, 24 Apr 2025 16:10:59 -0700 [thread overview]
Message-ID: <20250424161059.2e85f8a0@kernel.org> (raw)
In-Reply-To: <7b468f16-f648-4432-aa59-927d37a411a7@lunn.ch>
On Thu, 24 Apr 2025 23:32:12 +0200 Andrew Lunn wrote:
> > With commit:
> >
> > a0285236ab93fdfdd1008afaa04561d142d6c276
> > ixgbe: add initial devlink support
> >
> > the name of the device that I see on my 10G ethernet card changes from enp1s0
> > to enp1s0np0.
>
> Are you sure this patch is directly responsible? Looking at the patch
> i see:
>
> @@ -11617,6 +11626,11 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> }
> strcpy(netdev->name, "eth%d");
> pci_set_drvdata(pdev, adapter);
> +
> + devl_lock(adapter->devlink);
> + ixgbe_devlink_register_port(adapter);
> + SET_NETDEV_DEVLINK_PORT(adapter->netdev, &adapter->devlink_port);
> +
>
> Notice the context, not the change. The interface is being called
> eth%d, which is normal. The kernel will replace the %d with a unique
> number. So the kernel will call it eth42 or something. You should see
> this in dmesg.
>
> It is systemd which later renames it to enp1s0 or enp1s0np0. If you
> ask me, you are talking to the wrong people.
Hooking up the devlink port will add a suffix identifying the port,
it comes via dev_get_phys_port_name(). Intel could possibly implement
an empty ndo_get_phys_port_name to override. Tho, I do agree with you
in principle that this is highly unfortunate -- in principle _adding_
attributes should not cause regressions :(
Maybe NM could be thought to use altnames. But that's not a silver
bullet.
next prev parent reply other threads:[~2025-04-24 23:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-24 18:06 Is it possible to undo the ixgbe device name change? David Howells
2025-04-24 21:32 ` Andrew Lunn
2025-04-24 23:10 ` Jakub Kicinski [this message]
2025-04-25 8:58 ` David Howells
2025-04-25 12:11 ` Andrew Lunn
2025-04-29 21:40 ` Jacob Keller
2025-04-25 9:46 ` David Howells
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=20250424161059.2e85f8a0@kernel.org \
--to=kuba@kernel.org \
--cc=andrew@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=dhowells@redhat.com \
--cc=jedrzej.jagielski@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.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;
as well as URLs for NNTP newsgroup(s).