<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/NetworkManager.git/src/nm-pacrunner-manager.c, branch th/connection-call-ids-cleanup</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>core: support tracking default-route in NMIP4Config/NMIP6Config</title>
<updated>2017-09-08T09:11:21+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-08-31T11:39:04+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=0918b4914d03ec14f71b3e56178c44a6ec648b34'/>
<id>0918b4914d03ec14f71b3e56178c44a6ec648b34</id>
<content type='text'>
Default-routes are for the most part like regular routes. Add support to
track them like regular routes in NMIP4Config/NMIP6Config.

One thing is, sometimes we need to figure out whether an ip-config
instance has a default-route. For that, keep track of the best
default-route (there might be multiple) and expose it. That is
the most complicated part of this patch, because there are so many
places where the list of routes gets modified (replace, intersect,
subtract, merge, add), and they all need to take care of updating
the best default-route.

In a next patch, NMDefaultRouteManager will be dropped and default-routes
will be tracked by NMIP4Config/NMIP6Config.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Default-routes are for the most part like regular routes. Add support to
track them like regular routes in NMIP4Config/NMIP6Config.

One thing is, sometimes we need to figure out whether an ip-config
instance has a default-route. For that, keep track of the best
default-route (there might be multiple) and expose it. That is
the most complicated part of this patch, because there are so many
places where the list of routes gets modified (replace, intersect,
subtract, merge, add), and they all need to take care of updating
the best default-route.

In a next patch, NMDefaultRouteManager will be dropped and default-routes
will be tracked by NMIP4Config/NMIP6Config.
</pre>
</div>
</content>
</entry>
<entry>
<title>core: track addresses for NMIP4Config/NMIP6Config via NMDedupMultiIndex</title>
<updated>2017-07-25T04:44:12+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-07-07T21:34:41+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=22edeb5b691befd796c534cf71901b32f0b7945b'/>
<id>22edeb5b691befd796c534cf71901b32f0b7945b</id>
<content type='text'>
Reasons:

 - it adds an O(1) lookup index for accessing NMIPxConfig's addresses.
   Hence, operations like merge/intersect have now runtime O(n) instead
   of O(n^2).
   Arguably, we expect low numbers of addresses in general. For low
   numbers, the O(n^2) doesn't matter and quite likely in those cases
   the previous implementation was just fine -- maybe even faster.
   But the simple case works fine either way. It's important to scale
   well in the exceptional case.
 - the tracked objects can be shared between the various NMPI4Config,
   NMIP6Config instances with NMPlatform and everybody else.
 - the NMPObject can be treated generically, meaning it enables code to
   handle both IPv4 and IPv6, or addresses and routes. See for example
   _nm_ip_config_add_obj().
 - I want core to evolve to somewhere where we don't keep copies of
   NMPlatformIP4Address, et al. instances. Instead they shall all be
   shared. I hope this will reduce memory consumption (although tracking a
   reference consumes some memory too). Also, it shortcuts nmp_object_equal()
   when comparing the same object. Calling nmp_object_equal() on the
   identical objects would be a common case after the hash function
   pre-evaluates equality.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reasons:

 - it adds an O(1) lookup index for accessing NMIPxConfig's addresses.
   Hence, operations like merge/intersect have now runtime O(n) instead
   of O(n^2).
   Arguably, we expect low numbers of addresses in general. For low
   numbers, the O(n^2) doesn't matter and quite likely in those cases
   the previous implementation was just fine -- maybe even faster.
   But the simple case works fine either way. It's important to scale
   well in the exceptional case.
 - the tracked objects can be shared between the various NMPI4Config,
   NMIP6Config instances with NMPlatform and everybody else.
 - the NMPObject can be treated generically, meaning it enables code to
   handle both IPv4 and IPv6, or addresses and routes. See for example
   _nm_ip_config_add_obj().
 - I want core to evolve to somewhere where we don't keep copies of
   NMPlatformIP4Address, et al. instances. Instead they shall all be
   shared. I hope this will reduce memory consumption (although tracking a
   reference consumes some memory too). Also, it shortcuts nmp_object_equal()
   when comparing the same object. Calling nmp_object_equal() on the
   identical objects would be a common case after the hash function
   pre-evaluates equality.
