<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git/src/devices/nm-device-bridge.c, branch dcbw/adsl-fixes-bgo759001</title>
<subtitle>gitlab.freedesktop.org: NetworkManager/NetworkManager.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/'/>
<entry>
<title>device: cleanup handling master/slave relationships in NMDevice</title>
<updated>2015-12-05T18:34:06+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2015-12-02T09:53:16+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=f45f702a5ece358bf8cc075dc3a2d2f04f99b4d7'/>
<id>f45f702a5ece358bf8cc075dc3a2d2f04f99b4d7</id>
<content type='text'>
I found the handling of the master-device very confusing because it was
unclear who sets priv-&gt;master, and when it should be set.

Now:

- Setting priv-&gt;master (in a slave) always goes together with adding
  the master to priv-&gt;slaves (in the master). Previously, this was
  done at separate places, so it was not clear if master and slave
  always agree on their relationship -- in fact, they did not.

- There are now three basic functions which do the enslaving/releasing:
    (1) nm_device_master_add_slave()
    (2) nm_device_master_enslave_slave()
    (3) nm_device_master_release_one_slave()
  Step 3/release basically undoes the 1/add and 2/enslave steps.

- completing the enslaving/releasing is now done by
    (1) nm_device_slave_notify_enslave()
    (2) nm_device_slave_notify_release()
  These functions also emit signals like NM_DEVICE_MASTER.

- Derived classes no longer emit NM_DEVICE_SLAVES notification. Instead
  the notification is emited together with NM_DEVICE_MASTER, whenever a
  slaves changes state. Also, NM_DEVICE_SLAVES list now only exposes
  slaves that are actually @is_enslaved.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I found the handling of the master-device very confusing because it was
unclear who sets priv-&gt;master, and when it should be set.

Now:

- Setting priv-&gt;master (in a slave) always goes together with adding
  the master to priv-&gt;slaves (in the master). Previously, this was
  done at separate places, so it was not clear if master and slave
  always agree on their relationship -- in fact, they did not.

- There are now three basic functions which do the enslaving/releasing:
    (1) nm_device_master_add_slave()
    (2) nm_device_master_enslave_slave()
    (3) nm_device_master_release_one_slave()
  Step 3/release basically undoes the 1/add and 2/enslave steps.

- completing the enslaving/releasing is now done by
    (1) nm_device_slave_notify_enslave()
    (2) nm_device_slave_notify_release()
  These functions also emit signals like NM_DEVICE_MASTER.

- Derived classes no longer emit NM_DEVICE_SLAVES notification. Instead
  the notification is emited together with NM_DEVICE_MASTER, whenever a
  slaves changes state. Also, NM_DEVICE_SLAVES list now only exposes
  slaves that are actually @is_enslaved.
</pre>
</div>
</content>
</entry>
<entry>
<title>device: implement slave property in parent device class</title>
<updated>2015-12-05T18:34:06+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2015-12-02T09:33:19+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=9a8d9a0d855cfe2f82b171d48f8efbedc4f4d417'/>
<id>9a8d9a0d855cfe2f82b171d48f8efbedc4f4d417</id>
<content type='text'>
Instead of reimplementing the slave property in bond, bridge
and team, just add the property to the parent class. It's not
that the parent class would be agnostic to the master/slave
implementation, all the slaves are known to the every device
type implementation.

Also, the derived class doesn't know the correct time when
to invoke the notify-changed for the slaves property.
E.g. it should be only invoked after nm_device_slave_notify_enslave()
when other components also consider the slave as enslaved.
Later this will be fixed so that the SLAVES property correspond
to what other master/slave related properties say.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of reimplementing the slave property in bond, bridge
and team, just add the property to the parent class. It's not
that the parent class would be agnostic to the master/slave
implementation, all the slaves are known to the every device
type implementation.

