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 9EA674611C; Fri, 24 Jan 2025 10:59:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1342F41060; Fri, 24 Jan 2025 10:59:50 +0100 (CET) Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2049.outbound.protection.outlook.com [40.107.104.49]) by mails.dpdk.org (Postfix) with ESMTP id 9BA3E40EF0 for ; Fri, 24 Jan 2025 10:59:48 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=P4bVZD/S2jbFL3gyWusG4Lts58H0fToDoWdtj91SXF4lRunJcyFXhbo2DBFa9bu+1O2ANOtglGQP5MPGJeVjWp8vvaUhRCMIuBpSSwQEbGQfeeXbPac7zBXXz8egyRXIMvVLBv+7pNaDM7tMM4UEdTNW1gi3MTQEry9vHRz+VD0wJl2ERSIzT+kpzNKW/MhWqMit6EJEIqeOUn7S2bMOTpaALQ3C+BnWTC9obn0JTXqmJOr7Scetp9/je/X/tHqRwVoCNzx0pYyVfQP/f6NZ9VN8bZ7SY4TTPguxyWtnH0r77Q7AxALurEnYbAJlYFADDoiG7JAD832l4vTgJKhwHg== 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=skGZK550wgcavXKpJTD0l4JO+nsP/YTDl5p93TbYcl8=; b=dnvv/ceYhqIRSKpHfYFQPr+xDCGSLHU8qTWSgZ6sIK2z5QbmVyTc9+7yRk9cDA/jNiEN3l2XS6yvHSJZL5J3lY/uaYd+NfiXEpPpbHcvmgYWAoaXmnQx2+F+m+GrIrQe9HzRyGyvrSfcmCWcWAlWdFrxHfvTdJqP2nqgRHaCyO8Z5wYUOURBmIvinDVRHLKKg9eCpttIpCQ4UObTKXtlDtFkywqvHXHf8O/Nf21v8SS3gDaNLjNsLMtqCwQ4YSWvDLWfuGc9udAm223SCUgbHMpWqupPjHyLhUzn+/MVMvwJxDmyouB/1WCwlULiqIjFF16nyUF2Swkb78zsTxro9Q== 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=skGZK550wgcavXKpJTD0l4JO+nsP/YTDl5p93TbYcl8=; b=Ta6S0LkMkIqwhYk81hbrDn7B6SgW1CyIWKz6cafcCuOeiZWEKJgpjZ2Uiv1DVgt/bGDP1UBbO8dDr2kODEcGp4fus/IJDpvo99nBNRZFmv/nWUOhTZlaUj2Aw2cjDhNb9DBzycZuCMyBoR3y9nts9zVapkRLvc7tPeBAfxm7pf5atsw5PHop5IUywJ5Qc265cOuPUZ3GLjvr+ba9UC9T1co3pB+kPkuQG/IKVvC88wIwtQoygoB7pE/vj2kGb4JZ4LWhJaocqHDkjdy6cOCfjsFv16wKi+FlHDXrJKRAY+ZK/3JBnxpAmBawsEyWd1TWeEggQ+79b7uyKwJZN/iYpA== Received: from DB3PR08CA0008.eurprd08.prod.outlook.com (2603:10a6:8::21) by DB9PR07MB7225.eurprd07.prod.outlook.com (2603:10a6:10:218::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8377.17; Fri, 24 Jan 2025 09:59:44 +0000 Received: from DB5PEPF00014B98.eurprd02.prod.outlook.com (2603:10a6:8:0:cafe::d5) by DB3PR08CA0008.outlook.office365.com (2603:10a6:8::21) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8377.19 via Frontend Transport; Fri, 24 Jan 2025 09:59:44 +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 DB5PEPF00014B98.mail.protection.outlook.com (10.167.8.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8377.8 via Frontend Transport; Fri, 24 Jan 2025 09:59:44 +0000 Received: from seliiuvd00917.seli.gic.ericsson.se (153.88.142.248) by smtp-central.internal.ericsson.com (100.87.178.67) with Microsoft SMTP Server id 15.2.1544.14; Fri, 24 Jan 2025 10:59:43 +0100 From: Luka Jankovic To: CC: , , , Subject: [RFC PATCH v6 2/2] eventdev: documentation for atomic queue test Date: Fri, 24 Jan 2025 10:59:37 +0100 Message-ID: <20250124095937.1436673-2-luka.jankovic@ericsson.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20250115133844.1403623-1-luka.jankovic@ericsson.com> References: <20250115133844.1403623-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: DB5PEPF00014B98:EE_|DB9PR07MB7225:EE_ X-MS-Office365-Filtering-Correlation-Id: 8932f24c-f955-41c1-51e8-08dd3c5dd422 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-Ant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utf-8?B?SElTSmpPNGg2VWs5d0YzT3pUcEp5SktDT2VBRWEzcjhyWng3SHlHTHdLTmc5?= =?utf-8?B?OHFad2lGU2FJTlQ5eG5HcnVLSlg2bmVlYm9SZWZBQjIzVlIvSzVENHZlb1NH?= =?utf-8?B?ZlpuMzBjQXhQQVlxbTIraHRWeTR3dGFpOFY5L0VyMlRzT05KVmFOVUlwT0Rx?= =?utf-8?B?Mzd2bHkvWk14VU5LcG9RK25la3dSMTlYcEVuSzFkQjVtQmQrVlNKV2IvYk05?= =?utf-8?Q?FG+aLmH/q8AZ9klJk9JRAnMrEOjyaygX?= 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)(1800799024)(82310400026)(376014)(36860700013)(13003099007); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jan 2025 09:59:44.4341 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8932f24c-f955-41c1-51e8-08dd3c5dd422 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: DB5PEPF00014B98.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR07MB7225 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 Add relevant documentation to the tools/testeventdev page. Signed-off-by: Luka Jankovic --- .../tools/img/eventdev_atomic_queue_test.svg | 1701 +++++++++++++++++ doc/guides/tools/testeventdev.rst | 92 + 2 files changed, 1793 insertions(+) create mode 100644 doc/guides/tools/img/eventdev_atomic_queue_test.svg 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..38d9a555df --- /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 aaa0e5f24c..2f47c0aae8 100644 --- a/doc/guides/tools/testeventdev.rst +++ b/doc/guides/tools/testeventdev.rst @@ -55,6 +55,7 @@ The following are the application command-line options: order_queue order_atq + atomic_queue perf_queue perf_atq pipeline_atq @@ -326,6 +327,97 @@ Example command to run order queue test: sudo /app/dpdk-test-eventdev -c 0x1f -s 0x10 --vdev=event_sw0 -- \ --test=order_queue --plcores 1 --wlcores 2,3 +ORDER_ATOMIC Test +~~~~~~~~~~~~~~~~~ + +This is a functional test is similar to the ORDER_QUEUE test, but differs in two +critical ways: + +#. Both queues (q0 and q1) are atomic. This makes it compatible with the + distributed software event device (dsw). +#. Atomicity is verified using spinlocks for each combination of flow id and + queue id. + +.. _table_eventdev_atomic_queue_test: + +.. table:: Atomic queue test eventdev configuration. + + +---+--------------+----------------+---------------------------+ + | # | Items | Value | Comments | + | | | | | + +===+==============+================+===========================+ + | 1 | nb_queues | 2 | q0(atomic), q1(atomic) | + | | | | | + +---+--------------+----------------+---------------------------+ + | 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_queue_test: + +.. figure:: img/eventdev_atomic_queue_test.* + + order queue test operation. + +When an event is dequeued for processing, a spinlock is acquired for the +the flow from which the event was dequeued. Once processing is complete, +the lock is released. The test will fail if an attempt is made to take a lock +that is already held. This indicates that multiple workers attempted to +process the same flow at the same time, thereby violating atomicity. + +.. table:: Atomic queue test queue processing tasks. + + +-----------+---------------------------------------------------+ + | Queue ID | Processing Task | + | | | + +===========+===================================================+ + | 0 | Update queue ID for event and re-enqueue. | + | | | + +-----------+---------------------------------------------------+ + | 1 | Verify sequence number. | + | | | + +-----------+---------------------------------------------------+ + +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 with the software event device: + +.. code-block:: console + + sudo /app/dpdk-test-eventdev -c 0x1f -s 0x10 --vdev=event_sw0 -- \ + --test=atomic_queue --plcores 1 --wlcores 2,3 + +Example command to run with the distributed software event device: + +.. code-block:: console + + sudo /app/dpdk-test-eventdev -c 0x1f --vdev=event_dsw0 -- \ + --test=atomic_queue --plcores 1 --wlcores 2,3,4 ORDER_ATQ Test ~~~~~~~~~~~~~~ -- 2.34.1