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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sat,  3 May 2014 04:11:06 +0900
From:	Lorenzo Colitti <lorenzo@...gle.com>
To:	netdev@...r.kernel.org
Cc:	davem@...emloft.net, hannes@...essinduktion.org,
	yoshifuji@...ux-ipv6.org, david.laight@...lab.com,
	eric.dumazet@...il.com, Lorenzo Colitti <lorenzo@...gle.com>
Subject: [PATCH v6 0/2] Unify IPv6 sendmsg codepaths.

Ok, here's another attempt at reducing code duplication between
the IPv6 UDP/raw/L2TP/ping sendmsg codepaths. I took Hannes's
suggestion and created an ip6_output_opts structure which groups
together parameters that go to ip6_append data (and which can
be written to directly by ip6_datagram_send_ctl).

Does this look better now?


Since there was a concern that the previous patch might impact
UDP sendmsg performance, I ran a couple of benchmarks on this
version and the results suggest that impact is in the noise.
x86_64 improved by 1-2%, but ARM got 1% worse. I suspect that
this what this means is that any optimization made to this code
is irrelevant compared to the overhead of context switches,
system call setup, copying from userspace, etc.

Specifically, I tested sending UDP on loobpack with:

  netperf -6 -H ::1 -t UDP_STREAM -- -m <size>

and counted the number of packets sent in 10 seconds, 5 times,
for UDP payload sizes of 1 byte (the minimum) and 1452. Results:

x86_64 workstation, 1-byte UDP payload: +1.1%

- Before:
  - Run #1: 2717005 2707060 2652702 2695698 2703355
  - Run #2: 2711797 2692290 2699832 2705740 2698174
- After:
  - Run #1: 2726430 2725619 2704406 2672582 2730418
  - Run #2: 2777486 2740683 2732652 2707956 2772541

x86_64 workstation, 1452-byte UDP payload: +1.8%

- Before: 2577335 2514953 2572881 2571107 2571355
- After:  2620455 2609399 2635285 2610107 2568943

Nexus 5 phone, 1-byte UDP payload (backport to kernel 3.4): -1.0%

- Before: 213955 216284 217529 217785 216854
- After:  221096 216049 216426 203414 213897


Lorenzo Colitti (2):
  net: ipv6: Unduplicate UDP, raw, and L2TP sendmsg
  net: ipv6: Use ip6_datagram_send_common in ping.

 include/net/ipv6.h       |  33 ++++++++++-
 include/net/transp_v6.h  |   7 ++-
 net/ipv6/datagram.c      | 145 +++++++++++++++++++++++++++++++++++++++++++++--
 net/ipv6/icmp.c          |  27 +++++----
 net/ipv6/ip6_flowlabel.c |   6 +-
 net/ipv6/ip6_output.c    |  11 ++--
 net/ipv6/ipv6_sockglue.c |   7 ++-
 net/ipv6/ping.c          |  90 ++++++++++-------------------
 net/ipv6/raw.c           | 101 ++-------------------------------
 net/ipv6/udp.c           | 122 ++++-----------------------------------
 net/l2tp/l2tp_ip6.c      | 108 +++--------------------------------
 11 files changed, 255 insertions(+), 402 deletions(-)

-- 
1.9.1.423.g4596e3a

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