OpenDataPlane / odp

The ODP project is an open-source, cross-platform set of application programming interfaces (APIs) for the networking data plane

Home Page:https://opendataplane.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Classifier with more than one queue

Neetika02 opened this issue · comments

Hello,

As per the API documentation we can create multiple queues for every cos by giving cls_param.num_queues as more than one and associating a hash proto with the same.
I am unable to find any example of how to use the same.
My use case is such that I want UDP traffic matching a dport to be diverted to n number of queues/threads based on IP src and UDP sport.
I think I can use the classifier to get this result.
I want a thread recieving on each queue in which the packets are hashed into after matching cos.
But how will I recieve the packets since the queues will be created internally by the implementation in this case. Do I still call odp_schedule/odp_sched_multi?
Or do I call odp_cls_cos_queues to get the queues and then recieve on one queue in every thread using odp_queue_deque?

The dequeuing mechanism depends on the queue type. odp_queue_dequeue() is used for plain gueues and the scheduler is used for scheduled queues. When queue creation is left to the classifier, the application specifies the queue parameters that are to be used. Queue type is one of those parameters (odp_cls_cos_param_t.queue_param.type).

Note that you do not need the classifier for just getting received packets to multiple queues and scheduled to multiple threads as you can configure a pktin with multiple queues and RSS hashing.

Thanks a lot for the response.
I understand that I can get the hashing done via RSS for diverting traffic to multiple threads.
In my use case the traffic of different user contexts is coming muxed on single UDP Port.
So I need to first match the IP Dst and UDP DPort and then get it hashed to multiple threads.
As per my understanding I can get this done either in HW using DPDK rte_flow APIs which are currently not supported in ODP it seems?
Or else in SW via classifier with multiple queues mapping to a single CoS.

Also, as per the latest ODP v1.24.0.0 it supports DPDK 18.11
Is there any working release which supports DPDK 20?
Since we are looking to use DPDK 20 for our application as it requires flow matching in GTP Tunnels.

Generally, we support the current DPDK LTS releases (18.11 & 19.11). However, newer releases may also work if there are no clashing API changes. If some small changes are required to ODP code we may implement them before the next DPDK LTS release (likely 20.11).

I did a quick test and DPDK v20.05 seems to work without any ODP code modifications.