* Modify TX rate limit based on the existing "inp->inp_snd_tag", * if any. */
| 3402 | * if any. |
| 3403 | */ |
| 3404 | int |
| 3405 | in_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, ¶ms); |
| 3427 | } |
| 3428 | return (error); |
| 3429 | } |
| 3430 | |
| 3431 | /* |
| 3432 | * Query existing TX rate limit based on the existing |
no outgoing calls
no test coverage detected