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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 5 Jun 2007 10:05:43 +0200
From:	Jens Axboe <jens.axboe@...cle.com>
To:	netdev@...r.kernel.org
Subject: [PATCH][RFC] network splice receive

Hi,

Here's an implementation of tcp network splice receive support. It's
originally based on the patch set that Intel posted some time ago, but
has been (close to) 100% reworked.

Now, I'm not a networking guru by any stretch of the imagination, so I'd
like some input on the direction of the main patch. Is the approach
feasible? Glaring errors? Missing bits?

If you want to test it, I'd suggest downloading the latest splice tools
snapshot here:

http://brick.kernel.dk/snaps/splice-git-latest.tar.gz

Examples:

- Sending a small test message over the network:

  user@...t1:~/splice $ ./splice-fromnet 9999 | cat
  user@...t2:~ $ echo hello | netcat host1 9999

  should write "hello" on host1. Yeah, complex stuff.

- Sending a file over the network:

  user@...t1:~/splice $ ./splice-fromnet 9999 | ./splice out outfile
  user@...t2:~ $ cat somefile | netcat host1 9999

  should send somefile over the network, storing it in outfile.

Seems to work reasonably well for me, sometimes I do see small ranges
inside the output file that are not correct, but I haven't been able to
reproduce today. I think it has to do with page reuse, hence the
NET_COPY_SPLICE ifdef that you can enable to just plain copy the data
instead of referencing it.

Patches are against the #splice branch of the block repo, "official" url
of that is:

git://git.kernel.dk/data/git/linux-2.6-block.git/

and it's based on Linus main tree (at 2.6.22-rc4 right now). Let me know
if I should supply netdev branch patches instead.

-- 
Jens Axboe


View attachment "0001-NET-tcp_read_sock-alloc-recv_actor-return-retur.patch" of type "text/x-patch" (1103 bytes)

View attachment "0002-NET-TCP-splice-receive-support.patch" of type "text/x-patch" (11939 bytes)

Powered by blists - more mailing lists