Also, the derived class doesn't know the correct time when
to invoke the notify-changed for the slaves property.
E.g. it should be only invoked after nm_device_slave_notify_enslave()
when other components also consider the slave as enslaved.
Later this will be fixed so that the SLAVES property correspond
to what other master/slave related properties say.
</pre>
</div>
</content>
</entry>
<entry>
<title>device: don't return error from release_slave()</title>
<updated>2015-12-04T17:28:00+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2015-12-02T08:56:17+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=e7a860769536663f9ff26fc8eee8cfd5897dfd91'/>
<id>e7a860769536663f9ff26fc8eee8cfd5897dfd91</id>
<content type='text'>
release_slave() should do the right thing and handle errors as
good as it can. There is no value in propagating the error and
it's not clear what the caller should do in face of a failure
during release.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
release_slave() should do the right thing and handle errors as
good as it can. There is no value in propagating the error and
it's not clear what the caller should do in face of a failure
during release.
</pre>
</div>
</content>
</entry>
<entry>
<title>core: ensure platform links are compatible with the NMDevice</title>
<updated>2015-12-04T11:16:41+00:00</updated>
<author>
<name>Dan Williams</name>
<email>dcbw@redhat.com</email>
</author>
<published>2014-10-09T17:42:29+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=20906ca7a338661776a0a8364e41df9fd0ee3467'/>
<id>20906ca7a338661776a0a8364e41df9fd0ee3467</id>
<content type='text'>
Ensure the platform link with the same interface name as the
NMDevice is actually compatible with it before using the link
for initialization of device properties.  If not, remove the
NMDevice and create a new one since there are kernel resources
with a different type.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensure the platform link with the same interface name as the
NMDevice is actually compatible with it before using the link
for initialization of device properties.  If not, remove the
NMDevice and create a new one since there are kernel resources
with a different type.
</pre>
</div>
</content>
</entry>
<entry>
<title>core: create devices first and realize them later</title>
<updated>2015-12-04T11:16:40+00:00</updated>
<author>
<name>Dan Williams</name>
<email>dcbw@redhat.com</email>
</author>
<published>2014-09-24T21:58:07+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=4dbaac4ba24ebc8b257fffe5197cc8e362804a58'/>
<id>4dbaac4ba24ebc8b257fffe5197cc8e362804a58</id>
<content type='text'>
Unrealized devices aren't backed by kernel resources and so won't know
all of their attributes.  That means three things:

1) they must update their attributes when they become realized
2) they must clear those attributes when unrealized
3) they must be looser in checking compatible connections until
they are realized

This requires that the setup() function be split into two parts, start &amp; finish,
because finish must be run after add_device()

Also, we can simplify whether to pay attention to 'recheck-assume', which
is now dependent on priv-&gt;is_nm_owned, because the only case where NM should
*not* listen for the 'recheck-assume' signal is when the device is a
software device created by NM itself.  That logic was previously spread
across the callers of add_device() but is now consolidated into
nm-manager.c::device_realized() and nm-device.c::nm_device_create_and_realize().
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Unrealized devices aren't backed by kernel resources and so won't know
all of their attributes.  That means three things:

1) they must update their attributes when they become realized
2) they must clear those attributes when unrealized
3) they must be looser in checking compatible connections until
they are realized

This requires that the setup() function be split into two parts, start &amp; finish,
because finish must be run after add_device()

