From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP; 08 Nov 2017 20:40:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,367,1505804400"; d="scan'208";a="147759294" Received: from tanjianf-mobl.ccr.corp.intel.com (HELO [10.239.201.116]) ([10.239.201.116]) by orsmga004.jf.intel.com with ESMTP; 08 Nov 2017 20:40:13 -0800 To: "Yang, Zhiyong" , "dev@dpdk.org" References: <20171108110348.38548-1-zhiyong.yang@intel.com> <20171109031818.31040-1-zhiyong.yang@intel.com> Cc: "yliu@fridaylinux.org" From: "Tan, Jianfeng" Message-ID: <00e59d6d-7bbb-7875-d736-fbb40154e780@intel.com> Date: Thu, 9 Nov 2017 12:40:13 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3] net/virtio: fix rxq intr config fails using vfio-pci 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: Thu, 09 Nov 2017 04:40:18 -0000 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