1 // SPDX-License-Identifier: GPL-2.0
3 /* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
4 * Use is subject to license terms.
6 * Copyright (c) 2012, 2017, Intel Corporation.
9 /* This file is part of Lustre, http://www.lustre.org/
11 * Top level include for library side routines
14 #ifndef __LNET_LIB_LNET_H__
15 #define __LNET_LIB_LNET_H__
18 #define CFS_FAIL_PTLRPC_OST_BULK_CB2 0xe000
19 #define CFS_FAIL_MATCH_MD_NID 0xe001
21 #include <linux/netdevice.h>
23 #include <libcfs/libcfs.h>
25 #include <lnet/lib-cpt.h>
26 #include <lnet/lib-types.h>
27 #include <uapi/linux/lnet/lnet-dlc.h>
28 #include <uapi/linux/lnet/lnet-types.h>
29 #include <uapi/linux/lnet/lnetctl.h>
30 #include <uapi/linux/lnet/nidstr.h>
34 extern struct lnet the_lnet; /* THE network */
36 #if (BITS_PER_LONG == 32)
37 /* 2 CPTs, allowing more CPTs might make us under memory pressure */
38 # define LNET_CPT_MAX_BITS 1
40 #else /* 64-bit system */
42 * 256 CPTs for thousands of CPUs, allowing more CPTs might make us
43 * under risk of consuming all lh_cookie.
45 # define LNET_CPT_MAX_BITS 8
46 #endif /* BITS_PER_LONG == 32 */
48 /* max allowed CPT number */
49 #define LNET_CPT_MAX (1 << LNET_CPT_MAX_BITS)
51 #define LNET_CPT_NUMBER (the_lnet.ln_cpt_number)
52 #define LNET_CPT_BITS (the_lnet.ln_cpt_bits)
53 #define LNET_CPT_MASK ((1ULL << LNET_CPT_BITS) - 1)
56 #define LNET_LOCK_EX CFS_PERCPT_LOCK_EX
58 /* need both kernel and user-land acceptor */
59 #define LNET_ACCEPTOR_MIN_RESERVED_PORT 512
60 #define LNET_ACCEPTOR_MAX_RESERVED_PORT 1023
62 /* default timeout and credits */
63 #define DEFAULT_PEER_TIMEOUT 180
64 #define DEFAULT_PEER_CREDITS 8
65 #define DEFAULT_CREDITS 256
67 /* default number of connections per peer */
68 #define DEFAULT_CONNS_PER_PEER 0
70 #ifdef HAVE_KERN_SOCK_GETNAME_2ARGS
71 #define lnet_kernel_getpeername(sock, addr, addrlen) \
72 kernel_getpeername(sock, addr)
73 #define lnet_kernel_getsockname(sock, addr, addrlen) \
74 kernel_getsockname(sock, addr)
76 #define lnet_kernel_getpeername(sock, addr, addrlen) \
77 kernel_getpeername(sock, addr, addrlen)
78 #define lnet_kernel_getsockname(sock, addr, addrlen) \
79 kernel_getsockname(sock, addr, addrlen)
83 * kernel 5.3: commit ef11db3310e272d3d8dbe8739e0770820dd20e52
84 * kernel 4.18.0-193.el8:
85 * added in_dev_for_each_ifa_rtnl and in_dev_for_each_ifa_rcu
86 * and removed for_ifa and endfor_ifa.
87 * Use the _rntl variant as the current locking is rtnl.
89 #ifdef HAVE_IN_DEV_FOR_EACH_IFA_RTNL
90 #define DECLARE_CONST_IN_IFADDR(ifa) const struct in_ifaddr *ifa
91 #define endfor_ifa(in_dev)
93 #define DECLARE_CONST_IN_IFADDR(ifa)
94 #define in_dev_for_each_ifa_rtnl(ifa, in_dev) for_ifa((in_dev))
95 #define in_dev_for_each_ifa_rcu(ifa, in_dev) for_ifa((in_dev))
99 # if defined(__GNUC__) && __GNUC__ >= 7
100 # define fallthrough __attribute__((fallthrough)) /* fallthrough */
102 # define fallthrough do {} while (0) /* fallthrough */
106 int choose_ipv4_src(__u32 *ret,
107 int interface, __u32 dst_ipaddr, struct net *ns);
109 bool lnet_is_route_alive(struct lnet_route *route);
110 bool lnet_is_gateway_alive(struct lnet_peer *gw);
112 static inline int lnet_is_wire_handle_none(struct lnet_handle_wire *wh)
114 return (wh->wh_interface_cookie == LNET_WIRE_HANDLE_COOKIE_NONE &&
115 wh->wh_object_cookie == LNET_WIRE_HANDLE_COOKIE_NONE);
118 static inline int lnet_md_exhausted(struct lnet_libmd *md)
120 return (md->md_threshold == 0 ||
121 ((md->md_options & LNET_MD_MAX_SIZE) != 0 &&
122 md->md_offset + md->md_max_size > md->md_length));
125 static inline int lnet_md_unlinkable(struct lnet_libmd *md)
127 /* Should unlink md when its refcount is 0 and either:
128 * - md has been flagged for deletion (by auto unlink or LNetM[DE]Unlink,
129 * in the latter case md may not be exhausted).
130 * - auto unlink is on and md is exhausted.
132 if (md->md_refcount != 0)
135 if ((md->md_flags & LNET_MD_FLAG_ZOMBIE) != 0)
138 return ((md->md_flags & LNET_MD_FLAG_AUTO_UNLINK) != 0 &&
139 lnet_md_exhausted(md));
142 #define lnet_cpt_table() (the_lnet.ln_cpt_table)
143 #define lnet_cpt_current() cfs_cpt_current(the_lnet.ln_cpt_table, 1)
146 lnet_cpt_of_cookie(__u64 cookie)
148 unsigned int cpt = (cookie >> LNET_COOKIE_TYPE_BITS) & LNET_CPT_MASK;
150 /* LNET_CPT_NUMBER doesn't have to be power2, which means we can
151 * get illegal cpt from it's invalid cookie */
152 return cpt < LNET_CPT_NUMBER ? cpt : cpt % LNET_CPT_NUMBER;
156 lnet_res_lock(int cpt)
158 cfs_percpt_lock(the_lnet.ln_res_lock, cpt);
162 lnet_res_unlock(int cpt)
164 cfs_percpt_unlock(the_lnet.ln_res_lock, cpt);
168 lnet_res_lock_current(void)
170 int cpt = lnet_cpt_current();
177 lnet_net_lock(int cpt)
179 cfs_percpt_lock(the_lnet.ln_net_lock, cpt);
183 lnet_net_unlock(int cpt)
185 cfs_percpt_unlock(the_lnet.ln_net_lock, cpt);
189 lnet_net_lock_current(void)
191 int cpt = lnet_cpt_current();
197 #define LNET_LOCK() lnet_net_lock(LNET_LOCK_EX)
198 #define LNET_UNLOCK() lnet_net_unlock(LNET_LOCK_EX)
200 #define lnet_ptl_lock(ptl) spin_lock(&(ptl)->ptl_lock)
201 #define lnet_ptl_unlock(ptl) spin_unlock(&(ptl)->ptl_lock)
202 #define lnet_ni_lock(ni) spin_lock(&(ni)->ni_lock)
203 #define lnet_ni_unlock(ni) spin_unlock(&(ni)->ni_lock)
205 #define MAX_PORTALS 64
207 #define LNET_SMALL_MD_SIZE offsetof(struct lnet_libmd, md_kiov[1])
208 extern struct kmem_cache *lnet_mes_cachep; /* MEs kmem_cache */
209 extern struct kmem_cache *lnet_small_mds_cachep; /* <= LNET_SMALL_MD_SIZE bytes
211 extern struct kmem_cache *lnet_udsp_cachep;
212 extern struct kmem_cache *lnet_rspt_cachep;
213 extern struct kmem_cache *lnet_msg_cachep;
216 lnet_ni_set_status_locked(struct lnet_ni *ni, __u32 status)
217 __must_hold(&ni->ni_lock)
221 if (ni->ni_status && *ni->ni_status != status) {
222 CDEBUG(D_NET, "ni %s status changed from %#x to %#x\n",
223 libcfs_nidstr(&ni->ni_nid),
224 *ni->ni_status, status);
225 *ni->ni_status = status;
232 static inline unsigned int
233 lnet_ni_get_status_locked(struct lnet_ni *ni)
234 __must_hold(&ni->ni_lock)
236 if (nid_is_lo0(&ni->ni_nid))
237 return LNET_NI_STATUS_UP;
238 else if (atomic_read(&ni->ni_fatal_error_on))
239 return LNET_NI_STATUS_DOWN;
240 else if (the_lnet.ln_routing && ni->ni_status)
241 return *ni->ni_status;
243 return LNET_NI_STATUS_UP;
247 lnet_ni_set_status(struct lnet_ni *ni, __u32 status)
252 update = lnet_ni_set_status_locked(ni, status);
258 static inline void lnet_md_wait_handling(struct lnet_libmd *md, int cpt)
260 wait_queue_head_t *wq = __var_waitqueue(md);
261 #if defined(HAVE_WAIT_BIT_QUEUE_ENTRY) || !defined(HAVE_WAIT_VAR_EVENT)
262 struct wait_bit_queue_entry entry;
263 wait_queue_entry_t *wqe = &entry.wq_entry;
265 struct wait_bit_queue entry;
266 wait_queue_entry_t *wqe = &entry.wait;
268 init_wait_var_entry(&entry, md, 0);
269 prepare_to_wait_event(wq, wqe, TASK_IDLE);
270 if (md->md_flags & LNET_MD_FLAG_HANDLING) {
271 /* Race with unlocked call to ->md_handler.
272 * It is safe to drop the res_lock here as the
273 * caller has only just claimed it.
275 lnet_res_unlock(cpt);
277 /* Cannot check md now, it might be freed. Caller
278 * must reclaim reference and check.
282 finish_wait(wq, wqe);
286 lnet_md_free(struct lnet_libmd *md)
290 LASSERTF(!md->md_rspt_ptr, "md %px rsp %px\n", md, md->md_rspt_ptr);
292 size = offsetof(struct lnet_libmd, md_kiov[md->md_niov]);
294 if (size <= LNET_SMALL_MD_SIZE) {
295 LIBCFS_MEM_MSG(md, size, "slab-freed");
296 kmem_cache_free(lnet_small_mds_cachep, md);
298 LIBCFS_FREE(md, size);
302 struct lnet_libhandle *lnet_res_lh_lookup(struct lnet_res_container *rec,
304 void lnet_res_lh_initialize(struct lnet_res_container *rec,
305 struct lnet_libhandle *lh);
307 lnet_res_lh_invalidate(struct lnet_libhandle *lh)
309 /* ALWAYS called with resource lock held */
310 /* NB: cookie is still useful, don't reset it */
311 list_del(&lh->lh_hash_chain);
315 lnet_md2handle(struct lnet_handle_md *handle, struct lnet_libmd *md)
317 handle->cookie = md->md_lh.lh_cookie;
320 static inline struct lnet_libmd *
321 lnet_handle2md(struct lnet_handle_md *handle)
323 /* ALWAYS called with resource lock held */
324 struct lnet_libhandle *lh;
327 cpt = lnet_cpt_of_cookie(handle->cookie);
328 lh = lnet_res_lh_lookup(the_lnet.ln_md_containers[cpt],
333 return lh_entry(lh, struct lnet_libmd, md_lh);
336 static inline struct lnet_libmd *
337 lnet_wire_handle2md(struct lnet_handle_wire *wh)
339 /* ALWAYS called with resource lock held */
340 struct lnet_libhandle *lh;
343 if (wh->wh_interface_cookie != the_lnet.ln_interface_cookie)
346 cpt = lnet_cpt_of_cookie(wh->wh_object_cookie);
347 lh = lnet_res_lh_lookup(the_lnet.ln_md_containers[cpt],
348 wh->wh_object_cookie);
352 return lh_entry(lh, struct lnet_libmd, md_lh);
356 lnet_peer_net_addref_locked(struct lnet_peer_net *lpn)
358 atomic_inc(&lpn->lpn_refcount);
361 extern void lnet_destroy_peer_net_locked(struct lnet_peer_net *lpn);
364 lnet_peer_net_decref_locked(struct lnet_peer_net *lpn)
366 if (atomic_dec_and_test(&lpn->lpn_refcount))
367 lnet_destroy_peer_net_locked(lpn);
371 lnet_peer_addref_locked(struct lnet_peer *lp)
373 atomic_inc(&lp->lp_refcount);
376 extern void lnet_destroy_peer_locked(struct lnet_peer *lp);
379 lnet_peer_decref_locked(struct lnet_peer *lp)
381 if (atomic_dec_and_test(&lp->lp_refcount))
382 lnet_destroy_peer_locked(lp);
386 lnet_peer_ni_addref_locked(struct lnet_peer_ni *lp)
388 kref_get(&lp->lpni_kref);
391 extern void lnet_destroy_peer_ni_locked(struct kref *ref);
394 lnet_peer_ni_decref_locked(struct lnet_peer_ni *lp)
396 kref_put(&lp->lpni_kref, lnet_destroy_peer_ni_locked);
400 lnet_isrouter(struct lnet_peer_ni *lpni)
402 return lpni->lpni_peer_net->lpn_peer->lp_rtr_refcount != 0;
406 lnet_ni_addref_locked(struct lnet_ni *ni, int cpt)
408 LASSERT(cpt >= 0 && cpt < LNET_CPT_NUMBER);
409 LASSERT(*ni->ni_refs[cpt] >= 0);
411 (*ni->ni_refs[cpt])++;
415 lnet_ni_addref(struct lnet_ni *ni)
418 lnet_ni_addref_locked(ni, 0);
423 lnet_ni_decref_locked(struct lnet_ni *ni, int cpt)
425 LASSERT(cpt >= 0 && cpt < LNET_CPT_NUMBER);
426 LASSERT(*ni->ni_refs[cpt] > 0);
428 (*ni->ni_refs[cpt])--;
432 lnet_ni_decref(struct lnet_ni *ni)
435 lnet_ni_decref_locked(ni, 0);
439 static inline struct lnet_msg *
442 struct lnet_msg *msg;
444 msg = kmem_cache_zalloc(lnet_msg_cachep, GFP_NOFS);
450 lnet_msg_free(struct lnet_msg *msg)
452 LASSERT(!msg->msg_onactivelist);
453 kmem_cache_free(lnet_msg_cachep, msg);
456 static inline struct lnet_rsp_tracker *
457 lnet_rspt_alloc(int cpt)
459 struct lnet_rsp_tracker *rspt;
461 rspt = kmem_cache_zalloc(lnet_rspt_cachep, GFP_NOFS);
464 the_lnet.ln_counters[cpt]->lct_health.lch_rst_alloc++;
465 lnet_net_unlock(cpt);
467 LIBCFS_ALLOC_POST(rspt, sizeof(*rspt), "alloc");
472 lnet_rspt_free(struct lnet_rsp_tracker *rspt, int cpt)
474 LIBCFS_FREE_PRE(rspt, sizeof(*rspt), "free");
475 kmem_cache_free(lnet_rspt_cachep, rspt);
477 the_lnet.ln_counters[cpt]->lct_health.lch_rst_alloc--;
478 lnet_net_unlock(cpt);
481 int lnet_configure(void *arg);
482 int lnet_unconfigure(void);
484 void lnet_ni_free(struct lnet_ni *ni);
485 void lnet_net_free(struct lnet_net *net);
488 lnet_net_alloc(__u32 net_type, struct list_head *netlist);
491 lnet_ni_alloc(struct lnet_net *net, struct cfs_expr_list *el,
494 lnet_ni_alloc_w_cpt_array(struct lnet_net *net, struct lnet_nid *nid,
495 u32 *cpts, u32 ncpts, char *iface);
496 int lnet_ni_add_interface(struct lnet_ni *ni, char *iface);
499 lnet_nid2peerhash(struct lnet_nid *nid)
504 for (i = 0; i < 4; i++)
505 h = cfs_hash_32(nid->nid_addr[i]^h, 32);
506 return cfs_hash_32(LNET_NID_NET(nid) ^ h, LNET_PEER_HASH_BITS);
509 static inline struct list_head *
510 lnet_net2rnethash(__u32 net)
512 return &the_lnet.ln_remote_nets_hash[(LNET_NETNUM(net) +
514 ((1U << the_lnet.ln_remote_nets_hbits) - 1)];
517 static inline void lnet_hdr_from_nid4(struct lnet_hdr *hdr,
518 const struct lnet_hdr_nid4 *vhdr)
520 const struct _lnet_hdr_nid4 *hdr_nid4 = (void *)vhdr;
522 lnet_nid4_to_nid(le64_to_cpu(hdr_nid4->dest_nid), &hdr->dest_nid);
523 lnet_nid4_to_nid(le64_to_cpu(hdr_nid4->src_nid), &hdr->src_nid);
524 hdr->dest_pid = le32_to_cpu(hdr_nid4->dest_pid);
525 hdr->src_pid = le32_to_cpu(hdr_nid4->src_pid);
526 hdr->type = le32_to_cpu(hdr_nid4->type);
527 hdr->payload_length = le32_to_cpu(hdr_nid4->payload_length);
529 hdr->msg = hdr_nid4->msg;
532 static inline void lnet_hdr_to_nid4(const struct lnet_hdr *hdr,
533 struct lnet_hdr_nid4 *vhdr)
535 struct _lnet_hdr_nid4 *hdr_nid4 = (void *)vhdr;
537 hdr_nid4->dest_nid = cpu_to_le64(lnet_nid_to_nid4(&hdr->dest_nid));
538 hdr_nid4->src_nid = cpu_to_le64(lnet_nid_to_nid4(&hdr->src_nid));
539 hdr_nid4->dest_pid = cpu_to_le32(hdr->dest_pid);
540 hdr_nid4->src_pid = cpu_to_le32(hdr->src_pid);
541 hdr_nid4->type = cpu_to_le32(hdr->type);
542 hdr_nid4->payload_length = cpu_to_le32(hdr->payload_length);
544 hdr_nid4->msg = hdr->msg;
547 static inline void lnet_hdr_from_nid16(struct lnet_hdr *hdr,
548 const struct lnet_hdr_nid16 *vhdr)
550 const struct lnet_hdr *hdr16 = (void *)vhdr;
552 hdr->dest_nid = hdr16->dest_nid;
553 hdr->src_nid = hdr16->src_nid;
554 hdr->dest_pid = le32_to_cpu(hdr16->dest_pid);
555 hdr->src_pid = le32_to_cpu(hdr16->src_pid);
556 hdr->type = le32_to_cpu(hdr16->type);
557 hdr->payload_length = le32_to_cpu(hdr16->payload_length);
559 hdr->msg = hdr16->msg;
562 static inline void lnet_hdr_to_nid16(const struct lnet_hdr *hdr,
563 struct lnet_hdr_nid16 *vhdr)
565 struct lnet_hdr *hdr16 = (void *)vhdr;
567 hdr16->dest_nid = hdr->dest_nid;
568 hdr16->src_nid = hdr->src_nid;
569 hdr16->dest_pid = cpu_to_le32(hdr->dest_pid);
570 hdr16->src_pid = cpu_to_le32(hdr->src_pid);
571 hdr16->type = cpu_to_le32(hdr->type);
572 hdr16->payload_length = cpu_to_le32(hdr->payload_length);
574 hdr16->msg = hdr->msg;
577 extern const struct lnet_lnd the_lolnd;
578 extern int avoid_asym_router_failure;
580 extern unsigned int lnet_nid_cpt_hash(struct lnet_nid *nid,
581 unsigned int number);
582 extern int lnet_cpt_of_nid_locked(struct lnet_nid *nid, struct lnet_ni *ni);
583 extern int lnet_cpt_of_nid(lnet_nid_t nid, struct lnet_ni *ni);
584 extern int lnet_nid2cpt(struct lnet_nid *nid, struct lnet_ni *ni);
585 extern struct lnet_ni *lnet_nid_to_ni_locked(struct lnet_nid *nid, int cpt);
586 extern struct lnet_ni *lnet_net2ni_locked(__u32 net, int cpt);
587 extern struct lnet_ni *lnet_net2ni_addref(__u32 net);
588 extern struct lnet_ni *lnet_nid_to_ni_addref(struct lnet_nid *nid);
589 struct lnet_net *lnet_get_net_locked(__u32 net_id);
591 int lnet_lib_init(void);
592 void lnet_lib_exit(void);
593 void lnet_router_exit(void);
595 extern unsigned int lnet_response_tracking;
596 extern unsigned lnet_transaction_timeout;
597 extern unsigned lnet_retry_count;
598 extern unsigned int lnet_lnd_timeout;
599 extern unsigned int lnet_numa_range;
600 extern unsigned int lnet_health_sensitivity;
601 extern unsigned int lnet_recovery_interval;
602 extern unsigned int lnet_recovery_limit;
603 extern unsigned int lnet_peer_discovery_disabled;
604 extern unsigned int lnet_drop_asym_route;
605 extern unsigned int lnet_max_recovery_ping_interval;
606 extern unsigned int lnet_max_recovery_ping_count;
607 extern unsigned int router_sensitivity_percentage;
608 extern int alive_router_check_interval;
609 extern int live_router_check_interval;
610 extern int dead_router_check_interval;
611 extern int portal_rotor;
612 extern int lock_prim_nid;
614 void lnet_mt_event_handler(struct lnet_event *event);
616 int lnet_notify(struct lnet_ni *ni, struct lnet_nid *peer, bool alive,
617 bool reset, time64_t when);
618 void lnet_notify_locked(struct lnet_peer_ni *lp, int notifylnd, int alive,
620 int lnet_add_route(__u32 net, __u32 hops, struct lnet_nid *gateway,
621 __u32 priority, __u32 sensitivity);
622 int lnet_del_route(__u32 net, struct lnet_nid *gw_nid);
623 void lnet_move_route(struct lnet_route *route, struct lnet_peer *lp,
624 struct list_head *rt_list);
625 void lnet_destroy_routes(void);
626 int lnet_get_route(int idx, __u32 *net, __u32 *hops,
627 lnet_nid_t *gateway, __u32 *alive, __u32 *priority,
629 int lnet_get_rtr_pool_cfg(int idx, struct lnet_ioctl_pool_cfg *pool_cfg);
630 struct lnet_ni *lnet_get_next_ni_locked(struct lnet_net *mynet,
631 struct lnet_ni *prev);
632 struct lnet_ni *lnet_get_ni_idx_locked(int idx);
633 int lnet_get_net_healthv_locked(struct lnet_net *net);
635 extern int lnet_get_peer_list(__u32 *countp, __u32 *sizep,
636 struct lnet_process_id __user *ids);
637 void lnet_peer_ni_set_healthv(struct lnet_nid *nid, int value, bool all);
638 extern void lnet_peer_ni_add_to_recoveryq_locked(struct lnet_peer_ni *lpni,
639 struct list_head *queue,
641 extern int lnet_peer_add_pref_nid(struct lnet_peer_ni *lpni,
642 struct lnet_nid *nid);
643 extern void lnet_peer_clr_pref_nids(struct lnet_peer_ni *lpni);
644 extern int lnet_peer_del_pref_nid(struct lnet_peer_ni *lpni,
645 struct lnet_nid *nid);
646 void lnet_peer_ni_set_selection_priority(struct lnet_peer_ni *lpni,
648 extern void lnet_ni_add_to_recoveryq_locked(struct lnet_ni *ni,
649 struct list_head *queue,
652 void lnet_router_debugfs_init(void);
653 void lnet_router_debugfs_fini(void);
654 int lnet_rtrpools_alloc(int im_a_router);
655 void lnet_destroy_rtrbuf(struct lnet_rtrbuf *rb, int npages);
656 int lnet_rtrpools_adjust(int tiny, int small, int large);
657 int lnet_rtrpools_enable(void);
658 void lnet_rtrpools_disable(void);
659 void lnet_rtrpools_free(int keep_pools);
660 void lnet_rtr_transfer_to_peer(struct lnet_peer *src,
661 struct lnet_peer *target);
662 struct lnet_remotenet *lnet_find_rnet_locked(__u32 net);
663 int lnet_dyn_add_net(struct lnet_ioctl_config_data *conf);
664 int lnet_dyn_del_net(__u32 net);
665 int lnet_dyn_add_ni(struct lnet_ioctl_config_ni *conf, u32 net,
666 struct lnet_nid *nid,
667 struct lnet_ioctl_config_lnd_tunables *tun);
668 int lnet_dyn_del_ni(struct lnet_nid *nid);
669 int lnet_clear_lazy_portal(struct lnet_ni *ni, int portal, char *reason);
670 struct lnet_net *lnet_get_net_locked(__u32 net_id);
671 void lnet_net_clr_pref_rtrs(struct lnet_net *net);
672 int lnet_net_add_pref_rtr(struct lnet_net *net, struct lnet_nid *gw_nid);
674 int lnet_islocalnid(struct lnet_nid *nid);
675 int lnet_islocalnet(__u32 net);
676 int lnet_islocalnet_locked(__u32 net);
678 void lnet_msg_attach_md(struct lnet_msg *msg, struct lnet_libmd *md,
679 unsigned int offset, unsigned int mlen);
680 void lnet_build_unlink_event(struct lnet_libmd *md, struct lnet_event *ev);
681 void lnet_build_msg_event(struct lnet_msg *msg, enum lnet_event_kind ev_type);
682 void lnet_msg_commit(struct lnet_msg *msg, int cpt);
683 void lnet_msg_decommit(struct lnet_msg *msg, int cpt, int status);
685 void lnet_prep_send(struct lnet_msg *msg, int type,
686 struct lnet_processid *target, unsigned int offset,
688 int lnet_send(struct lnet_nid *nid, struct lnet_msg *msg,
689 struct lnet_nid *rtr_nid);
690 int lnet_send_ping(struct lnet_nid *dest_nid, struct lnet_handle_md *mdh,
691 int bytes, void *user_ptr, lnet_handler_t handler,
693 void lnet_return_tx_credits_locked(struct lnet_msg *msg);
694 void lnet_return_rx_credits_locked(struct lnet_msg *msg);
695 void lnet_schedule_blocked_locked(struct lnet_rtrbufpool *rbp);
696 void lnet_drop_routed_msgs_locked(struct list_head *list, int cpt);
698 struct list_head **lnet_create_array_of_queues(void);
700 /* portals functions */
701 /* portals attributes */
703 lnet_ptl_is_lazy(struct lnet_portal *ptl)
705 return !!(ptl->ptl_options & LNET_PTL_LAZY);
709 lnet_ptl_is_unique(struct lnet_portal *ptl)
711 return !!(ptl->ptl_options & LNET_PTL_MATCH_UNIQUE);
715 lnet_ptl_is_wildcard(struct lnet_portal *ptl)
717 return !!(ptl->ptl_options & LNET_PTL_MATCH_WILDCARD);
721 lnet_ptl_setopt(struct lnet_portal *ptl, int opt)
723 ptl->ptl_options |= opt;
727 lnet_ptl_unsetopt(struct lnet_portal *ptl, int opt)
729 ptl->ptl_options &= ~opt;
732 /* match-table functions */
733 struct list_head *lnet_mt_match_head(struct lnet_match_table *mtable,
734 struct lnet_processid *id, __u64 mbits);
735 struct lnet_match_table *lnet_mt_of_attach(unsigned int index,
736 struct lnet_processid *id,
737 __u64 mbits, __u64 ignore_bits,
738 enum lnet_ins_pos pos);
739 int lnet_mt_match_md(struct lnet_match_table *mtable,
740 struct lnet_match_info *info, struct lnet_msg *msg);
742 /* portals match/attach functions */
743 void lnet_ptl_attach_md(struct lnet_me *me, struct lnet_libmd *md,
744 struct list_head *matches, struct list_head *drops);
745 void lnet_ptl_detach_md(struct lnet_me *me, struct lnet_libmd *md);
746 int lnet_ptl_match_md(struct lnet_match_info *info, struct lnet_msg *msg);
748 /* initialized and finalize portals */
749 int lnet_portals_create(void);
750 void lnet_portals_destroy(void);
752 /* message functions */
753 int lnet_parse(struct lnet_ni *ni, struct lnet_hdr *hdr,
754 struct lnet_nid *fromnid, void *private, int rdma_req);
755 int lnet_parse_local(struct lnet_ni *ni, struct lnet_msg *msg);
756 int lnet_parse_forward_locked(struct lnet_ni *ni, struct lnet_msg *msg);
758 void lnet_recv(struct lnet_ni *ni, void *private, struct lnet_msg *msg,
759 int delayed, unsigned int offset, unsigned int mlen,
761 void lnet_ni_recv(struct lnet_ni *ni, void *private, struct lnet_msg *msg,
762 int delayed, unsigned int offset,
763 unsigned int mlen, unsigned int rlen);
764 void lnet_ni_send(struct lnet_ni *ni, struct lnet_msg *msg);
766 struct lnet_msg *lnet_create_reply_msg(struct lnet_ni *ni,
767 struct lnet_msg *get_msg);
768 void lnet_set_reply_msg_len(struct lnet_ni *ni, struct lnet_msg *msg,
770 void lnet_detach_rsp_tracker(struct lnet_libmd *md, int cpt);
771 void lnet_clean_zombie_rstqs(void);
773 bool lnet_md_discarded(struct lnet_libmd *md);
774 void lnet_finalize(struct lnet_msg *msg, int rc);
775 bool lnet_send_error_simulation(struct lnet_msg *msg,
776 enum lnet_msg_hstatus *hstatus);
777 void lnet_handle_remote_failure_locked(struct lnet_peer_ni *lpni);
779 void lnet_drop_message(struct lnet_ni *ni, int cpt, void *private,
780 unsigned int nob, __u32 msg_type);
781 void lnet_drop_delayed_msg_list(struct list_head *head, char *reason);
782 void lnet_recv_delayed_msg_list(struct list_head *head);
784 int lnet_msg_container_setup(struct lnet_msg_container *container, int cpt);
785 void lnet_msg_container_cleanup(struct lnet_msg_container *container);
786 void lnet_msg_containers_destroy(void);
787 int lnet_msg_containers_create(void);
789 char *lnet_health_error2str(enum lnet_msg_hstatus hstatus);
790 char *lnet_msgtyp2str(int type);
791 int lnet_fail_nid(lnet_nid_t nid, unsigned int threshold);
793 /** \addtogroup lnet_fault_simulation @{ */
795 /* See struct lnet_fault_attr4 for a description of these fields */
796 struct lnet_fault_large_attr {
797 struct lnet_nid fa_src;
798 struct lnet_nid fa_dst;
799 struct lnet_nid fa_local_nid;
806 u32 da_health_error_mask;
818 int lnet_fault_ctl(int cmd, struct libcfs_ioctl_data *data);
819 int lnet_fault_init(void);
820 void lnet_fault_fini(void);
822 bool lnet_drop_rule_match(struct lnet_hdr *hdr, struct lnet_nid *local_nid,
823 enum lnet_msg_hstatus *hstatus);
825 int lnet_delay_rule_add(struct lnet_fault_large_attr *attr);
826 int lnet_delay_rule_del(struct lnet_nid *src, struct lnet_nid *dst,
828 int lnet_delay_rule_list(int pos, struct lnet_fault_large_attr *attr,
829 struct lnet_fault_stat *stat);
830 void lnet_delay_rule_reset(void);
831 void lnet_delay_rule_check(void);
832 bool lnet_delay_rule_match_locked(struct lnet_hdr *hdr, struct lnet_msg *msg);
834 /** @} lnet_fault_simulation */
836 void lnet_counters_get_common(struct lnet_counters_common *common);
837 int lnet_counters_get(struct lnet_counters *counters);
838 void lnet_counters_reset(void);
840 lnet_ni_set_sel_priority_locked(struct lnet_ni *ni, __u32 priority)
842 ni->ni_sel_priority = priority;
846 lnet_net_set_sel_priority_locked(struct lnet_net *net, __u32 priority)
848 net->net_sel_priority = priority;
851 unsigned int lnet_iov_nob(unsigned int niov, struct kvec *iov);
852 unsigned int lnet_kiov_nob(unsigned int niov, struct bio_vec *iov);
853 int lnet_extract_kiov(int dst_niov, struct bio_vec *dst,
854 int src_niov, struct bio_vec *src,
855 unsigned int offset, unsigned int len);
857 void lnet_copy_iov2iov(unsigned int ndiov, struct kvec *diov,
858 unsigned int doffset,
859 unsigned int nsiov, struct kvec *siov,
860 unsigned int soffset, unsigned int nob);
861 void lnet_copy_kiov2iov(unsigned int niov, struct kvec *iov,
862 unsigned int iovoffset,
863 unsigned int nkiov, struct bio_vec *kiov,
864 unsigned int kiovoffset, unsigned int nob);
865 void lnet_copy_iov2kiov(unsigned int nkiov, struct bio_vec *kiov,
866 unsigned int kiovoffset,
867 unsigned int niov, struct kvec *iov,
868 unsigned int iovoffset, unsigned int nob);
869 void lnet_copy_kiov2kiov(unsigned int ndkiov, struct bio_vec *dkiov,
870 unsigned int doffset,
871 unsigned int nskiov, struct bio_vec *skiov,
872 unsigned int soffset, unsigned int nob);
875 lnet_copy_kiov2flat(int dlen, void *dest, unsigned int doffset,
876 unsigned int nsiov, struct bio_vec *skiov,
877 unsigned int soffset, unsigned int nob)
879 struct kvec diov = { .iov_base = dest, .iov_len = dlen };
881 lnet_copy_kiov2iov(1, &diov, doffset,
882 nsiov, skiov, soffset, nob);
886 lnet_copy_flat2kiov(unsigned int ndiov, struct bio_vec *dkiov,
887 unsigned int doffset, int slen, void *src,
888 unsigned int soffset, unsigned int nob)
890 struct kvec siov = { .iov_base = src, .iov_len = slen };
891 lnet_copy_iov2kiov(ndiov, dkiov, doffset,
892 1, &siov, soffset, nob);
895 void lnet_me_unlink(struct lnet_me *me);
897 void lnet_md_unlink(struct lnet_libmd *md);
898 void lnet_md_deconstruct(struct lnet_libmd *lmd, struct lnet_event *ev);
899 struct page *lnet_get_first_page(struct lnet_libmd *md, unsigned int offset);
900 int lnet_cpt_of_md(struct lnet_libmd *md, unsigned int offset);
902 unsigned int lnet_get_lnd_timeout(void);
903 void lnet_register_lnd(const struct lnet_lnd *lnd);
904 void lnet_unregister_lnd(const struct lnet_lnd *lnd);
906 struct socket *lnet_connect(struct lnet_nid *peer_nid, int interface,
907 struct sockaddr *peeraddr, struct net *ns);
908 void lnet_connect_console_error(int rc, struct lnet_nid *peer_nid,
909 struct sockaddr *sa);
910 int lnet_count_acceptor_nets(void);
911 int lnet_acceptor_timeout(void);
912 int lnet_acceptor_port(void);
913 int lnet_acceptor_start(void);
914 void lnet_acceptor_stop(void);
916 struct lnet_inetdev {
928 char li_name[IFNAMSIZ];
931 int lnet_inet_enumerate(struct lnet_inetdev **dev_list, struct net *ns,
933 int lnet_inet_select(struct lnet_ni *ni, struct lnet_inetdev *ifaces,
936 void lnet_sock_setbuf(struct socket *socket, int txbufsize, int rxbufsize);
937 void lnet_sock_getbuf(struct socket *socket, int *txbufsize, int *rxbufsize);
938 int lnet_sock_getaddr(struct socket *socket, bool remote,
939 struct sockaddr_storage *peer);
940 int lnet_sock_write(struct socket *sock, void *buffer, int nob, int timeout);
941 int lnet_sock_read(struct socket *sock, void *buffer, int nob, int timeout);
943 struct socket *lnet_sock_listen(int port, int backlog,
945 struct socket *lnet_sock_connect(int interface, int local_port,
946 struct sockaddr *peeraddr,
949 int lnet_peers_start_down(void);
950 int lnet_peer_buffer_credits(struct lnet_net *net);
951 void lnet_consolidate_routes_locked(struct lnet_peer *orig_lp,
952 struct lnet_peer *new_lp);
953 void lnet_router_discovery_complete(struct lnet_peer *lp);
954 void lnet_router_discovery_ping_reply(struct lnet_peer *lp,
955 struct lnet_ping_buffer *pbuf);
957 int lnet_monitor_thr_start(void);
958 void lnet_monitor_thr_stop(void);
960 bool lnet_router_checker_active(void);
961 void lnet_check_routers(void);
962 void lnet_wait_router_start(void);
963 void lnet_swap_pinginfo(struct lnet_ping_buffer *pbuf);
965 int lnet_ping_info_validate(struct lnet_ping_info *pinfo);
966 struct lnet_ping_buffer *lnet_ping_buffer_alloc(int bytes, gfp_t gfp);
967 void lnet_ping_buffer_free(struct lnet_ping_buffer *pbuf);
968 int lnet_get_link_status(struct net_device *dev);
969 __u32 lnet_set_link_fatal_state(struct lnet_ni *ni, unsigned int link_state);
971 static inline void lnet_ping_buffer_addref(struct lnet_ping_buffer *pbuf)
973 atomic_inc(&pbuf->pb_refcnt);
976 static inline void lnet_ping_buffer_decref(struct lnet_ping_buffer *pbuf)
978 if (atomic_dec_and_test(&pbuf->pb_refcnt)) {
979 wake_up_var(&pbuf->pb_refcnt);
980 lnet_ping_buffer_free(pbuf);
984 struct lnet_ping_iter {
985 struct lnet_ping_info *pinfo;
989 u32 *ping_iter_first(struct lnet_ping_iter *pi, struct lnet_ping_buffer *pbuf,
990 struct lnet_nid *nid);
991 u32 *ping_iter_next(struct lnet_ping_iter *pi, struct lnet_nid *nid);
992 int ping_info_count_entries(struct lnet_ping_buffer *pbuf);
994 static inline int lnet_push_target_resize_needed(void)
996 return the_lnet.ln_push_target->pb_nbytes < the_lnet.ln_push_target_nbytes;
999 int lnet_push_target_resize(void);
1000 int lnet_push_target_post(struct lnet_ping_buffer *pbuf,
1001 struct lnet_handle_md *mdh);
1002 void lnet_peer_push_event(struct lnet_event *ev);
1004 int lnet_parse_ip2nets(const char **networksp, const char *ip2nets);
1005 int lnet_parse_routes(const char *route_str, int *im_a_router);
1006 int lnet_parse_networks(struct list_head *nilist, const char *networks);
1007 bool lnet_net_unique(__u32 net_id, struct list_head *nilist,
1008 struct lnet_net **net);
1009 bool lnet_ni_unique_net(struct list_head *nilist, char *iface);
1010 void lnet_incr_dlc_seq(void);
1011 __u32 lnet_get_dlc_seq_locked(void);
1013 struct lnet_peer_net *lnet_get_next_peer_net_locked(struct lnet_peer *lp,
1015 struct lnet_peer_ni *lnet_get_next_peer_ni_locked(struct lnet_peer *peer,
1016 struct lnet_peer_net *peer_net,
1017 struct lnet_peer_ni *prev);
1018 struct lnet_peer_ni *lnet_peerni_by_nid_locked(struct lnet_nid *nid,
1019 struct lnet_nid *pref,
1021 struct lnet_peer_ni *lnet_nid2peerni_ex(struct lnet_nid *nid);
1022 struct lnet_peer_ni *lnet_peer_ni_get_locked(struct lnet_peer *lp,
1023 struct lnet_nid *nid);
1024 struct lnet_peer_ni *lnet_peer_ni_find_locked(struct lnet_nid *nid);
1025 struct lnet_peer *lnet_find_peer(struct lnet_nid *nid);
1026 void lnet_peer_net_added(struct lnet_net *net);
1027 void lnet_peer_primary_nid_locked(struct lnet_nid *nid,
1028 struct lnet_nid *result);
1029 int lnet_discover_peer_locked(struct lnet_peer_ni *lpni, int cpt, bool block);
1030 void lnet_peer_queue_message(struct lnet_peer *lp, struct lnet_msg *msg);
1031 int lnet_peer_discovery_start(void);
1032 void lnet_peer_discovery_stop(void);
1033 void lnet_push_update_to_peers(int force);
1034 void lnet_peer_tables_cleanup(struct lnet_net *net);
1035 void lnet_peer_uninit(void);
1036 int lnet_peer_tables_create(void);
1037 void lnet_debug_peer(struct lnet_nid *nid);
1038 struct lnet_peer_net *lnet_peer_get_net_locked(struct lnet_peer *peer,
1040 bool lnet_peer_is_pref_nid_locked(struct lnet_peer_ni *lpni,
1041 struct lnet_nid *nid);
1042 int lnet_peer_add_pref_nid(struct lnet_peer_ni *lpni, struct lnet_nid *nid);
1043 void lnet_peer_clr_pref_nids(struct lnet_peer_ni *lpni);
1044 bool lnet_peer_is_pref_rtr_locked(struct lnet_peer_ni *lpni,
1045 struct lnet_nid *gw_nid);
1046 void lnet_peer_clr_pref_rtrs(struct lnet_peer_ni *lpni);
1047 int lnet_peer_add_pref_rtr(struct lnet_peer_ni *lpni, struct lnet_nid *nid);
1048 int lnet_peer_ni_set_non_mr_pref_nid(struct lnet_peer_ni *lpni,
1049 struct lnet_nid *nid);
1050 int lnet_user_add_peer_ni(struct lnet_nid *key_nid, struct lnet_nid *nid,
1051 bool mr, bool lock_prim);
1052 int lnet_del_peer_ni(struct lnet_nid *key_nid, struct lnet_nid *nid,
1054 int lnet_get_peer_info(struct lnet_ioctl_peer_cfg *cfg, void __user *bulk);
1055 int lnet_get_peer_ni_info(__u32 peer_index, __u64 *nid,
1056 char alivness[LNET_MAX_STR_LEN],
1057 __u32 *cpt_iter, __u32 *refcount,
1058 __u32 *ni_peer_tx_credits, __u32 *peer_tx_credits,
1059 __u32 *peer_rtr_credits, __u32 *peer_min_rtr_credtis,
1060 __u32 *peer_tx_qnob);
1061 int lnet_get_peer_ni_hstats(struct lnet_ioctl_peer_ni_hstats *stats);
1064 lnet_peer_net_set_sel_priority_locked(struct lnet_peer_net *lpn, __u32 priority)
1066 lpn->lpn_sel_priority = priority;
1070 static inline struct lnet_peer_net *
1071 lnet_find_peer_net_locked(struct lnet_peer *peer, __u32 net_id)
1073 struct lnet_peer_net *peer_net;
1075 list_for_each_entry(peer_net, &peer->lp_peer_nets, lpn_peer_nets) {
1076 if (peer_net->lpn_net_id == net_id)
1084 lnet_peer_is_multi_rail(struct lnet_peer *lp)
1086 if (lp->lp_state & LNET_PEER_MULTI_RAIL)
1092 lnet_peer_ni_is_configured(struct lnet_peer_ni *lpni)
1094 if (lpni->lpni_peer_net->lpn_peer->lp_state & LNET_PEER_CONFIGURED)
1100 lnet_peer_ni_is_primary(struct lnet_peer_ni *lpni)
1102 return nid_same(&lpni->lpni_nid,
1103 &lpni->lpni_peer_net->lpn_peer->lp_primary_nid);
1106 bool lnet_peer_is_uptodate(struct lnet_peer *lp);
1107 bool lnet_peer_is_uptodate_locked(struct lnet_peer *lp);
1108 bool lnet_is_discovery_disabled(struct lnet_peer *lp);
1109 bool lnet_is_discovery_disabled_locked(struct lnet_peer *lp);
1110 bool lnet_peer_gw_discovery(struct lnet_peer *lp);
1113 lnet_peer_needs_push(struct lnet_peer *lp)
1115 if (!(lp->lp_state & LNET_PEER_MULTI_RAIL))
1117 if (lp->lp_state & LNET_PEER_MARK_DELETED)
1119 if (lp->lp_state & LNET_PEER_FORCE_PUSH)
1121 if (lp->lp_state & LNET_PEER_NO_DISCOVERY)
1123 /* if discovery is not enabled then no need to push */
1124 if (lnet_peer_discovery_disabled)
1126 if (lp->lp_node_seqno < atomic_read(&the_lnet.ln_ping_target_seqno))
1131 static inline unsigned int
1132 lnet_get_next_recovery_ping(unsigned int ping_count, time64_t now)
1134 unsigned int interval;
1136 /* lnet_max_recovery_interval <= 2^lnet_max_recovery_ping_count */
1137 if (ping_count > lnet_max_recovery_ping_count)
1138 interval = lnet_max_recovery_ping_interval;
1140 interval = 1 << ping_count;
1142 return now + interval;
1146 lnet_peer_ni_set_next_ping(struct lnet_peer_ni *lpni, time64_t now)
1148 lpni->lpni_next_ping =
1149 lnet_get_next_recovery_ping(lpni->lpni_ping_count, now);
1153 lnet_ni_set_next_ping(struct lnet_ni *ni, time64_t now)
1155 ni->ni_next_ping = lnet_get_next_recovery_ping(ni->ni_ping_count, now);
1159 * A peer NI is alive if it satisfies the following two conditions:
1160 * 1. peer NI health >= LNET_MAX_HEALTH_VALUE * router_sensitivity_percentage
1161 * 2. the cached NI status received when we discover the peer is UP
1164 lnet_is_peer_ni_alive(struct lnet_peer_ni *lpni)
1166 bool halive = false;
1168 halive = (atomic_read(&lpni->lpni_healthv) >=
1169 (LNET_MAX_HEALTH_VALUE * router_sensitivity_percentage / 100));
1171 return halive && lpni->lpni_ns_status == LNET_NI_STATUS_UP;
1175 lnet_update_peer_net_healthv(struct lnet_peer_ni *lpni)
1177 struct lnet_peer_net *lpn;
1178 int best_healthv = 0;
1180 lpn = lpni->lpni_peer_net;
1182 list_for_each_entry(lpni, &lpn->lpn_peer_nis, lpni_peer_nis) {
1183 int lpni_healthv = atomic_read(&lpni->lpni_healthv);
1184 if (best_healthv < lpni_healthv)
1185 best_healthv = lpni_healthv;
1188 lpn->lpn_healthv = best_healthv;
1192 lnet_set_lpni_healthv_locked(struct lnet_peer_ni *lpni, int value)
1194 if (atomic_read(&lpni->lpni_healthv) == value)
1196 atomic_set(&lpni->lpni_healthv, value);
1197 lnet_update_peer_net_healthv(lpni);
1201 lnet_atomic_add_unless_max(atomic_t *v, int a, int u)
1203 int c = atomic_read(v);
1216 old = atomic_cmpxchg(v, c, m);
1232 lnet_dec_healthv_locked(atomic_t *healthv, int sensitivity)
1234 int h = atomic_read(healthv);
1239 if (h < sensitivity)
1244 return (atomic_xchg(healthv, h) != h);
1248 lnet_dec_lpni_healthv_locked(struct lnet_peer_ni *lpni)
1250 /* If there is a health sensitivity in the peer then use that
1251 * instead of the globally set one.
1252 * only adjust the net health if the lpni health value changed
1254 if (lnet_dec_healthv_locked(&lpni->lpni_healthv,
1255 lpni->lpni_peer_net->lpn_peer->lp_health_sensitivity ? :
1256 lnet_health_sensitivity)) {
1257 lnet_update_peer_net_healthv(lpni);
1262 lnet_inc_lpni_healthv_locked(struct lnet_peer_ni *lpni)
1264 /* If there is a health sensitivity in the peer then use that
1265 * instead of the globally set one.
1266 * only adjust the net health if the lpni health value changed
1268 if (lnet_atomic_add_unless_max(&lpni->lpni_healthv,
1269 lpni->lpni_peer_net->lpn_peer->lp_health_sensitivity ? :
1270 lnet_health_sensitivity,
1271 LNET_MAX_HEALTH_VALUE)) {
1272 lnet_update_peer_net_healthv(lpni);
1277 lnet_inc_healthv(atomic_t *healthv, int value)
1279 lnet_atomic_add_unless_max(healthv, value, LNET_MAX_HEALTH_VALUE);
1283 lnet_get_list_len(struct list_head *list)
1285 struct list_head *l;
1288 list_for_each(l, list)
1294 void lnet_incr_stats(struct lnet_element_stats *stats,
1295 enum lnet_msg_type msg_type,
1296 enum lnet_stats_type stats_type);
1298 __u32 lnet_sum_stats(struct lnet_element_stats *stats,
1299 enum lnet_stats_type stats_type);
1301 void lnet_usr_translate_stats(struct lnet_ioctl_element_msg_stats *msg_stats,
1302 struct lnet_element_stats *stats);
1304 lnet_set_route_aliveness(struct lnet_route *route, bool alive)
1306 bool old = atomic_xchg(&route->lr_alive, alive);
1309 CERROR("route to %s through %s has gone from %s to %s\n",
1310 libcfs_net2str(route->lr_net),
1311 libcfs_nidstr(&route->lr_gateway->lp_primary_nid),
1312 old ? "up" : "down",
1313 alive ? "up" : "down");
1316 extern struct blocking_notifier_head lnet_ioctl_list;
1317 static inline int notifier_from_ioctl_errno(int err)
1321 return notifier_from_errno(err) | NOTIFY_STOP_MASK;
1324 void lnet_mark_ping_buffer_for_update(void);
1325 void lnet_queue_ping_buffer_update(void);