From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7E61F4634B; Wed, 5 Mar 2025 15:13:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4D2FB40659; Wed, 5 Mar 2025 15:13:09 +0100 (CET) Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013067.outbound.protection.outlook.com [52.101.67.67]) by mails.dpdk.org (Postfix) with ESMTP id E57FA40655 for ; Wed, 5 Mar 2025 15:13:06 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=LaSy1woMCVa7JN9oroPaKaJVL/FvDK1ofVs0ASbgklnDBjcMc7l0ndXNGmm7oJ+P5wT+mIMxTLKO3eJhc0r8YJsD6SkZqLrBf7NCJe3mS7Mk3xNmLIg01XNzrMgrh5n1Pfk3ZbOJ4NRFkqKBdbkhNfdnHeKsuewVBG7/Sy5vYNPNQPJm9XSW0pkt+Ib9tnMaGdkIExZoUGWajP1LxjP/LT19wAiAS/3TUjiB1ak462k4NtrDg2zqNBGG5e6wKjZ8mDFjBVJqAdsJVxap7l2er3pwnDOSmIfGeiaWeDrqoki9OpAofA61gG066t4K6f7QfRdaMqB/cZefPh3aNbFdjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zY+Azuhl34uP0t408x5TioOu2k5M3lHTbVAdD1HwQVc=; b=IZxqX9J9ZkRCuTnSU4BY/YbCHXtTPOL0h+sF6erCM/BcdpK0nyeSeXh2Jr0oKQfyfUj3iMTMArW7bA7xxPWBA+lA1NpWtpFEcfnfVbV3O9XSrpnVmELwwVWvOWfq2F+D0WMYkg8hOjuZPRvH6YnjCOm0EBZEj8jRzGW+3u/+kSCt5kS+AX/zilheiwhiaHMx1TkB2gHvxSftzAWuJLY19+pbhZnDm3sAxfRpNF3rV7DoBFAVq3X50lRh1qDsim6n7RtU/RXWJsRPSSoQcWFlVif/gWrETtnnscEGD8rZ88jLuiyjK9L00jFJdvSNpqK6S7T7g6M8AiJ9wTYVl2jjkg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 192.176.1.74) smtp.rcpttodomain=dpdk.org smtp.mailfrom=ericsson.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ericsson.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zY+Azuhl34uP0t408x5TioOu2k5M3lHTbVAdD1HwQVc=; b=lwHxdD6xeTtHduweiWtnALaoEJ3xoGBgbcgniuzBRE9KG9DpZO9S0fZATnCK75SJujMP1i04dCgLxNPDA+Gcm7UHkjCwlxgL5VnV3OaUIVTY2RcJIbm7RyKlMUKBHFfufE/ZTVeNG6zH+KdA8ZbCer0y9kXDkpl100mmQv9Dg7H/PtN9ju3lnqwEChxTlTv85ow/gDgjTMfK470M0YusxiYThwS2gDUNBwcT1f/87kVKUUuL4K3TLX0T27MaN35/mj45X+SQMOZf4wGOQRx6SlMrnbgXDZn8VjoC0PHBXLAlc3gsXtlX3RsD84A8Zwqs/H/LWKP1Wa32RahA8/6thg== Received: from DB8PR09CA0025.eurprd09.prod.outlook.com (2603:10a6:10:a0::38) by PAWPR07MB10048.eurprd07.prod.outlook.com (2603:10a6:102:38a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8489.28; Wed, 5 Mar 2025 14:13:02 +0000 Received: from DU2PEPF0001E9C1.eurprd03.prod.outlook.com (2603:10a6:10:a0:cafe::e8) by DB8PR09CA0025.outlook.office365.com (2603:10a6:10:a0::38) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8511.19 via Frontend Transport; Wed, 5 Mar 2025 14:13:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 192.176.1.74) smtp.mailfrom=ericsson.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ericsson.com; Received-SPF: Pass (protection.outlook.com: domain of ericsson.com designates 192.176.1.74 as permitted sender) receiver=protection.outlook.com; client-ip=192.176.1.74; helo=oa.msg.ericsson.com; pr=C Received: from oa.msg.ericsson.com (192.176.1.74) by DU2PEPF0001E9C1.mail.protection.outlook.com (10.167.8.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8511.15 via Frontend Transport; Wed, 5 Mar 2025 14:13:01 +0000 Received: from seliiuvd00917.seli.gic.ericsson.se (153.88.142.248) by smtp-central.internal.ericsson.com (100.87.178.63) with Microsoft SMTP Server id 15.2.1544.14; Wed, 5 Mar 2025 15:12:59 +0100 From: ejnulak To: CC: , , , Subject: [PATCH v9 3/3] eventdev: add atomic atq to test-eventdev app Date: Wed, 5 Mar 2025 15:12:55 +0100 Message-ID: <20250305141255.3031686-4-luka.jankovic@ericsson.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20250305141255.3031686-1-luka.jankovic@ericsson.com> References: <20250305125215.2870237-1-luka.jankovic@ericsson.com> <20250305141255.3031686-1-luka.jankovic@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF0001E9C1:EE_|PAWPR07MB10048:EE_ X-MS-Office365-Filtering-Correlation-Id: 10d017b8-ab51-422f-6f0f-08dd5befd70a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|376014|1800799024|36860700013|13003099007|43062017; X-Microsoft-Antispam-Message-Info: =?utf-8?B?TVBva1ByWWs1ODNNZW5mUXdrOHBIS1llc2UzNFVHL3NreSs0bFgxU29OeTMy?= =?utf-8?B?aGFMbTFlbXFUVG91WXpNTGZFQkJJTUhHbDV0QTBjMklROHVGRU1aVFdFRkN0?= =?utf-8?B?eXVtSkxMU3UzMmVNbnBvMENDd1hud1hRWnNSa3dZSVVoendPUGpHV2VXanNS?= =?utf-8?B?cnZqc3crUlhWL1hyaTlXVk40c2x2am0zOFR1cjgwd25rZXlCVlpYaFk2YmI5?= =?utf-8?B?QlZ5cVltaE5pd0ZkTjZHZUJmdzE4Y1h3Tm96R2lsT1RXeUpmaUtaRTJNb0pM?= =?utf-8?B?Uy92ekFPSlJwQ0w0dGNTMmsyWExubXJQeTdRL21ta0ltd1JUUzB4TFY4c2ps?= =?utf-8?B?OWhMTldSdi8xd005b3k1Rmpab2ZiKzIzWTBnREZzU2tQRmJFUUdwQ29BUmFF?= =?utf-8?B?RGZQL0xKTWp2cm9QeTNzM1FWS3FFWmQ4NGV2Z1BRYVZFSyszLzhqL1JPaHJ2?= =?utf-8?B?d3RYTzNQM3M2b1dPeWlPRWVuaHliR0NKb2p1RzM4Nkl3b1NvMDlpNHdwZXcv?= =?utf-8?B?U1U4MCtOM1RGS0lNclppVEFWak9PcUxFWk1NR3BqKzJqSmdZYUxEcG1RdWhY?= =?utf-8?B?OGZuTVFqM3dPMGE3MG0wWDFka09FT0pUQUVNMEMwZEl2U3hoMjlYb2tDU0Nw?= =?utf-8?B?SFZ0TXpDZnFqUHlDTjM2UDd6NkxPYmFIUDY3bDBLcmZZOElIT3NyYzZFYWkz?= =?utf-8?B?dFR2UXVERnJONnNXMGpzcW9XMlJPWEF5MXVrc21tRHBPQ1hadWN3bEowa0Fh?= =?utf-8?B?eERLZWZOYzk0eHdzWWZwNzhvY1czT2xLYzBoZURUZ2NrdG9HK2tXTXBTWkhP?= =?utf-8?B?cGNKVWJQbG01THFIbDNmMUdDVlp3ZFY0dGFUK1dzL2hYSmgvdTJOeSs2eU9k?= =?utf-8?B?emtGaGNkVWhHUVpQV3Q2RUF0YkxlMjdFSFdzWldMU3hBNERjSXk5ejRCVVRr?= =?utf-8?B?YWJpWVFLVlVPemJPY2tBRFZIRzU5bGpFUkdiUGpoODdpR0p5dm9FWEpqTmg2?= =?utf-8?B?NDgrMytsNVRKbmxlS2FmaXN4bEY4R1RUNndrMnJvOXJLdzFvTVM3dGN0djJE?= =?utf-8?B?NUQ5azRhQXJEN05iVjVmUlc2M3Ixdk9CRFc0QnF0Q2dpdG9LQ3JJVmJVa1lu?= =?utf-8?B?d0tGdnlpUk9RSnU4YmpGL3lNZ29nM0JBWWQ2VHdQVEJNQTVnYlJEbGs3OTR2?= =?utf-8?B?bzE1QWJjSmVyL1NMdE5nMkNPWTJDUGpZeHZkVlFraG44Mmw1bDFNSEZJdlg4?= =?utf-8?B?a05XYzg5NGRXc2FxeFZPaU9lUDVUUzJIaWJkN2JFMnVHQU9NUEdMZ09lMGZR?= =?utf-8?B?WXQ1bkE5T2ZtUFNGeUpoM2JNS3BwVW9rcDZCODBQRXlNQkdvZ01mUzVhcTgy?= =?utf-8?B?RVdTRjlqZ09zR1Q4bFdpTlY5Q0dtVzNXa2lwMnJieXpjM1lJQkI5bEEvM3hz?= =?utf-8?B?d0l6L2E4RWVwK285R1VXVU0rMFZGY1JTemk3bVNUSUxnYkpZbGVEL2xjd3hj?= =?utf-8?B?cFE1bTVFaHpmL0xMWEQzVG1VbHJxVlpiVXlhalY1UUhCUlJDd3pRZ0pyL1A2?= =?utf-8?B?UCs5Ti81MkpkSWd4T0xGSmYwZjBRc0t5UGNyQm51Wm82MW1LV2RGcUUzZTNX?= =?utf-8?B?WGU1SXYwQUNBSnRlTFVZM3lXdE02UUdxUksrV0w4RTE2MTB5SFZKUDBheWJl?= =?utf-8?B?T2w4cFdjbTY1SmFjMTl0Q0NNa3NsenBjbTFLZXlsRjZ4ZXovQlc0T3BEa2Jj?= =?utf-8?B?WjN0MW5RaTFiWSt4TUR6UjRzeE56WEx2SmRXZ3dqQ0R6ZWpGZ2FiR04rUHhJ?= =?utf-8?B?bE4zWnYxRGRDb1Y1eFRxQURNTWVMOWFjbHMxcWloaG1iT2VaN0JrbDNZTGNV?= =?utf-8?B?ZkxwcUxNQ1NkWXBWRHRSa2FPV0tpVXFyVmtrZUFRVkhNRXY4M2FPR0c0cUhX?= =?utf-8?B?UlVZT2tvZXJ1bXZaaHFNVDNIcHhOaGtjUHg5Y1hwSXc2OTlDa1ArQS9sbmJu?= =?utf-8?B?bkNVMkRyenBBPT0=?= X-Forefront-Antispam-Report: CIP:192.176.1.74; CTRY:SE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:oa.msg.ericsson.com; PTR:office365.se.ericsson.net; CAT:NONE; SFS:(13230040)(82310400026)(376014)(1800799024)(36860700013)(13003099007)(43062017); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2025 14:13:01.8793 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 10d017b8-ab51-422f-6f0f-08dd5befd70a X-MS-Exchange-CrossTenant-Id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=92e84ceb-fbfd-47ab-be52-080c6b87953f; Ip=[192.176.1.74]; Helo=[oa.msg.ericsson.com] X-MS-Exchange-CrossTenant-AuthSource: DU2PEPF0001E9C1.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR07MB10048 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Luka Jankovic Add an atomic atq test to the test-eventdev app. The test works in the same way as atomic queue, the difference being that only one queue capable of all types for both stages. Signed-off-by: Luka Jankovic Tested-by: Pavan Nikhilesh --- app/test-eventdev/meson.build | 1 + app/test-eventdev/test_atomic_atq.c | 220 +++ .../tools/img/eventdev_atomic_queue_test.svg | 1701 +++++++++++++++++ doc/guides/tools/testeventdev.rst | 63 + 4 files changed, 1985 insertions(+) create mode 100644 app/test-eventdev/test_atomic_atq.c create mode 100644 doc/guides/tools/img/eventdev_atomic_queue_test.svg diff --git a/app/test-eventdev/meson.build b/app/test-eventdev/meson.build index 1f13e1700c..10658f69ce 100644 --- a/app/test-eventdev/meson.build +++ b/app/test-eventdev/meson.build @@ -15,6 +15,7 @@ sources = files( 'test_order_atq.c', 'test_order_common.c', 'test_order_queue.c', + 'test_atomic_atq.c', 'test_atomic_common.c', 'test_atomic_queue.c', 'test_perf_atq.c', diff --git a/app/test-eventdev/test_atomic_atq.c b/app/test-eventdev/test_atomic_atq.c new file mode 100644 index 0000000000..4810d2eaae --- /dev/null +++ b/app/test-eventdev/test_atomic_atq.c @@ -0,0 +1,220 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2025 Ericsson AB + */ + +#include +#include + +#include "test_atomic_common.h" + +#define NB_QUEUES 1 +#define NB_STAGES 2 + +static rte_spinlock_t *atomic_locks; + +static inline void +atomic_atq_process_stage_0(struct test_order *const t, + struct rte_event *const ev, + uint32_t nb_flows, + uint32_t port) +{ + const uint32_t flow = *order_mbuf_flow_id(t, ev->mbuf); + + atomic_lock_verify(atomic_locks, 0, flow, nb_flows, t, port); + + ev->sub_event_type = 1; + ev->op = RTE_EVENT_OP_FORWARD; + ev->sched_type = RTE_SCHED_TYPE_ATOMIC; + ev->event_type = RTE_EVENT_TYPE_CPU; + + atomic_spinlock_unlock(atomic_locks, 0, flow, nb_flows); +} + +static inline void +atomic_atq_process_stage_1(struct test_order *const t, + struct rte_event *const ev, + uint32_t nb_flows, + uint32_t *const expected_flow_seq, + RTE_ATOMIC(uint64_t) * const outstand_pkts, + uint32_t port) +{ + const uint32_t flow = *order_mbuf_flow_id(t, ev->mbuf); + const uint32_t seq = *order_mbuf_seqn(t, ev->mbuf); + + atomic_lock_verify(atomic_locks, 1, flow, nb_flows, t, port); + + /* compare the seqn against expected value */ + if (seq != expected_flow_seq[flow]) { + evt_err("flow=%x seqn mismatch got=%x expected=%x", flow, seq, + expected_flow_seq[flow]); + t->err = true; + } + + expected_flow_seq[flow]++; + rte_pktmbuf_free(ev->mbuf); + + rte_atomic_fetch_sub_explicit(outstand_pkts, 1, rte_memory_order_relaxed); + + ev->op = RTE_EVENT_OP_RELEASE; + + atomic_spinlock_unlock(atomic_locks, 1, flow, nb_flows); +} + +static int +atomic_atq_worker_burst(void *arg, bool flow_id_cap, uint32_t max_burst) +{ + ORDER_WORKER_INIT; + struct rte_event ev[BURST_SIZE]; + uint16_t i; + + while (t->err == false) { + + uint16_t const nb_rx = rte_event_dequeue_burst(dev_id, port, ev, max_burst, 0); + + if (nb_rx == 0) { + if (rte_atomic_load_explicit(outstand_pkts, rte_memory_order_relaxed) <= 0) + break; + rte_pause(); + continue; + } + + for (i = 0; i < nb_rx; i++) { + if (!flow_id_cap) + order_flow_id_copy_from_mbuf(t, &ev[i]); + + switch (ev[i].sub_event_type) { + case 0: + atomic_atq_process_stage_0(t, &ev[i], nb_flows, port); + break; + case 1: + atomic_atq_process_stage_1(t, &ev[i], nb_flows, expected_flow_seq, + outstand_pkts, port); + break; + default: + order_process_stage_invalid(t, &ev[i]); + break; + } + } + + uint16_t total_enq = 0; + + do { + total_enq += rte_event_enqueue_burst( + dev_id, port, ev + total_enq, nb_rx - total_enq); + } while (total_enq < nb_rx); + } + + return 0; +} + +static int +worker_wrapper(void *arg) +{ + struct worker_data *w = arg; + int max_burst = evt_has_burst_mode(w->dev_id) ? BURST_SIZE : 1; + const bool flow_id_cap = evt_has_flow_id(w->dev_id); + + return atomic_atq_worker_burst(arg, flow_id_cap, max_burst); +} + +static int +atomic_atq_launch_lcores(struct evt_test *test, struct evt_options *opt) +{ + int ret = atomic_launch_lcores(test, opt, worker_wrapper); + rte_free(atomic_locks); + return ret; +} + +static int +atomic_atq_eventdev_setup(struct evt_test *test, struct evt_options *opt) +{ + int ret; + + const uint8_t nb_workers = evt_nr_active_lcores(opt->wlcores); + /* number of active worker cores + 1 producer */ + const uint8_t nb_ports = nb_workers + 1; + + ret = evt_configure_eventdev(opt, NB_QUEUES, nb_ports); + if (ret) { + evt_err("failed to configure eventdev %d", opt->dev_id); + return ret; + } + + /* q0 all types queue configuration */ + struct rte_event_queue_conf q0_conf = { + .priority = RTE_EVENT_DEV_PRIORITY_NORMAL, + .event_queue_cfg = RTE_EVENT_QUEUE_CFG_ALL_TYPES, + .nb_atomic_flows = opt->nb_flows, + .nb_atomic_order_sequences = opt->nb_flows, + }; + ret = rte_event_queue_setup(opt->dev_id, 0, &q0_conf); + if (ret) { + evt_err("failed to setup queue0 eventdev %d", opt->dev_id); + return ret; + } + + /* setup one port per worker, linking to all queues */ + ret = order_event_dev_port_setup(test, opt, nb_workers, NB_QUEUES); + 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; + } + + atomic_locks = atomic_init_locks(NB_STAGES, opt->nb_flows); + + return 0; +} + +static void +atomic_atq_opt_dump(struct evt_options *opt) +{ + order_opt_dump(opt); + evt_dump("nb_evdev_queues", "%d", NB_QUEUES); +} + +static bool +atomic_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 < NB_QUEUES || + dev_info.max_event_ports < order_nb_event_ports(opt)) { + evt_err("not enough eventdev queues=%d/%d or ports=%d/%d", NB_QUEUES, + dev_info.max_event_queues, order_nb_event_ports(opt), + dev_info.max_event_ports); + return false; + } + + return true; +} + +static const struct evt_test_ops atomic_atq = { + .cap_check = atomic_atq_capability_check, + .opt_check = order_opt_check, + .opt_dump = atomic_atq_opt_dump, + .test_setup = order_test_setup, + .mempool_setup = order_mempool_setup, + .eventdev_setup = atomic_atq_eventdev_setup, + .launch_lcores = atomic_atq_launch_lcores, + .eventdev_destroy = order_eventdev_destroy, + .mempool_destroy = order_mempool_destroy, + .test_result = order_test_result, + .test_destroy = order_test_destroy, +}; + +EVT_TEST_REGISTER(atomic_atq); diff --git a/doc/guides/tools/img/eventdev_atomic_queue_test.svg b/doc/guides/tools/img/eventdev_atomic_queue_test.svg new file mode 100644 index 0000000000..8d21de77e3 --- /dev/null +++ b/doc/guides/tools/img/eventdev_atomic_queue_test.svg @@ -0,0 +1,1701 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + test: atomic_queue +   + + + + + + + + + + + + + + producer_flow_seq + + producer maintains per flow sequence number + + + flow 0 + + flow 1 + flow 2 + + flow n + + + + producer0 + atomic queue 0 + atomic queue 1 + worker 0 + port n+1 + worker 1 + worker 2 + worker n + port 0 + port 1 + port 2 + port n + expected_flow_seq + per flow expected sequence number + + + flow 0 + + flow 1 + flow 2 + + flow n + + + + + + enqueue(step 1) + produce atomic flows(step 0) + + dequeue, lock(step 2) + + + + + + + + + + update queue id, enqueue, unlock(step 3) + + dequeue, lock(step 4) + + + unlock(step 5) + + + diff --git a/doc/guides/tools/testeventdev.rst b/doc/guides/tools/testeventdev.rst index 4f91e81240..424e51ab28 100644 --- a/doc/guides/tools/testeventdev.rst +++ b/doc/guides/tools/testeventdev.rst @@ -56,6 +56,7 @@ The following are the application command-line options: order_queue order_atq atomic_queue + atomic_atq perf_queue perf_atq pipeline_atq @@ -481,6 +482,68 @@ Example command to run order ``all types queue`` test: sudo /app/dpdk-test-eventdev -c 0x1f -- \ --test=order_atq --plcores 1 --wlcores 2,3 +ATOMIC_ATQ Test +~~~~~~~~~~~~~~~ + +This test verifies the same aspects of ``atomic_queue`` test, the difference is +the number of queues used, this test operates on a single ``all types queue(atq)`` +instead of two different atomic queues. + +.. _table_eventdev_atomic_atq_test: + +.. table:: Order all types queue test eventdev configuration. + + +---+--------------+----------------+------------------------+ + | # | Items | Value | Comments | + | | | | | + +===+==============+================+========================+ + | 1 | nb_queues | 1 | q0(all types queue) | + | | | | | + +---+--------------+----------------+------------------------+ + | 2 | nb_producers | 1 | | + | | | | | + +---+--------------+----------------+------------------------+ + | 3 | nb_workers | >= 1 | | + | | | | | + +---+--------------+----------------+------------------------+ + | 4 | nb_ports | nb_workers + | Workers use port 0 to | + | | | 1 | port n-1.Producer uses | + | | | | port n. | + +---+--------------+----------------+------------------------+ + +.. _figure_eventdev_atomic_atq_test: + +.. figure:: img/eventdev_atomic_atq_test.* + + atomic all types queue test operation. + +Application options +^^^^^^^^^^^^^^^^^^^ + +Supported application command line options are following:: + + --verbose + --dev + --test + --socket_id + --pool_sz + --plcores + --wlcores + --nb_flows + --nb_pkts + --worker_deq_depth + --deq_tmo_nsec + +Example +^^^^^^^ + +Example command to run order ``all types queue`` test: + +.. code-block:: console + + sudo /app/dpdk-test-eventdev -c 0x1f -- \ + --test=atomic_atq --plcores 1 --wlcores 2,3 + PERF_QUEUE Test ~~~~~~~~~~~~~~~ -- 2.34.1