From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick Mahan Subject: Access to the PCI config space Date: Wed, 21 Aug 2013 18:13:21 -0700 Message-ID: <521565B1.9020506@mahan.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit To: "dev-VfR2kkLFssw@public.gmane.org" Return-path: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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//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