On 29.11.2016 18:34, Francesco Giudici wrote:
> 
> 
> On 29/11/2016 13:36, Bjørn Mork wrote:
>> Thomas Haller <[email protected]> writes:
>>> On Tue, 2016-11-29 at 10:23 +0100, Francesco Giudici wrote:
>>>
>>>>> I would say yes. Half duplex setting is invalid for gigabit network
>>>>> speed.
>>>>>
>>>>
>>>> Yeah, I think so. I should also have got a warning from NM in your
>>>> journal logs stating that configuring the 1000Mb/Half failed (search
>>>> for
>>>> "set-link").
>>>> Thanks
>>>> Francesco
>>>
>>> I think then NM should reject such invalid configurations right way.
>>> I mean, really reject as invalid, not silently normalize away.
>>
>> I agree.  There is no way for NM to figure out if the user meant
>> 1000/full or 100/half.  So rejecting 1000/half as invalid is the only
>> possible action.  Preferably recommending "auto" for users who don't
>> know what to do about the rejected config.  No-one should ever force
>> speed or duplex without knowing exactly what they do anyway.
> 
> 
> NM does not normalize 1000/half... it just tries to set it but fails,
> logging a warning that the set-link failed. Then the link configuration
> will be just left as is, configuration is skipped. So, it will be the
> device default, usually link autoconfiguration.
> 
>>
>> (And for those who know what they are doing, there is a 100% probability
>> that the *correct* fix is to set the other end to "auto".  Although I
>> understand that not all users will have the ability to do that, due to
>> the limited range of most cluebats)
> 
> Please, note also that we don't support in NM changing the advertised
> modes for link autoconfiguration: so, you have to let the device link
> autoconf or you have to specify both speed & duplex. In this case, you
> have to know what you are doing.
> 
> After reading your notes, I started thinking to add the 1000/half check
> in NM verify code, so it would prevent it from any client (nm-c-e
> included)...
> But then I saw the comment from poma... starting to add checks simple as
> the 1000/half one, means starting taking care of right static values.
> So, poma's request seems legitimate: just show available values, but as
> Bjørn pointed out that's not that easy.
> 
> So, I think the best option is to avoid any check on static values.
> Users know they are alone when they set static link values. Full stop.
> I had just added a note in the GUI tooltip stating this.
> 
> Please, if you still want the 1000/half check tell, I could easily add
> it to the GUI.
> 
> Francesco
> 


Considering that there is no verification of static values, note the user to 
manually check.
See 
https://git.gnome.org/browse/network-manager-applet/commit/?h=fg/c-e-ethernet-link2&id=7a07336
as a reference.

---
 libnm-core/nm-setting-wired.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libnm-core/nm-setting-wired.c b/libnm-core/nm-setting-wired.c
index 08b0b34..3d47cb6 100644
--- a/libnm-core/nm-setting-wired.c
+++ b/libnm-core/nm-setting-wired.c
@@ -1035,6 +1035,7 @@ nm_setting_wired_class_init (NMSettingWiredClass 
*setting_wired_class)
         * In that case, statically configures the device to use that specified 
speed.
         * In Mbit/s, ie 100 == 100Mbit/s.
         * Must be set together with the "duplex" property when non-zero.
+        * Before specifying a speed value be sure your device supports it.
         **/
        /* ---ifcfg-rh---
         * property: speed
@@ -1057,6 +1058,7 @@ nm_setting_wired_class_init (NMSettingWiredClass 
*setting_wired_class)
         * Can be specified only when "auto-negotiate" is "off". In that case, 
statically
         * configures the device to use that specified duplex mode, either 
"half" or "full".
         * Must be set together with the "speed" property if specified.
+        * Before specifying a duplex mode be sure your device supports it.
         **/
        /* ---ifcfg-rh---
         * property: duplex
-- 
2.7.4

_______________________________________________
networkmanager-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to