Re: [dpdk-dev] Please stop using iopl() in DPDK

2019-10-30 Thread Willy Tarreau
Hi Stephen, On Mon, Oct 28, 2019 at 09:42:53AM -0700, Stephen Hemminger wrote: (...) > > I'd see an API more or less like this : > > > > int ioport(int op, u16 port, long val, long *ret); > > > > would take values such as INB,INW,INL to fill *, OUTB,OUTW,OUL > > to read from , possibly ORB,OR

Re: [dpdk-dev] Please stop using iopl() in DPDK

2019-10-28 Thread Andy Lutomirski
> On Oct 28, 2019, at 10:43 AM, Stephen Hemminger > wrote: > > On Fri, 25 Oct 2019 08:42:25 +0200 > Willy Tarreau wrote: > >> Hi Andy, >> >>> On Thu, Oct 24, 2019 at 09:45:56PM -0700, Andy Lutomirski wrote: >>> Hi all- >>> >>> Supporting iopl() in the Linux kernel is becoming a maintainability

Re: [dpdk-dev] Please stop using iopl() in DPDK

2019-10-28 Thread Stephen Hemminger
On Fri, 25 Oct 2019 08:42:25 +0200 Willy Tarreau wrote: > Hi Andy, > > On Thu, Oct 24, 2019 at 09:45:56PM -0700, Andy Lutomirski wrote: > > Hi all- > > > > Supporting iopl() in the Linux kernel is becoming a maintainability > > problem. As far as I know, DPDK is the only major modern user of >

Re: [dpdk-dev] Please stop using iopl() in DPDK

2019-10-28 Thread Maciej W. Rozycki
On Fri, 25 Oct 2019, Andy Lutomirski wrote: > > I'd see an API more or less like this : > > > > int ioport(int op, u16 port, long val, long *ret); > > Hmm. I have some memory of a /dev/ioport or similar, but now I can't > find it. It does seem quite reasonable. crw-r- 1 root kmem 1, 4 Se

Re: [dpdk-dev] Please stop using iopl() in DPDK

2019-10-27 Thread Thomas Gleixner
On Fri, 25 Oct 2019, Stephen Hemminger wrote: > On Thu, 24 Oct 2019 21:45:56 -0700 > Andy Lutomirski wrote: > > 3. Use ioperm() instead of iopl(). > > Ioperm has the wrong thread semantics. All DPDK applications have > multiple threads and the initialization logic needs to work even > if the thre

Re: [dpdk-dev] Please stop using iopl() in DPDK

2019-10-27 Thread Willy Tarreau
Hi Andy, On Thu, Oct 24, 2019 at 09:45:56PM -0700, Andy Lutomirski wrote: > Hi all- > > Supporting iopl() in the Linux kernel is becoming a maintainability > problem. As far as I know, DPDK is the only major modern user of > iopl(). > > After doing some research, DPDK uses direct io port access

Re: [dpdk-dev] Please stop using iopl() in DPDK

2019-10-27 Thread Willy Tarreau
On Fri, Oct 25, 2019 at 07:45:47AM -0700, Andy Lutomirski wrote: > But, for uses like DPDK, /sys/.../resource0 seems like a *far* better > API, since it actually uses the kernel's concept of which io range > corresponds to which device instead of hoping that the mappings don't > change out from und

Re: [dpdk-dev] Please stop using iopl() in DPDK

2019-10-25 Thread Andy Lutomirski
> On Oct 25, 2019, at 9:13 AM, Stephen Hemminger > wrote: > > On Thu, 24 Oct 2019 21:45:56 -0700 > Andy Lutomirski wrote: > >> Hi all- >> >> Supporting iopl() in the Linux kernel is becoming a maintainability >> problem. As far as I know, DPDK is the only major modern user of >> iopl(). >> >>

Re: [dpdk-dev] Please stop using iopl() in DPDK

2019-10-25 Thread Stephen Hemminger
On Thu, 24 Oct 2019 21:45:56 -0700 Andy Lutomirski wrote: > Hi all- > > Supporting iopl() in the Linux kernel is becoming a maintainability > problem. As far as I know, DPDK is the only major modern user of > iopl(). > > After doing some research, DPDK uses direct io port access for only a > s

Re: [dpdk-dev] Please stop using iopl() in DPDK

2019-10-25 Thread Andy Lutomirski
On Thu, Oct 24, 2019 at 11:42 PM Willy Tarreau wrote: > > Hi Andy, > > On Thu, Oct 24, 2019 at 09:45:56PM -0700, Andy Lutomirski wrote: > > Hi all- > > > > Supporting iopl() in the Linux kernel is becoming a maintainability > > problem. As far as I know, DPDK is the only major modern user of > >

Re: [dpdk-dev] Please stop using iopl() in DPDK

2019-10-25 Thread David Marchand
Hello Andy, On Fri, Oct 25, 2019 at 6:46 AM Andy Lutomirski wrote: > Supporting iopl() in the Linux kernel is becoming a maintainability > problem. As far as I know, DPDK is the only major modern user of > iopl(). Thanks for reaching out. Copying our virtio maintainers (Maxime and Tiwei), since

[dpdk-dev] Please stop using iopl() in DPDK

2019-10-24 Thread Andy Lutomirski
Hi all- Supporting iopl() in the Linux kernel is becoming a maintainability problem. As far as I know, DPDK is the only major modern user of iopl(). After doing some research, DPDK uses direct io port access for only a single purpose: accessing legacy virtio configuration structures. These struc