From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 9A1B1936A for ; Wed, 27 Jan 2016 04:45:49 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 26 Jan 2016 19:45:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,353,1449561600"; d="scan'208";a="734902998" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.66.49]) by orsmga003.jf.intel.com with ESMTP; 26 Jan 2016 19:45:47 -0800 Date: Wed, 27 Jan 2016 11:46:12 +0800 From: Yuanhan Liu To: Thomas Monjalon Message-ID: <20160127034612.GE4257@yliu-dev.sh.intel.com> References: <1452832571-6156-1-git-send-email-yuanhan.liu@linux.intel.com> <1453191125-26335-1-git-send-email-yuanhan.liu@linux.intel.com> <1453191125-26335-9-git-send-email-yuanhan.liu@linux.intel.com> <4677246.JVjdGphvhY@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4677246.JVjdGphvhY@xps13> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v5 8/9] virtio: add 1.0 support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2016 03:45:50 -0000 On Thu, Jan 21, 2016 at 12:49:10PM +0100, Thomas Monjalon wrote: > 2016-01-19 16:12, Yuanhan Liu: > > int > > vtpci_init(struct rte_pci_device *dev, struct virtio_hw *hw) > > { > > - hw->vtpci_ops = &legacy_ops; > > + hw->dev = dev; > > + > > + /* > > + * Try if we can succeed reading virtio pci caps, which exists > > + * only on modern pci device. If failed, we fallback to legacy > > + * virtio handling. > > + */ > > + if (virtio_read_caps(dev, hw) == 0) { > > + PMD_INIT_LOG(INFO, "modern virtio pci detected."); > > + hw->vtpci_ops = &modern_ops; > > + hw->modern = 1; > > + dev->driver->drv_flags |= RTE_PCI_DRV_INTR_LSC; > > + return 0; > > + } > > RTE_PCI_DRV_INTR_LSC is already set by virtio_resource_init_by_uio(). We don't go that far here. Here we just detect if it's a modern virtio device. And if yes, we do some modern initiations, and return. virtio_resource_init_by_uio() is invoked when virtio_read_caps() fails. > Do you mean interrupt was not supported with legacy virtio? Nope. this patch set changes nothing on legacy virtio support. --yliu