Re: sendfile(2) use with a char driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 01, 2022 at 09:08:27AM +0000, hinxx wrote:
> 
> 
> 
> 
> 
> Sent with Proton Mail secure email.
> 
> ------- Original Message -------
> On Wednesday, November 30th, 2022 at 11:48 AM, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> 
> 
> > On Wed, Nov 30, 2022 at 08:23:45AM +0000, hinxx wrote:
> > 
> > > Sent with Proton Mail secure email.
> > > 
> > > ------- Original Message -------
> > > On Wednesday, November 30th, 2022 at 8:05 AM, Greg KH gregkh@xxxxxxxxxxxxxxxxxxx wrote:
> > > 
> > > > On Tue, Nov 29, 2022 at 09:15:24PM +0000, hinxx wrote:
> > > > 
> > > > > I'm looking to use a sendfile(2) with a Xilinx XDMA kernel driver in order to move data from a PCIe board with Xilinx FPGA to the network card with "zero-copy".
> > > > > 
> > > > > Currently I'm getting EINVAL return status from sendfile(2) when providing opened XDMA device file descriptor as input fd.
> > > > > 
> > > > > The device driver provides a character device that can be mmap'ed.
> > > > > 
> > > > > There seem to be other restrictions. Can anyone provide insight on what would be needed to make this work?
> > > > 
> > > > Please contact the authors of your kernel driver, they can answer this
> > > > best.
> > > 
> > > That would make sense, sadly they are MIA on their github repo engagement.
> > 
> > 
> > Have a link to that repo? Again, they are the only ones that can
> > resolve this, or you can modify the code to support this.
> > 
> 
> Thank you for your time Greg!
> 
> I'm trying to understand the concepts behind the sendfile and modify the drivers myself.
> 
> Here is the Xilinx XDMA driver repo:
> 
> https://github.com/Xilinx/dma_ip_drivers/tree/master/XDMA/linux-kernel

That's a very odd driver, it creates a lot of different char device
nodes, all doing different things.  Please work with the authors on that
to figure out how to get this to go faster if you need it and have
determined that the extra copy is the speed limiter here (for most
processors that is not the case, they can copy memory very fast).

And a char device node can support sendfile if the driver supports it,
so this is up to the driver to do so.

good luck!

greg k-h



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux