From patchwork Thu Sep 17 11:28:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Marchand X-Patchwork-Id: 78045 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8693AA04AF; Thu, 17 Sep 2020 13:29:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 111981D634; Thu, 17 Sep 2020 13:29:12 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id 7601F1D630 for ; Thu, 17 Sep 2020 13:29:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600342148; 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=iD7JlRKQcGgxWVv1elNX0ygp3o0NtVnuz01RZGYrQBo=; b=HcVID6TIo46QwsjEeuiQXozFVjrtKf8idz6LK7R/4W7fSAkFOmnYf7jAI/l2Ezgfq+BIJr JdMW+RTOcnC9JxL+WcTUURpFaCztqwjxM8Mguj17RMEOC95dK7gMBh7T7m4aDOV+dHpI7M qAekmP7VjalTzG6U1csB+6diVqNngN8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-59-dlAvAeSjP1K46_ArRJcbhw-1; Thu, 17 Sep 2020 07:29:06 -0400 X-MC-Unique: dlAvAeSjP1K46_ArRJcbhw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6FD251008550; Thu, 17 Sep 2020 11:29:04 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.193.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id 075395DA30; Thu, 17 Sep 2020 11:29:01 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: arybchenko@solarflare.com, Ray Kinsella , Neil Horman , John McNamara , Marko Kovacevic , Jianfeng Tan , Jeff Guo Date: Thu, 17 Sep 2020 13:28:22 +0200 Message-Id: <20200917112823.10534-6-david.marchand@redhat.com> In-Reply-To: <20200917112823.10534-1-david.marchand@redhat.com> References: <20200914081727.12215-1-david.marchand@redhat.com> <20200917112823.10534-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [dpdk-dev] [PATCH v3 5/6] eal: hide internal device event structure X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This structure is not used in the public API. Fixes: a753e53d517b ("eal: add device event monitor framework") Signed-off-by: David Marchand Acked-by: Jeff Guo Acked-by: Ray Kinsella --- doc/guides/rel_notes/deprecation.rst | 3 --- doc/guides/rel_notes/release_20_11.rst | 3 +++ lib/librte_eal/include/rte_dev.h | 6 ------ lib/librte_eal/linux/eal_dev.c | 6 ++++++ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 8fca461045..3669d6533b 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -70,9 +70,6 @@ Deprecation Notices * eal: The function ``rte_eal_remote_launch`` will return new error codes after read or write error on the pipe, instead of calling ``rte_panic``. -* eal: The ``rte_dev_event`` structure will be made private to the EAL as no - public API makes use of it. - * rte_atomicNN_xxx: These APIs do not take memory order parameter. This does not allow for writing optimized code for all the CPU architectures supported in DPDK. DPDK will adopt C11 atomic operations semantics and provide wrappers diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst index 185eeae731..e87509dfa7 100644 --- a/doc/guides/rel_notes/release_20_11.rst +++ b/doc/guides/rel_notes/release_20_11.rst @@ -87,6 +87,9 @@ API Changes * eal: The ``rte_logs`` struct and global symbol was made private and is no longer part of the API. +* eal: Made the ``rte_dev_event`` structure private to the EAL as no public API + used it. + * pci: Removed the ``rte_kernel_driver`` enum defined in rte_dev.h and replaced with a private enum in the PCI subsystem. diff --git a/lib/librte_eal/include/rte_dev.h b/lib/librte_eal/include/rte_dev.h index 53c8bc6fab..81905b3ae3 100644 --- a/lib/librte_eal/include/rte_dev.h +++ b/lib/librte_eal/include/rte_dev.h @@ -33,12 +33,6 @@ enum rte_dev_event_type { RTE_DEV_EVENT_MAX /**< max value of this enum */ }; -struct rte_dev_event { - enum rte_dev_event_type type; /**< device event type */ - int subsystem; /**< subsystem id */ - char *devname; /**< device name */ -}; - typedef void (*rte_dev_event_cb_fn)(const char *device_name, enum rte_dev_event_type event, void *cb_arg); diff --git a/lib/librte_eal/linux/eal_dev.c b/lib/librte_eal/linux/eal_dev.c index 83b6068264..2e15762b56 100644 --- a/lib/librte_eal/linux/eal_dev.c +++ b/lib/librte_eal/linux/eal_dev.c @@ -133,6 +133,12 @@ dev_uev_socket_fd_create(void) return ret; } +struct rte_dev_event { + enum rte_dev_event_type type; /**< device event type */ + int subsystem; /**< subsystem id */ + char *devname; /**< device name */ +}; + static int dev_uev_parse(const char *buf, struct rte_dev_event *event, int length) {