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

Function rte_eth_iterator_cleanup

dpdk/lib/ethdev/rte_ethdev.c:330–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328}
329
330void
331rte_eth_iterator_cleanup(struct rte_dev_iterator *iter)
332{
333 if (iter == NULL) {
334 RTE_ETHDEV_LOG(ERR, "Cannot do clean up from NULL iterator\n");
335 return;
336 }
337
338 if (iter->bus_str == NULL)
339 return; /* nothing to free in pure class filter */
340
341 rte_eth_trace_iterator_cleanup(iter);
342
343 free(RTE_CAST_FIELD(iter, bus_str, char *)); /* workaround const */
344 free(RTE_CAST_FIELD(iter, cls_str, char *)); /* workaround const */
345 memset(iter, 0, sizeof(*iter));
346}
347
348uint16_t
349rte_eth_find_next(uint16_t port_id)

Callers 2

rte_eth_iterator_nextFunction · 0.85
detach_devargsFunction · 0.85

Calls 1

memsetFunction · 0.85

Tested by 1

detach_devargsFunction · 0.68