From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ns.mahan.org (unknown [67.116.10.138]) by dpdk.org (Postfix) with ESMTP id 084F91F3 for ; Thu, 22 Aug 2013 03:12:53 +0200 (CEST) Received: from gypsy.mahan.org (localhost [127.0.0.1]) by ns.mahan.org (8.14.5/8.14.5) with ESMTP id r7M1DLJl066966 for ; Wed, 21 Aug 2013 18:13:21 -0700 (PDT) (envelope-from mahan@mahan.org) Message-ID: <521565B1.9020506@mahan.org> Date: Wed, 21 Aug 2013 18:13:21 -0700 From: Patrick Mahan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: "dev@dpdk.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [dpdk-dev] Access to the PCI config space X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Aug 2013 01:12:54 -0000 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