MCPcopy Create free account
hub / github.com/F-Stack/f-stack / tcp_log_selectauto

Function tcp_log_selectauto

freebsd/netinet/tcp_log_buf.c:300–314  ·  view source on GitHub ↗

Do we want to select this session for auto-logging? */

Source from the content-addressed store, hash-verified

298
299/* Do we want to select this session for auto-logging? */
300static __inline bool
301tcp_log_selectauto(void)
302{
303
304 /*
305 * If we are doing auto-capturing, figure out whether we will capture
306 * this session.
307 */
308 if (tcp_log_auto_ratio &&
309 (tcp_disable_all_bb_logs == 0) &&
310 (atomic_fetchadd_long(&tcp_log_auto_ratio_cur, 1) %
311 tcp_log_auto_ratio) == 0)
312 return (true);
313 return (false);
314}
315
316static __inline int
317tcp_log_id_cmp(struct tcp_log_id_bucket *a, struct tcp_log_id_bucket *b)

Callers 2

tcp_log_set_idFunction · 0.85
tcp_log_tcpcbinitFunction · 0.85

Calls 1

atomic_fetchadd_longFunction · 0.50

Tested by

no test coverage detected