From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Tan, Jianfeng" Subject: Re: [PATCH v3] net/virtio: fix rxq intr config fails using vfio-pci Date: Thu, 9 Nov 2017 12:40:13 +0800 Message-ID: <00e59d6d-7bbb-7875-d736-fbb40154e780@intel.com> References: <20171108110348.38548-1-zhiyong.yang@intel.com> <20171109031818.31040-1-zhiyong.yang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: "yliu@fridaylinux.org" To: "Yang, Zhiyong" , "dev@dpdk.org" Return-path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 4332B1B22C for ; Thu, 9 Nov 2017 05:40:17 +0100 (CET) In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 11/9/2017 12:01 PM, Yang, Zhiyong wrote: >>> static int >>> +virtio_intr_enable(struct rte_eth_dev *dev) { >>> + struct virtio_hw *hw = dev->data->dev_private; >>> + >>> + if (rte_intr_enable(dev->intr_handle) < 0) >>> + return -1; >>> + >>> + if (!hw->virtio_user_dev) >>> + hw->use_msix = vtpci_msix_detect(RTE_ETH_DEV_TO_PCI(dev)); >> Maybe we can check hw->use_msix as an additional check; if it does not equal >> VIRTIO_MSIX_ENABLE, returns -1. >> > From my understanding, it is unnecessary. > Functionality of virtio_intr_enable should be generic. > Igb_uio or other can use it. it should be no harm to others. > we add msix detect here in order to just get use_msix status. Fair enough. > > Thanks > Zhiyong