From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <Pavan.Bhagavatula@cavium.com>
Received: from NAM02-BL2-obe.outbound.protection.outlook.com
 (mail-bl2nam02on0076.outbound.protection.outlook.com [104.47.38.76])
 by dpdk.org (Postfix) with ESMTP id 9D4701B1D5
 for <dev@dpdk.org>; Fri, 12 Jan 2018 17:45:42 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version;
 bh=ftAPEBetyoC0NGe6oteJCm53dqZO8MqBLQYUY+q6B3w=;
 b=RGbc6mTvIc5YT+ilD6Icuq1BTFJdxpn9nYJDiijQI2fZWlON1PJsuPx9lHX5u/S3MXfblqRQjLIRSPij60xVRvyy+FjIOc3XF2rCQvranpKA1DwL47QnX0q7a9RXJbrzLRGj4hRmJMmYzo1pt+iqgWEYpWqsTimKqyBY2yZxHQE=
Authentication-Results: spf=none (sender IP is )
 smtp.mailfrom=Pavan.Bhagavatula@cavium.com; 
Received: from Pavan-LT.caveonetworks.com (119.82.125.132) by
 DM5PR07MB3465.namprd07.prod.outlook.com (10.164.153.20) with Microsoft SMTP
 Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id
 15.20.386.5; Fri, 12 Jan 2018 16:45:36 +0000
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com,
 harry.van.haaren@intel.com, gage.eads@intel.com, hemant.agrawal@nxp.com,
 nipun.gupta@nxp.com, liang.j.ma@intel.com
Cc: dev@dpdk.org,
	Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Date: Fri, 12 Jan 2018 22:14:14 +0530
Message-Id: <20180112164416.21374-11-pbhagavatula@caviumnetworks.com>
X-Mailer: git-send-email 2.14.1
In-Reply-To: <20180112164416.21374-1-pbhagavatula@caviumnetworks.com>
References: <20171130072406.15605-1-pbhagavatula@caviumnetworks.com>
 <20180112164416.21374-1-pbhagavatula@caviumnetworks.com>
MIME-Version: 1.0
Content-Type: text/plain
X-Originating-IP: [119.82.125.132]
X-ClientProxiedBy: YQXPR0101CA0023.CANPRD01.PROD.OUTLOOK.COM (52.132.74.164)
 To DM5PR07MB3465.namprd07.prod.outlook.com (10.164.153.20)
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: a79a3b27-b672-456a-f5b1-08d559dbe97c
X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0;
 RULEID:(7020084)(4652020)(5600026)(4604075)(2017052603307)(7153060)(7193020);
 SRVR:DM5PR07MB3465; 
X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3465;
 3:2UJfGK/5KHUE4TH1uVCbV83sJQJxdfm9QcMabzV7zrFFu1hmXv0AHx84hJdiv8kBWs11EJeuKKH2Chd57NAT29EUClNIiyfs/bpoiWvpLxBQYA6ZQLCxl+bp506ApqHTSj+B/0oA6e+Wx83veKfHOFbksJUWVoZVTVATSVpPQrig2YLVGOb3Fd/Lg9yRMHqg58ptZfIEwfHCy2M/6Zatu4XSLQZYNnKDF/vTNJkBJBgppABM5678y4eu0FqqjIeZ;
 25:TN6qC8f/BDicIfVpbukzk5fC3fB9uG+Y5iExXZ2bSMuuW5I+HmpCCauVgy5DA1l6g5aAvuCDGeUVmoEHJX69xHLGaMNrcOKY744FTjt7lOtacewDTX/hlqyKZKUi6xxDuaDMhwtuLBCV0bK1gp1h4jQ1oLLJMfCZOwdIi7m2fQmPaZsZpWuDmw895CkF4MBpGmNp7ItcGHPurY5+zcSTZHaNcTr6G9O0Eh3PQLJQQFaPn7fXj2nxUNBNIXorSUIMTcNbpAW7lAS+DbgIV8/lgrMdPpDdZCjsLoPTFaqpQ6sY6DEJ/57Y/qmWVEGT3ymmUtTUnfgAI7DgFJk3lYbdgw==;
 31:NrBMozYO4zV5wLQX+Rq86uGB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S3WO+PRpZ/5o8H6oMgGl+sickHeTHC7+zVVTAdITC/KJKhxy74xdXNFWrvPXbAH2N/Tv6WoE6/X63rsVHSqgwlNb3Wgm5rlYxeoDpWSDNlq0qGm7hng9I7ypTlDlBRI8Apw==
