Lines Matching refs:mctx

76 void mtcp_free_context(mctx_t mctx);
925 struct mtcp_context mctx = {.cpu = ctx->cpu}; in RunMainLoop() local
926 walk->cb(&mctx, walk->id, 0, 0 /* FIXME */, NULL); in RunMainLoop()
1284 mctx_t mctx = (mctx_t)arg; in MTCPRunThread() local
1285 int cpu = mctx->cpu; in MTCPRunThread()
1354 sem_post(&g_done_sem[mctx->cpu]); in MTCPRunThread()
1371 mctx_t mctx; in mtcp_create_context() local
1400 mctx = (mctx_t)calloc(1, sizeof(struct mtcp_context)); in mtcp_create_context()
1401 if (!mctx) { in mtcp_create_context()
1405 mctx->cpu = cpu; in mtcp_create_context()
1406 g_ctx[cpu] = mctx; in mtcp_create_context()
1435 NULL, MTCPRunThread, (void *)mctx) != 0) { in mtcp_create_context()
1440 rte_eal_remote_launch(MTCPDPDKRunThread, mctx, cpu); in mtcp_create_context()
1445 NULL, MTCPRunThread, (void *)mctx) != 0) { in mtcp_create_context()
1465 return mctx; in mtcp_create_context()
1469 mtcp_destroy_context(mctx_t mctx) in mtcp_destroy_context() argument
1471 struct mtcp_thread_context *ctx = g_pctx[mctx->cpu]; in mtcp_destroy_context()
1476 m.cpu = mctx->cpu; in mtcp_destroy_context()
1479 free(mctx); in mtcp_destroy_context()
1485 mtcp_free_context(mctx_t mctx) in mtcp_free_context() argument
1487 struct mtcp_thread_context *ctx = g_pctx[mctx->cpu]; in mtcp_free_context()
1492 TRACE_DBG("CPU %d: mtcp_free_context()\n", mctx->cpu); in mtcp_free_context()
1494 if (g_pctx[mctx->cpu] == NULL) return; in mtcp_free_context()
1505 mtcp_close(mctx, i); in mtcp_free_context()
1516 if (master == mctx->cpu) in mtcp_free_context()
1517 pthread_join(g_thread[mctx->cpu], NULL); in mtcp_free_context()
1519 rte_eal_wait_lcore(mctx->cpu); in mtcp_free_context()
1523 pthread_join(g_thread[mctx->cpu], NULL); in mtcp_free_context()
1526 TRACE_INFO("MTCP thread %d joined.\n", mctx->cpu); in mtcp_free_context()
1528 running[mctx->cpu] = FALSE; in mtcp_free_context()
1532 if (printer == mctx->cpu) { in mtcp_free_context()
1534 if (i != mctx->cpu && running[i]) { in mtcp_free_context()
1546 TRACE_ERROR("CPU %d: Fail to signal socket pair\n", mctx->cpu); in mtcp_free_context()
1555 TRACE_LOG("Log thread %d joined.\n", mctx->cpu); in mtcp_free_context()
1614 if (g_logctx[mctx->cpu]) { in mtcp_free_context()
1615 free(g_logctx[mctx->cpu]); in mtcp_free_context()
1616 g_logctx[mctx->cpu] = NULL; in mtcp_free_context()
1619 g_pctx[mctx->cpu] = NULL; in mtcp_free_context()