From 28353e7fad1d224687220a448950dc552645a50a Mon Sep 17 00:00:00 2001 From: Allan Stephens Date: Mon, 19 May 2008 13:29:47 -0700 Subject: 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 Signed-off-by: David S. Miller --- net/tipc/subscr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/tipc/subscr.h') diff --git a/net/tipc/subscr.h b/net/tipc/subscr.h index 3e3e026..b9af687 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, -- cgit v1.1