All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Mahan <mahan-5dHXHCkEAVbYtjvyW6yDsg@public.gmane.org>
To: "dev-VfR2kkLFssw@public.gmane.org" <dev-VfR2kkLFssw@public.gmane.org>
Subject: 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:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-22  1:13 Patrick Mahan [this message]
     [not found] ` <521565B1.9020506-5dHXHCkEAVbYtjvyW6yDsg@public.gmane.org>
2013-08-22  1:55   ` Access to the PCI config space 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-5dhxhckeavbytjvyw6ydsg@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.