X-Microsoft-Antispam-PRVS: <DM5PR07MB3465E5E5930B69A9DDC0B89080170@DM5PR07MB3465.namprd07.prod.outlook.com>
X-Exchange-Antispam-Report-Test: UriScan:;
X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0;
 RULEID:(6040470)(2401047)(8121501046)(5005006)(3002001)(93006095)(10201501046)(3231023)(944501145)(6041268)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);
 SRVR:DM5PR07MB3465; BCL:0; PCL:0; RULEID:(100000803101)(100110400095);
 SRVR:DM5PR07MB3465; 
X-Forefront-PRVS: 0550778858
X-Forefront-Antispam-Report: SFV:NSPM;
 SFS:(10009020)(39860400002)(346002)(39380400002)(376002)(396003)(366004)(189003)(199004)(50226002)(76176011)(8676002)(6666003)(316002)(48376002)(53416004)(81156014)(53936002)(69596002)(16586007)(81166006)(59450400001)(386003)(16526018)(52116002)(6506007)(51416003)(6306002)(1076002)(6486002)(2950100002)(105586002)(66066001)(6512007)(50466002)(106356001)(47776003)(4326008)(5660300001)(53376002)(3846002)(42882006)(6116002)(7736002)(68736007)(966005)(97736004)(8656006)(478600001)(107886003)(8936002)(72206003)(36756003)(2906002)(19273905006)(305945005)(25786009)(562404015)(42262002)(563064011);
 DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3465; H:Pavan-LT.caveonetworks.com;
 FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; 
Received-SPF: None (protection.outlook.com: cavium.com does not designate
 permitted sender hosts)
X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR07MB3465;
 23:ObV6Dl6a5IUZABYZ2gR1ETvIMyK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za0bPY+hcHydbzMras7SxLh18qNdZEcYButHO+p37V/56HDlnB8m6anWFv0yjNBEmCrQ6ypolddnE6H6x1RxGxajmSmcOJL4A2m986+jcAcYQw3qeA3RlzZi73tujKOTdfCoOKPE0Rx32VfrNIPGE=;
 24:Rhp9ACZg+OfjXttlLmffp9hi/VGhtwv2i/M0GWt+7KBKNV9vzXsKBD+QkXuMQ2ZoEMA2/kwR5IyPxjoZkGU/WdDPliCmpKcIbTVIsNeYtmQ=;
 7:qjj3ntqOVsJZrSMAtaxXiFAfSNDgSnCCmNJzIuovO8yu6EYi84zacxZmSaNgyWq4k9gvr2hfFVRHAdq4kEV1Z9hqIyweW5yFRem+5XKzYF7DZXrfHVgM1DT2dSslnaOb3Up63Gxu8C7sF5U/yRn+TP4tbho7mGpOEhPrJF32BkgwukESQ2IB7K1H6NoQvQnUp+lErp5Vm9LdyC/Dsrcx15i5JzPvL2AWcblp7V4P+VOlrccJo2GqOrvrCv2xT+b/
