lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080905153811.GA3596@2ka.mipt.ru>
Date:	Fri, 5 Sep 2008 19:38:11 +0400
From:	Evgeniy Polyakov <johnpol@....mipt.ru>
To:	Johann Baudy <johaahn@...il.com>
Cc:	netdev@...r.kernel.org
Subject: Re: Fwd: Packet mmap: TX RING and zero copy

Hi.

On Fri, Sep 05, 2008 at 05:30:39PM +0200, Johann Baudy (johaahn@...il.com) wrote:
> > Well, udp_sendpage() needs to be extended to only append page when there
> > is anough free space there, otherwise push given frame and create next
> > packet.
> >
> Ok, I'll do a patch and let you know result.

Great, thank you. But it should take into account UDP nature: data is
not allowed to be split between ip packets like with TCP.

> > I meant you get a pointer by mapping some file in tmpfs (for example)
> > and then use some offset variable to store where you put your last data
> > (either packet header, or data itself), so that any subsequent write to
> > that area (either new packet header or dma data placement) would put
> > data just after the previous chunk. Thus after you have put number of
> > headers and appropriate data chunks, you could call sendfile() and reset
> > offset to the beginning of the mapped area.
> 
> If I understand well, there is no link between start of ethernet frame
> and packet header ?

Ethernet header is appended by the network core itself, likely core will
just allocate skb with small data area, put there an ethernet and udp/ip
headers and attach pages from the file. If hardware does not support
checksumming and scatter/gather, things will be different.

> App protocol must support packet loss ^^

I think matter of packet loss relevance here is just the same like with
any other sending method.

-- 
	Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