diff mbox series

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

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

Commit Message

Github ODP bot Aug. 10, 2018, 9 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: 9b2b5a9695ad66977c964c83691cd2fef4c45b85
 ** Merge commit sha: b7a150ea4e9fe568e77d603f637ddb968838aec6
 **/
 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;