</pre>
</div>
</content>
</entry>
<entry>
<title>core: refactor NMIP6Config to use dedup-index for IPv6 routes</title>
<updated>2017-07-05T16:37:39+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-07-03T15:03:54+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=cfd1851c0067773211524c2b648330b6ee7a066c'/>
<id>cfd1851c0067773211524c2b648330b6ee7a066c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>core: refactor NMIP4Config to use dedup-index for IPv4 routes</title>
<updated>2017-07-05T12:22:10+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-06-12T16:40:14+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=935411e5c03dcb62d5b2a85e67bf3220c75d0f5e'/>
<id>935411e5c03dcb62d5b2a85e67bf3220c75d0f5e</id>
<content type='text'>
Eventually, every NMPlatformIP4Route, NMPlatformIP6Route,
NMPlatformIP4Address and NMPlatformIP6Address should be shared
an deduplicated via the global NMDedupMultiIndex instance.

As first proof of concept, refactor NMIP4Config to track
IPv4 routes via the shared multi_idx. There is later potential
for improvement, when we pass (deduplicated) NMPObject instances
around instead of plain NMPlatformIP4Route, which needs still
a lot of comparing and cloning.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Eventually, every NMPlatformIP4Route, NMPlatformIP6Route,
NMPlatformIP4Address and NMPlatformIP6Address should be shared
an deduplicated via the global NMDedupMultiIndex instance.

As first proof of concept, refactor NMIP4Config to track
IPv4 routes via the shared multi_idx. There is later potential
for improvement, when we pass (deduplicated) NMPObject instances
around instead of plain NMPlatformIP4Route, which needs still
a lot of comparing and cloning.
</pre>
</div>
</content>
</entry>
<entry>
<title>proxy: use CList to track configs in NMPacrunnnerManager</title>
<updated>2017-05-11T16:42:49+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-05-11T10:04:24+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=8894e8c61b94af764e0a0e23f1a76d5e32ce5b0c'/>
<id>8894e8c61b94af764e0a0e23f1a76d5e32ce5b0c</id>
<content type='text'>
- config-&gt;removed can be replaced by c_list_is_empty(&amp;config-&gt;lst)

- downgrade some assertions to nm_assert(). Even without the
  assert we crash a few lines later with a NULL pointer access.
  That gives almost the same debuggability and discoverability
  of the bug.

- use exact type signature for GAsyncReadyCallback and avoid
  casting.

- when the name owner disappears, cancel all asynchronous
  operations. Note how the new pacrunner instance will anyway
  start without configuration, so for all intended purpose, all
  pending operations are at that moment obsolete.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- config-&gt;removed can be replaced by c_list_is_empty(&amp;config-&gt;lst)

- downgrade some assertions to nm_assert(). Even without the
  assert we crash a few lines later with a NULL pointer access.
  That gives almost the same debuggability and discoverability
  of the bug.

- use exact type signature for GAsyncReadyCallback and avoid
  casting.

- when the name owner disappears, cancel all asynchronous
  operations. Note how the new pacrunner instance will anyway
  start without configuration, so for all intended purpose, all
  pending operations are at that moment obsolete.
</pre>
</div>
</content>
</entry>
<entry>
<title>proxy: fix passing cancellable to async D-Bus operations</title>
<updated>2017-05-11T16:24:41+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-05-11T10:32:22+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=a08540d967812457af192ebd34497412da5d143e'/>
<id>a08540d967812457af192ebd34497412da5d143e</id>
<content type='text'>
We must not cancel pacrunner_cancellable when the D-Bus proxy is
created. Instead, keep it around and use it later for the asynchronous
D-Bus operations.

This doesn't really matter at the moment, because the pacrunner manager
is only destroyed when NetworkManager is about to terminated. That is
the only time when we actually cancel the asynchronous request. Also,
at that time we no longer iterate the mainloop, so the pending requests
are never completed anyway.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We must not cancel pacrunner_cancellable when the D-Bus proxy is
created. Instead, keep it around and use it later for the asynchronous
D-Bus operations.

