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

Function in_pcbmodify_txrtlmt

freebsd/netinet/in_pcb.c:3404–3429  ·  view source on GitHub ↗

* Modify TX rate limit based on the existing "inp->inp_snd_tag", * if any. */

Source from the content-addressed store, hash-verified

3402 * if any.
3403 */
3404int
3405in_pcbmodify_txrtlmt(struct inpcb *inp, uint32_t max_pacing_rate)
3406{
3407 union if_snd_tag_modify_params params = {
3408 .rate_limit.max_rate = max_pacing_rate,
3409 .rate_limit.flags = M_NOWAIT,
3410 };
3411 struct m_snd_tag *mst;
3412 struct ifnet *ifp;
3413 int error;
3414
3415 mst = inp->inp_snd_tag;
3416 if (mst == NULL)
3417 return (EINVAL);
3418
3419 ifp = mst->ifp;
3420 if (ifp == NULL)
3421 return (EINVAL);
3422
3423 if (ifp->if_snd_tag_modify == NULL) {
3424 error = EOPNOTSUPP;
3425 } else {
3426 error = ifp->if_snd_tag_modify(mst, &params);
3427 }
3428 return (error);
3429}
3430
3431/*
3432 * Query existing TX rate limit based on the existing

Callers 2

tcp_chg_pacing_rateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected