[systemd-devel] [k]dbus: api, match replace and test extending

Lennart Poettering lennart at poettering.net
Mon Nov 17 02:00:52 PST 2014


On Mon, 17.11.14 00:23, Rui Miguel Silva (rmfrfs at gmail.com) wrote:

> Hi,
> 
> I have some questions regarding kdbus/dbus, maybe some could assist:
> 
> 1\ api: when it is exported explicity bloom as filter implementation dont
> you think that:
>      - exporting through api an internal implementation, maybe it is not
>        a good idea

What do you mean by that? 

Note that the parameters of the bloom filter are communicated via
HELLO ioctl when you connect. This allows us to alter the parameters
later on should that be necessary.

Also, there's a feature negotiation scheme as well as "filter
versioning" available which allows us to change the filtering scheme
evenutally should this be necessary, without having to update all
clients at once.

We hence carefully made sure that we have a variety of "soft" ways how
we can still alter the filtering scheme later on, after the first
release.

That said, we also carefully selected the initial parameters we will
use by default. For example, the hash function we use is SipHash,
which is actually overkill for what we need (it's cryptographic which
is a property we don't need), and we defined a set of seeds that are
substantially more than we will need with the initial bloom filter
parameters.

>      - technical debt, if in the future the filter mechanism is change by
>        other than bloom.
> so bloom maybe just be replaced with only generic filter could make more
> sense?

What do you mean by "only generic filter"?

> 2\ match_replace: it is not clear to me from the docs what should be the
> behaviour when using the KDBUS_MATCH_REPLACE flag and the match with the
> given cookie does not exist. In the implementation it is obvious that it
> will add as a new match. but it is a feature or bug?

This is a feature. It's about atomic replace really.

> 3\ testing: it is of any interess to provide more test code and cases at
> kdbus level? or do not want to increase the testing scenario?

We are always interested in more test cases. In both sd-bus on the
systemd side, as well as in the kdbus/kernel repository!

Hope this is useful!

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list