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 3D3D446269; Wed, 19 Feb 2025 14:43:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 360E54161A; Wed, 19 Feb 2025 14:43:42 +0100 (CET) Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013007.outbound.protection.outlook.com [52.101.67.7]) by mails.dpdk.org (Postfix) with ESMTP id 2AAB342707 for ; Wed, 19 Feb 2025 14:43:41 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CAjCugeAXt3eD25i0fBJLnoLz/30+KJjQLaKUCLn6Up6fwCLbIXVioYMREWgv3Xv40J4yI6F6kZYeewZ/gJuGs+a4SeDuxb2Iy+9kIso9NIG9OOfc1Bbz2u/er5GBQ6jwVplLvVbWx0pjXZcqvCKWOP5yFTuTtZ+q5Gcr3RehurqLm33pfCubz0nv5AWa4eh1hPkjWjljeb9B6B60K+j/mZHDjYNLNpWAb4mtTh6mUVbA/G/UrDtuDJ4CtoFAolX4Yfojt4tWXtLQIfiVrSA2b4BvnKs6Ib0U2CW7Y9MJHlaiVoSVJOA81NFmB3qrdw/QcMqJdbwMSYote5pStYKKA== 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=Am2+ZqEz5kec1nun4onsXAoaqktGK9YMK/IbZcZPum8=; b=gGtAt6R9Ii5X/eub7lcocA0JacUXO4ipGQ844cNSOZtqZN5sW357Tvsc7YIfk9ZnfcZCwcHh1YFspExjdMDvPDztz715WOiGDpo2FzUUNQ+I0p/Ji7cKYDso0nxBaNHFn+Vphpq/iuWzkuNLz8O2nqWh2HTOgBy5s9kXgareZ/OYZrMaMU5ZHOhArTEpCagvf1SEL/i/8wG0P60Ah4BGp6VyW5Y37NLh1R8AhbBsm+2zIyd3h6+r2Fp42BMoFHuh/AesZEL6fRu3yDRoIUJb+dEY3hYro5K2zOq+RArAZ2t+uNHUdLb2kdZP/263wv1V2DDTboY1MRsW62wvgtKetw== 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=Am2+ZqEz5kec1nun4onsXAoaqktGK9YMK/IbZcZPum8=; b=q5mJbfPGg/CCm1dyrpyFeHktQttdbemZuJb3qfjwaNjbfxjObp7bIoBfJst3SbWzj+WWJ8kyhW51ad46/t4HD54oYHfFvHbMebnDFVO32WirAUwObwZFMhUy9m3P19AAY3A9cR9uwT55cU+40uMJqIw1GrZZFp3aferpJ4G7YeMwdXbkXO0lFqChw5KbkcgKx3bA59Bb6NSVg2ihBaqEeo4L2hsNFxpHmz3KC5ynySnJQj3+GRZdQQ9ckCF/Cn/nN7vWiiHC7bIMrsxhveTNW/Hs2GB/V6DKiDXipousW79QH5o0fXemQyQzcWqp1Cloqgs3POIKRZeoEznTcezIsg== Received: from AM6P191CA0080.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:8a::21) by PR3PR07MB8097.eurprd07.prod.outlook.com (2603:10a6:102:170::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8445.19; Wed, 19 Feb 2025 13:43:36 +0000 Received: from AM4PEPF00027A6A.eurprd04.prod.outlook.com (2603:10a6:209:8a:cafe::c5) by AM6P191CA0080.outlook.office365.com (2603:10a6:209:8a::21) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8466.15 via Frontend Transport; Wed, 19 Feb 2025 13:43:36 +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 AM4PEPF00027A6A.mail.protection.outlook.com (10.167.16.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8466.11 via Frontend Transport; Wed, 19 Feb 2025 13:43:36 +0000 Received: from seliiuvd00917.seli.gic.ericsson.se (153.88.142.248) by smtp-central.internal.ericsson.com (100.87.178.62) with Microsoft SMTP Server id 15.2.1544.14; Wed, 19 Feb 2025 14:43:35 +0100 From: Luka Jankovic To: CC: , , , Subject: [RFC v7 4/4] eventdev: documentation for atomic queue and atomic atq tests Date: Wed, 19 Feb 2025 14:43:25 +0100 Message-ID: <20250219134325.1195531-5-luka.jankovic@ericsson.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20250219134325.1195531-1-luka.jankovic@ericsson.com> References: <20250124095937.1436673-1-luka.jankovic@ericsson.com> <20250219134325.1195531-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: AM4PEPF00027A6A:EE_|PR3PR07MB8097:EE_ X-MS-Office365-Filtering-Correlation-Id: 405fa057-68b0-4a0b-1f61-08dd50eb68c7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|36860700013|82310400026|1800799024|13003099007; X-Microsoft-Antispam-Message-Info: =?utf-8?B?K3F3cnpBY3kvcC9iYi94dDVtTHdxa095SWU0UHVXVm9oV085SThhU0l2c0ZI?= =?utf-8?B?V2l4WVphVEhTbmZ3K3hlUnJVYjMrK2IvN2RxNFVuR0xhd1RwbndvU1VuWG5q?= =?utf-8?B?MmRQSWtqWUpFRTFWSVZqSWNMcTRpc1pFZFV3d24wRlI1NjBFSTBTd09GaEZD?= =?utf-8?B?MUtLeTBwOEpoYW5TK2JWeEJkNkREMVdlV0lMbVIyUTVBNC9ZUjBYL0lXYmRM?= =?utf-8?B?UGV4MjI1eFFLcVEzWnpHNi9EZGF3SGNrR0psSmN0aWR2dHFGcHZMVzZORjNZ?= =?utf-8?B?UXhXMElGdFZrWnBlbzdBQjZWOFdWV0hwN3VUTkxnd2tOYTA5bk51WFdnMzdT?= =?utf-8?B?SzU4K0FIbFhINkVNTm05VXh4TzJxVDd0Q3UvRFp3M3ZaeTg1QTRwNUtPOGxR?= =?utf-8?B?dE5OSXFBcEFOdld3RFlRZGdiOTFqRHhTcUZMTEgxT3BJWFNmOEJMQjdSUkRY?= =?utf-8?B?TjBiWGEralNrMkJ3SGw4RmtlOVBxeHVhZGw3Uk1JbnRsY0RhNjhEalkySkRa?= =?utf-8?B?OFc3OHprazBWYWhuWWc1blQ4d3BWdFZkaWFJYVdjSmhMVVliSVdaOHJrandW?= =?utf-8?B?K21kT3YwYVRBUW0yNFZDNUd4UXNwM3hpaStCTkExSksvY2tORlpJYWNsT0p6?= =?utf-8?B?aVY5YmQzQVZORDJnRmpOUE82VTU3a3FFeVM0dmF5NHRReVEzQTRVUzZXT3NJ?= =?utf-8?B?dTdZKy9xS2E2M2xYWmdSSXVBeHkvZkMyWUpsdWpTeXFTcWdWVFgyVTRzeXlk?= =?utf-8?B?N21yZG1q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DRJMDlR?= =?utf-8?B?Y05SMVZvWjRhWXhwbFBlY3A1ZFpVRnlLMVZoUHBHOHp3aUs1UUkzZlVYQkY5?= =?utf-8?B?YnFja0tyWHhwUnBhbTBPdlBnZzNLbjFackJYWFF6RjlPN054R01pTnliOEpW?= =?utf-8?B?akNMVXR3ZjF5M1UzYlBRRGxSKzJWR0FaNHpoN0gyZUdsbk1LeVNrOU1FZ0oy?= =?utf-8?B?dXJRMXJPSHlTa3RXbEV1N2RNZ1Y4ZEdyQ0pub1IwUktHa1hLQ1YrWFJldVlQ?= =?utf-8?Q?HBCrOZidr6QoJ6avqGZLNdib1CsdP1oD?= 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)(376014)(36860700013)(82310400026)(1800799024)(13003099007); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Feb 2025 13:43:36.1424 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 405fa057-68b0-4a0b-1f61-08dd50eb68c7 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: AM4PEPF00027A6A.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR07MB8097 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 and figures to the tools/testeventdev page. Signed-off-by: Luka Jankovic --- .../tools/img/eventdev_atomic_atq_test.svg | 1588 +++++++++++++++ .../tools/img/eventdev_atomic_queue_test.svg | 1701 +++++++++++++++++ doc/guides/tools/testeventdev.rst | 155 ++ 3 files changed, 3444 insertions(+) create mode 100644 doc/guides/tools/img/eventdev_atomic_atq_test.svg create mode 100644 doc/guides/tools/img/eventdev_atomic_queue_test.svg diff --git a/doc/guides/tools/img/eventdev_atomic_atq_test.svg b/doc/guides/tools/img/eventdev_atomic_atq_test.svg new file mode 100644 index 0000000000..0459d9f649 --- /dev/null +++ b/doc/guides/tools/img/eventdev_atomic_atq_test.svg @@ -0,0 +1,1588 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + test: atomic_atq(all types queue) +   + + + + + + + + + producer_flow_seq + + producer maintains per flow sequence number + + + flow 0 + + flow 1 + flow 2 + + flow n + + + + producer0 + all_types_queue0 + 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 + + + + + + + + + + + + + + + + + + dequeue_atomic_flow, lock(step 2) + enqueue atomic flow(step 1) + + produce atomic flows(step 0) + unlock and enqueue(step 3) + dequeue_atomic_flow, lock (step 4) + + + + + unlock(step 5) + + + 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..424e51ab28 100644 --- a/doc/guides/tools/testeventdev.rst +++ b/doc/guides/tools/testeventdev.rst @@ -55,6 +55,8 @@ The following are the application command-line options: order_queue order_atq + atomic_queue + atomic_atq perf_queue perf_atq pipeline_atq @@ -326,6 +328,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.* + + atomic 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 ~~~~~~~~~~~~~~ @@ -389,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