Looks like we need more advance API to run worker thread.

In DPDK on init you provide number of cores. And first core goes to init and others cores
immediately roll in loop:

#2 eal_thread_loop (arg=<optimized out>) at /opt/Linaro/odp-dpdk-build2/dpdk/lib/librte_eal/linuxapp/eal/eal_thread.c:204
204                n = read(m2s, &c, 1);

Then it supposed that main thread will send message with function which will be run in that loop:

rte_eal_remote_launch(int (*f)(void *), void *arg, unsigned slave_id)
{
    int n;
    char c = 0;
    int m2s = lcore_config[slave_id].pipe_master2slave[1];
    int s2m = lcore_config[slave_id].pipe_slave2master[0];

    if (lcore_config[slave_id].state != WAIT)
        return -EBUSY;

    lcore_config[slave_id].f = f;
    lcore_config[slave_id].arg = arg;

    /* send message */
    n = 0;
    while (n == 0 || (n < 0 && errno == EINTR))
        n = write(m2s, &c, 1);


Is there any idea how to do that with current ODP API?

Thanks,
Maxim.






_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to