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 AD9D045A9F; Thu, 3 Oct 2024 13:25:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F5D44060B; Thu, 3 Oct 2024 13:25:32 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 1860D402F1 for ; Thu, 3 Oct 2024 13:25:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1727954730; 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: in-reply-to:in-reply-to:references:references; bh=PQg2ChJLTKqNZuDz6v6xrbtbJmiFVLk2A6pxNE6vBQk=; b=i2BSpP0dD9N2AFyTBiKfzOlI4rKiQHiq/PutjgBS4AMV3p8ibuZk7l6pxLXeVBzuOXv9DD f1yiPgB2xxUA+EdqSPfivyd4nAcEef62PcZznUa8Glz3beWRm+dwKC7RAsr/H5OqTfqSJM Y+kyc/ctfqmzltwz0IdmCR4/29mC2mQ= Received: from mx-prod-mc-03.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-692-hb6LI4DcOs-15A897RH6xA-1; Thu, 03 Oct 2024 07:25:24 -0400 X-MC-Unique: hb6LI4DcOs-15A897RH6xA-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8F61719560BD; Thu, 3 Oct 2024 11:25:23 +0000 (UTC) Received: from ringo.redhat.com (unknown [10.39.208.13]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8B9B91955F68; Thu, 3 Oct 2024 11:25:21 +0000 (UTC) From: Robin Jarry To: dev@dpdk.org Cc: david.marchand@redhat.com, bruce.richardson@intel.com, ktraynor@redhat.com Subject: [PATCH dpdk v2 0/2] Fix race in ethdev telemetry Date: Thu, 3 Oct 2024 13:24:40 +0200 Message-ID: <20241003112438.902397-5-rjarry@redhat.com> In-Reply-To: <20241002155709.2522273-1-david.marchand@redhat.com> References: <20241002155709.2522273-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 Following a discussion we had during the summit, here is one series to fix a race between an application thread and the telemetry thread handling requests on ethdev ports. The problem may be generic to other device classes providing telemetry callbacks, but for now, this series goes with a simple and naive approach of putting locks in the ethdev layer. v2: added new telemetry api to register callbacks with a private arg. Robin Jarry (2): telemetry: add api to register command with private argument ethdev: fix potential race in telemetry endpoints lib/ethdev/rte_ethdev_telemetry.c | 66 ++++++++++++++++++++++--------- lib/telemetry/rte_telemetry.h | 46 +++++++++++++++++++++ lib/telemetry/telemetry.c | 38 ++++++++++++++---- lib/telemetry/version.map | 3 ++ 4 files changed, 126 insertions(+), 27 deletions(-) -- 2.46.2