This doesn't really matter at the moment, because the pacrunner manager
is only destroyed when NetworkManager is about to terminated. That is
the only time when we actually cancel the asynchronous request. Also,
at that time we no longer iterate the mainloop, so the pending requests
are never completed anyway.
</pre>
</div>
</content>
</entry>
<entry>
<title>proxy: fix refcount handing for DestroyProxyConfiguration operation</title>
<updated>2017-05-11T16:24:41+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-05-11T10:09:45+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=df137fdf9a7077c20d8923f068568c22fb479e5a'/>
<id>df137fdf9a7077c20d8923f068568c22fb479e5a</id>
<content type='text'>
Fixes: e895beb0da38fc87ce93fe7403a6b50e92f0dd82
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes: e895beb0da38fc87ce93fe7403a6b50e92f0dd82
</pre>
</div>
</content>
</entry>
<entry>
<title>proxy: send proxy config after creating D-Bus proxy</title>
<updated>2017-04-23T16:16:25+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-04-21T14:24:33+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=6ce0044c4d28e398ea9e20471063d2a798fdbe7a'/>
<id>6ce0044c4d28e398ea9e20471063d2a798fdbe7a</id>
<content type='text'>
As NMDevice now creates the NMPacrunnerManager instance
as needed, it is even more likely that the initial call
to nm_pacrunner_manager_send() will only queue (but not yet
send) the new config.

Later, when the D-Bus proxy is created, we will not get a
name-owner changed signal. We instead have to push the configuration
right away.

(cherry picked from commit 019b9fbfc0aa2123d1e0a742c0b3d01caaa7d874)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As NMDevice now creates the NMPacrunnerManager instance
as needed, it is even more likely that the initial call
to nm_pacrunner_manager_send() will only queue (but not yet
send) the new config.

Later, when the D-Bus proxy is created, we will not get a
name-owner changed signal. We instead have to push the configuration
right away.

(cherry picked from commit 019b9fbfc0aa2123d1e0a742c0b3d01caaa7d874)
</pre>
</div>
</content>
</entry>
<entry>
<title>proxy: unify logging in nm-pacrunner-manager</title>
<updated>2017-04-23T16:16:25+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-04-21T14:21:05+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=48388f1038d33f932cf993f1c458b02b24d47019'/>
<id>48388f1038d33f932cf993f1c458b02b24d47019</id>
<content type='text'>
Give logging lines that are concerned with a certain "config"
the same prefix: their call-id.

(cherry picked from commit 8c81a4b58b17283596b0dcb45825890dd6722ac9)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Give logging lines that are concerned with a certain "config"
the same prefix: their call-id.

(cherry picked from commit 8c81a4b58b17283596b0dcb45825890dd6722ac9)
</pre>
</div>
</content>
</entry>
<entry>
<title>proxy: introduce call-id for clearing pacmanager configuration</title>
<updated>2017-04-23T16:16:25+00:00</updated>
<author>
<name>Thomas Haller</name>
<email>thaller@redhat.com</email>
</author>
<published>2017-04-21T13:46:56+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/NetworkManager.git/commit/?id=b7a30dbf1f7150850f16f4fd28fe605b16221231'/>
<id>b7a30dbf1f7150850f16f4fd28fe605b16221231</id>
<content type='text'>
nm_pacrunner_manager_remove() required a "tag" argument. It was a
bug for callers trying to remove a configuration for a non-existing
tag.

That effectively means, the caller must keep track of whether a certain
"tag" is pending. The caller also must remember the tag -- a tag that he
must choose uniquely in the first place.

Turn that around and have nm_pacrunner_manager_send() return a (non
NULL) call-id. This call-id may later be used to remove the
configuration.

Apparently, previously the tracking of the "tag" was not always correct
and we hit the assertion in nm_pacrunner_manager_remove().

https://bugzilla.redhat.com/show_bug.cgi?id=1444374
(cherry picked from commit b04a9c90eb0a866f2d730cc4777b4f670220ddc7)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
nm_pacrunner_manager_remove() required a "tag" argument. It was a
bug for callers trying to remove a configuration for a non-existing
tag.

That effectively means, the caller must keep track of whether a certain
"tag" is pending. The caller also must remember the tag -- a tag that he
must choose uniquely in the first place.

Turn that around and have nm_pacrunner_manager_send() return a (non
NULL) call-id. This call-id may later be used to remove the
configuration.

Apparently, previously the tracking of the "tag" was not always correct
and we hit the assertion in nm_pacrunner_manager_remove().

https://bugzilla.redhat.com/show_bug.cgi?id=1444374
(cherry picked from commit b04a9c90eb0a866f2d730cc4777b4f670220ddc7)
</pre>
</div>
</content>
</entry>
</feed>
