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

Function in_pcboutput_eagain

freebsd/netinet/in_pcb.c:3665–3698  ·  view source on GitHub ↗

* Track route changes for TX rate limiting. */

Source from the content-addressed store, hash-verified

3663 * Track route changes for TX rate limiting.
3664 */
3665void
3666in_pcboutput_eagain(struct inpcb *inp)
3667{
3668 bool did_upgrade;
3669
3670 if (inp == NULL)
3671 return;
3672
3673 if (inp->inp_snd_tag == NULL)
3674 return;
3675
3676 if (!INP_WLOCKED(inp)) {
3677 /*
3678 * NOTE: If the write locking fails, we need to bail
3679 * out and use the non-ratelimited ring for the
3680 * transmit until there is a new chance to get the
3681 * write lock.
3682 */
3683 if (!INP_TRY_UPGRADE(inp))
3684 return;
3685 did_upgrade = 1;
3686 } else {
3687 did_upgrade = 0;
3688 }
3689
3690 /* detach rate limiting */
3691 in_pcbdetach_txrtlmt(inp);
3692
3693 /* make sure new mbuf send tag allocation is made */
3694 inp->inp_flags2 |= INP_RATE_LIMIT_CHANGED;
3695
3696 if (did_upgrade)
3697 INP_DOWNGRADE(inp);
3698}
3699
3700#ifdef INET
3701static void

Callers 2

ip_output_sendFunction · 0.85
ip6_output_sendFunction · 0.85

Calls 1

in_pcbdetach_txrtlmtFunction · 0.85

Tested by

no test coverage detected