<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git/src/devices/nm-device-bond.c, branch th/cli-strsplit</title>
<subtitle>gitlab.freedesktop.org: NetworkManager/NetworkManager.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/'/>
<entry>
<title>platform: pass string buffer to nm_platform_error_to_string() and print numeric errno</title>
<updated>2017-08-24T08:55:45+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-08-21T17:18:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=b524d879f0e814c57be9063ee5e6ee273310a19d'/>
<id>b524d879f0e814c57be9063ee5e6ee273310a19d</id>
<content type='text'>
Change the output of nm_platform_error_to_string() to print the numeric value.
Also, accept a string buffer instead of using an alloca() allocated buffer.

There is still a macro to provide the previous functionality, but it
was ill-suited to call from inside a loop.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change the output of nm_platform_error_to_string() to print the numeric value.
Also, accept a string buffer instead of using an alloca() allocated buffer.

There is still a macro to provide the previous functionality, but it
was ill-suited to call from inside a loop.
</pre>
</div>
</content>
</entry>
<entry>
<title>bond: ignore miimon option only when it is zero</title>
<updated>2017-06-23T09:18:51+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2017-06-21T09:19:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=92fc10918337f45ef5eb80bb663a8916894110fe'/>
<id>92fc10918337f45ef5eb80bb663a8916894110fe</id>
<content type='text'>
The default value for miimon, when missing in the setting, is 0 if
arp_interval is != 0, and 100 otherwise. So, when generating a
connection, let's ignore miimon=0 (which means that miimon is
disabled) and accept any other value. Adding miimon=100 does not cause
any harm to the connection assumption.

While at it, slightly improve the code: ignore_if_zero() is not useful
for 'updelay','downdelay','arp_interval' because zero is their default
value, so introduce a new function that checks if the value is the
default (and specially handles 'miimon').

Reported-by: Taketo Kabe &lt;rkabe@vega.pgw.jp&gt;

https://bugzilla.redhat.com/show_bug.cgi?id=1463077
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The default value for miimon, when missing in the setting, is 0 if
arp_interval is != 0, and 100 otherwise. So, when generating a
connection, let's ignore miimon=0 (which means that miimon is
disabled) and accept any other value. Adding miimon=100 does not cause
any harm to the connection assumption.

While at it, slightly improve the code: ignore_if_zero() is not useful
for 'updelay','downdelay','arp_interval' because zero is their default
value, so introduce a new function that checks if the value is the
default (and specially handles 'miimon').

Reported-by: Taketo Kabe &lt;rkabe@vega.pgw.jp&gt;

https://bugzilla.redhat.com/show_bug.cgi?id=1463077
</pre>
</div>
</content>
</entry>
<entry>
<title>device: refactor how master device's set is_available()</title>
<updated>2017-06-22T11:26:53+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-06-01T22:01:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=e9a917d61922a6d98ab4ae97070292fbdb33a90b'/>
<id>e9a917d61922a6d98ab4ae97070292fbdb33a90b</id>
<content type='text'>
Previously, master device types like bridge, bond, and team
would overwrite is_available() and check_connection_available()
and always return TRUE.

The device already expresses via nm_device_is_master() that it
is of a master kind. Refactor the code, so, instead of having these
device types overwrite is_available() and check_connection_available(),
let the parents implementation react on nm_device_is_master().

There is no change in behavior at all. Instead, the knowledge how to
treat a master device moves from the device implementation to the
parent class.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, master device types like bridge, bond, and team
would overwrite is_available() and check_connection_available()
and always return TRUE.

The device already expresses via nm_device_is_master() that it
is of a master kind. Refactor the code, so, instead of having these
device types overwrite is_available() and check_connection_available(),
let the parents implementation react on nm_device_is_master().

