hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/net/tipc/name_table.h
....@@ -58,9 +58,10 @@
5858 * @node: network address of publishing socket's node
5959 * @port: publishing port
6060 * @key: publication key, unique across the cluster
61
+ * @id: publication id
6162 * @binding_node: all publications from the same node which bound this one
62
- * - Remote publications: in node->publ_list
63
- * Used by node/name distr to withdraw publications when node is lost
63
+ * - Remote publications: in node->publ_list;
64
+ * Used by node/name distr to withdraw publications when node is lost
6465 * - Local/node scope publications: in name_table->node_scope list
6566 * - Local/cluster scope publications: in name_table->cluster_scope list
6667 * @binding_sock: all publications from the same socket which bound this one
....@@ -69,6 +70,7 @@
6970 * Used by closest_first and multicast receive lookup algorithms
7071 * @all_publ: all publications identical to this one, whatever node and scope
7172 * Used by round-robin lookup algorithm
73
+ * @list: to form a list of publications in temporal order
7274 * @rcu: RCU callback head used for deferred freeing
7375 */
7476 struct publication {
....@@ -79,22 +81,27 @@
7981 u32 node;
8082 u32 port;
8183 u32 key;
84
+ u32 id;
8285 struct list_head binding_node;
8386 struct list_head binding_sock;
8487 struct list_head local_publ;
8588 struct list_head all_publ;
89
+ struct list_head list;
8690 struct rcu_head rcu;
8791 };
8892
8993 /**
9094 * struct name_table - table containing all existing port name publications
91
- * @seq_hlist: name sequence hash lists
95
+ * @services: name sequence hash lists
9296 * @node_scope: all local publications with node scope
9397 * - used by name_distr during re-init of name table
9498 * @cluster_scope: all local publications with cluster scope
9599 * - used by name_distr to send bulk updates to new nodes
96100 * - used by name_distr during re-init of name table
101
+ * @cluster_scope_lock: lock for accessing @cluster_scope
97102 * @local_publ_count: number of publications issued by this node
103
+ * @rc_dests: destination node counter
104
+ * @snd_nxt: next sequence number to be used
98105 */
99106 struct name_table {
100107 struct hlist_head services[TIPC_NAMETBL_SIZE];
....@@ -102,6 +109,8 @@
102109 struct list_head cluster_scope;
103110 rwlock_t cluster_scope_lock;
104111 u32 local_publ_count;
112
+ u32 rc_dests;
113
+ u32 snd_nxt;
105114 };
106115
107116 int tipc_nl_name_table_dump(struct sk_buff *skb, struct netlink_callback *cb);