diff options
author | Ying Xue <ying.xue@windriver.com> | 2014-05-04 20:56:14 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-05 17:26:44 -0400 |
commit | ca0c42732c512a12fabe677594840f31861dd31a (patch) | |
tree | 80f703e28c77128d77006e47b9e6a9c8735fb5df /net/tipc/name_distr.h | |
parent | 9d561949685749be3d97239eab7d85aa78718108 (diff) |
tipc: avoid to asynchronously deliver name tables to peer node
Postpone the actions of delivering name tables until after node
lock is released, avoiding to do it under asynchronous context.
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/name_distr.h')
-rw-r--r-- | net/tipc/name_distr.h | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/net/tipc/name_distr.h b/net/tipc/name_distr.h index 47ff829f9361..b2eed4ec1526 100644 --- a/net/tipc/name_distr.h +++ b/net/tipc/name_distr.h | |||
@@ -39,10 +39,38 @@ | |||
39 | 39 | ||
40 | #include "name_table.h" | 40 | #include "name_table.h" |
41 | 41 | ||
42 | #define ITEM_SIZE sizeof(struct distr_item) | ||
43 | |||
44 | /** | ||
45 | * struct distr_item - publication info distributed to other nodes | ||
46 | * @type: name sequence type | ||
47 | * @lower: name sequence lower bound | ||
48 | * @upper: name sequence upper bound | ||
49 | * @ref: publishing port reference | ||
50 | * @key: publication key | ||
51 | * | ||
52 | * ===> All fields are stored in network byte order. <=== | ||
53 | * | ||
54 | * First 3 fields identify (name or) name sequence being published. | ||
55 | * Reference field uniquely identifies port that published name sequence. | ||
56 | * Key field uniquely identifies publication, in the event a port has | ||
57 | * multiple publications of the same name sequence. | ||
58 | * | ||
59 | * Note: There is no field that identifies the publishing node because it is | ||
60 | * the same for all items contained within a publication message. | ||
61 | */ | ||
62 | struct distr_item { | ||
63 | __be32 type; | ||
64 | __be32 lower; | ||
65 | __be32 upper; | ||
66 | __be32 ref; | ||
67 | __be32 key; | ||
68 | }; | ||
69 | |||
42 | struct sk_buff *tipc_named_publish(struct publication *publ); | 70 | struct sk_buff *tipc_named_publish(struct publication *publ); |
43 | struct sk_buff *tipc_named_withdraw(struct publication *publ); | 71 | struct sk_buff *tipc_named_withdraw(struct publication *publ); |
44 | void named_cluster_distribute(struct sk_buff *buf); | 72 | void named_cluster_distribute(struct sk_buff *buf); |
45 | void tipc_named_node_up(unsigned long node); | 73 | void tipc_named_node_up(u32 max_item_buf, u32 node); |
46 | void tipc_named_rcv(struct sk_buff *buf); | 74 | void tipc_named_rcv(struct sk_buff *buf); |
47 | void tipc_named_reinit(void); | 75 | void tipc_named_reinit(void); |
48 | 76 | ||