DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Alan Carew <alan.carew@intel.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 0/4] librte_pmd_virtio :Fix: virtio_pci.h non-existent virtio feature bit-flag tested
Date: Thu, 5 Jun 2014 10:06:33 -0700	[thread overview]
Message-ID: <20140605100633.6a6047bd@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <1401979159-14576-1-git-send-email-alan.carew@intel.com>

On Thu,  5 Jun 2014 15:39:15 +0100
Alan Carew <alan.carew@intel.com> wrote:

> 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.
> 
> If MSI-X is configured the device specific header is placed at byte offset 24
> relative to the IO base address. 
> If MSI-X is not configured the device specific header is placed at
> byte offset 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) 
> 
> However, VIRTIO_PCI_FLAG_MSIX is not a guest_feature nor is it part of the
> Virtio Specification and resolves to the VIRTIO_NET_F_MAC feature as both
> are #defined as 0x20. 
> 
> 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)
> 
> To enable this testing of interrupt mode, this series allows for the kernel
> 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.

Why not scan for the IRQ in /proc/interrupts rather than changing the kernel driver.
I ask because my goal is to get rid of igb_uio and it's quirks and use
uio_pci_generic instead.

  parent reply	other threads:[~2014-06-05 17:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-05 14:39 Alan Carew
2014-06-05 14:39 ` [dpdk-dev] [PATCH 1/4] [PATCH 1/4] igb_uio: Add interrupt_mode sysfs entry for igb_uio devices Alan Carew
2014-06-05 17:20   ` Stephen Hemminger
2014-06-05 14:39 ` [dpdk-dev] [PATCH 2/4] [PATCH 2/4] eal_pci: Add interrupt mode to rte_pci_device and parsing to eal_pci Alan Carew
2014-06-05 14:39 ` [dpdk-dev] [PATCH 3/4] [PATCH 3/4] FreeBSD: Adds the equivalent interrupt mode setting and parsing Alan Carew
2014-06-05 14:39 ` [dpdk-dev] [PATCH 4/4] [PATCH 4/4] virtio: Fixes the VIRTIO_PCI_CONFIG macro to use the correct offset to the Virtio header Alan Carew
2014-06-05 15:22 ` [dpdk-dev] [PATCH 0/4] librte_pmd_virtio :Fix: virtio_pci.h non-existent virtio feature bit-flag tested Stephen Hemminger
2014-06-05 17:06 ` Stephen Hemminger [this message]
2014-06-16 10:19 ` Carew, Alan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140605100633.6a6047bd@nehalam.linuxnetplumber.net \
    --to=stephen@networkplumber.org \
    --cc=alan.carew@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).