After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 677143 - network: make sure multiple nics are handled ok
network: make sure multiple nics are handled ok
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Network
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
: 678360 681533 (view as bug list)
Depends on: 685001
Blocks: 677152
 
 
Reported: 2012-05-31 01:30 UTC by Matthias Clasen
Modified: 2012-10-11 12:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
network: use interface names to disambiguate devices of same type (9.03 KB, patch)
2012-08-27 16:20 UTC, Dan Winship
reviewed Details | Review
network: Rename "Wireless" to "Wi-Fi" in the UI (4.71 KB, patch)
2012-08-30 12:16 UTC, Dan Winship
none Details | Review
network: Rename "Wired" to "Ethernet" and prepare for other types (27.87 KB, patch)
2012-08-30 12:16 UTC, Dan Winship
none Details | Review
network: use interface names to disambiguate devices of same type (8.55 KB, patch)
2012-08-30 12:17 UTC, Dan Winship
none Details | Review
network: Rename "Wireless" to "Wi-Fi" in the UI (4.71 KB, patch)
2012-09-27 20:49 UTC, Dan Winship
none Details | Review
network: Factor out most of NetDeviceWired, create NetDeviceEthernet (26.65 KB, patch)
2012-09-27 20:49 UTC, Dan Winship
none Details | Review
network: disambiguate devices of the same type (29.62 KB, patch)
2012-09-27 20:49 UTC, Dan Winship
none Details | Review
network: disambiguate devices of the same type (15.73 KB, patch)
2012-10-03 20:16 UTC, Dan Winship
none Details | Review
network: Rename "Wireless" to "Wi-Fi" in the UI (4.71 KB, patch)
2012-10-10 20:31 UTC, Dan Winship
committed Details | Review
network: Factor out most of NetDeviceWired, create NetDeviceEthernet (26.65 KB, patch)
2012-10-10 20:31 UTC, Dan Winship
committed Details | Review
network: disambiguate devices of the same type (15.45 KB, patch)
2012-10-10 20:31 UTC, Dan Winship
committed Details | Review

Description Matthias Clasen 2012-05-31 01:30:16 UTC
The nics should be identified in a reasonable way in the device list, and have
independent connection status.

(Note: this bug is part of a series of bugs I'm filing for handling 'exotic'
network constellations)
Comment 1 Dan Winship 2012-08-27 14:47:56 UTC
Current status is that the panel shows two "Wired" entries in the list, each of which shows the state of one of the connections, but with no indication anywhere of which entry corresponds to which device (other than the Hardware Address)

Maybe a reasonable thing to do would be to show the interface name in this case, identifying them as "Wired (eth0)" and "Wired (eth1)"?

We could also show the device names somewhere like the menu does (see screenshot on bug 677142), though that's less useful in a machine with multiple identical ethernet cards, which is probably the more common case...
Comment 2 Dan Winship 2012-08-27 16:20:50 UTC
Created attachment 222564 [details] [review]
network: use interface names to disambiguate devices of same type

here's a patch that implements the above suggestion
Comment 3 Matthias Clasen 2012-08-27 23:05:18 UTC
Review of attachment 222564 [details] [review]:

