DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Patrick Mahan <mahan@mahan.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Access to the PCI config space
Date: Wed, 21 Aug 2013 18:55:07 -0700	[thread overview]
Message-ID: <20130821185507.5d6a8539@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <521565B1.9020506@mahan.org>

On Wed, 21 Aug 2013 18:13:21 -0700
Patrick Mahan <mahan@mahan.org> wrote:

> Has anyone contemplated providing access to the PCI config space
> (pci_read_config_[byte|word|dword]) for DPDK?  It seems simple to
> perform, some preliminary testing by me seems to indicate opening
> the /sys/bus/pci/devices/<domain:bus:loc.func>/config file, seeking
> to the correct offset and reading off the value.
> 
> It seems to be correctly returning expected values and sysfs-pci.txt
> seems to indicate that this is RW so you can set values as well.
> It would seem a natural to make the PCI support code in DPDK more
> fully capable of porting PCI drivers.
> 
> I realize that somethings should be avoid (ie. causing interrupts),
> but I know that my device needs to modify bits in both the DEVCTL
> field of the PCI config and a BAR0 register to ensure they have
> the same value.
> 
> Thoughts?
> 
> Thanks,
> 
> Patrick

I played with that and it worked, but proved be unnecessary for the
hardware we support. If your device needs it, then sure it makes sense
to be supported genericly.

      reply	other threads:[~2013-08-22  1:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-22  1:13 Patrick Mahan
2013-08-22  1:55 ` Stephen Hemminger [this message]

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=20130821185507.5d6a8539@nehalam.linuxnetplumber.net \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=mahan@mahan.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).