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

Function mrvl_get_hif

dpdk/drivers/net/mvpp2/mrvl_ethdev.c:378–403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

376}
377
378static inline struct pp2_hif*
379mrvl_get_hif(struct mrvl_priv *priv, int core_id)
380{
381 int ret;
382
383 if (likely(hifs[core_id] != NULL))
384 return hifs[core_id];
385
386 rte_spinlock_lock(&priv->lock);
387
388 ret = mrvl_init_hif(core_id);
389 if (ret < 0) {
390 MRVL_LOG(ERR, "Failed to allocate hif %d", core_id);
391 goto out;
392 }
393
394 if (core_id < mrvl_lcore_first)
395 mrvl_lcore_first = core_id;
396
397 if (core_id > mrvl_lcore_last)
398 mrvl_lcore_last = core_id;
399out:
400 rte_spinlock_unlock(&priv->lock);
401
402 return hifs[core_id];
403}
404
405/**
406 * Set tx burst function according to offload flag

Callers 6

mrvl_flush_bpoolFunction · 0.85
mrvl_fill_bpoolFunction · 0.85
mrvl_rx_queue_releaseFunction · 0.85
mrvl_rx_pkt_burstFunction · 0.85
mrvl_tx_pkt_burstFunction · 0.85
mrvl_tx_sg_pkt_burstFunction · 0.85

Calls 3

mrvl_init_hifFunction · 0.85
rte_spinlock_lockFunction · 0.50
rte_spinlock_unlockFunction · 0.50

Tested by

no test coverage detected