From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 82CA82BE3 for ; Mon, 1 Oct 2018 11:47:20 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us4.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 26B4180005E; Mon, 1 Oct 2018 09:47:19 +0000 (UTC) Received: from [192.168.38.17] (91.220.146.112) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 1 Oct 2018 10:47:05 +0100 To: Jeff Guo , , , , , , , , , , , , , , CC: , , , References: <1534503091-31910-1-git-send-email-jia.guo@intel.com> <1538316988-128382-1-git-send-email-jia.guo@intel.com> <1538316988-128382-4-git-send-email-jia.guo@intel.com> From: Andrew Rybchenko Message-ID: <522cf78b-c2f2-42b8-3b92-e7415b486846@solarflare.com> Date: Mon, 1 Oct 2018 12:46:23 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <1538316988-128382-4-git-send-email-jia.guo@intel.com> Content-Language: en-GB X-Originating-IP: [91.220.146.112] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24128.003 X-TM-AS-Result: No-13.843000-8.000000-10 X-TMASE-MatchedRID: y/2oPz6gbvh6DVqDv3PkvSa1MaKuob8PC/ExpXrHizxaW2Ktn+I8/k1e BpiBy1kn/VuBejcr7X535tqpDepSp1hdPEiZHlm8JmbrB1j4Xwp8s8pjIsOUB99RlPzeVuQQQmZ 9+1UBYL1pKrcWmL2xBc4upQc4xGVC0H/zLeBgX28dxBAG5/hkW7OLGEexUnnyB4sIhfTjqIFKsl M7VUaEwXb4Bm7FqQnLz1+7FJCqpLLIDWKFjjZHby+PrAd8gbHJCFEIkVv1y6ykRqXjll9sCLDqO sTjp5Erzh9/JTWzqExcSNmWV/ZuF99faxl/I4mhngIgpj8eDcC063Wh9WVqgtQdB5NUNSsi1GcR AJRT6PP+Te8vUAQJT7QCZL1IhpXfNNelmmJ2JjvsARLSLO5dg5TD8qcjGn6QIZ8pNHET62dDccT BqRPvHR2Z6UHfXirzc0ddWWZ56vOz353OmNpikw== X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--13.843000-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24128.003 X-MDID: 1538387240-4Y-diozSSe7j Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v2 3/4] pci: add req handler field to generic pci device 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: , X-List-Received-Date: Mon, 01 Oct 2018 09:47:20 -0000 On 9/30/18 5:16 PM, Jeff Guo wrote: > There are some extended interrupt types in vfio pci device except from the > existing interrupts, such as err and req notifier, they could be useful for > device error monitoring. And these corresponding interrupt handler is > different from the other interrupt handler that register in PMDs, so a new > interrupt handler should be added. This patch will add specific req handler > in generic pci device. > > Signed-off-by: Jeff Guo > --- > v2->v1: > no change > --- > drivers/bus/pci/rte_bus_pci.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/bus/pci/rte_bus_pci.h b/drivers/bus/pci/rte_bus_pci.h > index 0d1955f..c45a820 100644 > --- a/drivers/bus/pci/rte_bus_pci.h > +++ b/drivers/bus/pci/rte_bus_pci.h > @@ -66,6 +66,7 @@ struct rte_pci_device { > uint16_t max_vfs; /**< sriov enable if not zero */ > enum rte_kernel_driver kdrv; /**< Kernel driver passthrough */ > char name[PCI_PRI_STR_SIZE+1]; /**< PCI location (ASCII) */ > + struct rte_intr_handle req_notifier_handler;/**< Req notifier handle */ It is uninitialized now everywhere the structure is used. In the best case it is initialized with zeros (if the structure is memset or partly initialized on declaration) and zero FD is a valid file descriptor. Is it OK? > }; > > /**