netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Hannes Reinecke <hare@suse.de>
Cc: Chris Leech <cleech@redhat.com>, Christoph Hellwig <hch@lst.de>,
	Rasesh Mody <rmody@marvell.com>, Ariel Elior <aelior@marvell.com>,
	Sudarsana Kalluru <skalluru@marvell.com>,
	Manish Chopra <manishc@marvell.com>,
	Nilesh Javali <njavali@marvell.com>,
	Manish Rangankar <mrangankar@marvell.com>,
	Jerry Snitselaar <jsnitsel@redhat.com>,
	John Meneghini <jmeneghi@redhat.com>,
	Lee Duncan <lduncan@suse.com>,
	Mike Christie <michael.christie@oracle.com>,
	Hannes Reinecke <hare@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] cnic,bnx2,bnx2x: use UIO_MEM_DMA_COHERENT
Date: Sun, 1 Oct 2023 13:57:25 +0200	[thread overview]
Message-ID: <2023100114-flatware-mourner-3fed@gregkh> (raw)
In-Reply-To: <e0360d8f-6d36-4178-9069-d633d9b7031d@suse.de>

On Sun, Oct 01, 2023 at 12:44:05PM +0200, Hannes Reinecke wrote:
> On 9/30/23 20:28, Greg Kroah-Hartman wrote:
> > On Sat, Sep 30, 2023 at 11:19:20AM -0700, Chris Leech wrote:
> > > On Sat, Sep 30, 2023 at 09:06:51AM +0200, Greg Kroah-Hartman wrote:
> > > > On Fri, Sep 29, 2023 at 10:00:23AM -0700, Chris Leech wrote:
> > > > > Make use of the new UIO_MEM_DMA_COHERENT type to properly handle mmap
> > > > > for dma_alloc_coherent buffers.
> > > > 
> > > > Why are ethernet drivers messing around with UIO devices?  That's not
> > > > what UIO is for, unless you are trying to do kernel bypass for these
> > > > devices without anyone noticing?
> > > > 
> > > > confused,
> > > 
> > > It's confusing. The bnx2 driver stack included a cnic (converged nic?)
> > > module that sits between the ethernet drivers (bnx2, bnx2x) and protocol
> > > offload drivers (iscsi, fcoe, rdma).
> > > 
> > > The iscsi module (bnx2i) uses a passthrough interface from cnic to
> > > handle some network configuration that the device firmware doesn't do.
> > > It uses a uio device and a userspace component called iscsiuio to do
> > > that.
> > 
> > That's horrible, and not what the UIO api is for at all.  Configure the
> > device like any other normal kernel device, don't poke at raw memory
> > values directly, that way lies madness.
> > 
> > Have a pointer to the userspace tool anywhere?  All I found looks like a
> > full IP stack in userspace under that name, and surely that's not what
> > this api is for...
> > 
> But that's how the interface is used, in particular for the bnx2i driver.
> Problem is that the bnx2i iSCSI offload is just that, an iSCSI offload. Not
> a TCP offload. So if the iSCSI interface is configured to
> acquire the IP address via DHCP, someone has to run the DHCP protocol.
> But the iSCSI offload can't, and the bnx2i PCI device is not a network
> device so that the normal network stack can't be used.
> And so the architects of the bnx2i card decided to use UIO to pass
> the network traffic to userspace, and used the userspace 'iscsiuio'
> application to run DHCP in userspace.
> 
> But's been that way for several years now; so long, in fact, that
> the card itself has been out of support from Marvell (since quite some
> years, too, IIRC). And even the successor of that card (the qedi driver)
> is nearing EOL. Mind you, the qedi driver is using the same interface (by
> using UIO to run DHCP in userspace), so singling out the bnx2i for bad
> design can be construed as being unfair :-)

Ok, let's say they are all horrible! :)

> I agree, though, that the design is a mess.

Ok, so why are we papering over it and continuing to allow it to exist?

What "broke" to suddenly require this UIO change?  If this has been
around for a very long time, what has caused this to now require the UIO
layer to change?

thanks,

greg k-h

  reply	other threads:[~2023-10-01 11:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-29 17:00 [PATCH 0/3] UIO_MEM_DMA_COHERENT for cnic/bnx2/bnx2x Chris Leech
2023-09-29 17:00 ` [PATCH 1/3] uio: introduce UIO_DMA_COHERENT type Chris Leech
2023-09-30  7:10   ` Greg Kroah-Hartman
2023-09-30 18:08     ` Chris Leech
2023-10-02  6:09   ` Christoph Hellwig
2023-09-29 17:00 ` [PATCH 2/3] cnic,bnx2,bnx2x: page align uio mmap allocations Chris Leech
2023-09-29 17:18   ` Jacob Keller
2023-10-02  6:11   ` Christoph Hellwig
2023-09-29 17:00 ` [PATCH 3/3] cnic,bnx2,bnx2x: use UIO_MEM_DMA_COHERENT Chris Leech
2023-09-29 17:19   ` Jacob Keller
2023-09-30  7:06   ` Greg Kroah-Hartman
2023-09-30  9:10     ` Jerry Snitselaar
2023-09-30 18:29       ` Greg Kroah-Hartman
2023-09-30 18:19     ` Chris Leech
2023-09-30 18:28       ` Greg Kroah-Hartman
2023-10-01 10:44         ` Hannes Reinecke
2023-10-01 11:57           ` Greg Kroah-Hartman [this message]
2023-10-01 14:22             ` Jerry Snitselaar
2023-10-02  6:04               ` Christoph Hellwig
2023-10-02  7:50                 ` Jerry Snitselaar
2023-10-02  8:46                   ` Greg Kroah-Hartman
2023-10-02  8:59                     ` Hannes Reinecke
2023-10-05 10:39                       ` Paolo Abeni

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=2023100114-flatware-mourner-3fed@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=aelior@marvell.com \
    --cc=cleech@redhat.com \
    --cc=hare@kernel.org \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=jmeneghi@redhat.com \
    --cc=jsnitsel@redhat.com \
    --cc=lduncan@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manishc@marvell.com \
    --cc=michael.christie@oracle.com \
    --cc=mrangankar@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=njavali@marvell.com \
    --cc=rmody@marvell.com \
    --cc=skalluru@marvell.com \
    /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).