diff mbox series

[API-NEXT,v3,2/2] linux-gen: pktio: implement per queue pktin configuration

Message ID 1534752012-14928-3-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v3,1/2] api: pktio: extend odp_pktin_queue_param_t to support per queue configuration | expand

Commit Message

Github ODP bot Aug. 20, 2018, 8 a.m. UTC
From: Bogdan Pricope <bogdan.pricope@linaro.org>


Enables advanced usecases where heterogeneous settings are needed
on input queues of the same interface.

Signed-off-by: Bogdan Pricope <bogdan.pricope@linaro.org>

---
/** Email created from pull request 660 (bogdanPricope:api_next_pktin_queue_pr)
 ** https://github.com/Linaro/odp/pull/660
 ** Patch: https://github.com/Linaro/odp/pull/660.patch
 ** Base sha: 2722279b31b075586551801eb2860687ff966ea8
 ** Merge commit sha: 7b311bb5354307530b9e27d0d6febddb1de2b8f5
 **/
 platform/linux-generic/odp_packet_io.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c
index 7759f83e4..cb8086afd 100644
--- a/platform/linux-generic/odp_packet_io.c
+++ b/platform/linux-generic/odp_packet_io.c
@@ -1466,15 +1466,23 @@  int odp_pktin_queue_config(odp_pktio_t pktio,
 			odp_queue_param_t queue_param;
 			char name[ODP_QUEUE_NAME_LEN];
 			int pktio_id = odp_pktio_index(pktio);
+			odp_pktin_queue_param_ovr_t *queue_param_ovr = NULL;
+
+			if (param->queue_param_ovr)
+				queue_param_ovr = param->queue_param_ovr + i;
 
 			snprintf(name, sizeof(name), "odp-pktin-%i-%i",
 				 pktio_id, i);
 
-			if (param->classifier_enable)
+			if (param->classifier_enable) {
 				odp_queue_param_init(&queue_param);
-			else
+			} else {
 				memcpy(&queue_param, &param->queue_param,
 				       sizeof(odp_queue_param_t));
+				if (queue_param_ovr)
+					queue_param.sched.group =
+						queue_param_ovr->group;
+			}
 
 			queue_param.type = ODP_QUEUE_TYPE_PLAIN;