linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* net device renaming 2-step, IFNAMSIZ limit
@ 2010-11-29  3:29 Matt Domsch
  2010-12-07  2:45 ` Piter PUNK
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Matt Domsch @ 2010-11-29  3:29 UTC (permalink / raw)
  To: linux-hotplug

Once again, IFNAMSIZ bites me.

I see this in the udev debug logs when using biosdevname (which I
finally got working with SR-IOV devices tonight):

renamed network interface eth60 to eth60-pci2#0_60
renamed network interface eth60-pci2#0_60 to pci2#0_60

So, it worked, however, note that the rename happens in 2 steps, the
middle step of which uses a name that's dangerously close to
IFNAMSIZ, in fact it is 15 chars there.

In my testing, I'm doing:
 modprobe ixgbe max_vfsc

which generates ethN..(N+127) interfaces (yes, 128 new interfaces) on
this dual-port card.  Combine that with the longer names that
biosdevname is suggesting:

 pciNN#PP_VVV

which is itself already 12 chars if all the fields are used to their
maximum length, and the concatenation of <oldname>-<newname> is way
past IFNAMSIZ.

I need a solution in which the intermediate name doesn't exceed 15
characters, and is guaranteed to be unique, as there may be lots of
udev instances running in parallel trying to do the same thing.

Ideas?

(note, vconfig can create VLANs for interfaces, which needs another 5
characters appended on the end, but that's for another day).

Thanks,
Matt

-- 
Matt Domsch
Technology Strategist
Dell | Office of the CTO

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-02-09 16:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-29  3:29 net device renaming 2-step, IFNAMSIZ limit Matt Domsch
2010-12-07  2:45 ` Piter PUNK
2010-12-07  3:54 ` Matt Domsch
2011-01-29 15:23 ` Matt Domsch
2011-02-08 14:42 ` Kay Sievers
2011-02-08 18:07 ` Scott James Remnant
2011-02-09 16:21 ` Matt Domsch

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).