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: <1372089776.1896.9.camel@bwh-desktop.uk.level5networks.com>
Date:	Mon, 24 Jun 2013 17:02:56 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Hannes Frederic Sowa <hannes@...essinduktion.org>
CC:	Ricardo Landim <ricardolan@...il.com>, <netdev@...r.kernel.org>
Subject: Re: UDP splice

On Mon, 2013-06-24 at 17:51 +0200, Hannes Frederic Sowa wrote:
> On Mon, Jun 24, 2013 at 04:42:34PM +0100, Ben Hutchings wrote:
> > On Fri, 2013-06-21 at 07:04 -0300, Ricardo Landim wrote:
> > > Hi folks,
> > > 
> > > I am developing a RTP proxy for voip applications and tried use the
> > > splice syscall
> > > for zero copy. I am trying splice udp data to pipe and splice pipe to udp
> > > socket.
> > > 
> > > I read some information of the splice function and reading the kernel
> > > source code I saw this lines in net/ipv4/af_inet.c
> > > 
> > > const struct proto_ops inet_stream_ops = {
> > > ...
> > >     .splice_read = tcp_splice_read,
> > > ...
> > > }
> > > 
> > > const struct proto_ops inet_dgram_ops = {
> > > ...
> > > ...
> > > }
> > > 
> > > There is an implementation of splice for TCP socket but not for UDP socket.
> > > 
> > > My question is: there is some limitation in UDP socket that prevents this
> > > implementation?
> > 
> > splice() works with streams, but UDP is a message-oriented protocol.
> > How would a UDP implementation of splice() decide where to put the
> > message boundaries, or to distinguish the messages?
> 
> Splicing a pipe to udp socket should work nontheless. Splicing from udp socket
> to pipe does not work.

Should it?  I suppose it could work for UDP-based protocols that include
their own framing, but I can't see that it's generally useful.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

--
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