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

Function __tcp_hpts_remove

freebsd/netinet/tcp_hpts.c:634–650  ·  view source on GitHub ↗

* Called normally with the INP_LOCKED but it * does not matter, the hpts lock is the key * but the lock order allows us to hold the * INP lock and then get the hpts lock. * * Valid values in the flags are * HPTS_REMOVE_OUTPUT - remove from the output of the hpts. * HPTS_REMOVE_INPUT - remove from the input of the hpts. * Note that you can use one or both values together * and get two acti

Source from the content-addressed store, hash-verified

632 * and get two actions.
633 */
634void
635__tcp_hpts_remove(struct inpcb *inp, int32_t flags, int32_t line)
636{
637 struct tcp_hpts_entry *hpts;
638
639 INP_WLOCK_ASSERT(inp);
640 if (flags & HPTS_REMOVE_OUTPUT) {
641 hpts = tcp_hpts_lock(inp);
642 tcp_hpts_remove_locked_output(hpts, inp, flags, line);
643 mtx_unlock(&hpts->p_mtx);
644 }
645 if (flags & HPTS_REMOVE_INPUT) {
646 hpts = tcp_input_lock(inp);
647 tcp_hpts_remove_locked_input(hpts, inp, flags, line);
648 mtx_unlock(&hpts->p_mtx);
649 }
650}
651
652static inline int
653hpts_tick(uint32_t wheel_tick, uint32_t plus)

Callers

nothing calls this directly

Calls 5

tcp_hpts_lockFunction · 0.85
tcp_input_lockFunction · 0.85
mtx_unlockFunction · 0.50

Tested by

no test coverage detected