DPDK patches and discussions
 help / color / mirror / Atom feed
From: Patrick Mahan <mahan@mahan.org>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] Access to the PCI config space
Date: Wed, 21 Aug 2013 18:13:21 -0700	[thread overview]
Message-ID: <521565B1.9020506@mahan.org> (raw)

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

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

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

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=521565B1.9020506@mahan.org \
    --to=mahan@mahan.org \
    --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).