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 073F8A0C4C; Mon, 25 Oct 2021 15:38:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E1A7340E32; Mon, 25 Oct 2021 15:38:50 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id D38F14003E for ; Mon, 25 Oct 2021 15:38:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635169128; 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=l/pjLQ0meWa4fzkajPrmca6WL3bXQtoKywPdwLQNgv0=; b=Olb8jQq6Ea8zQG+qbvXy3oIukULaB5J13TfyRvOLheFlNgmbOvfyLlc2hKygVXWzW9WXDx /Mxorzfvyh2GSX2k6n3SmXGH+mmz1GJowLsYgbDhPxk+z58jnoP0NmR+esLxMchrB7d/Ee DUJqTWMRy7lZN3pbhJJDEA/D/XbiUoU= 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-519-FIcF_43_OF20ixKO6zpiCw-1; Mon, 25 Oct 2021 09:38:46 -0400 X-MC-Unique: FIcF_43_OF20ixKO6zpiCw-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 688AC1858EBA; Mon, 25 Oct 2021 13:38:45 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.192.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id D19EB5DF21; Mon, 25 Oct 2021 13:38:43 +0000 (UTC) From: David Marchand To: hkalra@marvell.com, dev@dpdk.org Cc: dmitry.kozliuk@gmail.com, rasland@nvidia.com, thomas@monjalon.net Date: Mon, 25 Oct 2021 15:34:54 +0200 Message-Id: <20211025133456.26850-9-david.marchand@redhat.com> In-Reply-To: <20211025133456.26850-1-david.marchand@redhat.com> References: <20211022204934.132186-1-hkalra@marvell.com> <20211025133456.26850-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 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Subject: [dpdk-dev] [PATCH v7 8/9] interrupts: rename device specific file descriptor 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 Sender: "dev" From: Harman Kalra VFIO/UIO are mutually exclusive, storing file descriptor in a single field is enough. Signed-off-by: Harman Kalra Signed-off-by: David Marchand --- Changes since v5: - split from patch5, --- lib/eal/common/eal_common_interrupts.c | 6 +++--- lib/eal/common/eal_interrupts.h | 8 +------- lib/eal/include/rte_eal_trace.h | 8 ++++---- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/lib/eal/common/eal_common_interrupts.c b/lib/eal/common/eal_common_interrupts.c index 1337c560e4..3285c4335f 100644 --- a/lib/eal/common/eal_common_interrupts.c +++ b/lib/eal/common/eal_common_interrupts.c @@ -72,7 +72,7 @@ struct rte_intr_handle *rte_intr_instance_dup(const struct rte_intr_handle *src) intr_handle = rte_intr_instance_alloc(src->alloc_flags); intr_handle->fd = src->fd; - intr_handle->vfio_dev_fd = src->vfio_dev_fd; + intr_handle->dev_fd = src->dev_fd; intr_handle->type = src->type; intr_handle->max_intr = src->max_intr; intr_handle->nb_efd = src->nb_efd; @@ -139,7 +139,7 @@ int rte_intr_dev_fd_set(struct rte_intr_handle *intr_handle, int fd) { CHECK_VALID_INTR_HANDLE(intr_handle); - intr_handle->vfio_dev_fd = fd; + intr_handle->dev_fd = fd; return 0; fail: @@ -150,7 +150,7 @@ int rte_intr_dev_fd_get(const struct rte_intr_handle *intr_handle) { CHECK_VALID_INTR_HANDLE(intr_handle); - return intr_handle->vfio_dev_fd; + return intr_handle->dev_fd; fail: return -1; } diff --git a/lib/eal/common/eal_interrupts.h b/lib/eal/common/eal_interrupts.h index beacc04b62..1a4e5573b2 100644 --- a/lib/eal/common/eal_interrupts.h +++ b/lib/eal/common/eal_interrupts.h @@ -9,13 +9,7 @@ struct rte_intr_handle { RTE_STD_C11 union { struct { - RTE_STD_C11 - union { - /** VFIO device file descriptor */ - int vfio_dev_fd; - /** UIO cfg file desc for uio_pci_generic */ - int uio_cfg_fd; - }; + int dev_fd; /**< VFIO/UIO cfg device file descriptor */ int fd; /**< interrupt event file descriptor */ }; void *windows_handle; /**< device driver handle */ diff --git a/lib/eal/include/rte_eal_trace.h b/lib/eal/include/rte_eal_trace.h index af7b2d0bf0..5ef4398230 100644 --- a/lib/eal/include/rte_eal_trace.h +++ b/lib/eal/include/rte_eal_trace.h @@ -151,7 +151,7 @@ RTE_TRACE_POINT( RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, rte_intr_callback_fn cb, void *cb_arg, int rc), rte_trace_point_emit_int(rc); - rte_trace_point_emit_int(handle->vfio_dev_fd); + rte_trace_point_emit_int(handle->dev_fd); rte_trace_point_emit_int(handle->fd); rte_trace_point_emit_int(handle->type); rte_trace_point_emit_u32(handle->max_intr); @@ -164,7 +164,7 @@ RTE_TRACE_POINT( RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, rte_intr_callback_fn cb, void *cb_arg, int rc), rte_trace_point_emit_int(rc); - rte_trace_point_emit_int(handle->vfio_dev_fd); + rte_trace_point_emit_int(handle->dev_fd); rte_trace_point_emit_int(handle->fd); rte_trace_point_emit_int(handle->type); rte_trace_point_emit_u32(handle->max_intr); @@ -176,7 +176,7 @@ RTE_TRACE_POINT( rte_eal_trace_intr_enable, RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, int rc), rte_trace_point_emit_int(rc); - rte_trace_point_emit_int(handle->vfio_dev_fd); + rte_trace_point_emit_int(handle->dev_fd); rte_trace_point_emit_int(handle->fd); rte_trace_point_emit_int(handle->type); rte_trace_point_emit_u32(handle->max_intr); @@ -186,7 +186,7 @@ RTE_TRACE_POINT( rte_eal_trace_intr_disable, RTE_TRACE_POINT_ARGS(const struct rte_intr_handle *handle, int rc), rte_trace_point_emit_int(rc); - rte_trace_point_emit_int(handle->vfio_dev_fd); + rte_trace_point_emit_int(handle->dev_fd); rte_trace_point_emit_int(handle->fd); rte_trace_point_emit_int(handle->type); rte_trace_point_emit_u32(handle->max_intr); -- 2.23.0