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

Function tcp_lro_free

freebsd/netinet/tcp_lro.c:236–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236void
237tcp_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
266static uint16_t
267tcp_lro_csum_th(struct tcphdr *th)

Callers 2

iflib_rx_structures_freeFunction · 0.85

Calls 3

tcp_lro_active_removeFunction · 0.85
m_freemFunction · 0.50
freeFunction · 0.50

Tested by

no test coverage detected