Commit graph

25870 commits

Author SHA1 Message Date
Thomas Haller
dcb4ed2cb1
ethtool: add and use _NM_ETHTOOL_ID_FEATURE_AS_IDX() macro 2020-05-22 15:58:08 +02:00
Thomas Haller
1f4b190934
platform: make states of NMEthtoolCoalesceState indexed by ethtool_id
We already have NMEthtoolID to handle coalesce options in a way that is
convenient programmatically. That is, we can iterate over all valid
coalesce options (it's just an integer) and use that in a more generic
way.

If NMEthtoolCoalesceState names all fields explicitly, we need explicit
code that names each coalesce option. Especially since NMEthtoolCoalesceState
is an internal and intermediate data structure, this is cumbersome
and unnecessary.

Thereby it also fixes the issue that nm_platform_ethtool_init_coalesce() has a
NMPlatform argument without actually needing it.
nm_platform_ethtool_init_coalesce() does not operate on a NMPlatform
instance, and should not have the appearance of being a method of
NMPlatform.
2020-05-22 15:58:08 +02:00
Thomas Haller
1f5f840818
device: in _ethtool_coalesce_set() only fetch current coalesce settings if needed
In the common case, the user doesn't set any coalesce options. Avoid always
fetching the current settings, unless they are actually needed.
2020-05-22 15:58:01 +02:00
Thomas Haller
94a603a1bc
platform/trivial: rename NMEthtoolCoalesceState variables to "coalesce"
All other users name a similar variable "coalesce" (or "coalesce_new",
"coalesce_old"). Rename the variables, to don't use different names for
similar uses.
2020-05-22 15:58:01 +02:00
Thomas Haller
adcb935089
ifcfg-rh: avoid setting empty "-C/-K/-G" options for ethtool settings
If no options are set, we should not generate -C/-K/-G options
without parameter.
2020-05-22 15:58:01 +02:00
Thomas Haller
c48bfdf584
libnm: add NMUtilsPredicateStr typedef
This will be used for nm_setting_option_clear_by_name(), to
filter based on a name. But it is a general purpose typedef
for a predicate, not tied to NMSetting or option.
2020-05-22 15:58:01 +02:00
Thomas Haller
332cf1ad9d
license: add Rafael to RELICENSE.md
As confirmed via private email:

  From: Rafael Fontenelle <rafaelff(at)gnome.org>
  To:   Thomas Haller <thaller(at)redhat.com>
  Date: Fri, 22 May 2020 10:28:59 -0300
2020-05-22 15:54:43 +02:00
Thomas Haller
4cbb4a9dff
license: add Ikey to RELICENSE.md
As confirmed via private email:

  From: Ikey Doherty <ikey.doherty(at)lispysnake.com>
  To:   Thomas Haller <thaller(at)redhat.com>
  Date: Fri, 22 May 2020 14:43:18 +0100
2020-05-22 15:51:01 +02:00
Thomas Haller
9fd0867acb
license: add Yuri to RELICENSE.md
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/514#note_507841
2020-05-22 15:36:04 +02:00
Thomas Haller
7b9cb1f952
libnm: fix documentation for value argument of nm_client_dbus_call()
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/451
2020-05-22 08:51:21 +02:00
Thomas Haller
7774d837d7
license: add Alfonso to RELICENSE.md
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/390#note_502713
2020-05-20 21:25:40 +02:00
Thomas Haller
316719c5f7
license: add Canonical, Ltd. to RELICENSE.md
As discussed via email:

  From: Andrew Sinclair <andrew.sinclair(at)canonical.com>
  To:   Thomas Haller <thaller(at)redhat.com>
  Cc:   Legal(at)canonical.com <legal(at)canonical.com>, Loïc Minier <loic.minier(at)canonical.com>, Alfonso Sanchez-Beato <alfonso.sanchez-beato(at)canonical.com>
  Date: Wed, 20 May 2020 12:08:20 -0400
2020-05-20 21:17:05 +02:00
Thomas Haller
1373fd0a9b
license: fix obsolete line in RELICENSE.md 2020-05-20 21:16:41 +02:00
Thomas Haller
eb500fe077
license: add David to RELICENSE.md
https://mail.gnome.org/archives/networkmanager-list/2020-May/msg00014.html
2020-05-20 17:19:43 +02:00
Thomas Haller
6a464e3302
license: add Jan and Pengutronix to RELICENSE.md
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/390#note_504926
2020-05-20 11:43:00 +02:00
Thomas Haller
0ae7b6d956
license: add Timothy to RELICENSE.md
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/397#note_504980
2020-05-20 11:36:42 +02:00
Antonio Cardace
2eccd19b91
ethtool: merge branch 'ac/ethtool_opts_ring'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/508
2020-05-20 10:55:57 +02:00
Antonio Cardace
2ce0e714b6
nm-device: apply ethtool ring settings when activating a connection
nm-device now applies ethtool ring settings during stage 2 "device
config" of the connection activation.

ring settings will be then restored (according to what the state
was before the connection got activated on the device) when the
connection is deactivated during the device cleanup.

One thing to be noted is that unset ring settings (in the profile)
will not be touched at all by NetworkManager so that if the NIC driver
sets some default values these will be preserved unless specifically
overridden by the connection profile.

https://bugzilla.redhat.com/show_bug.cgi?id=1614700
2020-05-20 10:55:02 +02:00
Antonio Cardace
2d2c111304
platform: add support for ring settings using ioctl()
https://bugzilla.redhat.com/show_bug.cgi?id=1614700
2020-05-20 10:55:02 +02:00
Antonio Cardace
126995a4d8
clients: add support for ethtool ring settings
https://bugzilla.redhat.com/show_bug.cgi?id=1614700
2020-05-20 10:55:02 +02:00
Antonio Cardace
e04e5a5c2a
ifcfg-rh: add support for ethtool ring settings
Also update unit tests.

https://bugzilla.redhat.com/show_bug.cgi?id=1614700
2020-05-20 10:55:01 +02:00
Antonio Cardace
7109ac667a
ethtool: add ring settings
This is the initial support for ring settings and only allows
getting/setting, nothing is yet implemented in nm-device.

Also add unit test.

https://bugzilla.redhat.com/show_bug.cgi?id=1614700
2020-05-20 10:55:01 +02:00
Antonio Cardace
3e50221d7e
ethtool: refactor coalesce settings using gendata APIs
https://bugzilla.redhat.com/show_bug.cgi?id=1614700
2020-05-20 10:55:01 +02:00
Antonio Cardace
55d2df6658
nm-setting: use nm_setting_gendata_clear_all() to clear features
https://bugzilla.redhat.com/show_bug.cgi?id=1614700
2020-05-20 10:55:01 +02:00
Antonio Cardace
e08c3a6e18
nm-setting: add internal gendata API to clear value(s)
The filter function in nm_setting_gendata_clear_all() is useful
for when you want to only clear values according to a predicate,
if no such function is supplied all values will be cleared.

https://bugzilla.redhat.com/show_bug.cgi?id=1614700
2020-05-20 10:55:01 +02:00
Antonio Cardace
572f82a77b
nm-setting: add internal gendata API to get/set uint32
https://bugzilla.redhat.com/show_bug.cgi?id=1614700
2020-05-20 10:55:01 +02:00
Thomas Haller
12063d6cb6
platform: simplify NMEthtoolCoalesceState to only track one state
Only in one moment we need the old and requested settings together:
during _ethtool_coalesce_set(). But for that we shouldn't track both
states in "NMEthtoolCoalesceState".

Simplify "NMEthtoolCoalesceState" to only contain one set of options.
By tracking less state, the code becomes simpler, because you don't
need to wonder where the old and requested state is used.
2020-05-20 10:54:57 +02:00
Thomas Haller
d71f920f2e
license: add Daniel and Endless OS LLC to RELICENSE.md
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/390#note_503229
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/390#note_504774
2020-05-20 09:09:37 +02:00
Beniamino Galvani
02ea74c920 core: signal parent-active only when the parent AC is activated
The parent-active signal is used by the manager to determine when the
parent active-connection is ready and a connection that depend on it
can proceed.

The AC state could transition from ACTIVATING directly to
DEACTIVATING; in such case we should not emit the signal but instead
just stop watching the parent AC.

Fixes: 6e382ea91d ('active-connection: add parent active connection tracking')
https://bugzilla.redhat.com/show_bug.cgi?id=1778073
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/510
2020-05-19 21:40:51 +02:00
Thomas Haller
18deaa39c7
mailmap: fix identity for gunchleoc 2020-05-19 18:19:51 +02:00
Thomas Haller
ecc5425bdd
cli: merge branch 'th/wireguard-import-dns-search'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/502
2020-05-19 18:07:44 +02:00
Thomas Haller
753cc7b79b
libnm: use correct free macro for buffer in nm_utils_base64secret_decode()
In practice, g_free() and free() are the same. Still, avoid mixing the
APIs and use free() as plain malloc() was used to allocate the buffer.
2020-05-19 18:07:31 +02:00
Thomas Haller
3ab082ed96
cli: support dns-search for import of WireGuard profiles
wg-quick now supports specifying DNS searches as part of
DNS= setting.

See-also: https://lists.zx2c4.com/pipermail/wireguard/2020-May/005415.html
See-also: https://git.zx2c4.com/wireguard-tools/commit/?id=7f236c79570642d466c5acab890b26c3a07f4f7a
2020-05-19 18:05:55 +02:00
Thomas Haller
7e023e53e8
mailmap: update mailmap information for Antony 2020-05-19 18:01:26 +02:00
Thomas Haller
02e36c1dca
license: merge branch 'onlymee:patch-1'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/511
2020-05-19 17:54:33 +02:00
Antony Mee
d7dca08147 Added approval to RELICENSE.md 2020-05-19 10:41:14 +00:00
Thomas Haller
4fc92aa604
license: add Przemysław to RELICENSE.md
https://mail.gnome.org/archives/networkmanager-list/2020-May/msg00013.html
2020-05-19 11:42:59 +02:00
Thomas Haller
0480448e66
n-dhcp4: style fix in n_dhcp4_client_probe_transition_accept()
The upstream fix also doesn't have this whitespace.
Keep the sources in sync.

0be7033dd9
2020-05-18 09:54:28 +02:00
Thomas Haller
33a67c9f15
license: add luzpaz to RELICENSE.md
https://github.com/NetworkManager/NetworkManager/pull/205#issuecomment-629638948
2020-05-17 21:37:53 +02:00
Thomas Haller
6c7d910a7d
license: add Aleksander to RELICENSE.md
https://mail.gnome.org/archives/networkmanager-list/2020-May/msg00012.html
2020-05-16 11:57:39 +02:00
Thomas Haller
4b0886ef13
license: add Evan to RELICENSE.md
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/390#note_501410
2020-05-16 09:33:52 +02:00
Thomas Haller
4f7c05a320
license: add companies to RELICENSE.md 2020-05-15 21:51:06 +02:00
Thomas Haller
fcbdaf3fdd
license: add Pantelis to RELICENSE.md
https://mail.gnome.org/archives/networkmanager-list/2020-May/msg00011.html
2020-05-15 21:28:33 +02:00
Thomas Haller
1055631eb3
mailmap: update mailmap for Ray (halfline) 2020-05-15 21:25:12 +02:00
Thomas Haller
f1071f949b
license/RELICENSE: merge branch 'halfline:patch-1'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/509
2020-05-15 21:22:30 +02:00
Thomas Haller
16c913a14a
license: add Mario to RELICENSE.md
https://mail.gnome.org/archives/networkmanager-list/2020-May/msg00010.html
2020-05-15 21:18:52 +02:00
Thomas Haller
477dfa3190
license: add Giovanni to RELICENSE.md
https://mail.gnome.org/archives/networkmanager-list/2020-May/msg00009.html
2020-05-15 21:15:48 +02:00
Thomas Haller
901326e439
license: add Colin to RELICENSE.md
https://mail.gnome.org/archives/networkmanager-list/2020-May/msg00008.html
2020-05-15 21:13:52 +02:00
Ray Strode
e922c9989f Update RELICENSE.md to include halfline 2020-05-15 18:10:41 +00:00
Olivier Gayot
0b9f0b3080
nmtui: show error on connection deactivation failure
When a failure occurs on deactivation of a connection, no error was
shown on the TUI client. It was not obvious if anything was actually
happening after pressing the <Deactivate> button.

This patch shows the error in a dialog just like we do when a failure
occurs on activation of a connection.

https://mail.gnome.org/archives/networkmanager-list/2020-May/msg00004.html
2020-05-15 19:27:09 +02:00