aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/subscr.h
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2008-05-19 16:29:47 -0400
committerDavid S. Miller <davem@davemloft.net>2008-05-19 16:29:47 -0400
commit28353e7fad1d224687220a448950dc552645a50a (patch)
tree69f60055703f0213601d3a2d38c26886def6e52e /net/tipc/subscr.h
parentfc5ad582709ce9c7b9ab7b70c1e5b5e2cfc384db (diff)
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,
49 * @timeout: duration of subscription (in ms) 49 * @timeout: duration of subscription (in ms)
50 * @filter: event filtering to be done for subscription 50 * @filter: event filtering to be done for subscription
51 * @event_cb: routine invoked when a subscription event is detected 51 * @event_cb: routine invoked when a subscription event is detected
52 * @server_ref: object reference of server port associated with subscription
52 * @swap: indicates if subscriber uses opposite endianness in its messages 53 * @swap: indicates if subscriber uses opposite endianness in its messages
53 * @evt: template for events generated by subscription 54 * @evt: template for events generated by subscription
54 * @subscription_list: adjacent subscriptions in subscriber's subscription list 55 * @subscription_list: adjacent subscriptions in subscriber's subscription list
55 * @nameseq_list: adjacent subscriptions in name sequence's subscription list 56 * @nameseq_list: adjacent subscriptions in name sequence's subscription list
56 * @timer_ref: reference to timer governing subscription duration (may be NULL) 57 * @timer_ref: reference to timer governing subscription duration (may be NULL)
57 * @owner: pointer to subscriber object associated with this subscription
58 */ 58 */
59 59
60struct subscription { 60struct subscription {
@@ -62,12 +62,12 @@ struct subscription {
62 u32 timeout; 62 u32 timeout;
63 u32 filter; 63 u32 filter;
64 tipc_subscr_event event_cb; 64 tipc_subscr_event event_cb;
65 u32 server_ref;
65 int swap; 66 int swap;
66 struct tipc_event evt; 67 struct tipc_event evt;
67 struct list_head subscription_list; 68 struct list_head subscription_list;
68 struct list_head nameseq_list; 69 struct list_head nameseq_list;
69 struct timer_list timer; 70 struct timer_list timer;
70 struct subscriber *owner;
71}; 71};
72 72
73int tipc_subscr_overlap(struct subscription * sub, 73int tipc_subscr_overlap(struct subscription * sub,