Wired setting: improve handling of link negotiation
ClosedPublic

Authored by jgrulich on Oct 22 2019, 1:52 PM.

Details

Summary

Adds option to ignore link-negotiation, also uses a combobox, similar to what
nm-connection-editor is using, to give a choice only with sane values for speed.

BUG: 413211

Test Plan

I tried to configure all possible combinations, all of them were saved correctly and loaded afterwards.

Screenshot of updated wired setting:

Diff Detail

Repository
R116 Plasma Network Management Applet
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
jgrulich created this revision.Oct 22 2019, 1:52 PM
Restricted Application added a project: Plasma. · View Herald TranscriptOct 22 2019, 1:52 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
jgrulich requested review of this revision.Oct 22 2019, 1:52 PM
jgrulich edited the test plan for this revision. (Show Details)Oct 22 2019, 1:53 PM
jgrulich added a reviewer: Plasma.
jgrulich edited the test plan for this revision. (Show Details)
dvalter added a subscriber: dvalter.Nov 4 2019, 3:44 PM

Looks like a complete fix to #413211. I've tested it on Arch Linux with different modes. For me Ignore, Auto and 10/100/1000 Mbps modes worked as intended as well as duplex setup for 10 and 100.

The only questionable thing is an ability to set Half duplex for 1Gbps and 10 Gbps. The first one is virtually never used IRL (and does not work for some (I guess many) NIC's, and the second one is absent in the standard and therefore unlikely to be found anywhere. NetworkManager saves these values and silently ignores it's unabilty to apply them to the hardware.

Looks like a complete fix to #413211. I've tested it on Arch Linux with different modes. For me Ignore, Auto and 10/100/1000 Mbps modes worked as intended as well as duplex setup for 10 and 100.

The only questionable thing is an ability to set Half duplex for 1Gbps and 10 Gbps. The first one is virtually never used IRL (and does not work for some (I guess many) NIC's, and the second one is absent in the standard and therefore unlikely to be found anywhere. NetworkManager saves these values and silently ignores it's unabilty to apply them to the hardware.

I did basically what nm-connection-editor allows you to do. I also found somewhere that half-duplex is in the specification even for 1Gbps.

I did basically what nm-connection-editor allows you to do. I also found somewhere that half-duplex is in the specification even for 1Gbps.

Valid point since NetworkManager allows there rare modes to be used.

ngraham accepted this revision as: VDG.Nov 29 2019, 3:38 PM
ngraham added a reviewer: VDG.
ngraham added a subscriber: ngraham.

UI looks good to me.

UI looks good to me.

Do you maybe want to review the code itself? It's not that complicated and nobody else seems to be interested.

davidedmundson accepted this revision.Dec 5 2019, 2:26 PM
davidedmundson added a subscriber: davidedmundson.
davidedmundson added inline comments.
libs/editor/settings/wiredconnectionwidget.cpp
79

can loadConfig can be called multiple times?

If so we need an explicit

else {
 setCurrentIndex(LinkNegotiation::Ignore);
}
This revision is now accepted and ready to land.Dec 5 2019, 2:26 PM
jgrulich marked an inline comment as done.Dec 5 2019, 2:42 PM
jgrulich added inline comments.
libs/editor/settings/wiredconnectionwidget.cpp
79

No, it cannot be called multiple times.

This revision was automatically updated to reflect the committed changes.
jgrulich marked an inline comment as done.