Attachment 'varnishd.diff'

Download

   1 --- varnish-3.0.0/bin/varnishd/cache_acceptor.c	2011-06-16 14:24:54.000000000 +0300
   2 +++ varnish-3.0.0-uto/bin/varnishd/cache_acceptor.c	2011-08-16 20:22:59.000000000 +0300
   3 @@ -35,10 +35,12 @@
   4  #include <poll.h>
   5  #include <string.h>
   6  #include <stdlib.h>
   7  #include <unistd.h>
   8  
   9 +#include <netinet/in.h>
  10 +#include <netinet/tcp.h>
  11  #include <sys/uio.h>
  12  #include <sys/types.h>
  13  #include <sys/socket.h>
  14  
  15  #include "vcli.h"
  16 @@ -245,21 +247,30 @@
  17  				    SO_SNDTIMEO,
  18  				    &tv_sndtimeo, sizeof tv_sndtimeo));
  19  			}
  20  		}
  21  #endif
  22 -#ifdef SO_RCVTIMEO_WORKS
  23 +#if defined(SO_RCVTIMEO_WORKS) || defined(TCP_SNDUTO_TIMEOUT)
  24  		if (params->sess_timeout != sess_timeout) {
  25  			need_test = 1;
  26  			sess_timeout = params->sess_timeout;
  27  			tv_rcvtimeo = TIM_timeval(sess_timeout);
  28  			VTAILQ_FOREACH(ls, &heritage.socks, list) {
  29  				if (ls->sock < 0)
  30  					continue;
  31 +#ifdef SO_RCVTIMEO_WORKS
  32  				AZ(setsockopt(ls->sock, SOL_SOCKET,
  33  				    SO_RCVTIMEO,
  34  				    &tv_rcvtimeo, sizeof tv_rcvtimeo));
  35 +#endif
  36 +#ifdef TCP_SNDUTO_TIMEOUT
  37 +				int optval = (int)sess_timeout;
  38 +				AZ(setsockopt(ls->sock, IPPROTO_TCP,
  39 +				    TCP_SNDUTO_TIMEOUT,
  40 +				    &optval, sizeof optval));
  41 +#endif
  42 +
  43  			}
  44  		}
  45  #endif
  46  		/* Bound the pacing delay by parameter */
  47  		if (pace > params->acceptor_sleep_max)

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2011-07-03T19:16:07+0000, 3.2 KB) [[attachment:600uto.pcap]]
  • [get | view] (2011-06-21T06:50:05+0000, 0.5 KB) [[attachment:Both peers send UTO]]
  • [get | view] (2011-07-03T19:15:56+0000, 2.2 KB) [[attachment:no-uto.pcap]]
  • [get | view] (2011-08-15T07:38:02+0000, 28.8 KB) [[attachment:partial.pcap]]
  • [get | view] (2011-07-30T21:20:10+0000, 9.4 KB) [[attachment:uto6.pcap]]
  • [get | view] (2011-08-20T14:26:20+0000, 23.3 KB) [[attachment:uto_kernel.diff]]
  • [get | view] (2011-08-20T14:26:57+0000, 5.6 KB) [[attachment:uto_tests.tar.bz2]]
  • [get | view] (2011-08-20T14:26:34+0000, 22.5 KB) [[attachment:uto_userland.diff]]
  • [get | view] (2011-08-16T17:43:56+0000, 1.3 KB) [[attachment:varnishd.diff]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.