Also, we can simplify whether to pay attention to 'recheck-assume', which
is now dependent on priv-&gt;is_nm_owned, because the only case where NM should
*not* listen for the 'recheck-assume' signal is when the device is a
software device created by NM itself.  That logic was previously spread
across the callers of add_device() but is now consolidated into
nm-manager.c::device_realized() and nm-device.c::nm_device_create_and_realize().
</pre>
</div>
</content>
</entry>
<entry>
<title>utils: add @filter_func argument to nm_utils_g_value_set_object_path_array()</title>
<updated>2015-12-04T11:15:12+00:00</updated>
<author>
<name>Dan Williams</name>
<email>dcbw@redhat.com</email>
</author>
<published>2015-08-06T08:29:29+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=15d305c07f4248ec33413c5571e2728bdf7fe779'/>
<id>15d305c07f4248ec33413c5571e2728bdf7fe779</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>core: separate active and applied connection</title>
<updated>2015-09-18T15:32:11+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2015-07-14T14:53:24+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=06da3532428e3498c1e808ff8be1af48b540a6ff'/>
<id>06da3532428e3498c1e808ff8be1af48b540a6ff</id>
<content type='text'>
Clone the connection upon activation. This makes it safe for the user
to modify the original connection while it is activated.

This involves several changes:

- NMActiveConnection gets @settings_connection and @applied_connection.
  To support add-and-activate, we constructing a NMActiveConnection with
  no connection set. Previously, we would set the "connection" field to
  a temporary NMConnection. Now NMManager piggybacks this temporary
  connection as object-data (TAG_ACTIVE_CONNETION_ADD_AND_ACTIVATE).

- get rid of the functions nm_active_connection_get_connection_type()
  and nm_active_connection_get_connection_uuid(). From their names
  it is unclear whether this returns the settings or applied connection.
  The (few) callers should figure that out themselves.

- rename nm_active_connection_get_id() to
  nm_active_connection_get_settings_connection_id(). This function
  is only used internally for logging.

- dispatcher calls now get two connections as well. The
  applied-connection is used for the connection data, while
  the settings-connection is used for the connection path.

- needs special handling for properties that apply immediately
  when changed (nm_device_reapply_settings_immediately()).

Co-Authored-By: Thomas Haller &lt;thaller@redhat.com&gt;

https://bugzilla.gnome.org/show_bug.cgi?id=724041
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clone the connection upon activation. This makes it safe for the user
to modify the original connection while it is activated.

This involves several changes:

- NMActiveConnection gets @settings_connection and @applied_connection.
  To support add-and-activate, we constructing a NMActiveConnection with
  no connection set. Previously, we would set the "connection" field to
  a temporary NMConnection. Now NMManager piggybacks this temporary
  connection as object-data (TAG_ACTIVE_CONNETION_ADD_AND_ACTIVATE).

- get rid of the functions nm_active_connection_get_connection_type()
  and nm_active_connection_get_connection_uuid(). From their names
  it is unclear whether this returns the settings or applied connection.
  The (few) callers should figure that out themselves.

- rename nm_active_connection_get_id() to
  nm_active_connection_get_settings_connection_id(). This function
  is only used internally for logging.

- dispatcher calls now get two connections as well. The
  applied-connection is used for the connection data, while
  the settings-connection is used for the connection path.

- needs special handling for properties that apply immediately
  when changed (nm_device_reapply_settings_immediately()).

Co-Authored-By: Thomas Haller &lt;thaller@redhat.com&gt;

