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

Function rte_dpaa_mem_ptov

dpdk/drivers/bus/dpaa/bus_dpaa_driver.h:158–183  ·  view source on GitHub ↗

Either iterate over the list of internal memseg references or fallback to * EAL memseg based iova2virt. */

Source from the content-addressed store, hash-verified

156 * EAL memseg based iova2virt.
157 */
158__rte_internal
159static inline void *rte_dpaa_mem_ptov(phys_addr_t paddr)
160{
161 struct dpaa_memseg *ms;
162 void *va;
163
164 va = dpaax_iova_table_get_va(paddr);
165 if (likely(va != NULL))
166 return va;
167
168 /* Check if the address is already part of the memseg list internally
169 * maintained by the dpaa driver.
170 */
171 TAILQ_FOREACH(ms, &rte_dpaa_memsegs, next) {
172 if (paddr >= ms->iova && paddr <
173 ms->iova + ms->len)
174 return RTE_PTR_ADD(ms->vaddr, (uintptr_t)(paddr - ms->iova));
175 }
176
177 /* If not, Fallback to full memseg list searching */
178 va = rte_mem_iova2virt(paddr);
179
180 dpaax_iova_table_update(paddr, va, RTE_CACHE_LINE_SIZE);
181
182 return va;
183}
184
185__rte_internal
186static inline rte_iova_t

Callers 9

DPAA_MEMPOOL_PTOVFunction · 0.85
dqrr_out_fq_cb_rxFunction · 0.85
dpaa_sec_deqFunction · 0.85
dpaa_sec_deq_rawFunction · 0.85
dpaa_display_frame_infoFunction · 0.85
dpaa_rx_cb_no_prefetchFunction · 0.85
dpaa_rx_cb_prepareFunction · 0.85

Calls 3

dpaax_iova_table_get_vaFunction · 0.85
rte_mem_iova2virtFunction · 0.85
dpaax_iova_table_updateFunction · 0.85

Tested by

no test coverage detected