Bug 247439 - ue(4): Rename to match it's driver (cdce or uether)
Summary: ue(4): Rename to match it's driver (cdce or uether)
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: Unspecified
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-usb (Nobody)
Keywords: needs-patch, needs-qa
Depends on:
Reported: 2020-06-20 15:39 UTC by Walter von Entferndt
Modified: 2020-06-20 16:04 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Walter von Entferndt 2020-06-20 15:39:14 UTC
Dear programmer,

Usually network interface names are _the same_ (no abbr.) as their resp. driver.  The 'ue' interface should follow this convention, too.

This interface appears when a wireless modem is attached to the system.  I /guess/ it's the bridge supplied by cdce(4), but since 'ue' could also be meant as abbreviation for uether(4), I'm not quite shure... (and uether(4) has no man page)

It's easy to avoid such confusion by simply following the convention. To save two or three keystrokes is a void (pardon - silly) plea.  I do not mean this in an offensive way.

IMHO the fix should be that 1. the IF is named "uetherN" 2. when cdce(4) takes it, renames it to "cdceN".  I tried to fix it myself, but gave up after an hour reading through the src (found a module_map[] in sbin/ifconfig.c, does it belong in there?).  When you fix it, it takes you 10 minutes.

Comment 1 Hans Petter Selasky freebsd_committer 2020-06-20 16:04:03 UTC

The line you are looking for is:

if_initname(ifp, "ue", ue->ue_unit);

I'm not sure if it will solve anything to have different names for the USB ethernet adapters. They are currently named the same because these are USB devices, and so it is easy to recognize them.

If you want to map ueX to a given USB port, you need to look at the "sysctl -a" output. There is something called %parent and %location which will help you. 

Check this out:

net.ue.0.%parent: axge0