From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 526A3AFD2 for ; Mon, 16 Jun 2014 12:20:04 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 16 Jun 2014 03:20:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.01,485,1400050800"; d="scan'208";a="548558733" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by fmsmga001.fm.intel.com with ESMTP; 16 Jun 2014 03:19:56 -0700 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.245]) by IRSMSX102.ger.corp.intel.com ([169.254.2.105]) with mapi id 14.03.0123.003; Mon, 16 Jun 2014 11:19:53 +0100 From: "Carew, Alan" To: "dev@dpdk.org" Thread-Topic: [PATCH 0/4] librte_pmd_virtio :Fix: virtio_pci.h non-existent virtio feature bit-flag tested Thread-Index: AQHPgMwE1j0hgpDEfEaL7ONeMPwFIZtzlyEw Date: Mon, 16 Jun 2014 10:19:53 +0000 Message-ID: <0E29434AEE0C3A4180987AB476A6F630593A6EE5@IRSMSX101.ger.corp.intel.com> References: <1401979159-14576-1-git-send-email-alan.carew@intel.com> In-Reply-To: <1401979159-14576-1-git-send-email-alan.carew@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 0/4] librte_pmd_virtio :Fix: virtio_pci.h non-existent virtio feature bit-flag tested 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: Mon, 16 Jun 2014 10:20:04 -0000 > -----Original Message----- > From: Carew, Alan > Sent: Thursday, June 05, 2014 3:39 PM > To: dev@dpdk.org > Cc: Carew, Alan > Subject: [PATCH 0/4] librte_pmd_virtio :Fix: virtio_pci.h non-existent vi= rtio > feature bit-flag tested >=20 > This series addresses an issue with librte_pmd_virtio where the offset to= the > virtio device specific header may be incorrect depending on whether MSI-X= has > been enabled or not. >=20 > If MSI-X is configured the device specific header is placed at byte offse= t 24 > relative to the IO base address. > If MSI-X is not configured the device specific header is placed at > byte offset 20. >=20 > The following macro defined in virtio_pci.h is used to test the > presence of the MSI-X header and determine the correct offset: > #define VIRTIO_PCI_CONFIG(hw) (((hw)->guest_features & > VIRTIO_PCI_FLAG_MSIX) ? 24 : 20) >=20 > However, VIRTIO_PCI_FLAG_MSIX is not a guest_feature nor is it part of th= e > Virtio Specification and resolves to the VIRTIO_NET_F_MAC feature as both > are #defined as 0x20. >=20 > VIRTIO_PCI_FLAG_MSIX or similar flag should instead be set by the kernel > driver allocating resources and passed to user space for testing. > i.e. > #define VIRTIO_PCI_CONFIG(hw) (((hw)->intr_mode & > IGBUIO_MSIX_INTR_MODE) ? 24 : 20) >=20 > To enable this testing of interrupt mode, this series allows for the kern= el > driver(igb_uio) to place the configured interrupt mode into a sysfs entry= . > sysfs is then parsed by eal_pci to determine the configured mode, which > allows all user space devices to correctly determine the interrupt mode, > including virtio_ethdev. >=20 > This series should be applied prior to Anatoly Burakov's > [VFIO] Add VFIO support to DPDK series >=20 > Alan Carew (4): > igb_uio: Add interrupt_mode sysfs entry for igb_uio devices > eal_pci: Add interrupt mode to rte_pci_device and parsing to eal_pci > FreeBSD: Adds the equivalent interrupt mode setting and parsing > virtio: Fixes the VIRTIO_PCI_CONFIG macro to use the correct offset > to the Virtio header >=20 > lib/librte_eal/bsdapp/eal/eal_pci.c | 44 ++++++++++ > lib/librte_eal/bsdapp/nic_uio/nic_uio.c | 14 +++ > lib/librte_eal/common/Makefile | 1 + > lib/librte_eal/common/include/rte_pci.h | 2 + > .../common/include/rte_pci_dev_feature_defs.h | 85 > ++++++++++++++++++++ > .../common/include/rte_pci_dev_features.h | 70 ++++++++++++++= ++ > lib/librte_eal/linuxapp/eal/eal_pci.c | 78 ++++++++++++++= ++++ > lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 48 +++++++++--- > lib/librte_pmd_virtio/virtio_ethdev.c | 1 + > lib/librte_pmd_virtio/virtio_pci.h | 4 +- > 10 files changed, 336 insertions(+), 11 deletions(-) > create mode 100755 > lib/librte_eal/common/include/rte_pci_dev_feature_defs.h > create mode 100755 lib/librte_eal/common/include/rte_pci_dev_features.h Self NAK, alternative approach and patch set to follow.