aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/subscr.h
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2008-05-19 13:29:47 -0700
committerDavid S. Miller <davem@davemloft.net>2008-05-19 13:29:47 -0700
commit28353e7fad1d224687220a448950dc552645a50a (patch)
tree69f60055703f0213601d3a2d38c26886def6e52e /net/tipc/subscr.h
parenttipc: Fix bug in topology server byte swapping routine (diff)
downloadlinux-dev-28353e7fad1d224687220a448950dc552645a50a.tar.xz
linux-dev-28353e7fad1d224687220a448950dc552645a50a.zip
tipc: Consolidate subscriber & subscriber port references
This patch modifies TIPC's network topology service so that it only requires a single reference table entry per subscriber connection, rather than two. This is achieved by letting the reference to the server port communicating with the subscriber act as the reference to the subscriber object itself. (Since the subscriber cannot exist without its port, and vice versa, this dual role for the reference is perfectly natural.) This consolidation reduces the size of the reference table by 50% in the default configuration. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/subscr.h')
-rw-r--r--net/tipc/subscr.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/tipc/subscr.h b/net/tipc/subscr.h
index 3e3e0265146e..b9af687b6368 100644
--- a/net/tipc/subscr.h
+++ b/net/tipc/subscr.h
@@ -49,12 +49,12 @@ typedef void (*tipc_subscr_event) (struct subscription *sub,
* @timeout: duration of subscription (in ms)
* @filter: event filtering to be done for subscription
* @event_cb: routine invoked when a subscription event is detected
+ * @server_ref: object reference of server port associated with subscription
* @swap: indicates if subscriber uses opposite endianness in its messages
* @evt: template for events generated by subscription
* @subscription_list: adjacent subscriptions in subscriber's subscription list
* @nameseq_list: adjacent subscriptions in name sequence's subscription list
* @timer_ref: reference to timer governing subscription duration (may be NULL)
- * @owner: pointer to subscriber object associated with this subscription
*/
struct subscription {
@@ -62,12 +62,12 @@ struct subscription {
u32 timeout;
u32 filter;
tipc_subscr_event event_cb;
+ u32 server_ref;
int swap;
struct tipc_event evt;
struct list_head subscription_list;
struct list_head nameseq_list;
struct timer_list timer;
- struct subscriber *owner;
};
int tipc_subscr_overlap(struct subscription * sub,