| 140 | } |
| 141 | |
| 142 | int |
| 143 | tcp_offload_output(struct tcpcb *tp) |
| 144 | { |
| 145 | struct toedev *tod = tp->tod; |
| 146 | int error, flags; |
| 147 | |
| 148 | KASSERT(tod != NULL, ("%s: tp->tod is NULL, tp %p", __func__, tp)); |
| 149 | INP_WLOCK_ASSERT(tp->t_inpcb); |
| 150 | |
| 151 | flags = tcp_outflags[tp->t_state]; |
| 152 | |
| 153 | if (flags & TH_RST) { |
| 154 | /* XXX: avoid repeated calls like we do for FIN */ |
| 155 | error = tod->tod_send_rst(tod, tp); |
| 156 | } else if ((flags & TH_FIN || tp->t_flags & TF_NEEDFIN) && |
| 157 | (tp->t_flags & TF_SENTFIN) == 0) { |
| 158 | error = tod->tod_send_fin(tod, tp); |
| 159 | if (error == 0) |
| 160 | tp->t_flags |= TF_SENTFIN; |
| 161 | } else |
| 162 | error = tod->tod_output(tod, tp); |
| 163 | |
| 164 | return (error); |
| 165 | } |
| 166 | |
| 167 | void |
| 168 | tcp_offload_rcvd(struct tcpcb *tp) |
no outgoing calls
no test coverage detected