::: panels/network/panel-common.c
@@ +141,3 @@
+                 * (non-localized) interface name, like "eth0".
+                 */
+                return g_strdup_printf (C_("device name", "%s (%s)"),

Do we really need to localize "%s (%s)" ?
Comment 4 Matthias Clasen 2012-08-27 23:06:10 UTC
Looks ok in principle. I wonder if we want the strings to be the same in the network menu and the panel, though.
Comment 5 Dan Winship 2012-08-27 23:22:52 UTC
(In reply to comment #3)
> Do we really need to localize "%s (%s)" ?

I dunno, translators might want to use localized parentheses or something?

I suppose since it's string semi freeze now anyway we could just not translate it and see if anyone complains.
Comment 6 Matthias Clasen 2012-08-28 16:13:45 UTC
(In reply to comment #5)
> (In reply to comment #3)
> > Do we really need to localize "%s (%s)" ?
> 
> I dunno, translators might want to use localized parentheses or something?
> 
> I suppose since it's string semi freeze now anyway we could just not translate
> it and see if anyone complains.

I think that would be my preference.
Comment 7 Dan Winship 2012-08-30 12:15:06 UTC
*** Bug 681533 has been marked as a duplicate of this bug. ***
Comment 8 Dan Winship 2012-08-30 12:16:56 UTC
Created attachment 222931 [details] [review]
network: Rename "Wireless" to "Wi-Fi" in the UI

We support multiple kinds of wireless networks; clarify which kind
we're talking about here.

Also, add "Wi-Fi" and "Wifi" to the desktop file search keywords
(leaving "Wireless" there as well).
Comment 9 Dan Winship 2012-08-30 12:16:58 UTC
Created attachment 222932 [details] [review]
network: Rename "Wired" to "Ethernet" and prepare for other types

Change "Wired" to "Ethernet" in the UI.

Likewise, rename NetDeviceWired to NetDeviceEthernet, but split out
most of the code into a new NetDeviceSimple superclass that can later
be used for other device types that we provide only minimal UI/support
for.
Comment 10 Dan Winship 2012-08-30 12:17:02 UTC
Created attachment 222933 [details] [review]
network: use interface names to disambiguate devices of same type

eg, if there are two ethernet devices, call them "Ethernet (eth0)" and
"Ethernet (eth1)" instead of calling them both just "Ethernet".
Comment 11 Bastien Nocera 2012-08-30 12:26:13 UTC
(In reply to comment #9)
> Created an attachment (id=222932) [details] [review]
> network: Rename "Wired" to "Ethernet" and prepare for other types
> 
> Change "Wired" to "Ethernet" in the UI.
> 
> Likewise, rename NetDeviceWired to NetDeviceEthernet, but split out
> most of the code into a new NetDeviceSimple superclass that can later
> be used for other device types that we provide only minimal UI/support
> for.

Really don't like that change. The backend name change is fine, but for 99% of our users, there's only one type of wired, and it's Ethernet. If you had Infiniband or whatever other wired type, then name those devices by their real name, but changing "Wired" to "Ethernet" is unhelpful.
Comment 12 Bastien Nocera 2012-08-30 12:27:17 UTC
(In reply to comment #10)
> Created an attachment (id=222933) [details] [review]
> network: use interface names to disambiguate devices of same type
> 
> eg, if there are two ethernet devices, call them "Ethernet (eth0)" and
> "Ethernet (eth1)" instead of calling them both just "Ethernet".

What about using the name of the device? Or the connection type (Built-in vs. USB vs. ...)?
Comment 13 Dan Winship 2012-08-30 13:47:25 UTC
My argument in bug 681532 was "even Apple calls it Ethernet".

Anyway, this is what Allan's current design shows. Whatever decision is made here needs to stay in sync with bug 677142.

(In reply to comment #11)
> If you had
> Infiniband or whatever other wired type, then name those devices by their real
> name, but changing "Wired" to "Ethernet" is unhelpful.

Note that most machines with InfiniBand will have Ethernet too (since basically all motherboards have onboard Ethernet these days), so you'd have both "Wired" and "InfiniBand" in the list. (Unless we changed it to say "Wired" when you only had Ethernet devices, and "Ethernet" otherwise, which was also suggested at some point.)

(In reply to comment #12)
> > eg, if there are two ethernet devices, call them "Ethernet (eth0)" and
> > "Ethernet (eth1)" instead of calling them both just "Ethernet".
> 
> What about using the name of the device? Or the connection type (Built-in vs.
> USB vs. ...)?

I guess there are 2 major cases:

  - machine has multiple identical NICs. (eg, server-class machines)
  - machine has one built-in NIC plus a single additional PCI, USB, or
    CardBus NIC

I chose interface name because it's the only thing that works to differentiate the NICs in the first case, but yeah, it isn't all that great for the second case. I guess we could show interface names iff there would be two devices that would otherwise have the same name based on whatever other rules we use.

Device names are what nm-applet and gnome-shell use in 3.4, but they suck. My onboard NIC is "Intel 82579LM", which means nothing to anyone. My USB NIC identifies itself as an "ADMTek USB To LAN Converter", which does at least have the word "USB" in it, although that's the *only* word it has in common with what's actually written on the device ("Belkin USB 10/100 Ethernet").

"Built-in" vs "USB" is nice. Do we have a reliable way of knowing that a device is built-in?
Comment 14 Bastien Nocera 2012-09-07 16:54:40 UTC
(In reply to comment #13)
> My argument in bug 681532 was "even Apple calls it Ethernet".
<snip>
> "Built-in" vs "USB" is nice. Do we have a reliable way of knowing that a device
> is built-in?

Not as such. We can find USB ethernet adapters, we can find DisplayPort or PC-Card ones. Still, that's another layer of policy we can use to get that name.

The majority use case of "one ethernet, one wifi" should be the one we target, and then make the distinction possible, with the minimum amount of data.
Comment 15 Matthias Clasen 2012-09-20 17:47:52 UTC
See bug 678360
Comment 16 Bastien Nocera 2012-09-20 21:19:41 UTC
From bug 678360 comment 8:
"
I would rather that the differentiation was:
- first through type:
Wired
Wired
becomes:
Ethernet
Infiniband

- secondly through connection type:
Ethernet
Ethernet
becomes:
USB Ethernet
PCI Ethernet

- thirdly through vendor/product:
PCI Ethernet
PCI Ethernet
becomes:
Intel Ethernet
Realtek Ethernet

Finally through using interface names:
Intel Ethernet
Intel Ethernet
becomes:
Intel Ethernet (eth0)
Intel Ethernet (eth1)
"

We'll show the interface in the details page.
Comment 17 Allan Day 2012-09-25 09:28:41 UTC
(In reply to comment #16)
> From bug 678360 comment 8:
...

Makes sense to me.
Comment 18 Dan Winship 2012-09-27 20:48:23 UTC
*** Bug 678360 has been marked as a duplicate of this bug. ***
Comment 19 Dan Winship 2012-09-27 20:49:27 UTC
Created attachment 225288 [details] [review]
network: Rename "Wireless" to "Wi-Fi" in the UI

We support multiple kinds of wireless networks; clarify which kind
we're talking about here.

Also, add "Wi-Fi" and "Wifi" to the desktop file search keywords
(leaving "Wireless" there as well).
Comment 20 Dan Winship 2012-09-27 20:49:37 UTC
Created attachment 225289 [details] [review]
network: Factor out most of NetDeviceWired, create NetDeviceEthernet

Rename NetDeviceWired to NetDeviceEthernet, but split out most of the
code into a new NetDeviceSimple superclass that can later be used for
other device types that we provide only minimal UI/support for.
Comment 21 Dan Winship 2012-09-27 20:49:46 UTC
Created attachment 225290 [details] [review]
network: disambiguate devices of the same type

If there are multiple devices that would end up with the same name in
the device list, disambiguate their names (in increasingly geeky ways,
as needed).
Comment 22 Dan Winship 2012-09-27 20:54:59 UTC
For full functionality (specifically, being able to distinguish via USB vs PCI), this requires the danw/client-bus branch of NetworkManager. (It will compile with the released NM, it just won't have the USB vs PCI functionality.) It would be possible to do that check in control-center itself, by using gudev directly (which it already depends on indirectly via libnm-glib anyway), but I didn't...

Bastien's example talked about disambiguating by "product", but his examples only used the vendor name, and that's what I implemented here, because "Intel Corporation 82579LM Gigabit Network Connection Ethernet" doesn't really fit very well in the list...
Comment 23 Dan Williams 2012-09-28 17:27:43 UTC
libnm-glib has a bunch of code that handles name fixups if that's what you're looking for; it's completely localization ignorant but since all that information about "Intel Corporation XXX Gigabit" comes from pciids and usbids, the source is completely unlocalized anyway.

I'm not specifically against adding a "bus" property, but keep in mind that not all network devices are attached with a "bus".  On more embedded systems there will often be custom interfaces (even on-chip SoC lines) which are not busses, but point-to-point.

So I would rather go with "subsystem" or something like that, based not on the net interface, but the parent or grandparent.  There's already code in NM that figures that out by walking up the hierarchy (up the the grandparent) to find out the actual physical subsystem.

Next problem is that virtual devices like bridges, bonds, TAP/TUN devices, IPSec tunnels, and also some embedded drivers are actually "virtual" and have no real hardware backing.  So these either won't have a subsystem/bus or will have one called "virtual".

Honestly, what you *really* want here is internal vs. external, right?  What you're really trying to show is whether it's built-in or not, it seems.  While that's pretty hard to figure out these days (though the kernel can now tell you whether USB devices are internal or external, and we may be able to figure out if the PCI-E slots are internal or not) using the bus type seems like a kludge.
Comment 24 Dan Williams 2012-09-28 17:50:23 UTC
Another case where this breaks down is ExpressCards.  They're also 'pci' just like internal devices.

That's the point; the bus doesn't matter, it's whether or not the device is removable, I suppose, and these days we have a good chance of figuring that out from the kernel.  That's if the internal/external distinction actually makes sense in the first place...

But also, we don't necessarily have to patch NM for this, given that NM already provides the sysfs path of the device in the "Udi" property, which means you can pass that directly to g_udev_client_query_by_sysfs_path(), I think, and then the client can do whatever they want with that data for presentation.

But if we feel like internal/external is something that is useful, then there are a couple of ways to deal with that which might make more sense than putting that logic into NM, like making sure the kernel has a good interface for figuring that out (or that udev provides that info) before we start adding proxies for the thing we really want to the NM D-Bus interface.
Comment 25 Dan Winship 2012-10-03 20:16:46 UTC
Created attachment 225714 [details] [review]
network: disambiguate devices of the same type

If there are multiple devices that would end up with the same name in
the device list, disambiguate their names via new libnm-gtk API.

(requires libnm-gtk from git-master network-manager-applet)
Comment 26 Matthias Clasen 2012-10-03 20:52:25 UTC
Looks good to me. Are we going to use the same function in the shell menu, so we get the same strings in both places.
Comment 27 Dan Winship 2012-10-03 20:56:39 UTC
yes, see bug 677142 (though after attaching it I realized that there are supposed to be other UI changes there too)
Comment 28 Bastien Nocera 2012-10-10 17:03:22 UTC
Dan, which one of those patches am I supposed to apply then (having problems applying to master)? Can you also make sure that the required versions for libnm-gtk gets bumped?
Comment 29 Dan Winship 2012-10-10 20:31:44 UTC
Created attachment 226201 [details] [review]
network: Rename "Wireless" to "Wi-Fi" in the UI

We support multiple kinds of wireless networks; clarify which kind
we're talking about here.

Also, add "Wi-Fi" and "Wifi" to the desktop file search keywords
(leaving "Wireless" there as well).
Comment 30 Dan Winship 2012-10-10 20:31:51 UTC
Created attachment 226202 [details] [review]
network: Factor out most of NetDeviceWired, create NetDeviceEthernet

Rename NetDeviceWired to NetDeviceEthernet, but split out most of the
code into a new NetDeviceSimple superclass that can later be used for
other device types that we provide only minimal UI/support for.
Comment 31 Dan Winship 2012-10-10 20:31:56 UTC
Created attachment 226203 [details] [review]
network: disambiguate devices of the same type

If there are multiple devices that would end up with the same name in
the device list, disambiguate their names via new libnm-gtk API.
Comment 32 Dan Winship 2012-10-10 20:33:00 UTC
oops, apparently I hadn't "git pull"ed since late August... rebased patches attached. Still needs a configure.ac update.
Comment 33 Bastien Nocera 2012-10-11 07:31:20 UTC
I added some more keywords to the list. The patches seem to work fine for me, I've tested with a USB ethernet adapter being plugged into my desktop, and it shows both a PCI and a USB Ethernet, which is what I would be expecting (though they were labelled "Ethernet" and not "Wired" but I'll live with that).

Attachment 226201 [details] pushed as 9e5a8eb - network: Rename "Wireless" to "Wi-Fi" in the UI
Attachment 226202 [details] pushed as 71c0325 - network: Factor out most of NetDeviceWired, create NetDeviceEthernet
Attachment 226203 [details] pushed as 6375645 - network: disambiguate devices of the same type
Comment 34 Dan Winship 2012-10-11 12:38:22 UTC
(In reply to comment #33)
> shows both a PCI and a USB Ethernet, which is what I would be expecting (though
> they were labelled "Ethernet" and not "Wired" but I'll live with that).

That's how you put it in your examples above. And "USB Wired" doesn't really sound right anyway...
Comment 35 Bastien Nocera 2012-10-11 12:55:31 UTC
(In reply to comment #34)
> (In reply to comment #33)
> > shows both a PCI and a USB Ethernet, which is what I would be expecting (though
> > they were labelled "Ethernet" and not "Wired" but I'll live with that).
> 
> That's how you put it in your examples above. And "USB Wired" doesn't really
> sound right anyway...

My mistake, never mind.