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 54C5845B3B; Mon, 14 Oct 2024 21:32:46 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D7415402C3; Mon, 14 Oct 2024 21:32:45 +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 D1DEE4026C for ; Mon, 14 Oct 2024 21:32:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728934364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rk+F6y1XmQEix9CW76ZoJDbkZ6X2HWT+UwKWjmeHiHo=; b=IU4tw5AN7jx1HxCVfVvI37cENMlLxJ9at3EXX2FhTjQZRNqrAwgraeI3KKN061UnwjDjLV tvdc13ibZYSgsz+BbmUjyaqTImVaxpXHIPSmJevK3UQq557fhjlw7YHaizjUGz25JwSsMO 5sUWhR36VpFnaS62rmknKvxL/WyQ41k= 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-464-VlCtA_w-PjqTz8fL2pinpA-1; Mon, 14 Oct 2024 15:32:42 -0400 X-MC-Unique: VlCtA_w-PjqTz8fL2pinpA-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (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 A0CD11955F40 for ; Mon, 14 Oct 2024 19:32:41 +0000 (UTC) Received: from ringo.home (unknown [10.39.208.8]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 59F111956089; Mon, 14 Oct 2024 19:32:39 +0000 (UTC) From: Robin Jarry To: dev@dpdk.org Subject: [PATCH dpdk v3 0/2] Fix race in ethdev telemetry Date: Mon, 14 Oct 2024 21:32:35 +0200 Message-ID: <20241014193237.1992382-1-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.15 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. v3: reordered callback arguments. 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 doc/guides/rel_notes/release_24_11.rst | 5 ++ lib/ethdev/rte_ethdev_telemetry.c | 66 ++++++++++++++++++-------- lib/telemetry/rte_telemetry.h | 46 ++++++++++++++++++ lib/telemetry/telemetry.c | 38 +++++++++++---- lib/telemetry/version.map | 3 ++ 5 files changed, 131 insertions(+), 27 deletions(-) -- 2.46.2