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 B5625A0C43; Sat, 23 Oct 2021 01:34:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 322B341125; Sat, 23 Oct 2021 01:33:55 +0200 (CEST) Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) by mails.dpdk.org (Postfix) with ESMTP id B0EB44113D for ; Sat, 23 Oct 2021 01:33:53 +0200 (CEST) Received: by mail-lj1-f172.google.com with SMTP id 145so364659ljj.1 for ; Fri, 22 Oct 2021 16:33:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rVUjZ9eUMOagBJzF2RvAejtPDt/rCUh9V2/rgFfYt6c=; b=e5t+OjuVwJNGtP+/vPuUYDGNNAXnBrVMfg0UazPFzq9/5fgDelVDzDl7XwxxEr3S64 ub2glsbXzTYdRKkB4dZYtqY7Xs05hhaPBdw0GQnAifhqCLF+9BZOwVxoolOf+saAGHtr HewVwOaMyoK8Hz3eayTwJWBxJhILKCTlHFk6x8yUbWX9pomc2wAOl9d47SGRlJoemLVD sAmoelte1wwaEXfKVx+luiq8gWM+42Hgrwpepav8R3LicgIG2L+h4qrL3PFxxwIxbUbP 5XT3ClsJZL9LuhcZKZdz719DAoy5gmkvvLjiJ00PzJ7MhPxID/oh9u/oCjDhE6EhiCDI LekQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rVUjZ9eUMOagBJzF2RvAejtPDt/rCUh9V2/rgFfYt6c=; b=zQFAn4Ojo5VG1gf+fxN1HWwu3VO6Lqpa7Gp1//d6sXbAFL5JO8cUdAluEUWYtQ8Fq+ E7GmVkb3aQCfjxeZ+W3QCJmO36YLNI3n5UbEmFW/S9w2CHaso9w+mUdw7hu75RUEn66S t3IkS4dgHVCXYGY9UeDEayTfLTARvUYU8IY//bXUWhaEe+eNgENMHtdovxi4UfqTEhu3 9Qey3qvcqcvV+C23u9gvU9PXVrVdWHUIr5b5b+rfxWTdN+ZQcAL7roBgJrLmF9yVn4t2 h9qSXjQRzU48QgsaIkqiRHkFf8rf83oSNmbb5qhURPJ0AzOFB1Kgk0zwiql9UzbOJg6l 17kA== X-Gm-Message-State: AOAM533l6Px9qn39YF1nmZcyk3ruuhfKi2Q9MaM1fEX6RcnLfflovial 1+4u5Zb+qazTnsLzVuebyJ8= X-Google-Smtp-Source: ABdhPJyxIax2nH7iVaXW6aUQtRI3TzZs75TrxZNjqwLvlQGGXDS/nKRITo6ceRmcm7QSXgbJN4sy0A== X-Received: by 2002:a2e:8786:: with SMTP id n6mr2962235lji.331.1634945633348; Fri, 22 Oct 2021 16:33:53 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id br11sm584383lfb.212.2021.10.22.16.33.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Oct 2021 16:33:53 -0700 (PDT) Date: Sat, 23 Oct 2021 02:33:52 +0300 From: Dmitry Kozlyuk To: Harman Kalra , Cc: , Anatoly Burakov , , Message-ID: <20211023023352.74a9f088@sovereign> In-Reply-To: <20211022204934.132186-6-hkalra@marvell.com> References: <20210826145726.102081-1-hkalra@marvell.com> <20211022204934.132186-1-hkalra@marvell.com> <20211022204934.132186-6-hkalra@marvell.com> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v5 5/6] eal/interrupts: make interrupt handle structure opaque 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" 2021-10-23 02:19 (UTC+0530), Harman Kalra: > Moving interrupt handle structure definition inside the c file > to make its fields totally opaque to the outside world. > > Dynamically allocating the efds and elist array os intr_handle > structure, based on size provided by user. Eg size can be > MSIX interrupts supported by a PCI device. > > Signed-off-by: Harman Kalra > --- > drivers/bus/pci/linux/pci_vfio.c | 7 + > lib/eal/common/eal_common_interrupts.c | 190 +++++++++++++++++++++++-- > lib/eal/include/meson.build | 1 - > lib/eal/include/rte_eal_interrupts.h | 72 ---------- > lib/eal/include/rte_interrupts.h | 22 ++- > 5 files changed, 209 insertions(+), 83 deletions(-) > delete mode 100644 lib/eal/include/rte_eal_interrupts.h > diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c > [...] > diff --git a/lib/eal/include/rte_interrupts.h b/lib/eal/include/rte_interrupts.h > index a29232e16a..fc6b2d1210 100644 > --- a/lib/eal/include/rte_interrupts.h > +++ b/lib/eal/include/rte_interrupts.h > @@ -33,7 +33,27 @@ struct rte_intr_handle; > /** Interrupt instance could be shared within primary secondary process. */ > #define RTE_INTR_INSTANCE_F_SHARED 0x00000002 > > -#include "rte_eal_interrupts.h" > +#define RTE_MAX_RXTX_INTR_VEC_ID 512 > +#define RTE_INTR_VEC_ZERO_OFFSET 0 > +#define RTE_INTR_VEC_RXTX_OFFSET 1 > + > +/** > + * The interrupt source type, e.g. UIO, VFIO, ALARM etc. > + */ > +enum rte_intr_handle_type { > + RTE_INTR_HANDLE_UNKNOWN = 0, /**< generic unknown handle */ > + RTE_INTR_HANDLE_UIO, /**< uio device handle */ > + RTE_INTR_HANDLE_UIO_INTX, /**< uio generic handle */ > + RTE_INTR_HANDLE_VFIO_LEGACY, /**< vfio device handle (legacy) */ > + RTE_INTR_HANDLE_VFIO_MSI, /**< vfio device handle (MSI) */ > + RTE_INTR_HANDLE_VFIO_MSIX, /**< vfio device handle (MSIX) */ > + RTE_INTR_HANDLE_ALARM, /**< alarm handle */ > + RTE_INTR_HANDLE_EXT, /**< external handler */ > + RTE_INTR_HANDLE_VDEV, /**< virtual device */ > + RTE_INTR_HANDLE_DEV_EVENT, /**< device event handle */ > + RTE_INTR_HANDLE_VFIO_REQ, /**< VFIO request handle */ > + RTE_INTR_HANDLE_MAX /**< count of elements */ Wasn't this member going to be removed since v1? Ray, do you agree? MAX enum members have been scheduled for removal long ago. This one even seems unlikely to be used as array size and break anything. > +}; > > /** Function to be registered for the specific interrupt */ > typedef void (*rte_intr_callback_fn)(void *cb_arg);