Do we want to select this session for auto-logging? */
| 298 | |
| 299 | /* Do we want to select this session for auto-logging? */ |
| 300 | static __inline bool |
| 301 | tcp_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 | |
| 316 | static __inline int |
| 317 | tcp_log_id_cmp(struct tcp_log_id_bucket *a, struct tcp_log_id_bucket *b) |
no test coverage detected