Browse code

NEWS: notes about the new udp4_raw mode

Andrei Pelinescu-Onciul authored on 11/08/2010 14:03:55
Showing 1 changed files
... ...
@@ -6,6 +6,19 @@ $Id$
6 6
 sip-router 3.1 chages
7 7
 
8 8
 core:
9
+  - major performance increase on Linux multi-cpu machines that send a lot
10
+     of UDP IPv4 packets (40-50% faster in stateless mode). For it to work
11
+     udp4_raw must be enabled or set into auto mode in sr.cfg and sr must be
12
+     started as root or with CAP_NET_RAW. Note that even if udp4_raw is
13
+     off (default), if sr was started with enough privileges, it can be
14
+     enabled at runtime.
15
+     The support for using raw sockets is also available on FreeBSD (compiled
16
+     by default but not tested for performance yet), NetBSD, OpenBSD and
17
+     Darwin (not tested and not compiled by default, needs
18
+     make cfg extra_defs=-DUSE_RAW_SOCKS). To check if the support is
19
+     compiled, use ser -V |grep --color RAW_SOCKS or for a running
20
+     ser: sercmd core.udp4_raw_info.
21
+     See udp4_raw, udp4_raw_mtu and udp4_raw_ttl below.
9 22
   - onreply_route {...} is now equivalent with onreply_route[0] {...}
10 23
   - global, per protocol blacklist ignore masks (via extended send_flags).
11 24
     See dst_blacklist_udp_imask a.s.o (dst_blacklist_*_imask).
... ...
@@ -13,6 +26,28 @@ core:
13 26
   - route() now supports rvalue expressions (e.g. route("test"+$i))
14 27
 
15 28
 new config variables:
29
+  - udp4_raw - enables raw socket support for sending UDP IPv4 datagrams 
30
+      (40-50% performance increase on linux multi-cpu).
31
+      Possible values: 0 - disabled (default), 1 - enabled, -1 auto.
32
+      In "auto" mode it will be enabled if possible (sr started as root or
33
+      with CAP_NET_RAW).
34
+      udp4_raw can be used on Linux and FreeBSD. For other BSDs and Darwin
35
+      one must compile with -DUSE_RAW_SOCKS.
36
+      On Linux one should also set udp4_raw_mtu if the MTU on any network
37
+      interface that could be used for sending is smaller then 1500.
38
+      Can be set at runtime as long as sr was started with enough privileges
39
+      (core.udp4_raw).
40
+  - udp4_raw_mtu - MTU value used for UDP IPv4 packets when udp4_raw is
41
+      enabled.  It should be set to the minimum MTU of all the network
42
+      interfaces that could be used for sending. The default value is 1500.
43
+      Note that on BSDs it does not need to be set (if set it will be ignored,
44
+      the proper MTU will be used automatically by the kernel). On Linux it
45
+      should be set.
46
+      Can be set at runtime (core.udp4_raw_mtu).
47
+  - udp4_raw_ttl - TTL value used for UDP IPv4 packets when udp4_raw is
48
+      enabled. By default it is set to auto mode (-1), meaning that the
49
+      same TTL will be used as for normal UDP sockets.
50
+      Can be set at runtime (core.udp4_raw_ttl).
16 51
   - dst_blacklist_udp_imask - global blacklist events ignore mask for udp
17 52
     (a blacklist event/reason set in this variable will be ignored when 
18 53
     deciding whether or not to blacklist an udp destination). Can be set