From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=v657g397pteWLSaAmSgCT5Dez12nEoWpqt02OWNMeps=; b=0gsgUdKfnC+/x6s3811BfJ86lFom1VydmteARKgFCB1yqffuq5fS0xoBQoaIzb2DX6 Ced+NhdHcCChvnIciKSQkdiSA/HXD2xEqSSfwebemSL+dnH/7uIxx6P/vDJhhqN28bzH BwnG7U7XAb8y9nV2zSo5puCtuUmAkhYBxdqLkRb0JAvxnOWYHVuy12zMOARo4lMx4G6U zALL4tJh6jNcJOnKPTcEof812nv9IytHK8e0pKeeqV6NjpXX+AtVwCGvQiawvNXjpoLw nIKqdMSzpflM0JdONvGbyg1ZEtr2AfnGre5lc3DjCYZNMyhEAyvzYffV8NoJV87nj2OW twvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=v657g397pteWLSaAmSgCT5Dez12nEoWpqt02OWNMeps=; b=Bs5bYZgIcNfVWPM2vK4JjC9x2JkGTqKwjZEARntsODclkrBVnZpamXa0Wrx4cEpvt6 VgKhgsCm/grZaeKJnpVY0ImgyX1BijK+s+su6uUY9KdTZ9nT97kbgjpOlESRnUuut8ah uEngeP6PSdDva0ziUl8iSuVhg+ZjFo3FQSZoxNy5k+ccKC/h7lg2ti2LZ355yQymsjuM U6HOgxf7J6Vd70xpoa4vyly/aY3A4FnJR97BUmJ4GtvUAG3bzZQturpvryAPlSe9F6mm UEiC8aYfruys9nlMxJ7oHnE5qUHJFCsrynRfJubra80d9ygaZ7VOhovH6SUJoarZzk75 7Y8g== X-Gm-Message-State: AKaTC02forCsPsVcKWyHBtc3RB8OnmAwbwINtQ4ULYFGX9czYY1IO/khWaXGtpPHDIWTgQ== X-Received: by 10.84.130.5 with SMTP id 5mr84608249plc.69.1480722429028; Fri, 02 Dec 2016 15:47:09 -0800 (PST) Received: from xeon-e3 (204-195-18-65.wavecable.com. [204.195.18.65]) by smtp.gmail.com with ESMTPSA id n17sm10057250pfg.80.2016.12.02.15.47.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Dec 2016 15:47:08 -0800 (PST) Date: Fri, 2 Dec 2016 15:47:06 -0800 From: Stephen Hemminger To: Jianfeng Tan Cc: dev@dpdk.org, david.marchand@6wind.com, ferruh.yigit@intel.com Message-ID: <20161202154706.3676195c@xeon-e3> In-Reply-To: <1472696197-37614-1-git-send-email-jianfeng.tan@intel.com> 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 Subject: Re: [dpdk-dev] [RFC] igb_uio: deprecate iomem and ioport mapping X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2016 23:47:10 -0000 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.