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 C9E20A0C41; Sun, 24 Oct 2021 22:07:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B10A940698; Sun, 24 Oct 2021 22:07:42 +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 60C5640141 for ; Sun, 24 Oct 2021 22:07:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635106060; 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=NFi//23K8sVrBem30cOkFobPxjiAh5h2HRtKPm23CK3z4hRIZVJgmdiZM77v5G/3zYMy9p o9nu5G2lT7WUpw49xOxdjQwfcan40BeTsEVOcztgBgz/tP9sib2XyuHQXTEOjGugiz4ns5 2NILA5jVBOmCpBd7T0vDVtFV1nozmUQ= 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-554-Voq5lJv2PaG7nqVmY_mPBA-1; Sun, 24 Oct 2021 16:07:37 -0400 X-MC-Unique: Voq5lJv2PaG7nqVmY_mPBA-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 4E43E801B00; Sun, 24 Oct 2021 20:07:36 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.192.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id DFE045D9D5; Sun, 24 Oct 2021 20:07:34 +0000 (UTC) From: David Marchand To: hkalra@marvell.com, dev@dpdk.org Cc: dmitry.kozliuk@gmail.com Date: Sun, 24 Oct 2021 22:04:48 +0200 Message-Id: <20211024200449.12024-9-david.marchand@redhat.com> In-Reply-To: <20211024200449.12024-1-david.marchand@redhat.com> References: <20211022204934.132186-1-hkalra@marvell.com> <20211024200449.12024-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 v6 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