From: "Tan, Jianfeng" <jianfeng.tan@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"david.marchand@6wind.com" <david.marchand@6wind.com>,
"Yigit, Ferruh" <ferruh.yigit@intel.com>
Subject: Re: [dpdk-dev] [RFC] igb_uio: deprecate iomem and ioport mapping
Date: Mon, 5 Dec 2016 07:04:05 +0000 [thread overview]
Message-ID: <ED26CBA2FAD1BF48A8719AEF02201E364E6FC0CF@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20161202154706.3676195c@xeon-e3>
Hi Stephen,
> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Saturday, December 3, 2016 7:47 AM
> To: Tan, Jianfeng
> Cc: dev@dpdk.org; david.marchand@6wind.com; Yigit, Ferruh
> Subject: Re: [RFC] igb_uio: deprecate iomem and ioport mapping
>
> On Thu, 1 Sep 2016 02:16:37 +0000
> Jianfeng Tan <jianfeng.tan@intel.com> 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 <jianfeng.tan@intel.com>
>
> What about people using older kernels with the new DPDK EAL and
> vice versa?
There are two things planned in this proposal:
(1) deprecating iomem mapping in igb_uio, which is not used in DPDK code anyway.
(2) deprecating ioport mapping in igb_uio, which has effect on ioport mapping for x86 platforms. The way we use to make up is to leverage how uio_pci_generic does, aka, based on /proc/ioports, and this proc file is available at very early stage of Linux (Even before 2.6.32).
So I don't see a problem there when running the new DPDK EAL on older kernels.
On the other way, running old DPDK EAL on new kernels, and using new igb_uio, right? Oops, this should have problem. Thank you for pointing out this. So how about just removing iomem? And my motivation to clean igb_uio like this way is to fix a problem here: http://dpdk.org/dev/patchwork/patch/17495/.
> It makes sense to make igb_uio generic for non DPDK
> usage, so it should probably follow the other UIO drivers.
>
Then the problem would be backward compatibility. I might need to reconsider this.
Thank you for reviewing!
Thanks,
Jianfeng
next prev parent reply other threads:[~2016-12-05 7:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-01 2:16 Jianfeng Tan
2016-09-02 12:31 ` Ferruh Yigit
2016-09-02 12:59 ` Tan, Jianfeng
2016-09-09 9:06 ` David Marchand
2016-09-09 9:31 ` Tan, Jianfeng
2016-09-22 5:44 ` [dpdk-dev] [PATCH] doc: remove iomem and ioport handling in igb_uio Jianfeng Tan
2016-09-30 10:13 ` Ferruh Yigit
2016-11-11 2:12 ` Remy Horton
2016-11-13 8:55 ` Thomas Monjalon
2016-12-02 16:28 ` [dpdk-dev] [PATCH] igb_uio: deprecate iomem and ioport mapping Jianfeng Tan
2016-12-02 16:45 ` [dpdk-dev] [PATCH] igb_uio: stop device when closing /dev/uioX Jianfeng Tan
2017-03-30 20:22 ` Thomas Monjalon
2017-03-31 14:16 ` Ferruh Yigit
2016-12-02 23:47 ` [dpdk-dev] [RFC] igb_uio: deprecate iomem and ioport mapping Stephen Hemminger
2016-12-05 7:04 ` Tan, Jianfeng [this message]
2017-01-05 15:23 ` Ferruh Yigit
2017-01-06 1:52 ` Tan, Jianfeng
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=ED26CBA2FAD1BF48A8719AEF02201E364E6FC0CF@SHSMSX103.ccr.corp.intel.com \
--to=jianfeng.tan@intel.com \
--cc=david.marchand@6wind.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=stephen@networkplumber.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).