From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id 17B569436 for ; Wed, 27 Jan 2016 09:12:17 +0100 (CET) Received: by mail-wm0-f48.google.com with SMTP id n5so13760495wmn.0 for ; Wed, 27 Jan 2016 00:12:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=VThCywWBLDEiv2OzuYkDzXyurNg1LxXEx9veT+poL8I=; b=HKs0FMtH0S5Zyi0zTpt4NqgCDh9R9zxwxyl78vOVRYZCcr8XrFCGVkrrCkxqx3c6wH GjzUi9sB730Sk/FWn7EAM6WkKc0MieeB2m0ymkq6/uQbTHbqyUESFst/2EHXW3dNHR7E mpflBPjWJWW0kQbOMqj5K9/n8KBGY+ONgS8ybQsodFH8mTBopu3M0mH5VtjukXIGe7hF +UaCCDnSSsT7SDjlijr81Wx4p804FXU8eoeyhwo3shtUN0/nXNlG7juCAJnLJlBI7BRh nC8U4U6ZH6ytWLfhUf7mO49gzoGRWdW/KA6wsyFbvErdHvmBZ25lk0y5TRoySjU8l7XJ 6Tsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=VThCywWBLDEiv2OzuYkDzXyurNg1LxXEx9veT+poL8I=; b=UWw2wiHg8WQWcYdvfDSihPGz/c7dgooagCBzdOwlNS4J5JjUyN4NGSB+JPZGH6teGa +4tBxWJ99NXCnAZC60pnsQU3qTcRzK4g1/0Rxjvd+7amI3e3lGoOs91WgEnG91goTugC I03Vvo4bjgRFmEqgnrsb+qcviMaCTZQl0j0gjR+fLlqLfwPpvWotqjFPbI4uUa8TrW7M ro0zEcgS2odw2+k4Z7iChlg/5RDHa0lMYCfM6emVCBhD9Z3e6GoVESyKl1zEZvHqAwdu 2eXgACjlizZnObwWo1q1bo5+pY6Bm7Wlig07h4eS6s1mesFqSIZmLo8ZOLOzMtHTlca0 TxXQ== X-Gm-Message-State: AG10YOTrrkN8U+bDcrXVMSOd+bbB0/1zU4qyPiTRyv4/XEvH+GOS7lB9TFGPsBngAAm8iWRZ X-Received: by 10.28.232.208 with SMTP id f77mr29972324wmi.34.1453882336953; Wed, 27 Jan 2016 00:12:16 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id r10sm4919588wjz.24.2016.01.27.00.12.15 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 27 Jan 2016 00:12:16 -0800 (PST) From: Thomas Monjalon To: Yuanhan Liu Date: Wed, 27 Jan 2016 09:11:07 +0100 Message-ID: <2261590.4JDQbYOqdP@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20160127034612.GE4257@yliu-dev.sh.intel.com> References: <1452832571-6156-1-git-send-email-yuanhan.liu@linux.intel.com> <4677246.JVjdGphvhY@xps13> <20160127034612.GE4257@yliu-dev.sh.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 08:12:17 -0000 2016-01-27 11:46, Yuanhan Liu: > 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. Oh yes. I guess I had not seen the return.