There is no change in behavior at all. Instead, the knowledge how to
treat a master device moves from the device implementation to the
parent class.
</pre>
</div>
</content>
</entry>
<entry>
<title>bond: check for NULL bond mode value in update_connection()</title>
<updated>2017-06-08T07:44:47+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2017-06-07T16:51:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=5600a27c2aa1a69c1c72422937bfd4401217046e'/>
<id>5600a27c2aa1a69c1c72422937bfd4401217046e</id>
<content type='text'>
Don't crash if the bond mode can't be read from sysfs - for example
when the interface disappears. The generated connection will be bogus,
but at that point it doesn't matter because the in-memory connection
will be destroyed.

Fixes: 056a973a4fdb68abe8bc7bfc5f31250345d71f21

https://bugzilla.redhat.com/show_bug.cgi?id=1459580
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't crash if the bond mode can't be read from sysfs - for example
when the interface disappears. The generated connection will be bogus,
but at that point it doesn't matter because the in-memory connection
will be destroyed.

Fixes: 056a973a4fdb68abe8bc7bfc5f31250345d71f21

https://bugzilla.redhat.com/show_bug.cgi?id=1459580
</pre>
</div>
</content>
</entry>
<entry>
<title>bond: add only supported options to the generated connection</title>
<updated>2017-06-05T15:46:10+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2017-06-05T12:48:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=056a973a4fdb68abe8bc7bfc5f31250345d71f21'/>
<id>056a973a4fdb68abe8bc7bfc5f31250345d71f21</id>
<content type='text'>
Upstream commit [1] changed in the kernel the default value of
tlb_dynamic_lb bond from 1 to 0 when the mode is not tlb. This is not
wrong, as the option value doesn't really matter for other modes, but
it breaks the connection matching because we read back a 0 value when
we expect a default of 1.

Fix this in a generic way by ignoring altogether options that are not
relevant for the current bond mode, because they are removed from the
connection during normalization.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8b426dc54cf4056984bab7dfa48c92ee79a46434

https://bugzilla.redhat.com/show_bug.cgi?id=1457909
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Upstream commit [1] changed in the kernel the default value of
tlb_dynamic_lb bond from 1 to 0 when the mode is not tlb. This is not
wrong, as the option value doesn't really matter for other modes, but
it breaks the connection matching because we read back a 0 value when
we expect a default of 1.

Fix this in a generic way by ignoring altogether options that are not
relevant for the current bond mode, because they are removed from the
connection during normalization.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8b426dc54cf4056984bab7dfa48c92ee79a46434

https://bugzilla.redhat.com/show_bug.cgi?id=1457909
</pre>
</div>
</content>
</entry>
<entry>
<title>device: transform NM_DEVICE_IS_MASTER gobject property to field in NMDeviceClass</title>
<updated>2017-06-02T19:06:08+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-06-01T21:08:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=c79a97657bfeef34aa376394bc61f49d46391695'/>
<id>c79a97657bfeef34aa376394bc61f49d46391695</id>
<content type='text'>
We don't need this flexibility of having a full fledged GObject
property for is-master. The property value only depends on the
device's class.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We don't need this flexibility of having a full fledged GObject
property for is-master. The property value only depends on the
device's class.
</pre>
</div>
</content>
</entry>
<entry>
<title>device: don't use platform singleton getter in device subclasses</title>
<updated>2017-04-18T13:53:11+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-04-18T10:09:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=7b91e8b6dbc54eb73e987a8830d97e4a89f5239d'/>
<id>7b91e8b6dbc54eb73e987a8830d97e4a89f5239d</id>
<content type='text'>
Reduce the use of NM_PLATFORM_GET / nm_platform_get() to get
the platform singleton instance.

For one, this is a step towards supporting namespaces, where we need
to use different NMNetns/NMPlatform instances depending on in which
namespace the device lives.

Also, we should reduce our use of singletons. They are difficult to
coordinate on shutdown. Instead there should be a clear order of
dependencies, expressed by owning a reference to those singelton
instances. We already own a reference to the platform singelton,
so use it and avoid NM_PLATFORM_GET.

