#define FSL_DPAA_BUS_NAME dpaa_bus
-RTE_DEFINE_PER_LCORE(bool, dpaa_io);
-RTE_DEFINE_PER_LCORE(struct dpaa_portal_dqrr, held_bufs);
+RTE_DEFINE_PER_LCORE(struct dpaa_portal *, dpaa_io);
struct fm_eth_port_cfg *
dpaa_get_eth_port_cfg(int dev_id)
{
unsigned int cpu, lcore = rte_lcore_id();
int ret;
- struct dpaa_portal *dpaa_io_portal;
BUS_INIT_FUNC_TRACE();
DPAA_BUS_LOG(DEBUG, "QMAN thread initialized - CPU=%d lcore=%d",
cpu, lcore);
- dpaa_io_portal = rte_malloc(NULL, sizeof(struct dpaa_portal),
+ DPAA_PER_LCORE_PORTAL = rte_malloc(NULL, sizeof(struct dpaa_portal),
RTE_CACHE_LINE_SIZE);
- if (!dpaa_io_portal) {
+ if (!DPAA_PER_LCORE_PORTAL) {
DPAA_BUS_LOG(ERR, "Unable to allocate memory");
bman_thread_finish();
qman_thread_finish();
return -ENOMEM;
}
- dpaa_io_portal->qman_idx = qman_get_portal_index();
- dpaa_io_portal->bman_idx = bman_get_portal_index();
- dpaa_io_portal->tid = syscall(SYS_gettid);
+ DPAA_PER_LCORE_PORTAL->qman_idx = qman_get_portal_index();
+ DPAA_PER_LCORE_PORTAL->bman_idx = bman_get_portal_index();
+ DPAA_PER_LCORE_PORTAL->tid = syscall(SYS_gettid);
- ret = pthread_setspecific(dpaa_portal_key, (void *)dpaa_io_portal);
+ ret = pthread_setspecific(dpaa_portal_key,
+ (void *)DPAA_PER_LCORE_PORTAL);
if (ret) {
DPAA_BUS_LOG(ERR, "pthread_setspecific failed on core %u"
" (lcore=%u) with ret: %d", cpu, lcore, ret);
return ret;
}
- RTE_PER_LCORE(dpaa_io) = true;
-
DPAA_BUS_LOG(DEBUG, "QMAN thread initialized");
return 0;
u32 sdqcr;
int ret;
- if (unlikely(!RTE_PER_LCORE(dpaa_io))) {
+ if (unlikely(!DPAA_PER_LCORE_PORTAL)) {
ret = rte_dpaa_portal_init(arg);
if (ret < 0) {
DPAA_BUS_LOG(ERR, "portal initialization failure");
rte_free(dpaa_io_portal);
dpaa_io_portal = NULL;
-
- RTE_PER_LCORE(dpaa_io) = false;
+ DPAA_PER_LCORE_PORTAL = NULL;
}
static int