From patchwork Wed Apr 1 11:57:20 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eelco Chaudron X-Patchwork-Id: 2218543 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=F6baeIll; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4fm3Qb2GXnz1yFv for ; Wed, 01 Apr 2026 22:57:59 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id EFD4D408BA; Wed, 1 Apr 2026 11:57:56 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id Qa_jdgMjb92D; Wed, 1 Apr 2026 11:57:56 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 0A8DB40087 Authentication-Results: smtp2.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=F6baeIll Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id 0A8DB40087; Wed, 1 Apr 2026 11:57:56 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id EFDF7C0070; Wed, 1 Apr 2026 11:57:55 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5A1BAC003D for ; Wed, 1 Apr 2026 11:57:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 460A14089B for ; Wed, 1 Apr 2026 11:57:54 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id SO7NFOwtJ7da for ; Wed, 1 Apr 2026 11:57:53 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=echaudro@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 3BA334089A Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 3BA334089A Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 3BA334089A for ; Wed, 1 Apr 2026 11:57:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775044671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8AOF4X0BgZsjD/pafNZp44R+phAjfdwbh21OgUcxw+A=; b=F6baeIllSFgXTvyFrdvzYRGW651G3U37Wcb5FM9k9ZTZIk4oITtqqpy80tM/MIo6fYo7vi c3u801EGxq5a0aTnWROS2HFe9I6mq8jji5dys/KyJdbrUjUEOFBhqSQznyJoxLcpacF57z kQX9k6iHo+NF4WCm6yw45hWEhGTBZVI= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-53-7eBTgd10PbGe3ppEn2Ncow-1; Wed, 01 Apr 2026 07:57:47 -0400 X-MC-Unique: 7eBTgd10PbGe3ppEn2Ncow-1 X-Mimecast-MFC-AGG-ID: 7eBTgd10PbGe3ppEn2Ncow_1775044666 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A1DA419560B9; Wed, 1 Apr 2026 11:57:46 +0000 (UTC) Received: from ebuild.chome (unknown [10.44.50.103]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 292A01954102; Wed, 1 Apr 2026 11:57:44 +0000 (UTC) To: dev@openvswitch.org Date: Wed, 1 Apr 2026 13:57:20 +0200 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: T2l1ovYOsd9XoJ5cN6tTuGxxxOQNQIrKrm7CIu8NH7U_1775044666 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH v2 0/2] dpif-offload: Add PMD thread helpers and hardware offload simulation X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Eelco Chaudron via dev From: Eelco Chaudron Reply-To: Eelco Chaudron Cc: elibr@nvidia.com, i.maximets@ovn.org Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" This series adds infrastructure for hardware offload providers to register callbacks that execute as part of PMD thread processing, and uses this infrastructure to implement simulated hardware offload in the dummy offload provider. Patch 1 adds the PMD thread lifecycle hooks that allow offload providers to initialize per-PMD contexts, register work callbacks that run in each PMD iteration, and properly clean up on thread exit. Cycle statistics are integrated into the existing PMD performance metrics. Patch 2 leverages this infrastructure for the full hardware offload simulation in the dummy provider. Note that the second patch in the series depends on another patch currently on the mailing list: https://patchwork.ozlabs.org/project/openvswitch/list/?series=498322 Eelco Chaudron (2): dpif-offload: Add infrastructure for offload provider PMD helpers. dummy-offload: Use pmd_thread_lifecycle APIs for HW simulator. lib/dpif-netdev-perf.c | 19 ++++- lib/dpif-netdev-perf.h | 3 +- lib/dpif-netdev.c | 42 ++++++++++- lib/dpif-offload-dummy.c | 44 +++++++++-- lib/dpif-offload-provider.h | 26 +++++++ lib/dpif-offload.c | 133 ++++++++++++++++++++++++++++++++++ lib/dpif-offload.h | 11 +++ lib/dummy.h | 1 - lib/netdev-dummy.c | 1 - tests/pmd.at | 32 ++++++++ utilities/checkpatch_dict.txt | 2 + 11 files changed, 298 insertions(+), 16 deletions(-)