(cherry picked from commit 94d9ee129d85ff926a10de78fedcc6b57cdcdb19)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reduce the use of NM_PLATFORM_GET / nm_platform_get() to get
the platform singleton instance.

For one, this is a step towards supporting namespaces, where we need
to use different NMNetns/NMPlatform instances depending on in which
namespace the device lives.

Also, we should reduce our use of singletons. They are difficult to
coordinate on shutdown. Instead there should be a clear order of
dependencies, expressed by owning a reference to those singelton
instances. We already own a reference to the platform singelton,
so use it and avoid NM_PLATFORM_GET.

(cherry picked from commit 94d9ee129d85ff926a10de78fedcc6b57cdcdb19)
</pre>
</div>
</content>
</entry>
<entry>
<title>device-bond: fix possible uninitialized variable</title>
<updated>2017-04-07T17:03:22+00:00</updated>
<author>
<name>Dan Williams</name>
<email>dcbw@redhat.com</email>
</author>
<published>2017-04-07T16:56:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=8608158ed8dc6a8933ffede856f9cee43538d668'/>
<id>8608158ed8dc6a8933ffede856f9cee43538d668</id>
<content type='text'>
src/devices/nm-device-bond.c: In function 'check_changed_options':
src/devices/nm-device-bond.c:529:4: error: 'name' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    g_set_error (error,
    ^
src/devices/nm-device-bond.c:505:14: note: 'name' was declared here
  const char *name, *value_a, *value_b;
              ^
src/devices/nm-device-bond.c:528:8: error: 'value_a' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   if (!nm_streq0 (value_a, value_b)) {
        ^
src/devices/nm-device-bond.c:505:21: note: 'value_a' was declared here
  const char *name, *value_a, *value_b;
                     ^

(cherry picked from commit f66de1dd0f44178fa6d0a3940a61e323559dcce6)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
src/devices/nm-device-bond.c: In function 'check_changed_options':
src/devices/nm-device-bond.c:529:4: error: 'name' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    g_set_error (error,
    ^
src/devices/nm-device-bond.c:505:14: note: 'name' was declared here
  const char *name, *value_a, *value_b;
              ^
src/devices/nm-device-bond.c:528:8: error: 'value_a' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   if (!nm_streq0 (value_a, value_b)) {
        ^
src/devices/nm-device-bond.c:505:21: note: 'value_a' was declared here
  const char *name, *value_a, *value_b;
                     ^

(cherry picked from commit f66de1dd0f44178fa6d0a3940a61e323559dcce6)
</pre>
</div>
</content>
</entry>
<entry>
<title>device: bond: implement connection reapply</title>
<updated>2017-03-06T09:29:37+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2017-03-03T11:08:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=1ba25fd19f8d894221b7c8c0f05b81031eae559c'/>
<id>1ba25fd19f8d894221b7c8c0f05b81031eae559c</id>
<content type='text'>
Only a couple of bond options (active_slave, primary) are supported at
for now.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only a couple of bond options (active_slave, primary) are supported at
for now.
</pre>
</div>
</content>
</entry>
<entry>
<title>bond: set the active slave only after enslavement</title>
<updated>2017-03-06T09:29:16+00:00</updated>
<author>
<name>Beniamino Galvani</name>
<email>bgalvani@redhat.com</email>
</author>
<published>2017-03-01T13:55:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/NetworkManager.git/commit/?id=8eb49639fcd5ec29c129d87900f63125933e1263'/>
<id>8eb49639fcd5ec29c129d87900f63125933e1263</id>
<content type='text'>
The kernel doesn't accept an interface to be set as active_slave until
the interface is enslaved to the bond. Delay the initialization of the
property.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The kernel doesn't accept an interface to be set as active_slave until
the interface is enslaved to the bond. Delay the initialization of the
property.
</pre>
</div>
</content>
</entry>
</feed>