https://bugzilla.gnome.org/show_bug.cgi?id=724041
</pre>
</div>
</content>
</entry>
<entry>
<title>device: don't assert the platform device's not there upon creation attempt</title>
<updated>2015-08-13T08:31:41+00:00</updated>
<author>
<name>Lubomir Rintel</name>
<email>lkundrak@v3.sk</email>
</author>
<published>2015-08-13T08:28:52+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=8810036895e4a3053d447c7a50af08fbc2560375'/>
<id>8810036895e4a3053d447c7a50af08fbc2560375</id>
<content type='text'>
It might just be that we didn't see it yet; either on daemon startup on in a
race. The nm_platform_*_add() deals with the device already being there in
_link_add_check_existing().

  NetworkManager:ERROR:devices/nm-device-bridge.c:402:create_and_realize: assertion failed: (nm_device_get_ifindex (device) &lt;= 0)

  Program received signal SIGABRT, Aborted.
  0x00007ffff46965d7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
  56        return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
  Missing separate debuginfos, use: debuginfo-install bluez-libs-5.23-4.el7.x86_64
  (gdb) bt
  #0  0x00007ffff46965d7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
  #1  0x00007ffff4697cc8 in __GI_abort () at abort.c:90
  #2  0x00007ffff4a916d5 in g_assertion_message (domain=domain@entry=0x5a5088 "NetworkManager", file=file@entry=0x59b0f2 "devices/nm-device-bridge.c", line=line@entry=402, func=func@entry=0x59b3f0 &lt;__FUNCTION__.29169&gt; "create_and_realize", message=message@entry=0xa76a30 "assertion failed: (nm_device_get_ifindex (device) &lt;= 0)") at gtestutils.c:2292
  #3  0x00007ffff4a9176a in g_assertion_message_expr (domain=domain@entry=0x5a5088 "NetworkManager", file=file@entry=0x59b0f2 "devices/nm-device-bridge.c", line=line@entry=402, func=func@entry=0x59b3f0 &lt;__FUNCTION__.29169&gt; "create_and_realize", expr=expr@entry=0x59aef8 "nm_device_get_ifindex (device) &lt;= 0") at gtestutils.c:2307
  #4  0x0000000000447cb6 in create_and_realize (device=0xa77f40 [NMDeviceBridge], connection=0x8d0200, parent=&lt;optimized out&gt;, out_plink=0x7fffffffd700, error=0x0) at devices/nm-device-bridge.c:402
  #5  0x000000000045d560 in nm_device_create_and_realize (self=self@entry=0xa77f40 [NMDeviceBridge], connection=connection@entry=0x8d0200, parent=&lt;optimized out&gt;, error=error@entry=0x0)
  at devices/nm-device.c:1594
  #6  0x00000000004d4b64 in system_create_virtual_device (self=self@entry=0x8802b0 [NMManager], connection=connection@entry=0x8d0200, error=error@entry=0x0) at nm-manager.c:983
  #7  0x00000000004d4d71 in system_create_virtual_devices (self=0x8802b0 [NMManager]) at nm-manager.c:1022
  #8  0x00000000004d47a5 in add_device (self=&lt;optimized out&gt;, device=&lt;optimized out&gt;, try_assume=&lt;optimized out&gt;) at nm-manager.c:1785
  #9  0x00000000004d501f in platform_link_added (self=self@entry=0x8802b0 [NMManager], ifindex=&lt;optimized out&gt;, plink=plink@entry=0xa7f810) at nm-manager.c:1887
  #10 0x00000000004d7c24 in nm_manager_start (self=0x8802b0 [NMManager]) at nm-manager.c:1959
  #11 0x00000000004d7c24 in nm_manager_start (self=self@entry=0x8802b0 [NMManager], error=error@entry=0x7fffffffd930) at nm-manager.c:4178
  #12 0x00000000004459ec in main (argc=1, argv=0x7fffffffda88) at main.c:442
  (gdb)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It might just be that we didn't see it yet; either on daemon startup on in a
