| 234 | } |
| 235 | |
| 236 | void |
| 237 | tcp_lro_free(struct lro_ctrl *lc) |
| 238 | { |
| 239 | struct lro_entry *le; |
| 240 | unsigned x; |
| 241 | |
| 242 | /* reset LRO free list */ |
| 243 | LIST_INIT(&lc->lro_free); |
| 244 | |
| 245 | /* free active mbufs, if any */ |
| 246 | while ((le = LIST_FIRST(&lc->lro_active)) != NULL) { |
| 247 | tcp_lro_active_remove(le); |
| 248 | m_freem(le->m_head); |
| 249 | } |
| 250 | |
| 251 | /* free hash table */ |
| 252 | free(lc->lro_hash, M_LRO); |
| 253 | lc->lro_hash = NULL; |
| 254 | lc->lro_hashsz = 0; |
| 255 | |
| 256 | /* free mbuf array, if any */ |
| 257 | for (x = 0; x != lc->lro_mbuf_count; x++) |
| 258 | m_freem(lc->lro_mbuf_data[x].mb); |
| 259 | lc->lro_mbuf_count = 0; |
| 260 | |
| 261 | /* free allocated memory, if any */ |
| 262 | free(lc->lro_mbuf_data, M_LRO); |
| 263 | lc->lro_mbuf_data = NULL; |
| 264 | } |
| 265 | |
| 266 | static uint16_t |
| 267 | tcp_lro_csum_th(struct tcphdr *th) |
no test coverage detected