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 04E3645FE6; Wed, 15 Jan 2025 14:39:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 878DC402E7; Wed, 15 Jan 2025 14:39:01 +0100 (CET) Received: from PA4PR04CU001.outbound.protection.outlook.com (mail-francecentralazon11013001.outbound.protection.outlook.com [40.107.162.1]) by mails.dpdk.org (Postfix) with ESMTP id C1B43402E5 for ; Wed, 15 Jan 2025 14:38:59 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TgP5e0Cxvd4eFERwt91yfcAapvolCJutNP03D/bM7Q58zQAWWrfsMiOpzFynuIUGaLucCshJDiKrfuAHb03ZP4S0ba92k6zq4nGNGbMacOQm9OQkgc+2c5qWOBtV/spnnPzHiBrf76Zng5nGM0tDX121+RZ3io7yEO8wo1LahUkiRTg0PgOJ9ehv5mA3iSjGwzrEh0QJ0JR/FpTnprq0OkJO6lIQUWaPJ9xEaXBNlEoYvxcnAIQ6l49fPlihdJ3+pl8Kb0FpEDVz0iq0beLPFZbTLtgmrpikRL5AipCJhdsJa4pWwVXQPvcHqIwFDJmKqUaaSYLnDT8FANrZpnHDig== 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=Potqo1K76yhxQTEMLY819XypTneNhJFGGGek9xp3gdw=; b=JmqHfqv15266Dp7vUkmxyM3NKl7FXpub/GlgweKqXYpibJGSTfJrCj66qhckzy9wpIrZNWQgbzQYoPirEHkB6xHVSUKJl5GxqVHOfxYRtZaLUz+rwLhR5LRjIrUpGR3Sq0Qli/q5q3ExVoeVUui6u62k7jKZtEcB1gx581RG6l5YnGIqDx8J4gTtgDIykkjgoSZk/Wq3h9lTt/F9iJ4nV95+ly+aUlPSZ/n7ioa8vUe3p3n4B3+hG0+vbKsxDvkVNiA21NHJrPwO1KTCt3TuMYZO0bcEDXyhCKZjk1jkR7cDNtJb13FSRphwPrZ1C0R6ymCjx14R90hlymbbfiukgA== 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=Potqo1K76yhxQTEMLY819XypTneNhJFGGGek9xp3gdw=; b=fyg6mEATMxdnyLIHYMlAGDszCdxcPY2mYjblxXePyUz8bNud/ZUYP7i+sJZdwVRjneN30ODi4/kLuOgl1e54wu83MoopN3+Qw9+iqtNBC9hJCxplMpsxsKOyWuOh90BrT9TcfiUtX1XrEkQMDsYjdJw7aT+Wyn2yNkl4z+KTMqeljUmThlRzQ7bNKc1qeWOfDRgjUB4yZObajzgFPLJSC2XaK+kMaqWJISaFcERLQgsChGvDjku0mc4tzo7TDDI0QngOiot4DNYqygZDC8CP3ex4rldV5tWBo3OKlMmqK4FadgFRmDonCxurUng3TqJIjOOLVgT9OM69cX7isDYiLw== Received: from DUZPR01CA0093.eurprd01.prod.exchangelabs.com (2603:10a6:10:4bb::21) by AS2PR07MB9231.eurprd07.prod.outlook.com (2603:10a6:20b:5e8::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.12; Wed, 15 Jan 2025 13:38:51 +0000 Received: from DB5PEPF00014B9D.eurprd02.prod.outlook.com (2603:10a6:10:4bb:cafe::20) by DUZPR01CA0093.outlook.office365.com (2603:10a6:10:4bb::21) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8356.13 via Frontend Transport; Wed, 15 Jan 2025 13:38:51 +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 DB5PEPF00014B9D.mail.protection.outlook.com (10.167.8.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.11 via Frontend Transport; Wed, 15 Jan 2025 13:38:51 +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, 15 Jan 2025 14:38:50 +0100 From: Luka Jankovic To: CC: , , Subject: [RFC v5 2/2] eventdev: documentation for atomic queue test Date: Wed, 15 Jan 2025 14:38:44 +0100 Message-ID: <20250115133844.1403623-2-luka.jankovic@ericsson.com> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20250113121733.2384990-1-luka.jankovic@ericsson.com> References: <20250113121733.2384990-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: DB5PEPF00014B9D:EE_|AS2PR07MB9231:EE_ X-MS-Office365-Filtering-Correlation-Id: 437ecf0a-3840-4b83-3dea-08dd3569f262 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: =?utf-8?B?aUMzeXlSZEpxNnI5YzYyek9KRi9zdHVib2VZbXpZSldDcWZtSFdIdVlFQlYv?= =?utf-8?B?UHJmNTZrQkF3WnB5SHV5K2xLMU5EMXpNckxiMVNPWEdyT2FybFlQTDlZUk1m?= =?utf-8?B?REJHY2NGQXl6Z292NUFSTjMrWDA2QytMd3dMcnhPUEx3QWpWZ2tlMXVUbWd0?= =?utf-8?B?VDFDY3g2QlJNUm5UakR6Q2JiSmMwOG1CLzFRWkN4a21TeW1BN3Z2Qy92OVEx?= =?utf-8?B?V2x0Yjc2ODM2WHJFeVN2YkJ2c1JSYVNXTDhjWURzOEJnNkgzcEFqTXh3L0dk?= =?utf-8?B?enN0VEszQk1JUG1Ycy80UENtcnZGWDg1Zlk4Qy9CNVlwQ0FCVzBuVzd6V0U4?= =?utf-8?B?NjdlVFl4Qnp2bEdhMTRMS0N3dzZWbTY4N1V1aWNjQVA2WWVkb3BBeFRpZUUr?= =?utf-8?B?RjFJUldmK2ppSzJFck81cmltbEdrWmkwYzhmc0o1dWtxL3dsTUNLOTBGcCt1?= =?utf-8?B?bExFRjc1QXJ5S282bTl4UDQyT25NTStsNktCRWRPQjUvajNESmsvUlRiYnhu?= =?utf-8?B?S0VwMmMzMlozY0VibjByUFF4V3ZRRDN5d3R0QzNQeDVqd0VCbFVhbUVKN293?= =?utf-8?B?SFl2Q2hhVXQ4dHRTWGdSTUNqT0RHclpqK1M2U21RVUZCdHplVzZOTHdIcVNi?= =?utf-8?B?Y3ZveWd3L1Y3TG01dll4U0EzQ21PU29ZSmJvWEY4RXR3KzFqOG1LWlo1OUtl?= =?utf-8?B?MndlR1dJYmVtVndSdVVqMWRvbGxvRUdPMVVmMkVLN3ZVek1FQVBwdkQzblBB?= =?utf-8?B?VFdWYW1CRjF1UkgwUW5qVkFQMGR6SkRBYmliTmZWYXY1UlkxYXdKVW16Zn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SkpTZTZDOTR4VzlBazd2RHR0eFlO?= =?utf-8?B?V2JydlhDeVR4UHo5emVvM1dINHAwR003NkgvRGlMaWFKY1VuRHNFZlVGY25j?= =?utf-8?B?U01mSHlUUzI3bk9SL0JWZEVsWE1UZzRWQk1VSVhvY2xnbHl3V0tFWnNNQVBQ?= =?utf-8?B?eFFzVzlCU1lNalQ1MzZqa0pFbEsyVytNN0NlT3dVckRuZnFpdlBUZ1RXNW5y?= =?utf-8?Q?Qg8mkqwmVyPk6BXejzRYwUbIhK2rOCo0?= 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)(376014)(82310400026)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jan 2025 13:38:51.0060 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 437ecf0a-3840-4b83-3dea-08dd3569f262 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: DB5PEPF00014B9D.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR07MB9231 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 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..6f9268e320 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 + order_atomic 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