race. The nm_platform_*_add() deals with the device already being there in
_link_add_check_existing().

  NetworkManager:ERROR:devices/nm-device-bridge.c:402:create_and_realize: assertion failed: (nm_device_get_ifindex (device) &lt;= 0)

  Program received signal SIGABRT, Aborted.
  0x00007ffff46965d7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
  56        return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig);
  Missing separate debuginfos, use: debuginfo-install bluez-libs-5.23-4.el7.x86_64
  (gdb) bt
  #0  0x00007ffff46965d7 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
  #1  0x00007ffff4697cc8 in __GI_abort () at abort.c:90
  #2  0x00007ffff4a916d5 in g_assertion_message (domain=domain@entry=0x5a5088 "NetworkManager", file=file@entry=0x59b0f2 "devices/nm-device-bridge.c", line=line@entry=402, func=func@entry=0x59b3f0 &lt;__FUNCTION__.29169&gt; "create_and_realize", message=message@entry=0xa76a30 "assertion failed: (nm_device_get_ifindex (device) &lt;= 0)") at gtestutils.c:2292
  #3  0x00007ffff4a9176a in g_assertion_message_expr (domain=domain@entry=0x5a5088 "NetworkManager", file=file@entry=0x59b0f2 "devices/nm-device-bridge.c", line=line@entry=402, func=func@entry=0x59b3f0 &lt;__FUNCTION__.29169&gt; "create_and_realize", expr=expr@entry=0x59aef8 "nm_device_get_ifindex (device) &lt;= 0") at gtestutils.c:2307
  #4  0x0000000000447cb6 in create_and_realize (device=0xa77f40 [NMDeviceBridge], connection=0x8d0200, parent=&lt;optimized out&gt;, out_plink=0x7fffffffd700, error=0x0) at devices/nm-device-bridge.c:402
  #5  0x000000000045d560 in nm_device_create_and_realize (self=self@entry=0xa77f40 [NMDeviceBridge], connection=connection@entry=0x8d0200, parent=&lt;optimized out&gt;, error=error@entry=0x0)
  at devices/nm-device.c:1594
  #6  0x00000000004d4b64 in system_create_virtual_device (self=self@entry=0x8802b0 [NMManager], connection=connection@entry=0x8d0200, error=error@entry=0x0) at nm-manager.c:983
  #7  0x00000000004d4d71 in system_create_virtual_devices (self=0x8802b0 [NMManager]) at nm-manager.c:1022
  #8  0x00000000004d47a5 in add_device (self=&lt;optimized out&gt;, device=&lt;optimized out&gt;, try_assume=&lt;optimized out&gt;) at nm-manager.c:1785
  #9  0x00000000004d501f in platform_link_added (self=self@entry=0x8802b0 [NMManager], ifindex=&lt;optimized out&gt;, plink=plink@entry=0xa7f810) at nm-manager.c:1887
  #10 0x00000000004d7c24 in nm_manager_start (self=0x8802b0 [NMManager]) at nm-manager.c:1959
  #11 0x00000000004d7c24 in nm_manager_start (self=self@entry=0x8802b0 [NMManager], error=error@entry=0x7fffffffd930) at nm-manager.c:4178
  #12 0x00000000004459ec in main (argc=1, argv=0x7fffffffda88) at main.c:442
  (gdb)
</pre>
</div>
</content>
</entry>
<entry>
<title>devices, active-connection: port to gdbus</title>
<updated>2015-08-10T13:41:26+00:00</updated>
<author>
<name>Dan Winship</name>
<email>danw@redhat.com</email>
</author>
<published>2015-04-15T18:53:30+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=c050fb7cd2160f0b74ba8a0760e717e3fe329066'/>
<id>c050fb7cd2160f0b74ba8a0760e717e3fe329066</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>all: drop includes to &lt;glib/gi18n.h&gt; for "nm-default.h"</title>
<updated>2015-08-05T13:35:51+00:00</updated>
<author>
<name>Dan Winship</name>
<email>danw@redhat.com</email>
</author>
<published>2015-08-04T17:02:19+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=22e1a97e122b9c563a4da76bfdb2bd3e77dddccf'/>
<id>22e1a97e122b9c563a4da76bfdb2bd3e77dddccf</id>
<content type='text'>
The localization headers are now included via "nm-default.h".

Also fixes several places, where we wrongly included &lt;glib/gi18n-lib.h&gt;
instead of &lt;glib/gi18n.h&gt;. For example under "clients/" directory.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The localization headers are now included via "nm-default.h".

Also fixes several places, where we wrongly included &lt;glib/gi18n-lib.h&gt;
instead of &lt;glib/gi18n.h&gt;. For example under "clients/" directory.
</pre>
</div>
</content>
</entry>
</feed>
