From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [RFC] igb_uio: deprecate iomem and ioport mapping Date: Fri, 2 Dec 2016 15:47:06 -0800 Message-ID: <20161202154706.3676195c@xeon-e3> References: <1472696197-37614-1-git-send-email-jianfeng.tan@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, david.marchand@6wind.com, ferruh.yigit@intel.com To: Jianfeng Tan Return-path: Received: from mail-pg0-f42.google.com (mail-pg0-f42.google.com [74.125.83.42]) by dpdk.org (Postfix) with ESMTP id CCAC158DB for ; Sat, 3 Dec 2016 00:47:09 +0100 (CET) Received: by mail-pg0-f42.google.com with SMTP id f188so112106514pgc.3 for ; Fri, 02 Dec 2016 15:47:09 -0800 (PST) In-Reply-To: <1472696197-37614-1-git-send-email-jianfeng.tan@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 1 Sep 2016 02:16:37 +0000 Jianfeng Tan wrote: > Previously in igb_uio, iomem is mapped, and both ioport and io mem > are recorded into uio framework, which is duplicated and makes the > code too complex. > > For iomem, DPDK user space code never opens or reads files under > /sys/pci/bus/devices/xxxx:xx:xx.x/uio/uioY/maps/. Instead, > /sys/pci/bus/devices/xxxx:xx:xx.x/resourceY are used to map device > memory. > > For ioport, non-x86 platforms cannot read from files under > /sys/pci/bus/devices/xxxx:xx:xx.x/uio/uioY/portio/ directly, because > non-x86 platforms need to map port region for access in user space, > see non-x86 version pci_uio_ioport_map(). x86 platforms can use the > the same way as uio_pci_generic. > > This patch deprecates iomem and ioport mapping in igb_uio kernel > module, and adjusts the iomem implementation in both igb_uio and > uio_pci_generic: > - for x86 platform, get ports info from /proc/ioports; > - for non-x86 platform, map and get ports info by pci_uio_ioport_map(). > > Note: this will affect those applications who are using files under > /sys/pci/bus/devices/xxxx:xx:xx.x/uio/uioY/maps/ and > /sys/pci/bus/devices/xxxx:xx:xx.x/uio/uioY/portio/. > > Signed-off-by: Jianfeng Tan What about people using older kernels with the new DPDK EAL and vice versa? It makes sense to make igb_uio generic for non DPDK usage, so it should probably follow the other UIO drivers.