SpamDiagnosticOutput: 1:99
SpamDiagnosticMetadata: NSPM
X-OriginatorOrg: caviumnetworks.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2018 16:45:36.1845 (UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: a79a3b27-b672-456a-f5b1-08d559dbe97c
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3465
Subject: [dpdk-dev]  [PATCH v4 11/13] app/eventdev: add pipeline atq test
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 12 Jan 2018 16:45:43 -0000

This is a pipeline test case that aims at testing the following with
``all types queue`` eventdev scheme.
1. Measure the end-to-end performance of an event dev with a ethernet dev.
2. Maintain packet ordering from Rx to Tx.

The atq queue test functions as same as ``pipeline_queue`` test.
The difference is, It uses, ``all type queue scheme`` instead of separate
queues for each stage and thus reduces the number of queues required to
realize the use case.

Note: The --prod_type_ethdev is mandatory for running the application.

Example command to run pipeline atq test:
sudo build/app/dpdk-test-eventdev -c 0xf -s 0x8 --vdev=event_sw0 -- \
--test=pipeline_atq --wlcore=1 --prod_type_ethdev --stlist=ao

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
---
 app/test-eventdev/Makefile            |   1 +
 app/test-eventdev/test_pipeline_atq.c | 223 ++++++++++++++++++++++++++++++++++
 2 files changed, 224 insertions(+)
 create mode 100644 app/test-eventdev/test_pipeline_atq.c

diff --git a/app/test-eventdev/Makefile b/app/test-eventdev/Makefile
index 94b489f41..e600e21c4 100644
--- a/app/test-eventdev/Makefile
+++ b/app/test-eventdev/Makefile
@@ -27,5 +27,6 @@ SRCS-y += test_perf_atq.c
 
 SRCS-y += test_pipeline_common.c
 SRCS-y += test_pipeline_queue.c
+SRCS-y += test_pipeline_atq.c
 
 include $(RTE_SDK)/mk/rte.app.mk
diff --git a/app/test-eventdev/test_pipeline_atq.c b/app/test-eventdev/test_pipeline_atq.c
new file mode 100644
index 000000000..6c9ac6119
--- /dev/null
+++ b/app/test-eventdev/test_pipeline_atq.c
@@ -0,0 +1,223 @@
+/*
+ * SPDX-License-Identifier: BSD-3-Clause
+ * Copyright 2017 Cavium, Inc.
+ */
+
+#include "test_pipeline_common.h"
+
+/* See http://dpdk.org/doc/guides/tools/testeventdev.html for test details */
+
+static __rte_always_inline int
+pipeline_atq_nb_event_queues(struct evt_options *opt)
+{
+	RTE_SET_USED(opt);
+
+	return rte_eth_dev_count();
+}
+
+static int
+worker_wrapper(void *arg)
+{
+	RTE_SET_USED(arg);
+	rte_panic("invalid worker\n");
+}
+
+static int
+pipeline_atq_launch_lcores(struct evt_test *test, struct evt_options *opt)
+{
+	struct test_pipeline *t = evt_test_priv(test);
+
+	if (t->mt_unsafe)
+		rte_service_component_runstate_set(t->tx_service.service_id, 1);
+	return pipeline_launch_lcores(test, opt, worker_wrapper);
+}
+
+static int
+pipeline_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt)
+{
+	int ret;
+	int nb_ports;
+	int nb_queues;
+	uint8_t queue;
+	struct rte_event_dev_info info;
+	struct test_pipeline *t = evt_test_priv(test);
+	uint8_t tx_evqueue_id = 0;
+	uint8_t queue_arr[RTE_EVENT_MAX_QUEUES_PER_DEV];
+	uint8_t nb_worker_queues = 0;
+
+	nb_ports = evt_nr_active_lcores(opt->wlcores);
+	nb_queues = rte_eth_dev_count();
+
+	/* One extra port and queueu for Tx service */
+	if (t->mt_unsafe) {
+		tx_evqueue_id = nb_queues;
+		nb_ports++;
+		nb_queues++;
+	}
+
+
+	rte_event_dev_info_get(opt->dev_id, &info);
+
+	const struct rte_event_dev_config config = {
+			.nb_event_queues = nb_queues,
+			.nb_event_ports = nb_ports,
+			.nb_events_limit  = info.max_num_events,
+			.nb_event_queue_flows = opt->nb_flows,
+			.nb_event_port_dequeue_depth =
+				info.max_event_port_dequeue_depth,
+			.nb_event_port_enqueue_depth =
+				info.max_event_port_enqueue_depth,
+	};
+	ret = rte_event_dev_configure(opt->dev_id, &config);
+	if (ret) {
+		evt_err("failed to configure eventdev %d", opt->dev_id);
+		return ret;
+	}
+
+	struct rte_event_queue_conf q_conf = {
+			.priority = RTE_EVENT_DEV_PRIORITY_NORMAL,
+			.nb_atomic_flows = opt->nb_flows,
+			.nb_atomic_order_sequences = opt->nb_flows,
+	};
+	/* queue configurations */
+	for (queue = 0; queue < nb_queues; queue++) {
+		q_conf.event_queue_cfg = RTE_EVENT_QUEUE_CFG_ALL_TYPES;
+
+		if (t->mt_unsafe) {
+			if (queue == tx_evqueue_id) {
+				q_conf.event_queue_cfg =
+					RTE_EVENT_QUEUE_CFG_SINGLE_LINK;
+			} else {
+				queue_arr[nb_worker_queues] = queue;
+				nb_worker_queues++;
+			}
+		}
+
+		ret = rte_event_queue_setup(opt->dev_id, queue, &q_conf);
+		if (ret) {
+			evt_err("failed to setup queue=%d", queue);
+			return ret;
+		}
+	}
+
+	/* port configuration */
+	const struct rte_event_port_conf p_conf = {
+			.dequeue_depth = opt->wkr_deq_dep,
+			.enqueue_depth = info.max_event_port_dequeue_depth,
+			.new_event_threshold = info.max_num_events,
+	};
+
+	if (t->mt_unsafe) {
+		ret = pipeline_event_port_setup(test, opt, queue_arr,
+				nb_worker_queues, p_conf);
+		if (ret)
+			return ret;
+
+		ret = pipeline_event_tx_service_setup(test, opt, tx_evqueue_id,
+				nb_ports - 1, p_conf);
+	} else
+		ret = pipeline_event_port_setup(test, opt, NULL, nb_queues,
+				p_conf);
+
+	if (ret)
+		return ret;
+
+	/*
+	 * The pipelines are setup in the following manner:
+	 *
+	 * eth_dev_count = 2, nb_stages = 2, atq mode
+	 *
+	 * Multi thread safe :
+	 *	queues = 2
+	 *	stride = 1
+	 *
+	 *	event queue pipelines:
+	 *	eth0 -> q0 ->tx
+	 *	eth1 -> q1 ->tx
+	 *
+	 *	q0, q1 are configured as ATQ so, all the different stages can
+	 *	be enqueued on the same queue.
+	 *
+	 * Multi thread unsafe :
+	 *	queues = 3
+	 *	stride = 1
+	 *
+	 *	event queue pipelines:
+	 *	eth0 -> q0
+	 *		  } (q3->tx) Tx service
+	 *	eth1 -> q1
+	 *
+	 *	q0,q1 are configured as stated above.
+	 *	q3 configured as SINGLE_LINK|ATOMIC.
+	 */
+	ret = pipeline_event_rx_adapter_setup(opt, 1, p_conf);
+	if (ret)
+		return ret;
+
+	if (!evt_has_distributed_sched(opt->dev_id)) {
+		uint32_t service_id;
+		rte_event_dev_service_id_get(opt->dev_id, &service_id);
+		ret = evt_service_setup(service_id);
+		if (ret) {
+			evt_err("No service lcore found to run event dev.");
+			return ret;
+		}
+	}
+
+	ret = rte_event_dev_start(opt->dev_id);
+	if (ret) {
+		evt_err("failed to start eventdev %d", opt->dev_id);
+		return ret;
+	}
+
+	return 0;
+}
+
+static void
+pipeline_atq_opt_dump(struct evt_options *opt)
+{
+	pipeline_opt_dump(opt, pipeline_atq_nb_event_queues(opt));
+}
+
+static int
+pipeline_atq_opt_check(struct evt_options *opt)
+{
+	return pipeline_opt_check(opt, pipeline_atq_nb_event_queues(opt));
+}
+
+static bool
+pipeline_atq_capability_check(struct evt_options *opt)
+{
+	struct rte_event_dev_info dev_info;
+
+	rte_event_dev_info_get(opt->dev_id, &dev_info);
+	if (dev_info.max_event_queues < pipeline_atq_nb_event_queues(opt) ||
+			dev_info.max_event_ports <
+			evt_nr_active_lcores(opt->wlcores)) {
+		evt_err("not enough eventdev queues=%d/%d or ports=%d/%d",
+			pipeline_atq_nb_event_queues(opt),
+			dev_info.max_event_queues,
+			evt_nr_active_lcores(opt->wlcores),
+			dev_info.max_event_ports);
+	}
+
+	return true;
+}
+
+static const struct evt_test_ops pipeline_atq =  {
+	.cap_check          = pipeline_atq_capability_check,
+	.opt_check          = pipeline_atq_opt_check,
+	.opt_dump           = pipeline_atq_opt_dump,
+	.test_setup         = pipeline_test_setup,
+	.mempool_setup      = pipeline_mempool_setup,
+	.ethdev_setup	    = pipeline_ethdev_setup,
+	.eventdev_setup     = pipeline_atq_eventdev_setup,
+	.launch_lcores      = pipeline_atq_launch_lcores,
+	.eventdev_destroy   = pipeline_eventdev_destroy,
+	.mempool_destroy    = pipeline_mempool_destroy,
+	.ethdev_destroy	    = pipeline_ethdev_destroy,
+	.test_result        = pipeline_test_result,
+	.test_destroy       = pipeline_test_destroy,
+};
+
+EVT_TEST_REGISTER(pipeline_atq);
-- 
2.14.1