diff options
author | Tuong Lien <tuong.t.lien@dektech.com.au> | 2019-11-21 15:34:58 +0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-22 09:29:50 -0800 |
commit | 41b416f1fc4c7074e1801fc20f1c7fda94459487 (patch) | |
tree | 78c925ba320f8096efb0f9fee60e86639937903b /net/strparser | |
parent | ba5f6a8617f4cd8e77da0a190b9647065014eade (diff) | |
download | linux-41b416f1fc4c7074e1801fc20f1c7fda94459487.tar.bz2 |
tipc: support in-order name publication events
It is observed that TIPC service binding order will not be kept in the
publication event report to user if the service is subscribed after the
bindings.
For example, services are bound by application in the following order:
Server: bound port A to {18888,66,66} scope 2
Server: bound port A to {18888,33,33} scope 2
Now, if a client subscribes to the service range (e.g. {18888, 0-100}),
it will get the 'TIPC_PUBLISHED' events in that binding order only when
the subscription is started before the bindings.
Otherwise, if started after the bindings, the events will arrive in the
opposite order:
Client: received event for published {18888,33,33}
Client: received event for published {18888,66,66}
For the latter case, it is clear that the bindings have existed in the
name table already, so when reported, the events' order will follow the
order of the rbtree binding nodes (- a node with lesser 'lower'/'upper'
range value will be first).
This is correct as we provide the tracking on a specific service status
(available or not), not the relationship between multiple services.
However, some users expect to see the same order of arriving events
irrespective of when the subscription is issued. This turns out to be
easy to fix. We now add functionality to ensure that publication events
always are issued in the same temporal order as the corresponding
bindings were performed.
v2: replace the unnecessary macro - 'publication_after()' with inline
function.
v3: reuse 'time_after32()' instead of reinventing the same exact code.
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Tuong Lien <tuong.t.lien@dektech.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/strparser')
0 files changed, 0 insertions, 0 deletions