forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/net/tipc/bearer.h
....@@ -119,7 +119,8 @@
119119 char *raw);
120120 u32 priority;
121121 u32 tolerance;
122
- u32 window;
122
+ u32 min_win;
123
+ u32 max_win;
123124 u32 mtu;
124125 u32 type_id;
125126 u32 hwaddr_len;
....@@ -158,13 +159,15 @@
158159 struct packet_type pt;
159160 struct rcu_head rcu;
160161 u32 priority;
161
- u32 window;
162
+ u32 min_win;
163
+ u32 max_win;
162164 u32 tolerance;
163165 u32 domain;
164166 u32 identity;
165167 struct tipc_discoverer *disc;
166168 char net_plane;
167169 unsigned long up;
170
+ refcount_t refcnt;
168171 };
169172
170173 struct tipc_bearer_names {
....@@ -207,9 +210,11 @@
207210
208211 int tipc_media_set_priority(const char *name, u32 new_value);
209212 int tipc_media_set_window(const char *name, u32 new_value);
210
-void tipc_media_addr_printf(char *buf, int len, struct tipc_media_addr *a);
213
+int tipc_media_addr_printf(char *buf, int len, struct tipc_media_addr *a);
211214 int tipc_enable_l2_media(struct net *net, struct tipc_bearer *b,
212215 struct nlattr *attrs[]);
216
+bool tipc_bearer_hold(struct tipc_bearer *b);
217
+void tipc_bearer_put(struct tipc_bearer *b);
213218 void tipc_disable_l2_media(struct tipc_bearer *b);
214219 int tipc_l2_send_msg(struct net *net, struct sk_buff *buf,
215220 struct tipc_bearer *b, struct tipc_media_addr *dest);
....@@ -229,9 +234,20 @@
229234 struct tipc_media_addr *dest);
230235 void tipc_bearer_xmit(struct net *net, u32 bearer_id,
231236 struct sk_buff_head *xmitq,
232
- struct tipc_media_addr *dst);
237
+ struct tipc_media_addr *dst,
238
+ struct tipc_node *__dnode);
233239 void tipc_bearer_bc_xmit(struct net *net, u32 bearer_id,
234240 struct sk_buff_head *xmitq);
241
+void tipc_clone_to_loopback(struct net *net, struct sk_buff_head *pkts);
242
+int tipc_attach_loopback(struct net *net);
243
+void tipc_detach_loopback(struct net *net);
244
+
245
+static inline void tipc_loopback_trace(struct net *net,
246
+ struct sk_buff_head *pkts)
247
+{
248
+ if (unlikely(dev_nit_active(net->loopback_dev)))
249
+ tipc_clone_to_loopback(net, pkts);
250
+}
235251
236252 /* check if device MTU is too low for tipc headers */
237253 static inline bool tipc_mtu_bad(struct net_device *dev, unsigned int reserve)