From patchwork Thu Aug 23 10:00:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 144899 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp197ljw; Thu, 23 Aug 2018 03:00:24 -0700 (PDT) X-Google-Smtp-Source: AA+uWPy9HG5YjQJncK60SHPzLEanpOug9KjZdmosxizurIqR7zPprFMbeWKQ+qL8Kn3uGZRCKLlU X-Received: by 2002:ac8:2aba:: with SMTP id b55-v6mr58187839qta.286.1535018424801; Thu, 23 Aug 2018 03:00:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535018424; cv=none; d=google.com; s=arc-20160816; b=f4v9W/Nh71RINYzw7/Liu9p49Bhnv+HcYsOohw7GtsqkjJcKK+HDaGaBTRs0ygLLUb /EtctfgUMXo5nmK6A/uFOif55RdSaQP82GdK525jUgmSwNqA1hs94ySG2PqSxbU9iGOh pxZ6FITX5Rt8ktMRM/EFev6T8+gD+bLshyiTVJorDxaTD73NVhlhRKgd7t2lXFN1X5pl TwYPD+mH5SmZwUQKLF1ijcm3PsYDmVKT2LLxvkYw/gzUzX0rZnkAEoRTgt0FbDTZ1Rxh mDkQ9Av1D6zctd8kIgoZRm2xA0TaxxLFl/2flP6rxoF1fDzmaXcqOc5ioxb1OUohEd+R B3OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=9RhmFUWi2G3/ynBQwVCrRiC05IrUVYHy36zNrbH1Jxc=; b=Y0pXFQGsbJ+bL+TgIDi5o52nJesYBl3WUw3KzgZyxdgRAxmoSg0JFlJsJ2ja1uEkph G+oduZppPulX2ud4GyXxith7uf0wxhCMz2bHDMvZ3EZ3lRIM8Hqx9VU/BuQJj4gfv66L qpy0GGMVUH9zXsVb/K6ak28hjChuettcPVOe/O5YlmHHCwC32GwsRgPCbzNJSw/GQAxR dV5xlVVaHOfr4N2d+Me9ZFtGdEmKkhR3YZueyDK8NdMIk3oBBqIE9ViBxgXYBT+BJqfC PkgSx6mjfkA0FlJxjMKx2PdsincInshXqjhR3Zh5SNevzCXG2aTls3j+tLBBX+RrPETj vN7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id o184-v6si4427578qkc.288.2018.08.23.03.00.23; Thu, 23 Aug 2018 03:00:24 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id E3C1968635; Thu, 23 Aug 2018 10:00:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 87AA960F2C; Thu, 23 Aug 2018 10:00:18 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id E8B196862F; Thu, 23 Aug 2018 10:00:11 +0000 (UTC) Received: from forward104p.mail.yandex.net (forward104p.mail.yandex.net [77.88.28.107]) by lists.linaro.org (Postfix) with ESMTPS id 8AB6060F5B for ; Thu, 23 Aug 2018 10:00:10 +0000 (UTC) Received: from mxback7g.mail.yandex.net (mxback7g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:168]) by forward104p.mail.yandex.net (Yandex) with ESMTP id 702AC183412 for ; Thu, 23 Aug 2018 13:00:09 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback7g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id umoMElvYly-09IKHHJx; Thu, 23 Aug 2018 13:00:09 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Eb3MaP2Agv-08oahuT9; Thu, 23 Aug 2018 13:00:08 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Thu, 23 Aug 2018 10:00:07 +0000 Message-Id: <1535018407-21420-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535018407-21420-1-git-send-email-odpbot@yandex.ru> References: <1535018407-21420-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 679 Subject: [lng-odp] [PATCH API-NEXT v1 1/1] validation: pktio: test per queue pktin configuration X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Bogdan Pricope Signed-off-by: Bogdan Pricope --- /** Email created from pull request 679 (bogdanPricope:api_next_pktin_queue_validation_pr) ** https://github.com/Linaro/odp/pull/679 ** Patch: https://github.com/Linaro/odp/pull/679.patch ** Base sha: d42ef2c5a01d29a9877e0b487694f66e40c43624 ** Merge commit sha: 2de86f4656e3c680bef6a36446cd23ba9258de80 **/ test/validation/api/pktio/pktio.c | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/test/validation/api/pktio/pktio.c b/test/validation/api/pktio/pktio.c index 09367d4ea..04232f84f 100644 --- a/test/validation/api/pktio/pktio.c +++ b/test/validation/api/pktio/pktio.c @@ -1391,6 +1391,42 @@ static void pktio_test_pktin_queue_config_sched(void) CU_ASSERT_FATAL(odp_pktio_close(pktio) == 0); } +static void pktio_test_pktin_queue_config_multi_sched(void) +{ + odp_pktio_t pktio; + odp_pktio_capability_t capa; + odp_pktin_queue_param_t queue_param; + odp_queue_t in_queues[MAX_QUEUES]; + odp_pktin_queue_param_ovr_t queue_param_ovr[MAX_QUEUES]; + int num_queues, i; + + pktio = create_pktio(0, ODP_PKTIN_MODE_SCHED, ODP_PKTOUT_MODE_DIRECT); + CU_ASSERT_FATAL(pktio != ODP_PKTIO_INVALID); + + CU_ASSERT_FATAL(odp_pktio_capability(pktio, &capa) == 0 && + capa.max_input_queues > 0); + num_queues = (capa.max_input_queues < MAX_QUEUES) ? + capa.max_input_queues : MAX_QUEUES; + + odp_pktin_queue_param_init(&queue_param); + + queue_param.hash_enable = 0; + queue_param.num_queues = num_queues; + queue_param.queue_param.sched.group = ODP_SCHED_GROUP_ALL; + queue_param.queue_param.sched.sync = ODP_SCHED_SYNC_ATOMIC; + + for (i = 0; i < num_queues; i++) + queue_param_ovr[i].group = ODP_SCHED_GROUP_ALL; + queue_param.queue_param_ovr = queue_param_ovr; + + CU_ASSERT_FATAL(odp_pktin_queue_config(pktio, &queue_param) == 0); + + CU_ASSERT(odp_pktin_event_queue(pktio, in_queues, MAX_QUEUES) + == num_queues); + + CU_ASSERT_FATAL(odp_pktio_close(pktio) == 0); +} + static void pktio_test_pktin_queue_config_queue(void) { odp_pktio_t pktio; @@ -2446,6 +2482,7 @@ odp_testinfo_t pktio_suite_unsegmented[] = { ODP_TEST_INFO(pktio_test_info), ODP_TEST_INFO(pktio_test_pktin_queue_config_direct), ODP_TEST_INFO(pktio_test_pktin_queue_config_sched), + ODP_TEST_INFO(pktio_test_pktin_queue_config_multi_sched), ODP_TEST_INFO(pktio_test_pktin_queue_config_queue), ODP_TEST_INFO(pktio_test_pktout_queue_config), ODP_TEST_INFO(pktio_test_plain_queue),