Hi all,
While going through thread and scheduler APIs I've stumbled on one
uncertainty in ODP API that I could not find straight solution to.
Does ODP allow scheduling packets from an ODP_THREAD_CONTROL thread?
If yes then what would be the difference between ODP_THREAD_CONTROL and
ODP_THREAD_WORKER threads beside isolating cores for worker threads? API
suggests this approach as both control and worker threads are treated
the same way in odp_thrmask_* calls. Moreover:
a. schedule groups take odp_thrmask_t (no comment on whether it has
to only contain worker threads)
b. There is a schedule group ODP_SCHED_GROUP_ALL which would imply that
user can create a scheduler queue that control threads can use.
On the other hand I can find the following in ODP_THREAD_CONTROL
description: "Control threads do not participate the main packet flow
through the system". That looks to me like an implication that control
threads should not do any packet processing. However if that's the case
then ODP_THREAD_COUNT_MAX does not differentiate between worker or
control threads and similarly odp_thrmask_t doesn't (and by extension
schedule groups).
To put this discussion in a concrete context, on the platform which I'm
working on, each thread that wants to interact with a scheduler needs to
do it via special hardware handle of which I have a limited number. For
me it makes sense to reserve such handles only for threads which are
going to do the traffic processing (hence worker threads) and leave
control threads unlimited. In summary let application spawn as many
control threads as it wants but limit worker threads by the amount of
handles that I have to spare.
--
Best Regards,
Stanislaw Kardach