From andersb at projects.linpro.no Tue Sep 5 22:11:05 2006 From: andersb at projects.linpro.no (andersb at projects.linpro.no) Date: Wed, 6 Sep 2006 00:11:05 +0200 (CEST) Subject: r915 - trunk/varnish-cache/bin/varnishncsa Message-ID: <20060905221105.02F283BC1BA@projects.linpro.no> Author: andersb Date: 2006-09-06 00:11:05 +0200 (Wed, 06 Sep 2006) New Revision: 915 Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c Log: Added more outputdata, fixed memory leaks (I think). Code still not Alpha ready, but I think most concepts work now. Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-08-24 07:57:07 UTC (rev 914) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-05 22:11:05 UTC (rev 915) @@ -41,10 +41,15 @@ unsigned char *df_r; // Datafield for %r (Request) int df_rfini; // Set to 1 when a ReqServTime has come. unsigned char *df_s; // Datafield for %s, Status + int df_sfini; unsigned char *df_b; // Datafield for %b, Bytes + int df_bfini; struct tm *logline_time; // Datafield for %t unsigned char *df_R; // Datafield for %{Referer}i + int df_Rfini; unsigned char *df_U; // Datafield for %{User-agent}i + int df_Ufini; + int bogus_req; // Set to 1 if we discover a bogus request }; /* We make a array of pointers to vsb's. Sbuf is a string buffer. @@ -95,7 +100,14 @@ time_t req_time; // Timeobject used for making the requesttime. int i; + // Used for cleaning memoryalloc + + int df_s_set = 0; + int df_b_set = 0; + int jalla2 = 0; + + u = (p[2] << 8) | p[3]; if (ob[u] == NULL) { ob[u] = vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND); @@ -106,8 +118,8 @@ w = 0; i = 0; j = 0; - ll[u].df_rfini = 0; - ll[u].df_hfini = 0; + //ll[u].df_rfini = 0; + //ll[u].df_hfini = 0; switch (p[0]) { @@ -116,12 +128,13 @@ // We catch the IP adress of the session. // We also catch IP in SessionReuse because we can not always // be sure we see a SessionOpen when we start logging. + tmpPtr = strchr(p + 4, ' '); j = strlen(p + 4) - strlen(tmpPtr); // length of IP strncpy(ll[u].df_h, p + 4, j); ll[u].df_h[j] = '\0'; // put on a NULL at end of buffer. - printf("New session [%d]: %s \n",u, ll[u].df_h); + //printf("New session [%d]: %s \n",u, ll[u].df_h); break; @@ -151,12 +164,12 @@ } else { - vsb_bcat(ob[u], p + 4, strlen(p + 4)); + //vsb_bcat(ob[u], p + 4, strlen(p + 4)); //printf("Got something other than HEAD, POST, GET\n"); + ll[u].bogus_req = 1; } - break; - + case SLT_RxURL: vsb_cat(ob[u], " "); @@ -174,14 +187,16 @@ case SLT_TxStatus: ll[u].df_s = strdup(p + 4); + ll[u].df_sfini = 1; break; - + case SLT_RxHeader: - /* if (p[1] >= 11 && !strncasecmp((void *)&p[4], "user-agent:",11)){ ll[u].df_U = strdup(p + 4); + ll[u].df_Ufini = 1; } + /* if (p[1] >= 8 && !strncasecmp((void *)&p[4], "referer:",8)){ ll[u].df_R = strdup(p + 4); } @@ -198,21 +213,25 @@ // We use ReqServTime to find how the time the request was delivered // also to define that a request is finished. - /* + + /* tmpPtra = strdup(p + 4); - tmpPtrb = malloc(strlen(p + 4)); - tmpPtrc = malloc(strlen(p + 4)); + jalla2 = strlen(p + 4); + printf("Lengde av ReqEnd: %d \n", jalla2); + tmpPtrb = malloc(jalla2); + //tmpPtrc = malloc(jalla2); temp_time[0] = '\0'; - for ( tmpPtrb = strtok(tmpPtra," "); tmpPtrb != NULL; tmpPtrb = strtok(NULL, " ")){ if (i == 1){ // We have the right time + free(tmpPtra); tmpPtra = tmpPtrb; } - //printf("ReqServTime number %d: %s\n", i, tmpPtrb); + printf("ReqServTime number %d: %s\n", i, tmpPtrb); i++; } + free(tmpPtrb); tmpPtrc = strchr(tmpPtra, '.'); j = strlen(tmpPtrc); // length of timestamp //printf("j=%d\n", j); @@ -224,8 +243,9 @@ ll[u].logline_time = localtime(&req_time); strftime (temp_time, 50, "[%d/%b/%Y:%X %z] ", ll[u].logline_time); */ + ll[u].df_rfini = 1; - printf("ReqServTime [%d]\n", u); + //printf("ReqServTime [%d]\n", u); break; @@ -234,12 +254,12 @@ // XXX ask DES or PHK about this one. Am I overflowing? ll[u].df_b = strdup(p + 4); - /* + ll[u].df_bfini = 1; if (!atoi(ll[u].df_b)){ + ll[u].df_b = malloc(2); ll[u].df_b[0] = '-'; ll[u].df_b[1] = '\0'; } - */ break; @@ -247,7 +267,7 @@ // Session is closed, we clean up things. But do not write. - printf("Session close [%d]\n", u); + //printf("Session close [%d]\n", u); ll[u].df_hfini = 1; @@ -268,10 +288,10 @@ j = strlen(p + 4) - strlen(tmpPtr); // length of IP strncpy(ll[u].df_h, p + 4, j); ll[u].df_h[j] = '\0'; // put on a NULL at end of buffer. - printf("Got IP from Reuse [%d] : %s\n", u, ll[u].df_h); + //printf("Got IP from Reuse [%d] : %s\n", u, ll[u].df_h); } - printf("Session reuse [%d]\n", u); + //printf("Session reuse [%d]\n", u); break; @@ -288,11 +308,14 @@ // and clear variables that are different for each request. // - if (ll[u].df_h[0] == '\0'){ - printf("Tom IP \n"); + int jalla; + + if (ll[u].df_h[0] == '\0' || ll[u].bogus_req){ + ll[u].bogus_req = 0; + //printf("Tom IP \n"); } else{ - printf("[%d] %s - - ", u, ll[u].df_h ); + printf("[%d] %s - - %s ", u, ll[u].df_h, temp_time ); vsb_finish(ob[u]); printf("\"%s\"", vsb_data(ob[u])); printf(" %s %s \"%s\" \"%s\"", ll[u].df_s, ll[u].df_b, ll[u].df_R, ll[u].df_U); @@ -305,42 +328,61 @@ // Clear the TxStaus - if (ll[u].df_s != NULL){ + if (ll[u].df_sfini){ free(ll[u].df_s); - printf("Freed df_s [%d]\n", u); + ll[u].df_sfini = 0; + //printf("Freed df_s [%d]\n", u); + jalla = strlen(ll[u].df_s); + //printf("Jalla: %d\n", jalla); } - if (ll[u].df_b != NULL){ + if (ll[u].df_bfini){ free(ll[u].df_b); - printf("Freed df_b [%d]\n", u); + ll[u].df_bfini = 0; + //printf("Freed df_b [%d]\n", u); + jalla = strlen(ll[u].df_b); + //printf("Jalla: %d\n", jalla); } // Clean User-Agent and Referer - if (ll[u].df_U != NULL){ + if (ll[u].df_Ufini){ free(ll[u].df_U); - printf("Freed df_U [%d]\n", u); + ll[u].df_Ufini = 0; + //printf("Freed df_U [%d]\n", u); + jalla = strlen(ll[u].df_U); + //printf("Jalla: %d\n", jalla); } if (ll[u].df_R != NULL){ free(ll[u].df_R); - printf("Freed df_R [%d]\n", u); + //printf("Freed df_R [%d]\n", u); + jalla = strlen(ll[u].df_R); + //printf("Jalla: %d\n", jalla); } // Clean up ReqEnd/Time variables - if (tmpPtra != NULL){ + //if (tmpPtra != NULL){ free(tmpPtra); - printf("Freed tmpPtra [%d]\n", u); - } + //printf("Freed tmpPtra [%d]\n", u); + jalla = strlen(tmpPtra); + //printf("Jalla: %d\n", jalla); + //} + /* if (tmpPtrb != NULL){ free(tmpPtrb); - printf("Freed tmpPtrb [%d]\n", u); + //printf("Freed tmpPtrb [%d]\n", u); + jalla = strlen(tmpPtrb); + //printf("Jalla: %d\n", jalla); } if (tmpPtrc != NULL){ free(tmpPtrc); - printf("Freed tmpPtrc [%d]\n", u); + //printf("Freed tmpPtrc [%d]\n", u); + jalla = strlen(tmpPtrc); + //printf("Jalla: %d\n", jalla); } + */ temp_time[0] = '\0'; @@ -349,7 +391,8 @@ // // Clean IP adress ll[u].df_h[0] = '\0'; - printf("Clearer [%d]\n", u); + //printf("Clearer [%d]\n", u); + ll[u].df_hfini = 0; } From phk at projects.linpro.no Wed Sep 6 06:39:52 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 6 Sep 2006 08:39:52 +0200 (CEST) Subject: r916 - trunk/varnish-cache/lib/libvarnishapi Message-ID: <20060906063952.9CE721EC3EC@projects.linpro.no> Author: phk Date: 2006-09-06 08:39:52 +0200 (Wed, 06 Sep 2006) New Revision: 916 Modified: trunk/varnish-cache/lib/libvarnishapi/shmlog.c Log: escape control characters in SLT_Debug as %XX Modified: trunk/varnish-cache/lib/libvarnishapi/shmlog.c =================================================================== --- trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2006-09-05 22:11:05 UTC (rev 915) +++ trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2006-09-06 06:39:52 UTC (rev 916) @@ -291,6 +291,17 @@ assert(fo != NULL); if (tag == SLT_Debug) { + fprintf(fo, "%5d %-12s %c \"", fd, VSL_tags[tag], + ((spec & VSL_S_CLIENT) ? 'c' : (spec & VSL_S_BACKEND) ? 'b' : ' ')); + while (len-- > 0) { + if (*ptr >= ' ' && *ptr <= '~') + fprintf(fo, "%c", *ptr); + else + fprintf(fo, "%%%02x", *ptr); + ptr++; + } + fprintf(fo, "\"\n"); + return (0); } fprintf(fo, "%5d %-12s %c %.*s\n", fd, VSL_tags[tag], From phk at projects.linpro.no Wed Sep 6 07:37:34 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 6 Sep 2006 09:37:34 +0200 (CEST) Subject: r917 - trunk/varnish-cache/bin/varnishd Message-ID: <20060906073734.6B1801EC3F3@projects.linpro.no> Author: phk Date: 2006-09-06 09:37:34 +0200 (Wed, 06 Sep 2006) New Revision: 917 Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c Log: Fix a bug in chunked fetching: With very short chunks, in this case 3 characters, our buffer may contain not only the chunk length and the chunk data, but also the next chunk length. If the short chunk is the last chunk before the zero length chunk at the end, unconditionally trying to fill the buffer before parsing the length may hang because we already have everything there is to have in the buffer. The fix is to always try to parse the buffer before adding to it. While here, tighten up and improve error checks of the code. Reported by: Xing Li Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-06 06:39:52 UTC (rev 916) +++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-06 07:37:34 UTC (rev 917) @@ -67,86 +67,94 @@ { int i; char *q; - unsigned char *p; struct storage *st; unsigned u, v; - char buf[20]; + char buf[20]; /* XXX: arbitrary */ char *bp, *be; - i = fcntl(fd, F_GETFL); /* XXX ? */ - i &= ~O_NONBLOCK; - i = fcntl(fd, F_SETFL, i); - - be = buf + sizeof buf; + be = buf + sizeof buf - 1; bp = buf; st = NULL; + u = 0; while (1) { - i = http_Read(hp, fd, bp, be - bp); - xxxassert(i >= 0); - bp += i; + /* Try to parse buf as a chunk length */ *bp = '\0'; u = strtoul(buf, &q, 16); - if (q == NULL || q == buf) + + /* Skip trailing whitespace */ + if (q != NULL && q > buf) { + while (*q == '\t' || *q == ' ') + q++; + if (*q == '\r') + q++; + } + + /* If we didn't succeed, add to buffer, try again */ + if (q == NULL || q == buf || *q != '\n') { + xxxassert(be > bp); + i = http_Read(hp, fd, bp, be - bp); + xxxassert(i >= 0); + bp += i; continue; - xxxassert(isspace(*q)); - while (*q == '\t' || *q == ' ') - q++; - if (*q == '\r') - q++; - xxxassert(*q == '\n'); + } + + /* Skip NL */ q++; + + /* Last chunk is zero bytes long */ if (u == 0) break; - sp->obj->len += u; while (u > 0) { - if (st != NULL && st->len < st->space) { - p = st->ptr + st->len; - } else { - st = stevedore->alloc(stevedore, - stevedore->trim == NULL ? u : CHUNK_PREALLOC); + + /* Get some storage if we don't have any */ + if (st == NULL || st->len == st->space) { + v = u; + if (u < CHUNK_PREALLOC && + stevedore->trim != NULL) + v = CHUNK_PREALLOC; + st = stevedore->alloc(stevedore, v); XXXAN(st->stevedore); TAILQ_INSERT_TAIL(&sp->obj->store, st, list); - p = st->ptr; } v = st->space - st->len; if (v > u) v = u; + /* Handle anything left in our buffer first */ i = bp - q; assert(i >= 0); - if (i == 0) { - } else if (v > i) { - memcpy(p, q, i); - p += i; + if (i > v) + i = v; + if (i != 0) { + memcpy(st->ptr + st->len, q, i); st->len += i; + sp->obj->len += i; u -= i; v -= i; - q = bp = buf; - } else if (i >= v) { - memcpy(p, q, v); - p += v; - st->len += v; - q += v; - u -= v; - v -= v; - if (u == 0 && bp > q) { - memcpy(buf, q, bp - q); - q = bp = buf + (bp - q); - } + q += i; } if (u == 0) break; if (v == 0) continue; + + /* Pick up the rest of this chunk */ while (v > 0) { - i = http_Read(hp, fd, p, v); + i = http_Read(hp, fd, st->ptr + st->len, v); st->len += i; + sp->obj->len += i; + u -= i; v -= i; - u -= i; - p += i; } } + assert(u == 0); + + /* We might still have stuff in our buffer */ + v = bp - q; + if (v > 0) + memcpy(buf, q, v); + q = bp = buf + v; } if (st != NULL && stevedore->trim != NULL) From phk at projects.linpro.no Wed Sep 6 09:18:06 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 6 Sep 2006 11:18:06 +0200 (CEST) Subject: r918 - trunk/varnish-cache/bin/varnishd Message-ID: <20060906091806.47B751EC3F4@projects.linpro.no> Author: phk Date: 2006-09-06 11:18:06 +0200 (Wed, 06 Sep 2006) New Revision: 918 Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c Log: Fix the same issue as in the kqueue acceptor: By the time we get here the filedescriptor may already be closed, so accept EBADF. Reported by: Xing Li Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c 2006-09-06 07:37:34 UTC (rev 917) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c 2006-09-06 09:18:06 UTC (rev 918) @@ -37,7 +37,10 @@ static void vca_del(int fd) { - AZ(epoll_ctl(epfd, EPOLL_CTL_DEL, fd, NULL)); + int i; + + i = epoll_ctl(epfd, EPOLL_CTL_DEL, fd, NULL); + assert(i == 0 || errno == EBADF); } static void From phk at projects.linpro.no Wed Sep 6 09:54:49 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 6 Sep 2006 11:54:49 +0200 (CEST) Subject: r919 - in trunk/varnish-cache: bin/varnishd include lib/libvcl Message-ID: <20060906095449.CB9D61EC3EF@projects.linpro.no> Author: phk Date: 2006-09-06 11:54:49 +0200 (Wed, 06 Sep 2006) New Revision: 919 Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c trunk/varnish-cache/include/vrt.h trunk/varnish-cache/include/vrt_obj.h trunk/varnish-cache/lib/libvcl/vcc_compile.c trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl trunk/varnish-cache/lib/libvcl/vcc_obj.c Log: Add support for inspecting response headers. Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt.c 2006-09-06 09:18:06 UTC (rev 918) +++ trunk/varnish-cache/bin/varnishd/cache_vrt.c 2006-09-06 09:54:49 UTC (rev 919) @@ -42,13 +42,24 @@ /*--------------------------------------------------------------------*/ char * -VRT_GetHdr(struct sess *sp, const char *n) +VRT_GetHdr(struct sess *sp, int where, const char *n) { char *p; + struct http *hp; CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); - AN(sp->http); - if (!http_GetHdr(sp->http, n, &p)) + switch (where) { + case 1: + hp = sp->http; + break; + case 2: + hp = sp->vbc->http; + break; + default: + INCOMPL(); + } + CHECK_OBJ_NOTNULL(hp, HTTP_MAGIC); + if (!http_GetHdr(hp, n, &p)) return (NULL); return (p); } Modified: trunk/varnish-cache/include/vrt.h =================================================================== --- trunk/varnish-cache/include/vrt.h 2006-09-06 09:18:06 UTC (rev 918) +++ trunk/varnish-cache/include/vrt.h 2006-09-06 09:54:49 UTC (rev 919) @@ -45,7 +45,7 @@ void VRT_error(struct sess *, unsigned, const char *); int VRT_switch_config(const char *); -char *VRT_GetHdr(struct sess *, const char *); +char *VRT_GetHdr(struct sess *, int where, const char *); void VRT_handling(struct sess *sp, unsigned hand); /* Backend related */ Modified: trunk/varnish-cache/include/vrt_obj.h =================================================================== --- trunk/varnish-cache/include/vrt_obj.h 2006-09-06 09:18:06 UTC (rev 918) +++ trunk/varnish-cache/include/vrt_obj.h 2006-09-06 09:54:49 UTC (rev 919) @@ -30,3 +30,5 @@ void VRT_l_obj_ttl(struct sess *, double); const char * VRT_r_req_http_(struct sess *); void VRT_l_req_http_(struct sess *, const char *); +const char * VRT_r_resp_http_(struct sess *); +void VRT_l_resp_http_(struct sess *, const char *); Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_compile.c 2006-09-06 09:18:06 UTC (rev 918) +++ trunk/varnish-cache/lib/libvcl/vcc_compile.c 2006-09-06 09:54:49 UTC (rev 919) @@ -375,7 +375,7 @@ { char *p; struct var *v; - int i; + int i, w; (void)tl; @@ -388,7 +388,11 @@ p[i] = '\0'; v->name = p; v->fmt = STRING; - asprintf(&p, "VRT_GetHdr(sp, \"\\%03o%s:\")", + if (!memcmp(vh->name, "req.", 4)) + w = 1; + else + w = 2; + asprintf(&p, "VRT_GetHdr(sp, %d, \"\\%03o%s:\")", w, (unsigned)(strlen(v->name + vh->len) + 1), v->name + vh->len); assert(p != NULL); v->rname = p; Modified: trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2006-09-06 09:18:06 UTC (rev 918) +++ trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2006-09-06 09:54:49 UTC (rev 919) @@ -513,7 +513,7 @@ fputs("void VRT_error(struct sess *, unsigned, const char *);\n", f); fputs("int VRT_switch_config(const char *);\n", f); fputs("\n", f); - fputs("char *VRT_GetHdr(struct sess *, const char *);\n", f); + fputs("char *VRT_GetHdr(struct sess *, int where, const char *);\n", f); fputs("void VRT_handling(struct sess *sp, unsigned hand);\n", f); fputs("\n", f); fputs("/* Backend related */\n", f); Modified: trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl 2006-09-06 09:18:06 UTC (rev 918) +++ trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl 2006-09-06 09:54:49 UTC (rev 919) @@ -22,6 +22,7 @@ { obj.cacheable BOOL } { obj.ttl TIME } { req.http. HEADER } + { resp.http. HEADER } } set tt(IP) "const unsigned char *" Modified: trunk/varnish-cache/lib/libvcl/vcc_obj.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_obj.c 2006-09-06 09:18:06 UTC (rev 918) +++ trunk/varnish-cache/lib/libvcl/vcc_obj.c 2006-09-06 09:54:49 UTC (rev 919) @@ -62,6 +62,10 @@ "VRT_r_req_http_(sp)", "VRT_l_req_http_(sp, ", }, + { "resp.http.", HEADER, 10, + "VRT_r_resp_http_(sp)", + "VRT_l_resp_http_(sp, ", + }, { NULL } }; @@ -98,4 +102,6 @@ "void VRT_l_obj_ttl(struct sess *, double);\n" "const char * VRT_r_req_http_(struct sess *);\n" "void VRT_l_req_http_(struct sess *, const char *);\n" + "const char * VRT_r_resp_http_(struct sess *);\n" + "void VRT_l_resp_http_(struct sess *, const char *);\n" ; From phk at projects.linpro.no Wed Sep 6 09:58:24 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 6 Sep 2006 11:58:24 +0200 (CEST) Subject: r920 - trunk/varnish-cache/bin/varnishd Message-ID: <20060906095824.A24F61EC3F3@projects.linpro.no> Author: phk Date: 2006-09-06 11:58:24 +0200 (Wed, 06 Sep 2006) New Revision: 920 Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c Log: Mark responses with Set-Cookie as "pass" Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2006-09-06 09:54:49 UTC (rev 919) +++ trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2006-09-06 09:58:24 UTC (rev 920) @@ -69,6 +69,9 @@ " if (!obj.cacheable) {\n" " insert_pass;\n" " }\n" + " if (resp.http.Set-Cookie) {\n" + " insert_pass;\n" + " }\n" " insert;\n" "}\n" "sub default_vcl_timeout {\n" From phk at projects.linpro.no Wed Sep 6 10:45:55 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 6 Sep 2006 12:45:55 +0200 (CEST) Subject: r921 - trunk/varnish-cache/lib/libvcl Message-ID: <20060906104555.837F21EC3ED@projects.linpro.no> Author: phk Date: 2006-09-06 12:45:55 +0200 (Wed, 06 Sep 2006) New Revision: 921 Modified: trunk/varnish-cache/lib/libvcl/vcc_priv.h Log: Allow '-' in identifiers. For further study: should we accept RFC2616's definition of "token" ? Modified: trunk/varnish-cache/lib/libvcl/vcc_priv.h =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_priv.h 2006-09-06 09:58:24 UTC (rev 920) +++ trunk/varnish-cache/lib/libvcl/vcc_priv.h 2006-09-06 10:45:55 UTC (rev 921) @@ -5,7 +5,7 @@ #include "vcc_token_defs.h" #define isident1(c) (isalpha(c)) -#define isident(c) (isalpha(c) || isdigit(c) || (c) == '_') +#define isident(c) (isalpha(c) || isdigit(c) || (c) == '_' || (c) == '-') #define isvar(c) (isident(c) || (c) == '.') unsigned vcl_fixed_token(const char *p, const char **q); extern const char *vcl_tnames[256]; From phk at projects.linpro.no Wed Sep 6 11:21:40 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 6 Sep 2006 13:21:40 +0200 (CEST) Subject: r922 - trunk/varnish-cache/lib/libvarnishapi Message-ID: <20060906112140.3858A3BC13C@projects.linpro.no> Author: phk Date: 2006-09-06 13:21:40 +0200 (Wed, 06 Sep 2006) New Revision: 922 Modified: trunk/varnish-cache/lib/libvarnishapi/shmlog.c Log: Fix buglet in -i/-x name matching Modified: trunk/varnish-cache/lib/libvarnishapi/shmlog.c =================================================================== --- trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2006-09-06 10:45:55 UTC (rev 921) +++ trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2006-09-06 11:21:40 UTC (rev 922) @@ -393,7 +393,7 @@ for (j = 0; j < l; j++) if (tolower(*q++) != tolower(*p++)) break; - if (j != l) + if (j != l || *p != '\0') continue; if (arg == 'x') From phk at projects.linpro.no Wed Sep 6 18:23:24 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 6 Sep 2006 20:23:24 +0200 (CEST) Subject: r923 - trunk/varnish-cache/bin/varnishd Message-ID: <20060906182324.F35C01EC3E9@projects.linpro.no> Author: phk Date: 2006-09-06 20:23:24 +0200 (Wed, 06 Sep 2006) New Revision: 923 Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c Log: Fix the poll acceptor, we need to cache the fd as sp->fd might change to -1 under us. Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c 2006-09-06 11:21:40 UTC (rev 922) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c 2006-09-06 18:23:24 UTC (rev 923) @@ -78,7 +78,7 @@ unsigned v; struct sess *sp, *sp2; struct timespec ts; - int i; + int i, fd; (void)arg; @@ -100,13 +100,14 @@ if (v == 0) break; CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); - if (pollfd[sp->fd].revents) { + fd = sp->fd; + if (pollfd[fd].revents) { v--; i = vca_pollsession(sp); if (i < 0) continue; TAILQ_REMOVE(&sesshead, sp, list); - vca_unpoll(sp->fd); + vca_unpoll(fd); if (i == 0) vca_handover(sp, i); else @@ -119,7 +120,7 @@ sp->t_open.tv_nsec > ts.tv_nsec) continue; TAILQ_REMOVE(&sesshead, sp, list); - vca_unpoll(sp->fd); + vca_unpoll(fd); vca_close_session(sp, "timeout"); SES_Delete(sp); } From phk at projects.linpro.no Wed Sep 6 18:32:06 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 6 Sep 2006 20:32:06 +0200 (CEST) Subject: r924 - trunk/varnish-cache/bin/varnishd Message-ID: <20060906183206.04A841EC3EF@projects.linpro.no> Author: phk Date: 2006-09-06 20:32:05 +0200 (Wed, 06 Sep 2006) New Revision: 924 Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c Log: Give pool threads 120 second timeout, 10 was close to silly. Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-06 18:23:24 UTC (rev 923) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-06 18:32:05 UTC (rev 924) @@ -227,8 +227,8 @@ "Minimum is 1 thread. ", "1" }, { "thread_pool_timeout", tweak_thread_pool_timeout, "Thread dies after this many seconds of inactivity.\n" - "Default is 10 seconds. " - "Minimum is 1 second. ", "10" }, + "Default is 120 seconds. " + "Minimum is 1 second. ", "120" }, { "http_workspace", tweak_http_workspace, "Bytes of HTTP protocol workspace allocated. " "This space must be big enough for the entire HTTP protocol " From phk at projects.linpro.no Wed Sep 6 18:37:17 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 6 Sep 2006 20:37:17 +0200 (CEST) Subject: r925 - trunk/varnish-cache/bin/varnishd Message-ID: <20060906183717.B0BE71EC3EF@projects.linpro.no> Author: phk Date: 2006-09-06 20:37:17 +0200 (Wed, 06 Sep 2006) New Revision: 925 Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c trunk/varnish-cache/bin/varnishd/cache_session.c Log: Save a systemcall by using the same timestamp twice. Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-06 18:32:05 UTC (rev 924) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-06 18:37:17 UTC (rev 925) @@ -66,6 +66,7 @@ XXXAN(sp); (void)clock_gettime(CLOCK_REALTIME, &sp->t_open); + sp->acct.first = sp->t_open.tv_sec; sp->fd = i; sp->id = i; Modified: trunk/varnish-cache/bin/varnishd/cache_session.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-06 18:32:05 UTC (rev 924) +++ trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-06 18:37:17 UTC (rev 925) @@ -244,8 +244,6 @@ http_Setup(&sm->http, (void *)(sm + 1), sm->workspace); - sm->sess.acct.first = time(NULL); - return (&sm->sess); } From phk at projects.linpro.no Wed Sep 6 18:46:26 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 6 Sep 2006 20:46:26 +0200 (CEST) Subject: r926 - trunk/varnish-cache/bin/varnishd Message-ID: <20060906184626.913141EC3E2@projects.linpro.no> Author: phk Date: 2006-09-06 20:46:26 +0200 (Wed, 06 Sep 2006) New Revision: 926 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_center.c Log: Remove unused timestamp "t0" and save a syscall per request. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-06 18:37:17 UTC (rev 925) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-06 18:46:26 UTC (rev 926) @@ -267,7 +267,6 @@ /* Various internal stuff */ struct sessmem *mem; - time_t t0; struct workreq workreq; struct acct acct; Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-06 18:37:17 UTC (rev 925) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-06 18:46:26 UTC (rev 926) @@ -589,7 +589,6 @@ { int done; - sp->t0 = time(NULL); AZ(sp->vcl); sp->vcl = VCL_Get(); From phk at projects.linpro.no Wed Sep 6 18:47:06 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 6 Sep 2006 20:47:06 +0200 (CEST) Subject: r927 - trunk/varnish-cache/bin/varnishd Message-ID: <20060906184706.6CBF61EC3E9@projects.linpro.no> Author: phk Date: 2006-09-06 20:47:06 +0200 (Wed, 06 Sep 2006) New Revision: 927 Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c Log: Don't bother with SO_NOSIGPIPE, it doesn't always work and we have ignored the signal anyway. Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-06 18:46:26 UTC (rev 926) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-06 18:47:06 UTC (rev 927) @@ -70,10 +70,6 @@ sp->fd = i; sp->id = i; -#ifdef SO_NOSIGPIPE /* XXX Linux */ - i = 1; - AZ(setsockopt(sp->fd, SOL_SOCKET, SO_NOSIGPIPE, &i, sizeof i)); -#endif #ifdef SO_LINGER /* XXX Linux*/ linger.l_onoff = 0; linger.l_linger = 0; From phk at projects.linpro.no Wed Sep 6 19:08:06 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 6 Sep 2006 21:08:06 +0200 (CEST) Subject: r928 - trunk/varnish-cache/bin/varnishd Message-ID: <20060906190806.473F41EC3E2@projects.linpro.no> Author: phk Date: 2006-09-06 21:08:06 +0200 (Wed, 06 Sep 2006) New Revision: 928 Modified: trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_pool.c Log: Grab the r_recv timestamp at the right time. Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-06 18:47:06 UTC (rev 927) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-06 19:08:06 UTC (rev 928) @@ -589,6 +589,8 @@ { int done; + clock_gettime(CLOCK_REALTIME, &sp->t_req); + AZ(sp->vcl); sp->vcl = VCL_Get(); Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-06 18:47:06 UTC (rev 927) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-06 19:08:06 UTC (rev 928) @@ -215,8 +215,6 @@ struct worker *w; pthread_t tp; - clock_gettime(CLOCK_REALTIME, &sp->t_req); - sp->workreq.sess = sp; LOCK(&wrk_mtx); From phk at projects.linpro.no Wed Sep 6 19:35:33 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 6 Sep 2006 21:35:33 +0200 (CEST) Subject: r929 - trunk/varnish-cache/bin/varnishd Message-ID: <20060906193533.EF44B1EC3E9@projects.linpro.no> Author: phk Date: 2006-09-06 21:35:33 +0200 (Wed, 06 Sep 2006) New Revision: 929 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_pool.c Log: Reduce traffic on the wrk_mtx, saving some syscalls along the way: Make a thread-reaper-thread which examines the tail end of the queue and kicks threads which are too old so the wake up and die. This allows us to assume that a thread on the free queue is always waiting on its condvar, so we don't need to hold the mutex when we signal the condvar. As a result, the woken thread stands a chance to grab the mutex and a little song and dance between the two threads is avoided. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-06 19:08:06 UTC (rev 928) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-06 19:35:33 UTC (rev 929) @@ -99,7 +99,8 @@ struct objhead *nobjhead; struct object *nobj; - unsigned nbr; + time_t idle; + pthread_cond_t cv; TAILQ_ENTRY(worker) list; struct workreq *wrq; Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-06 19:08:06 UTC (rev 928) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-06 19:35:33 UTC (rev 929) @@ -25,8 +25,10 @@ /* Number of work requests queued in excess of worker threads available */ static unsigned wrk_overflow; -static TAILQ_HEAD(, worker) wrk_idle = TAILQ_HEAD_INITIALIZER(wrk_idle); -static TAILQ_HEAD(, worker) wrk_busy = TAILQ_HEAD_INITIALIZER(wrk_busy); +TAILQ_HEAD(workerhead, worker); + +static struct workerhead wrk_idle = TAILQ_HEAD_INITIALIZER(wrk_idle); +static struct workerhead wrk_busy = TAILQ_HEAD_INITIALIZER(wrk_busy); static TAILQ_HEAD(, workreq) wrk_reqhead = TAILQ_HEAD_INITIALIZER(wrk_reqhead); /*-------------------------------------------------------------------- @@ -150,6 +152,7 @@ if (w->nobjhead != NULL) CHECK_OBJ(w->nobjhead, OBJHEAD_MAGIC); w->wrq = NULL; + w->idle = time(NULL); LOCK(&wrk_mtx); VSL_stats->n_wrk_busy--; } @@ -158,19 +161,17 @@ wrk_thread(void *priv) { struct worker *w, ww; - struct timespec ts; (void)priv; w = &ww; memset(w, 0, sizeof *w); w->magic = WORKER_MAGIC; - + w->idle = time(NULL); AZ(pthread_cond_init(&w->cv, NULL)); + VSL(SLT_WorkThread, 0, "%p start", w); LOCK(&wrk_mtx); - w->nbr = VSL_stats->n_wrk; VSL_stats->n_wrk_create++; - VSL(SLT_WorkThread, 0, "%u born", w->nbr); TAILQ_INSERT_HEAD(&wrk_busy, w, list); while (1) { CHECK_OBJ_NOTNULL(w, WORKER_MAGIC); @@ -184,27 +185,17 @@ TAILQ_REMOVE(&wrk_busy, w, list); TAILQ_INSERT_HEAD(&wrk_idle, w, list); - - /* If we are a reserved thread we don't die */ - if (w->nbr < params->wthread_min) { - AZ(pthread_cond_wait(&w->cv, &wrk_mtx)); - } else { - /* If we are a dynamic thread, time out and die */ - AZ(clock_gettime(CLOCK_REALTIME, &ts)); - ts.tv_sec += params->wthread_timeout; - if (pthread_cond_timedwait(&w->cv, &wrk_mtx, &ts)) { - VSL_stats->n_wrk--; - TAILQ_REMOVE(&wrk_idle, w, list); - UNLOCK(&wrk_mtx); - VSL(SLT_WorkThread, 0, "%u suicide", w->nbr); - AZ(pthread_cond_destroy(&w->cv)); - return (NULL); - } - } - - /* we are already removed from wrk_idle */ + assert(w->idle != 0); + AZ(pthread_cond_wait(&w->cv, &wrk_mtx)); + if (w->idle == 0) + break; wrk_do_one(w); } + VSL_stats->n_wrk--; + UNLOCK(&wrk_mtx); + VSL(SLT_WorkThread, 0, "%p end", w); + AZ(pthread_cond_destroy(&w->cv)); + return (NULL); } /*--------------------------------------------------------------------*/ @@ -224,10 +215,10 @@ /* If there are idle threads, we tickle the first one into action */ w = TAILQ_FIRST(&wrk_idle); if (w != NULL) { - AZ(pthread_cond_signal(&w->cv)); TAILQ_REMOVE(&wrk_idle, w, list); TAILQ_INSERT_TAIL(&wrk_busy, w, list); UNLOCK(&wrk_mtx); + AZ(pthread_cond_signal(&w->cv)); return; } @@ -258,8 +249,36 @@ VSL_stats->n_wrk_failed++; UNLOCK(&wrk_mtx); } + +/*--------------------------------------------------------------------*/ +static void * +wrk_reaperthread(void *priv) +{ + time_t now; + struct worker *w; + (void)priv; + while (1) { + sleep(1); + if (VSL_stats->n_wrk <= params->wthread_min) + continue; + now = time(NULL); + LOCK(&wrk_mtx); + w = TAILQ_LAST(&wrk_idle, workerhead); + if (w != NULL && w->idle + params->wthread_timeout < now) + TAILQ_REMOVE(&wrk_idle, w, list); + else + w = NULL; + UNLOCK(&wrk_mtx); + if (w == NULL) + continue; + w->idle = 0; + AZ(pthread_cond_signal(&w->cv)); + } + INCOMPL(); +} + /*--------------------------------------------------------------------*/ void @@ -270,6 +289,9 @@ AZ(pthread_mutex_init(&wrk_mtx, NULL)); + AZ(pthread_create(&tp, NULL, wrk_reaperthread, NULL)); + AZ(pthread_detach(tp)); + VSL(SLT_Debug, 0, "Starting %u worker threads", params->wthread_min); for (i = 0; i < params->wthread_min; i++) { VSL_stats->n_wrk++; @@ -295,7 +317,7 @@ t = time(NULL); TAILQ_FOREACH(w, &wrk_busy, list) { cli_out(cli, "\n"); - cli_out(cli, "W %p nbr %d ", w, w->nbr); + cli_out(cli, "W %p", w); if (w->wrq == NULL) continue; s = w->wrq->sess; From phk at projects.linpro.no Wed Sep 6 20:45:49 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 6 Sep 2006 22:45:49 +0200 (CEST) Subject: r930 - trunk/varnish-cache/bin/varnishd Message-ID: <20060906204549.8DECE1EC3E9@projects.linpro.no> Author: phk Date: 2006-09-06 22:45:49 +0200 (Wed, 06 Sep 2006) New Revision: 930 Modified: trunk/varnish-cache/bin/varnishd/cache_session.c Log: Give the stats summation its own mutex Modified: trunk/varnish-cache/bin/varnishd/cache_session.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-06 19:35:33 UTC (rev 929) +++ trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-06 20:45:49 UTC (rev 930) @@ -49,6 +49,7 @@ TAILQ_HEAD(srcaddrhead ,srcaddr); static struct srcaddrhead srcaddr_hash[CLIENT_HASH]; static pthread_mutex_t ses_mtx; +static pthread_mutex_t stat_mtx; static pthread_mutex_t ses_mem_mtx; /*-------------------------------------------------------------------- @@ -152,7 +153,7 @@ ses_sum_acct(&sp->acct, a); - LOCK(&ses_mtx); + LOCK(&stat_mtx); ses_sum_acct(b, a); VSL(SLT_StatAddr, 0, "%s 0 %d %ju %ju %ju %ju %ju %ju %ju", sp->srcaddr->addr, time(NULL) - b->first, @@ -165,7 +166,7 @@ VSL_stats->s_fetch += a->fetch; VSL_stats->s_hdrbytes += a->hdrbytes; VSL_stats->s_bodybytes += a->bodybytes; - UNLOCK(&ses_mtx); + UNLOCK(&stat_mtx); memset(a, 0, sizeof *a); } @@ -285,5 +286,6 @@ for (i = 0; i < CLIENT_HASH; i++) TAILQ_INIT(&srcaddr_hash[i]); AZ(pthread_mutex_init(&ses_mtx, NULL)); + AZ(pthread_mutex_init(&stat_mtx, NULL)); AZ(pthread_mutex_init(&ses_mem_mtx, NULL)); } From phk at projects.linpro.no Wed Sep 6 21:15:27 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 6 Sep 2006 23:15:27 +0200 (CEST) Subject: r931 - in trunk/varnish-cache: bin/varnishd include lib/libvarnish Message-ID: <20060906211527.103B21EC3E9@projects.linpro.no> Author: phk Date: 2006-09-06 23:15:26 +0200 (Wed, 06 Sep 2006) New Revision: 931 Added: trunk/varnish-cache/lib/libvarnish/crc32.c Modified: trunk/varnish-cache/bin/varnishd/cache_session.c trunk/varnish-cache/bin/varnishd/hash_classic.c trunk/varnish-cache/bin/varnishd/hash_simple_list.c trunk/varnish-cache/bin/varnishd/shmlog.c trunk/varnish-cache/include/libvarnish.h trunk/varnish-cache/lib/libvarnish/Makefile.am Log: Move CRC32 into libvarnish Use it for hashing srcaddr as well. Hash the sockaddr instead of the ascii representation. Add a primitive mutex tracking facility which writes debug records to the shmlog if enabled. Modified: trunk/varnish-cache/bin/varnishd/cache_session.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-06 20:45:49 UTC (rev 930) +++ trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-06 21:15:26 UTC (rev 931) @@ -55,10 +55,6 @@ /*-------------------------------------------------------------------- * Assign a srcaddr to this session. * - * We use a simple hash over the ascii representation of the address - * because it is nice and modular. I'm not sure how much improvement - * using the binary address would be anyway. - * * Each hash bucket is sorted in least recently used order and if we * need to make a new entry we recycle the first expired entry we find. * If we find more expired entries during our search, we delete them. @@ -68,14 +64,12 @@ SES_RefSrcAddr(struct sess *sp) { unsigned u, v; - char *p; struct srcaddr *c, *c2, *c3; struct srcaddrhead *ch; time_t now; AZ(sp->srcaddr); - for (u = 0, p = sp->addr; *p; p++) - u += u + *p; + u = crc32_l(sp->sockaddr, sp->sockaddrlen); v = u % CLIENT_HASH; ch = &srcaddr_hash[v]; now = time(NULL); Modified: trunk/varnish-cache/bin/varnishd/hash_classic.c =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_classic.c 2006-09-06 20:45:49 UTC (rev 930) +++ trunk/varnish-cache/bin/varnishd/hash_classic.c 2006-09-06 21:15:26 UTC (rev 931) @@ -2,8 +2,6 @@ * $Id$ * * A classic bucketed hash - * - * The CRC32 implementation is in the public domain. */ #include @@ -11,8 +9,8 @@ #include #include -#include -#include +#include "shmlog.h" +#include "cache.h" /*--------------------------------------------------------------------*/ @@ -39,71 +37,6 @@ static unsigned hcl_nhash = 16383; static struct hcl_hd *hcl_head; -/*--------------------------------------------------------------------*/ - -static uint32_t crc32bits[] = { - 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, - 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, - 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, - 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, - 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, - 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, - 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, - 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, - 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, - 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, - 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, - 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, - 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, - 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, - 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, - 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, - 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, - 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, - 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, - 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, - 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, - 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, - 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, - 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, - 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, - 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, - 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, - 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, - 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, - 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, - 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, - 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, - 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, - 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, - 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, - 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, - 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, - 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, - 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, - 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, - 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, - 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, - 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d -}; - -static uint32_t -crc32(const char *p1, const char *p2) -{ - const unsigned char *p; - uint32_t crc; - - crc = ~0U; - - for (p = (const unsigned char*)p1; *p != '\0'; p++) - crc = (crc >> 8) ^ crc32bits[(crc ^ *p) & 0xff]; - for (p = (const unsigned char*)p2; *p != '\0'; p++) - crc = (crc >> 8) ^ crc32bits[(crc ^ *p) & 0xff]; - - return (crc ^ ~0U); -} - - /*-------------------------------------------------------------------- * The ->init method allows the management process to pass arguments */ @@ -170,7 +103,7 @@ CHECK_OBJ_NOTNULL(noh, OBJHEAD_MAGIC); - digest = crc32(key1, key2); + digest = crc32_2s(key1, key2); u1 = digest % hcl_nhash; hp = &hcl_head[u1]; Modified: trunk/varnish-cache/bin/varnishd/hash_simple_list.c =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_simple_list.c 2006-09-06 20:45:49 UTC (rev 930) +++ trunk/varnish-cache/bin/varnishd/hash_simple_list.c 2006-09-06 21:15:26 UTC (rev 931) @@ -8,7 +8,8 @@ #include #include -#include +#include "shmlog.h" +#include "cache.h" /*--------------------------------------------------------------------*/ Modified: trunk/varnish-cache/bin/varnishd/shmlog.c =================================================================== --- trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-06 20:45:49 UTC (rev 930) +++ trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-06 21:15:26 UTC (rev 931) @@ -61,7 +61,7 @@ } /* Only hold the lock while we find our space */ - LOCK(&vsl_mtx); + LOCKSHM(&vsl_mtx); assert(loghead->ptr < loghead->size); /* Wrap if necessary */ @@ -71,7 +71,7 @@ loghead->ptr += 5 + l; p[5 + l] = SLT_ENDMARKER; assert(loghead->ptr < loghead->size); - UNLOCK(&vsl_mtx); + UNLOCKSHM(&vsl_mtx); p[1] = l & 0xff; p[2] = (id >> 8) & 0xff; @@ -98,7 +98,7 @@ return; } - LOCK(&vsl_mtx); + LOCKSHM(&vsl_mtx); assert(loghead->ptr < loghead->size); /* Wrap if we cannot fit a full size record */ @@ -122,7 +122,7 @@ loghead->ptr += 5 + n; assert(loghead->ptr < loghead->size); - UNLOCK(&vsl_mtx); + UNLOCKSHM(&vsl_mtx); va_end(ap); } Modified: trunk/varnish-cache/include/libvarnish.h =================================================================== --- trunk/varnish-cache/include/libvarnish.h 2006-09-06 20:45:49 UTC (rev 930) +++ trunk/varnish-cache/include/libvarnish.h 2006-09-06 21:15:26 UTC (rev 931) @@ -4,6 +4,7 @@ #include #include +#include #ifndef NULL #define NULL ((void*)0) @@ -13,6 +14,10 @@ void FreeArgv(char **argv); char **ParseArgv(const char *s, int comment); +/* from libvarnish/crc32.c */ +uint32_t crc32_2s(const char *p1, const char *p2); +uint32_t crc32_l(const void *p1, unsigned l); + /* from libvarnish/time.c */ void TIM_format(time_t t, char *p); time_t TIM_parse(const char *p); @@ -52,5 +57,13 @@ #define XXXAZ(foo) do { xxxassert((foo) == 0); } while (0) #define XXXAN(foo) do { xxxassert((foo) != NULL); } while (0) +#define LOCKSHM(foo) AZ(pthread_mutex_lock(foo)) +#define UNLOCKSHM(foo) AZ(pthread_mutex_unlock(foo)) + +#if 1 #define LOCK(foo) AZ(pthread_mutex_lock(foo)) #define UNLOCK(foo) AZ(pthread_mutex_unlock(foo)) +#else +#define LOCK(foo) do { AZ(pthread_mutex_lock(foo)); VSL(SLT_Debug, 0, "LOCK(%s,%s,%d," #foo ")", __func__, __FILE__, __LINE__); } while (0); +#define UNLOCK(foo) do { AZ(pthread_mutex_unlock(foo)); VSL(SLT_Debug, 0, "UNLOC(%s,%s,%d," #foo ")", __func__, __FILE__, __LINE__); } while (0); +#endif Modified: trunk/varnish-cache/lib/libvarnish/Makefile.am =================================================================== --- trunk/varnish-cache/lib/libvarnish/Makefile.am 2006-09-06 20:45:49 UTC (rev 930) +++ trunk/varnish-cache/lib/libvarnish/Makefile.am 2006-09-06 21:15:26 UTC (rev 931) @@ -10,6 +10,7 @@ binary_heap.c \ cli.c \ cli_common.c \ + crc32.c \ time.c \ version.c \ vsb.c Added: trunk/varnish-cache/lib/libvarnish/crc32.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/crc32.c 2006-09-06 20:45:49 UTC (rev 930) +++ trunk/varnish-cache/lib/libvarnish/crc32.c 2006-09-06 21:15:26 UTC (rev 931) @@ -0,0 +1,84 @@ +/* + * $Id$ + * + * This CRC32 implementation is in the public domain. + */ + +#include "libvarnish.h" + +/*--------------------------------------------------------------------*/ + +static uint32_t crc32bits[] = { + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, + 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, + 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, + 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, + 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, + 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, + 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, + 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, + 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, + 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106, + 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433, + 0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, + 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, + 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, + 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, + 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, + 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, + 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, + 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, + 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a, + 0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, + 0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, + 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, + 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, + 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, + 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, + 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, + 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, + 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, + 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f, + 0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, + 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, + 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, + 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, + 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, + 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, + 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, + 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, + 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d +}; + +uint32_t +crc32_2s(const char *p1, const char *p2) +{ + const unsigned char *p; + uint32_t crc; + + crc = ~0U; + + for (p = (const unsigned char*)p1; *p != '\0'; p++) + crc = (crc >> 8) ^ crc32bits[(crc ^ *p) & 0xff]; + for (p = (const unsigned char*)p2; *p != '\0'; p++) + crc = (crc >> 8) ^ crc32bits[(crc ^ *p) & 0xff]; + + return (crc ^ ~0U); +} + +uint32_t +crc32_l(const void *p1, unsigned l) +{ + const unsigned char *p; + uint32_t crc; + + crc = ~0U; + + for (p = (const unsigned char*)p1; l-- > 0; p++) + crc = (crc >> 8) ^ crc32bits[(crc ^ *p) & 0xff]; + return (crc ^ ~0U); +} From phk at projects.linpro.no Wed Sep 6 21:41:13 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 6 Sep 2006 23:41:13 +0200 (CEST) Subject: r932 - trunk/varnish-cache/bin/varnishd Message-ID: <20060906214113.E0EFB1EC3E2@projects.linpro.no> Author: phk Date: 2006-09-06 23:41:13 +0200 (Wed, 06 Sep 2006) New Revision: 932 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_acceptor.c trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_main.c Log: Move a bunch of work from the acceptor thread to the worker thread for better scaling. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-06 21:15:26 UTC (rev 931) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-06 21:41:13 UTC (rev 932) @@ -299,6 +299,7 @@ /* cache_acceptor.c */ void vca_return_session(struct sess *sp); void vca_close_session(struct sess *sp, const char *why); +void VCA_Prep(struct sess *sp); void VCA_Init(void); /* cache_backend.c */ @@ -315,6 +316,7 @@ /* cache_center.c [CNT] */ void CNT_Session(struct sess *sp); +void CNT_Init(void); /* cache_cli.c [CLI] */ void CLI_Init(void); Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-06 21:15:26 UTC (rev 931) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-06 21:41:13 UTC (rev 932) @@ -41,7 +41,6 @@ static struct acceptor *vca_act; -static unsigned xids; static pthread_t vca_thread_acct; static struct sess * @@ -51,7 +50,6 @@ struct sockaddr addr[2]; /* XXX: IPv6 hack */ struct sess *sp; int i; - struct linger linger; VSL_stats->client_conn++; @@ -65,11 +63,22 @@ sp = SES_New(addr, l); XXXAN(sp); - (void)clock_gettime(CLOCK_REALTIME, &sp->t_open); - sp->acct.first = sp->t_open.tv_sec; sp->fd = i; sp->id = i; + (void)clock_gettime(CLOCK_REALTIME, &sp->t_open); + return (sp); +} + +void +VCA_Prep(struct sess *sp) +{ + struct linger linger; + + TCP_name(sp->sockaddr, sp->sockaddrlen, + sp->addr, sizeof sp->addr, sp->port, sizeof sp->port); + VSL(SLT_SessionOpen, sp->fd, "%s %s", sp->addr, sp->port); + sp->acct.first = sp->t_open.tv_sec; #ifdef SO_LINGER /* XXX Linux*/ linger.l_onoff = 0; linger.l_linger = 0; @@ -93,10 +102,6 @@ AZ(setsockopt(sp->fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv)); } #endif - - TCP_name(addr, l, sp->addr, sizeof sp->addr, sp->port, sizeof sp->port); - VSL(SLT_SessionOpen, sp->fd, "%s %s", sp->addr, sp->port); - return (sp); } void @@ -111,8 +116,6 @@ } sp->step = STP_RECV; VSL_stats->client_req++; - sp->xid = xids++; - VSL(SLT_ReqStart, sp->fd, "XID %u", sp->xid); WRK_QueueSession(sp); } @@ -181,8 +184,6 @@ http_RecvPrep(sp->http); sp->step = STP_FIRST; VSL_stats->client_req++; - sp->xid = xids++; - VSL(SLT_ReqStart, sp->fd, "XID %u", sp->xid); WRK_QueueSession(sp); } } @@ -194,8 +195,6 @@ VCA_Init(void) { - srandomdev(); - xids = random(); /* XXX: Add selector mechanism at some point */ vca_act = vca_acceptors[0]; Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-06 21:15:26 UTC (rev 931) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-06 21:41:13 UTC (rev 932) @@ -38,6 +38,7 @@ #include "vcl.h" #include "cache.h" +static unsigned xids; /*-------------------------------------------------------------------- * We have a refcounted object on the session, now deliver it. @@ -238,6 +239,7 @@ { int i; + VCA_Prep(sp); for (;;) { i = http_RecvSome(sp->fd, sp->http); switch (i) { @@ -590,6 +592,8 @@ int done; clock_gettime(CLOCK_REALTIME, &sp->t_req); + sp->xid = ++xids; + VSL(SLT_ReqStart, sp->fd, "XID %u", sp->xid); AZ(sp->vcl); sp->vcl = VCL_Get(); @@ -684,3 +688,11 @@ /* DOT } */ + +void +CNT_Init(void) +{ + + srandomdev(); + xids = random(); +} Modified: trunk/varnish-cache/bin/varnishd/cache_main.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_main.c 2006-09-06 21:15:26 UTC (rev 931) +++ trunk/varnish-cache/bin/varnishd/cache_main.c 2006-09-06 21:41:13 UTC (rev 932) @@ -25,6 +25,7 @@ setbuf(stderr, NULL); printf("Child starts\n"); + CNT_Init(); VCL_Init(); HTTP_Init(); From phk at projects.linpro.no Wed Sep 6 21:52:50 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 6 Sep 2006 23:52:50 +0200 (CEST) Subject: r933 - trunk/varnish-cache/bin/varnishd Message-ID: <20060906215250.DC59C1EC3ED@projects.linpro.no> Author: phk Date: 2006-09-06 23:52:50 +0200 (Wed, 06 Sep 2006) New Revision: 933 Modified: trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_pool.c Log: Move some setup code to first state now that we have it. Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-06 21:41:13 UTC (rev 932) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-06 21:52:50 UTC (rev 933) @@ -240,6 +240,8 @@ int i; VCA_Prep(sp); + sp->wrk->acct.sess++; + SES_RefSrcAddr(sp); for (;;) { i = http_RecvSome(sp->fd, sp->http); switch (i) { Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-06 21:41:13 UTC (rev 932) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-06 21:52:50 UTC (rev 933) @@ -138,10 +138,6 @@ CHECK_OBJ_NOTNULL(wrq->sess, SESS_MAGIC); wrq->sess->wrk = w; w->wrq = wrq; - if (wrq->sess->srcaddr == NULL) { - w->acct.sess++; - SES_RefSrcAddr(wrq->sess); - } if (w->nobj != NULL) CHECK_OBJ(w->nobj, OBJECT_MAGIC); if (w->nobjhead != NULL) From phk at projects.linpro.no Wed Sep 6 22:02:07 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Thu, 7 Sep 2006 00:02:07 +0200 (CEST) Subject: r934 - trunk/varnish-cache/bin/varnishd Message-ID: <20060906220207.E71E31EC3ED@projects.linpro.no> Author: phk Date: 2006-09-07 00:02:07 +0200 (Thu, 07 Sep 2006) New Revision: 934 Modified: trunk/varnish-cache/bin/varnishd/cache_response.c Log: Account for header bytes in error and 304 responses. Remove unhelpful debug entry. Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-06 21:52:50 UTC (rev 933) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-06 22:02:07 UTC (rev 934) @@ -126,7 +126,7 @@ "\r\n"); vsb_finish(sb); WRK_Reset(sp->wrk, &sp->fd); - WRK_Write(sp->wrk, vsb_data(sb), vsb_len(sb)); + sp->wrk->acct.hdrbytes += WRK_Write(sp->wrk, vsb_data(sb), vsb_len(sb)); WRK_Flush(sp->wrk); VSL(SLT_TxResponse, sp->id, "%d", code); VSL(SLT_TxProtocol, sp->id, "HTTP/1.1"); @@ -157,7 +157,7 @@ if (sp->doclose != NULL) http_SetHeader(sp->fd, sp->http, "Connection: close"); WRK_Reset(sp->wrk, &sp->fd); - http_Write(sp->wrk, sp->http, 1); + sp->wrk->acct.hdrbytes += http_Write(sp->wrk, sp->http, 1); if (WRK_Flush(sp->wrk)) vca_close_session(sp, "remote closed"); } @@ -180,8 +180,6 @@ "Cond: %d > %d ", sp->obj->last_modified, ims); return (0); } - VSL(SLT_Debug, sp->fd, - "Cond: %d <= %d", sp->obj->last_modified, ims); res_do_304(sp); return (1); } From phk at projects.linpro.no Wed Sep 6 22:09:32 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Thu, 7 Sep 2006 00:09:32 +0200 (CEST) Subject: r935 - trunk/varnish-cache/bin/varnishd Message-ID: <20060906220932.47D681EC3ED@projects.linpro.no> Author: phk Date: 2006-09-07 00:09:32 +0200 (Thu, 07 Sep 2006) New Revision: 935 Modified: trunk/varnish-cache/bin/varnishd/cache_session.c Log: Don't use binary address anyway, we only want the IP number part and splitting that out of the binary part is not worth the trouble. Modified: trunk/varnish-cache/bin/varnishd/cache_session.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-06 22:02:07 UTC (rev 934) +++ trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-06 22:09:32 UTC (rev 935) @@ -69,7 +69,7 @@ time_t now; AZ(sp->srcaddr); - u = crc32_l(sp->sockaddr, sp->sockaddrlen); + u = crc32_2s(sp->addr, ""); v = u % CLIENT_HASH; ch = &srcaddr_hash[v]; now = time(NULL); From phk at projects.linpro.no Thu Sep 7 05:40:09 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Thu, 7 Sep 2006 07:40:09 +0200 (CEST) Subject: r936 - trunk/varnish-cache/bin/varnishd Message-ID: <20060907054009.F3CBC1EC3A5@projects.linpro.no> Author: phk Date: 2006-09-07 07:40:09 +0200 (Thu, 07 Sep 2006) New Revision: 936 Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c Log: Read more than one session pointer at a time from the pipe and handle them all with one kevent call. Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-06 22:09:32 UTC (rev 935) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-07 05:40:09 UTC (rev 936) @@ -10,6 +10,7 @@ #include #include +#include #include #include @@ -43,19 +44,29 @@ static void vca_kev(struct kevent *kp) { - int i; + int i, j; struct sess *sp; + struct kevent ke[NKEV]; + struct sess *ss[NKEV]; AN(kp->udata); if (kp->udata == pipes) { - while (kp->data > 0) { - i = read(pipes[0], &sp, sizeof sp); - assert(i == sizeof sp); - kp->data -= i; - CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); - TAILQ_INSERT_TAIL(&sesshead, sp, list); - vca_kq_sess(sp, EV_ADD); + j = 0; + i = read(pipes[0], ss, sizeof ss); + if (i == -1 && errno == EAGAIN) + return; + while (i >= sizeof ss[0]) { + CHECK_OBJ_NOTNULL(ss[j], SESS_MAGIC); + assert(ss[j]->fd >= 0); + TAILQ_INSERT_TAIL(&sesshead, ss[j], list); + EV_SET(&ke[j], ss[j]->fd, EVFILT_READ, + EV_ADD, 0, 0, ss[j]); + j++; + i -= sizeof ss[0]; } + assert(i == 0); + AZ(kevent(kq, ke, j, NULL, 0, NULL)); + VSL(SLT_Debug, 0, "KQ %d", j); return; } CAST_OBJ_NOTNULL(sp, kp->udata, SESS_MAGIC); @@ -143,8 +154,13 @@ static void vca_kqueue_init(void) { + int i; AZ(pipe(pipes)); + i = fcntl(pipes[0], F_GETFL); + i |= O_NONBLOCK; + i = fcntl(pipes[0], F_SETFL, i); + AZ(pthread_create(&vca_kqueue_thread, NULL, vca_kqueue_main, NULL)); } From phk at projects.linpro.no Thu Sep 7 05:41:13 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Thu, 7 Sep 2006 07:41:13 +0200 (CEST) Subject: r937 - trunk/varnish-cache/bin/varnishd Message-ID: <20060907054113.2CE321EC3A5@projects.linpro.no> Author: phk Date: 2006-09-07 07:41:13 +0200 (Thu, 07 Sep 2006) New Revision: 937 Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c Log: Remove debug entry Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-07 05:40:09 UTC (rev 936) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-07 05:41:13 UTC (rev 937) @@ -66,7 +66,6 @@ } assert(i == 0); AZ(kevent(kq, ke, j, NULL, 0, NULL)); - VSL(SLT_Debug, 0, "KQ %d", j); return; } CAST_OBJ_NOTNULL(sp, kp->udata, SESS_MAGIC); From phk at projects.linpro.no Thu Sep 7 07:09:38 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Thu, 7 Sep 2006 09:09:38 +0200 (CEST) Subject: r938 - trunk/varnish-cache/bin/varnishd Message-ID: <20060907070938.1729C1EC3F5@projects.linpro.no> Author: phk Date: 2006-09-07 09:09:37 +0200 (Thu, 07 Sep 2006) New Revision: 938 Modified: trunk/varnish-cache/bin/varnishd/storage_file.c Log: Split the freelist by size. Use 32 buckets for now, with a 4k pagesize that takes us to 128k which matches the fetchers default chunksize. Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-07 05:41:13 UTC (rev 937) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-07 07:09:37 UTC (rev 938) @@ -39,8 +39,12 @@ #define MINPAGES 128 +#define NBUCKET 32 /* 32 * 4k = 128k (see fetch) */ + /*--------------------------------------------------------------------*/ +TAILQ_HEAD(smfhead, smf); + struct smf { unsigned magic; #define SMF_MAGIC 0x0927a8a0 @@ -56,17 +60,16 @@ TAILQ_ENTRY(smf) order; TAILQ_ENTRY(smf) status; + struct smfhead *flist; }; -TAILQ_HEAD(smfhead, smf); - struct smf_sc { char *filename; int fd; unsigned pagesize; uintmax_t filesize; struct smfhead order; - struct smfhead free; + struct smfhead free[NBUCKET]; struct smfhead used; pthread_mutex_t mtx; }; @@ -200,11 +203,13 @@ char *p, *q; struct stat st; struct smf_sc *sc; + unsigned u; sc = calloc(sizeof *sc, 1); XXXAN(sc); TAILQ_INIT(&sc->order); - TAILQ_INIT(&sc->free); + for (u = 0; u < NBUCKET; u++) + TAILQ_INIT(&sc->free[u]); TAILQ_INIT(&sc->used); sc->pagesize = getpagesize(); @@ -285,6 +290,54 @@ } /*-------------------------------------------------------------------- + * Insert/Remove from correct freelist + */ + +static void +insfree(struct smf_sc *sc, struct smf *sp) +{ + unsigned b, n; + struct smf *sp2; + + assert(sp->alloc == 0); + assert(sp->flist == NULL); + b = sp->size / sc->pagesize; + if (b >= NBUCKET) + b = NBUCKET - 1; + sp->flist = &sc->free[b]; + n = 0; + TAILQ_FOREACH(sp2, sp->flist, status) { + assert(sp2->alloc == 0); + assert(sp2->flist == sp->flist); + if (sp->age > sp2->age || + (sp->age == sp2->age && sp->offset < sp2->offset)) { + TAILQ_INSERT_BEFORE(sp2, sp, status); + break; + } + n++; + } + if (sp2 == NULL) + TAILQ_INSERT_TAIL(sp->flist, sp, status); + VSL(SLT_Debug, 0, "FILE i %u %p %ju [%u]", b, sp, sp->size, n); +} + +static void +remfree(struct smf_sc *sc, struct smf *sp) +{ + unsigned b; + + assert(sp->alloc == 0); + assert(sp->flist != NULL); + b = sp->size / sc->pagesize; + if (b >= NBUCKET) + b = NBUCKET - 1; + assert(sp->flist == &sc->free[b]); + TAILQ_REMOVE(sp->flist, sp, status); + sp->flist = NULL; + VSL(SLT_Debug, 0, "FILE r %u %p %ju", b, sp, sp->size); +} + +/*-------------------------------------------------------------------- * Allocate a range from the first free range that is large enough. */ @@ -292,19 +345,29 @@ alloc_smf(struct smf_sc *sc, size_t bytes) { struct smf *sp, *sp2; + unsigned b; + int n; - TAILQ_FOREACH(sp, &sc->free, status) { - CHECK_OBJ_NOTNULL(sp, SMF_MAGIC); - if (sp->size >= bytes) + b = bytes / sc->pagesize; + if (b >= NBUCKET) + b = NBUCKET - 1; + n = 0; + for (sp = NULL; b < NBUCKET; b++) { + sp = TAILQ_FIRST(&sc->free[b]); + if (sp != NULL) break; + n++; } if (sp == NULL) return (sp); + remfree(sc, sp); + if (sp->size == bytes) { - TAILQ_REMOVE(&sc->free, sp, status); sp->alloc = 1; TAILQ_INSERT_TAIL(&sc->used, sp, status); + VSL(SLT_Debug, 0, "FILE A %p %ju == %ju [%d]", + sp, (uintmax_t)sp->size, (uintmax_t)bytes, n); return (sp); } @@ -313,6 +376,8 @@ XXXAN(sp2); VSL_stats->n_smf++; *sp2 = *sp; + VSL(SLT_Debug, 0, "FILE A %p %ju > %ju [%d] %p", + sp, (uintmax_t)sp->size, (uintmax_t)bytes, n, sp2); sp->offset += bytes; sp->ptr += bytes; @@ -322,6 +387,7 @@ sp2->alloc = 1; TAILQ_INSERT_BEFORE(sp, sp2, order); TAILQ_INSERT_TAIL(&sc->used, sp2, status); + insfree(sc, sp); return (sp2); } @@ -338,16 +404,19 @@ CHECK_OBJ_NOTNULL(sp, SMF_MAGIC); TAILQ_REMOVE(&sc->used, sp, status); + assert(sp->alloc != 0); sp->alloc = 0; + VSL(SLT_Debug, 0, "FILE F %p %ju", sp, sp->size); sp2 = TAILQ_NEXT(sp, order); if (sp2 != NULL && sp2->alloc == 0 && (sp2->ptr == sp->ptr + sp->size) && (sp2->offset == sp->offset + sp->size)) { sp->size += sp2->size; + VSL(SLT_Debug, 0, "FILE CN %p -> %p %ju", sp2, sp, sp->size); TAILQ_REMOVE(&sc->order, sp2, order); - TAILQ_REMOVE(&sc->free, sp2, status); + remfree(sc, sp2); free(sp2); VSL_stats->n_smf--; } @@ -357,24 +426,17 @@ sp2->alloc == 0 && (sp->ptr == sp2->ptr + sp2->size) && (sp->offset == sp2->offset + sp2->size)) { + remfree(sc, sp2); sp2->size += sp->size; + VSL(SLT_Debug, 0, "FILE CP %p -> %p %ju", sp, sp2, sp2->size); sp2->age = sp->age; TAILQ_REMOVE(&sc->order, sp, order); free(sp); VSL_stats->n_smf--; - TAILQ_REMOVE(&sc->free, sp2, status); sp = sp2; } - TAILQ_FOREACH(sp2, &sc->free, status) { - if (sp->age > sp2->age || - (sp->age == sp2->age && sp->offset < sp2->offset)) { - TAILQ_INSERT_BEFORE(sp2, sp, status); - break; - } - } - if (sp2 == NULL) - TAILQ_INSERT_TAIL(&sc->free, sp, status); + insfree(sc, sp); } /*-------------------------------------------------------------------- @@ -398,6 +460,8 @@ sp->size = bytes; sp2->ptr += bytes; sp2->offset += bytes; + sp2->alloc = 0; + VSL(SLT_Debug, 0, "FILE T %p -> %p %ju %d", sp, sp2, sp2->size); TAILQ_INSERT_TAIL(&sc->used, sp2, status); TAILQ_INSERT_AFTER(&sc->order, sp, sp2, order); free_smf(sp2); @@ -419,11 +483,9 @@ VSL_stats->n_smf++; sp->sc = sc; - sp->size = len; sp->ptr = ptr; sp->offset = off; - sp->alloc = 1; TAILQ_FOREACH(sp2, &sc->order, order) { From phk at projects.linpro.no Thu Sep 7 07:12:18 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Thu, 7 Sep 2006 09:12:18 +0200 (CEST) Subject: r939 - trunk/varnish-cache/bin/varnishd Message-ID: <20060907071218.C2E481EC3E9@projects.linpro.no> Author: phk Date: 2006-09-07 09:12:18 +0200 (Thu, 07 Sep 2006) New Revision: 939 Modified: trunk/varnish-cache/bin/varnishd/storage_file.c Log: Don't clear alloc, it will be done in due time. Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-07 07:09:37 UTC (rev 938) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-07 07:12:18 UTC (rev 939) @@ -460,7 +460,6 @@ sp->size = bytes; sp2->ptr += bytes; sp2->offset += bytes; - sp2->alloc = 0; VSL(SLT_Debug, 0, "FILE T %p -> %p %ju %d", sp, sp2, sp2->size); TAILQ_INSERT_TAIL(&sc->used, sp2, status); TAILQ_INSERT_AFTER(&sc->order, sp, sp2, order); From phk at projects.linpro.no Thu Sep 7 07:17:31 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Thu, 7 Sep 2006 09:17:31 +0200 (CEST) Subject: r940 - trunk/varnish-cache/bin/varnishd Message-ID: <20060907071731.219D71EC3E9@projects.linpro.no> Author: phk Date: 2006-09-07 09:17:31 +0200 (Thu, 07 Sep 2006) New Revision: 940 Modified: trunk/varnish-cache/bin/varnishd/storage_file.c Log: remove "age", it was effectively unused. Revisit the idea later. Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-07 07:12:18 UTC (rev 939) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-07 07:17:31 UTC (rev 940) @@ -52,7 +52,6 @@ struct smf_sc *sc; int alloc; - time_t age; off_t size; off_t offset; @@ -309,8 +308,7 @@ TAILQ_FOREACH(sp2, sp->flist, status) { assert(sp2->alloc == 0); assert(sp2->flist == sp->flist); - if (sp->age > sp2->age || - (sp->age == sp2->age && sp->offset < sp2->offset)) { + if (sp->offset < sp2->offset) { TAILQ_INSERT_BEFORE(sp2, sp, status); break; } @@ -429,7 +427,6 @@ remfree(sc, sp2); sp2->size += sp->size; VSL(SLT_Debug, 0, "FILE CP %p -> %p %ju", sp, sp2, sp2->size); - sp2->age = sp->age; TAILQ_REMOVE(&sc->order, sp, order); free(sp); VSL_stats->n_smf--; From phk at projects.linpro.no Thu Sep 7 07:27:21 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Thu, 7 Sep 2006 09:27:21 +0200 (CEST) Subject: r941 - in trunk/varnish-cache: bin/varnishd include Message-ID: <20060907072721.DB6401EC3E9@projects.linpro.no> Author: phk Date: 2006-09-07 09:27:21 +0200 (Thu, 07 Sep 2006) New Revision: 941 Modified: trunk/varnish-cache/bin/varnishd/storage_file.c trunk/varnish-cache/include/stat_field.h Log: Add stats counters for large and small free fragments. Remove debugging Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-07 07:17:31 UTC (rev 940) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-07 07:27:21 UTC (rev 941) @@ -301,8 +301,12 @@ assert(sp->alloc == 0); assert(sp->flist == NULL); b = sp->size / sc->pagesize; - if (b >= NBUCKET) + if (b >= NBUCKET) { b = NBUCKET - 1; + VSL_stats->n_smf_large++; + } else { + VSL_stats->n_smf_frag++; + } sp->flist = &sc->free[b]; n = 0; TAILQ_FOREACH(sp2, sp->flist, status) { @@ -316,7 +320,6 @@ } if (sp2 == NULL) TAILQ_INSERT_TAIL(sp->flist, sp, status); - VSL(SLT_Debug, 0, "FILE i %u %p %ju [%u]", b, sp, sp->size, n); } static void @@ -327,12 +330,15 @@ assert(sp->alloc == 0); assert(sp->flist != NULL); b = sp->size / sc->pagesize; - if (b >= NBUCKET) + if (b >= NBUCKET) { b = NBUCKET - 1; + VSL_stats->n_smf_large--; + } else { + VSL_stats->n_smf_frag--; + } assert(sp->flist == &sc->free[b]); TAILQ_REMOVE(sp->flist, sp, status); sp->flist = NULL; - VSL(SLT_Debug, 0, "FILE r %u %p %ju", b, sp, sp->size); } /*-------------------------------------------------------------------- @@ -364,8 +370,6 @@ if (sp->size == bytes) { sp->alloc = 1; TAILQ_INSERT_TAIL(&sc->used, sp, status); - VSL(SLT_Debug, 0, "FILE A %p %ju == %ju [%d]", - sp, (uintmax_t)sp->size, (uintmax_t)bytes, n); return (sp); } @@ -374,8 +378,6 @@ XXXAN(sp2); VSL_stats->n_smf++; *sp2 = *sp; - VSL(SLT_Debug, 0, "FILE A %p %ju > %ju [%d] %p", - sp, (uintmax_t)sp->size, (uintmax_t)bytes, n, sp2); sp->offset += bytes; sp->ptr += bytes; @@ -405,14 +407,12 @@ assert(sp->alloc != 0); sp->alloc = 0; - VSL(SLT_Debug, 0, "FILE F %p %ju", sp, sp->size); sp2 = TAILQ_NEXT(sp, order); if (sp2 != NULL && sp2->alloc == 0 && (sp2->ptr == sp->ptr + sp->size) && (sp2->offset == sp->offset + sp->size)) { sp->size += sp2->size; - VSL(SLT_Debug, 0, "FILE CN %p -> %p %ju", sp2, sp, sp->size); TAILQ_REMOVE(&sc->order, sp2, order); remfree(sc, sp2); free(sp2); @@ -426,7 +426,6 @@ (sp->offset == sp2->offset + sp2->size)) { remfree(sc, sp2); sp2->size += sp->size; - VSL(SLT_Debug, 0, "FILE CP %p -> %p %ju", sp, sp2, sp2->size); TAILQ_REMOVE(&sc->order, sp, order); free(sp); VSL_stats->n_smf--; @@ -457,7 +456,6 @@ sp->size = bytes; sp2->ptr += bytes; sp2->offset += bytes; - VSL(SLT_Debug, 0, "FILE T %p -> %p %ju %d", sp, sp2, sp2->size); TAILQ_INSERT_TAIL(&sc->used, sp2, status); TAILQ_INSERT_AFTER(&sc->order, sp, sp2, order); free_smf(sp2); Modified: trunk/varnish-cache/include/stat_field.h =================================================================== --- trunk/varnish-cache/include/stat_field.h 2006-09-07 07:17:31 UTC (rev 940) +++ trunk/varnish-cache/include/stat_field.h 2006-09-07 07:27:21 UTC (rev 941) @@ -18,6 +18,8 @@ MAC_STAT(n_object, uint64_t, "u", "N struct object") MAC_STAT(n_objecthead, uint64_t, "u", "N struct objecthead") MAC_STAT(n_smf, uint64_t, "u", "N struct smf") +MAC_STAT(n_smf_frag, uint64_t, "u", "N small free smf") +MAC_STAT(n_smf_large, uint64_t, "u", "N large free smf") MAC_STAT(n_vbe_conn, uint64_t, "u", "N struct vbe_conn") MAC_STAT(n_wrk, uint64_t, "u", "N worker threads") MAC_STAT(n_wrk_create, uint64_t, "u", "N worker threads created") From phk at projects.linpro.no Thu Sep 7 07:33:23 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Thu, 7 Sep 2006 09:33:23 +0200 (CEST) Subject: r942 - trunk/varnish-cache/bin/varnishd Message-ID: <20060907073323.49A5B1EC3E2@projects.linpro.no> Author: phk Date: 2006-09-07 09:33:23 +0200 (Thu, 07 Sep 2006) New Revision: 942 Modified: trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_http.c trunk/varnish-cache/bin/varnishd/cache_response.c Log: Remove debugging messages. Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-07 07:27:21 UTC (rev 941) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-07 07:33:23 UTC (rev 942) @@ -673,7 +673,6 @@ switch (sp->step) { #define STEP(l,u) \ case STP_##u: \ - VSL(SLT_Debug, sp->id, "State " #u); \ done = cnt_##l(sp); \ break; #include "steps.h" Modified: trunk/varnish-cache/bin/varnishd/cache_http.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_http.c 2006-09-07 07:27:21 UTC (rev 941) +++ trunk/varnish-cache/bin/varnishd/cache_http.c 2006-09-07 07:33:23 UTC (rev 942) @@ -190,7 +190,6 @@ sp->doclose = "not HTTP/1.1"; return; } - VSL(SLT_Debug, sp->fd, "DoConnect(%s)", p); for (; *p; p++) { if (isspace(*p)) continue; @@ -205,7 +204,6 @@ u = http_findhdr(hp, i, p); if (u != 0) hp->hdf[u] |= HDF_FILTER; - VSL(SLT_Debug, sp->fd, "FLD(%.*s) u = %u", q - p, p, u); if (!*q) break; p = q; Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-07 07:27:21 UTC (rev 941) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-07 07:33:23 UTC (rev 942) @@ -176,8 +176,6 @@ if (ims > sp->t_req.tv_sec) /* [RFC2616 14.25] */ return (0); if (sp->obj->last_modified > ims) { - VSL(SLT_Debug, sp->fd, - "Cond: %d > %d ", sp->obj->last_modified, ims); return (0); } res_do_304(sp); From phk at projects.linpro.no Thu Sep 7 07:50:48 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Thu, 7 Sep 2006 09:50:48 +0200 (CEST) Subject: r943 - trunk/varnish-cache/bin/varnishd Message-ID: <20060907075048.E51061EC3E9@projects.linpro.no> Author: phk Date: 2006-09-07 09:50:48 +0200 (Thu, 07 Sep 2006) New Revision: 943 Modified: trunk/varnish-cache/bin/varnishd/cache_response.c Log: Logging for status & response was swapped for generated errors. Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-07 07:33:23 UTC (rev 942) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-07 07:50:48 UTC (rev 943) @@ -128,9 +128,9 @@ WRK_Reset(sp->wrk, &sp->fd); sp->wrk->acct.hdrbytes += WRK_Write(sp->wrk, vsb_data(sb), vsb_len(sb)); WRK_Flush(sp->wrk); - VSL(SLT_TxResponse, sp->id, "%d", code); + VSL(SLT_TxStatus, sp->id, "%d", code); VSL(SLT_TxProtocol, sp->id, "HTTP/1.1"); - VSL(SLT_TxStatus, sp->id, msg); + VSL(SLT_TxResponse, sp->id, msg); vca_close_session(sp, expl); vsb_delete(sb); } From phk at projects.linpro.no Thu Sep 7 08:01:14 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Thu, 7 Sep 2006 10:01:14 +0200 (CEST) Subject: r944 - trunk/varnish-cache/include Message-ID: <20060907080114.E98571EC3F7@projects.linpro.no> Author: phk Date: 2006-09-07 10:01:14 +0200 (Thu, 07 Sep 2006) New Revision: 944 Modified: trunk/varnish-cache/include/libvarnish.h Log: Pick up uint32_t from instead of Modified: trunk/varnish-cache/include/libvarnish.h =================================================================== --- trunk/varnish-cache/include/libvarnish.h 2006-09-07 07:50:48 UTC (rev 943) +++ trunk/varnish-cache/include/libvarnish.h 2006-09-07 08:01:14 UTC (rev 944) @@ -4,7 +4,7 @@ #include #include -#include +#include #ifndef NULL #define NULL ((void*)0) From phk at projects.linpro.no Thu Sep 7 08:25:06 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Thu, 7 Sep 2006 10:25:06 +0200 (CEST) Subject: r945 - trunk/varnish-cache/bin/varnishd Message-ID: <20060907082506.279691EC3F5@projects.linpro.no> Author: phk Date: 2006-09-07 10:25:05 +0200 (Thu, 07 Sep 2006) New Revision: 945 Modified: trunk/varnish-cache/bin/varnishd/storage_file.c Log: Insert a bunch of asserts to try to catch anything going wrong Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-07 08:01:14 UTC (rev 944) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-07 08:25:05 UTC (rev 945) @@ -288,6 +288,24 @@ smf_initfile(sc, size, 1); } +/*--------------------------------------------------------------------*/ + +static void +phk(struct smf *sp) +{ + struct smf *sp2; + sp2 = TAILQ_NEXT(sp, order); + if (sp2 != NULL) { + assert(sp2->offset > sp->offset); + assert(sp2->ptr > sp->ptr); + } + sp2 = TAILQ_PREV(sp, smfhead, order); + if (sp2 != NULL) { + assert(sp2->offset < sp->offset); + assert(sp2->ptr < sp->ptr); + } +} + /*-------------------------------------------------------------------- * Insert/Remove from correct freelist */ @@ -298,6 +316,7 @@ unsigned b, n; struct smf *sp2; + phk(sp); assert(sp->alloc == 0); assert(sp->flist == NULL); b = sp->size / sc->pagesize; @@ -327,6 +346,7 @@ { unsigned b; + phk(sp); assert(sp->alloc == 0); assert(sp->flist != NULL); b = sp->size / sc->pagesize; @@ -356,10 +376,8 @@ if (b >= NBUCKET) b = NBUCKET - 1; n = 0; - for (sp = NULL; b < NBUCKET; b++) { + for (sp = NULL; sp == NULL && b < NBUCKET; b++) { sp = TAILQ_FIRST(&sc->free[b]); - if (sp != NULL) - break; n++; } if (sp == NULL) @@ -388,6 +406,8 @@ TAILQ_INSERT_BEFORE(sp, sp2, order); TAILQ_INSERT_TAIL(&sc->used, sp2, status); insfree(sc, sp); + phk(sp); + phk(sp2); return (sp2); } @@ -403,9 +423,10 @@ struct smf_sc *sc = sp->sc; CHECK_OBJ_NOTNULL(sp, SMF_MAGIC); + assert(sp->alloc != 0); TAILQ_REMOVE(&sc->used, sp, status); - assert(sp->alloc != 0); sp->alloc = 0; + phk(sp); sp2 = TAILQ_NEXT(sp, order); if (sp2 != NULL && @@ -445,6 +466,8 @@ struct smf *sp2; struct smf_sc *sc = sp->sc; + phk(sp); + assert(sp->alloc != 0); assert(bytes > 0); CHECK_OBJ_NOTNULL(sp, SMF_MAGIC); sp2 = malloc(sizeof *sp2); From phk at projects.linpro.no Thu Sep 7 10:12:54 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Thu, 7 Sep 2006 12:12:54 +0200 (CEST) Subject: r946 - trunk/varnish-cache/bin/varnishd Message-ID: <20060907101254.D4CC01EC3E9@projects.linpro.no> Author: phk Date: 2006-09-07 12:12:54 +0200 (Thu, 07 Sep 2006) New Revision: 946 Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c trunk/varnish-cache/bin/varnishd/storage_file.c Log: Handle zero length storage objects correctly: Don't let them exist. Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-07 08:25:05 UTC (rev 945) +++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-07 10:12:54 UTC (rev 946) @@ -38,6 +38,8 @@ struct storage *st; cl = strtoumax(b, NULL, 0); + if (cl == 0) + return (0); st = stevedore->alloc(stevedore, cl); XXXAN(st->stevedore); @@ -157,7 +159,10 @@ q = bp = buf + v; } - if (st != NULL && stevedore->trim != NULL) + if (st != NULL && st->len == 0) { + TAILQ_REMOVE(&sp->obj->store, st, list); + stevedore->free(st); + } else if (st != NULL && stevedore->trim != NULL) stevedore->trim(st, st->len); return (0); } @@ -202,7 +207,10 @@ sp->obj->len += i; } - if (stevedore->trim != NULL) + if (st->len == 0) { + TAILQ_REMOVE(&sp->obj->store, st, list); + stevedore->free(st); + } else if (stevedore->trim != NULL) stevedore->trim(st, st->len); return (1); Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-07 08:25:05 UTC (rev 945) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-07 10:12:54 UTC (rev 946) @@ -291,19 +291,32 @@ /*--------------------------------------------------------------------*/ static void -phk(struct smf *sp) +phk(struct smf_sc *sc, struct smf *sp) { struct smf *sp2; + size_t b; + + CHECK_OBJ_NOTNULL(sp, SMF_MAGIC); + return; + assert(sp->size > 0); sp2 = TAILQ_NEXT(sp, order); if (sp2 != NULL) { + CHECK_OBJ(sp2, SMF_MAGIC); assert(sp2->offset > sp->offset); assert(sp2->ptr > sp->ptr); } sp2 = TAILQ_PREV(sp, smfhead, order); if (sp2 != NULL) { + CHECK_OBJ(sp2, SMF_MAGIC); assert(sp2->offset < sp->offset); assert(sp2->ptr < sp->ptr); } + if (sp->flist != NULL) { + b = sp->size / sc->pagesize; + if (b >= NBUCKET) + b = NBUCKET - 1; + assert(sp->flist == &sc->free[b]); + } } /*-------------------------------------------------------------------- @@ -313,10 +326,11 @@ static void insfree(struct smf_sc *sc, struct smf *sp) { - unsigned b, n; + size_t b; struct smf *sp2; + size_t ns; - phk(sp); + phk(sc, sp); assert(sp->alloc == 0); assert(sp->flist == NULL); b = sp->size / sc->pagesize; @@ -327,26 +341,28 @@ VSL_stats->n_smf_frag++; } sp->flist = &sc->free[b]; - n = 0; + ns = b * sc->pagesize; TAILQ_FOREACH(sp2, sp->flist, status) { + phk(sc, sp2); + assert(sp2->size >= ns); assert(sp2->alloc == 0); assert(sp2->flist == sp->flist); - if (sp->offset < sp2->offset) { - TAILQ_INSERT_BEFORE(sp2, sp, status); + if (sp->offset < sp2->offset) break; - } - n++; } if (sp2 == NULL) TAILQ_INSERT_TAIL(sp->flist, sp, status); + else + TAILQ_INSERT_BEFORE(sp2, sp, status); + phk(sc, sp); } static void remfree(struct smf_sc *sc, struct smf *sp) { - unsigned b; + size_t b; - phk(sp); + phk(sc, sp); assert(sp->alloc == 0); assert(sp->flist != NULL); b = sp->size / sc->pagesize; @@ -359,6 +375,7 @@ assert(sp->flist == &sc->free[b]); TAILQ_REMOVE(sp->flist, sp, status); sp->flist = NULL; + phk(sc, sp); } /*-------------------------------------------------------------------- @@ -369,22 +386,30 @@ alloc_smf(struct smf_sc *sc, size_t bytes) { struct smf *sp, *sp2; - unsigned b; - int n; + size_t b; + assert(!(bytes % sc->pagesize)); b = bytes / sc->pagesize; if (b >= NBUCKET) b = NBUCKET - 1; - n = 0; - for (sp = NULL; sp == NULL && b < NBUCKET; b++) { + for (sp = NULL; b < NBUCKET - 1; b++) { sp = TAILQ_FIRST(&sc->free[b]); - n++; + if (sp != NULL) + break; } + if (sp == NULL) { + TAILQ_FOREACH(sp, &sc->free[NBUCKET -1], status) + if (sp->size >= bytes) + break; + } if (sp == NULL) return (sp); + phk(sc, sp); + assert(sp->size >= bytes); remfree(sc, sp); + phk(sc, sp); if (sp->size == bytes) { sp->alloc = 1; TAILQ_INSERT_TAIL(&sc->used, sp, status); @@ -403,11 +428,14 @@ sp2->size = bytes; sp2->alloc = 1; + phk(sc, sp); TAILQ_INSERT_BEFORE(sp, sp2, order); + phk(sc, sp); + phk(sc, sp2); TAILQ_INSERT_TAIL(&sc->used, sp2, status); insfree(sc, sp); - phk(sp); - phk(sp2); + phk(sc, sp); + phk(sc, sp2); return (sp2); } @@ -424,11 +452,15 @@ CHECK_OBJ_NOTNULL(sp, SMF_MAGIC); assert(sp->alloc != 0); + assert(sp->size > 0); + assert(!(sp->size % sc->pagesize)); TAILQ_REMOVE(&sc->used, sp, status); sp->alloc = 0; - phk(sp); + phk(sc, sp); sp2 = TAILQ_NEXT(sp, order); + if (sp2 != NULL) + phk(sc, sp2); if (sp2 != NULL && sp2->alloc == 0 && (sp2->ptr == sp->ptr + sp->size) && @@ -438,9 +470,12 @@ remfree(sc, sp2); free(sp2); VSL_stats->n_smf--; + phk(sc, sp); } sp2 = TAILQ_PREV(sp, smfhead, order); + if (sp2 != NULL) + phk(sc, sp2); if (sp2 != NULL && sp2->alloc == 0 && (sp->ptr == sp2->ptr + sp2->size) && @@ -451,6 +486,7 @@ free(sp); VSL_stats->n_smf--; sp = sp2; + phk(sc, sp); } insfree(sc, sp); @@ -466,9 +502,12 @@ struct smf *sp2; struct smf_sc *sc = sp->sc; - phk(sp); + phk(sc, sp); assert(sp->alloc != 0); assert(bytes > 0); + assert(bytes < sp->size); + assert(!(bytes % sc->pagesize)); + assert(!(sp->size % sc->pagesize)); CHECK_OBJ_NOTNULL(sp, SMF_MAGIC); sp2 = malloc(sizeof *sp2); XXXAN(sp2); @@ -479,8 +518,8 @@ sp->size = bytes; sp2->ptr += bytes; sp2->offset += bytes; + TAILQ_INSERT_AFTER(&sc->order, sp, sp2, order); TAILQ_INSERT_TAIL(&sc->used, sp2, status); - TAILQ_INSERT_AFTER(&sc->order, sp, sp2, order); free_smf(sp2); } @@ -506,6 +545,7 @@ sp->alloc = 1; TAILQ_FOREACH(sp2, &sc->order, order) { + phk(sc, sp2); if (sp->ptr < sp2->ptr) { TAILQ_INSERT_BEFORE(sp2, sp, order); break; @@ -588,6 +628,7 @@ struct smf *smf; struct smf_sc *sc = st->priv; + assert(size > 0); size += (sc->pagesize - 1); size &= ~(sc->pagesize - 1); LOCK(&sc->mtx); @@ -616,10 +657,7 @@ struct smf_sc *sc; CHECK_OBJ_NOTNULL(s, STORAGE_MAGIC); - if (size == 0) { - /* XXX: this should not happen */ - return; - } + assert(size > 0); assert(size <= s->space); xxxassert(size > 0); /* XXX: seen */ CAST_OBJ_NOTNULL(smf, s->priv, SMF_MAGIC); From phk at projects.linpro.no Thu Sep 7 10:14:43 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Thu, 7 Sep 2006 12:14:43 +0200 (CEST) Subject: r947 - trunk/varnish-cache/bin/varnishd Message-ID: <20060907101443.373CC1EC3FA@projects.linpro.no> Author: phk Date: 2006-09-07 12:14:43 +0200 (Thu, 07 Sep 2006) New Revision: 947 Modified: trunk/varnish-cache/bin/varnishd/storage_file.c Log: Missing commit message from previous commit: Fix a logic bug which allowed storage objects to be trampled on: the last bucket may contain object smaller than we want. Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-07 10:12:54 UTC (rev 946) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-07 10:14:43 UTC (rev 947) @@ -288,7 +288,9 @@ smf_initfile(sc, size, 1); } -/*--------------------------------------------------------------------*/ +/*-------------------------------------------------------------------- + * XXX: Temporary sanity checker + */ static void phk(struct smf_sc *sc, struct smf *sp) From phk at projects.linpro.no Fri Sep 8 05:58:33 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Fri, 8 Sep 2006 07:58:33 +0200 (CEST) Subject: r948 - trunk/varnish-cache/bin/varnishd Message-ID: <20060908055833.D6EB11EC3E3@projects.linpro.no> Author: phk Date: 2006-09-08 07:58:33 +0200 (Fri, 08 Sep 2006) New Revision: 948 Modified: trunk/varnish-cache/bin/varnishd/storage_file.c Log: Add an extra bucket and make it clear how the number was chosen. Remove extra sanitychecking. Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-07 10:14:43 UTC (rev 947) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-08 05:58:33 UTC (rev 948) @@ -39,7 +39,14 @@ #define MINPAGES 128 -#define NBUCKET 32 /* 32 * 4k = 128k (see fetch) */ +/* + * Number of buckets on free-list. + * + * Last bucket is "larger than" so choose number so that the second + * to last bucket matches the 128k CHUNKSIZE in cache_fetch.c when + * using the a 4K minimal page size + */ +#define NBUCKET (128 / 4 + 1) /*--------------------------------------------------------------------*/ @@ -289,39 +296,6 @@ } /*-------------------------------------------------------------------- - * XXX: Temporary sanity checker - */ - -static void -phk(struct smf_sc *sc, struct smf *sp) -{ - struct smf *sp2; - size_t b; - - CHECK_OBJ_NOTNULL(sp, SMF_MAGIC); - return; - assert(sp->size > 0); - sp2 = TAILQ_NEXT(sp, order); - if (sp2 != NULL) { - CHECK_OBJ(sp2, SMF_MAGIC); - assert(sp2->offset > sp->offset); - assert(sp2->ptr > sp->ptr); - } - sp2 = TAILQ_PREV(sp, smfhead, order); - if (sp2 != NULL) { - CHECK_OBJ(sp2, SMF_MAGIC); - assert(sp2->offset < sp->offset); - assert(sp2->ptr < sp->ptr); - } - if (sp->flist != NULL) { - b = sp->size / sc->pagesize; - if (b >= NBUCKET) - b = NBUCKET - 1; - assert(sp->flist == &sc->free[b]); - } -} - -/*-------------------------------------------------------------------- * Insert/Remove from correct freelist */ @@ -332,7 +306,6 @@ struct smf *sp2; size_t ns; - phk(sc, sp); assert(sp->alloc == 0); assert(sp->flist == NULL); b = sp->size / sc->pagesize; @@ -345,7 +318,6 @@ sp->flist = &sc->free[b]; ns = b * sc->pagesize; TAILQ_FOREACH(sp2, sp->flist, status) { - phk(sc, sp2); assert(sp2->size >= ns); assert(sp2->alloc == 0); assert(sp2->flist == sp->flist); @@ -356,7 +328,6 @@ TAILQ_INSERT_TAIL(sp->flist, sp, status); else TAILQ_INSERT_BEFORE(sp2, sp, status); - phk(sc, sp); } static void @@ -364,7 +335,6 @@ { size_t b; - phk(sc, sp); assert(sp->alloc == 0); assert(sp->flist != NULL); b = sp->size / sc->pagesize; @@ -377,7 +347,6 @@ assert(sp->flist == &sc->free[b]); TAILQ_REMOVE(sp->flist, sp, status); sp->flist = NULL; - phk(sc, sp); } /*-------------------------------------------------------------------- @@ -407,11 +376,9 @@ if (sp == NULL) return (sp); - phk(sc, sp); assert(sp->size >= bytes); remfree(sc, sp); - phk(sc, sp); if (sp->size == bytes) { sp->alloc = 1; TAILQ_INSERT_TAIL(&sc->used, sp, status); @@ -430,14 +397,9 @@ sp2->size = bytes; sp2->alloc = 1; - phk(sc, sp); TAILQ_INSERT_BEFORE(sp, sp2, order); - phk(sc, sp); - phk(sc, sp2); TAILQ_INSERT_TAIL(&sc->used, sp2, status); insfree(sc, sp); - phk(sc, sp); - phk(sc, sp2); return (sp2); } @@ -458,11 +420,8 @@ assert(!(sp->size % sc->pagesize)); TAILQ_REMOVE(&sc->used, sp, status); sp->alloc = 0; - phk(sc, sp); sp2 = TAILQ_NEXT(sp, order); - if (sp2 != NULL) - phk(sc, sp2); if (sp2 != NULL && sp2->alloc == 0 && (sp2->ptr == sp->ptr + sp->size) && @@ -472,12 +431,9 @@ remfree(sc, sp2); free(sp2); VSL_stats->n_smf--; - phk(sc, sp); } sp2 = TAILQ_PREV(sp, smfhead, order); - if (sp2 != NULL) - phk(sc, sp2); if (sp2 != NULL && sp2->alloc == 0 && (sp->ptr == sp2->ptr + sp2->size) && @@ -488,7 +444,6 @@ free(sp); VSL_stats->n_smf--; sp = sp2; - phk(sc, sp); } insfree(sc, sp); @@ -504,7 +459,6 @@ struct smf *sp2; struct smf_sc *sc = sp->sc; - phk(sc, sp); assert(sp->alloc != 0); assert(bytes > 0); assert(bytes < sp->size); @@ -547,7 +501,6 @@ sp->alloc = 1; TAILQ_FOREACH(sp2, &sc->order, order) { - phk(sc, sp2); if (sp->ptr < sp2->ptr) { TAILQ_INSERT_BEFORE(sp2, sp, order); break; From phk at projects.linpro.no Fri Sep 8 06:47:55 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Fri, 8 Sep 2006 08:47:55 +0200 (CEST) Subject: r949 - trunk/varnish-cache/bin/varnishd Message-ID: <20060908064755.7553A1EC3EC@projects.linpro.no> Author: phk Date: 2006-09-08 08:47:55 +0200 (Fri, 08 Sep 2006) New Revision: 949 Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c trunk/varnish-cache/bin/varnishd/heritage.h trunk/varnish-cache/bin/varnishd/mgt_param.c Log: Make the fetchers chunksize a parameter, but keep the default at 128k Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-08 05:58:33 UTC (rev 948) +++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-08 06:47:55 UTC (rev 949) @@ -16,17 +16,8 @@ #include "shmlog.h" #include "cache.h" +#include "heritage.h" -/* - * Chunked encoding is a hack. We prefer to have a single chunk or a - * few large chunks, and not a terribly long list of small ones. - * If our stevedore can trim, we alloc big chunks and trim the last one - * at the end when we know the result. - * - * Good testcase: http://www.washingtonpost.com/ - */ -#define CHUNK_PREALLOC (128 * 1024) - /*--------------------------------------------------------------------*/ static int @@ -112,9 +103,9 @@ /* Get some storage if we don't have any */ if (st == NULL || st->len == st->space) { v = u; - if (u < CHUNK_PREALLOC && + if (u < params->fetch_chunksize && stevedore->trim != NULL) - v = CHUNK_PREALLOC; + v = params->fetch_chunksize; st = stevedore->alloc(stevedore, v); XXXAN(st->stevedore); TAILQ_INSERT_TAIL(&sp->obj->store, st, list); @@ -189,7 +180,7 @@ st = NULL; while (1) { if (v == 0) { - st = stevedore->alloc(stevedore, CHUNK_PREALLOC); + st = stevedore->alloc(stevedore, params->fetch_chunksize); XXXAN(st->stevedore); TAILQ_INSERT_TAIL(&sp->obj->store, st, list); p = st->ptr + st->len; Modified: trunk/varnish-cache/bin/varnishd/heritage.h =================================================================== --- trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-08 05:58:33 UTC (rev 948) +++ trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-08 06:47:55 UTC (rev 949) @@ -47,6 +47,9 @@ /* Management hints */ unsigned auto_restart; + + /* Fetcher hints */ + unsigned fetch_chunksize; }; extern struct params *params; Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-08 05:58:33 UTC (rev 948) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-08 06:47:55 UTC (rev 949) @@ -190,6 +190,23 @@ /*--------------------------------------------------------------------*/ +static void +tweak_fetch_chunksize(struct cli *cli, struct parspec *par, const char *arg) +{ + unsigned u; + + (void)par; + if (arg != NULL) { + u = strtoul(arg, NULL, 0); + params->fetch_chunksize = u; + } + if (cli == NULL) + return; + cli_out(cli, "%u [kb]\n", params->fetch_chunksize); +} + +/*--------------------------------------------------------------------*/ + /* * Make sure to end all lines with either a space or newline of the * formatting will go haywire. @@ -257,6 +274,9 @@ "Restart child process automatically if it dies. " "1 = yes, 0 = no.\n" "Default is 1. ", "1" }, + { "fetch_chunksize", tweak_fetch_chunksize, + "The default chunksize used by fetcher.\n" + "Default is 128 kilobytes. ", "128" }, { NULL, NULL, NULL } }; From andersb at projects.linpro.no Sun Sep 10 22:23:59 2006 From: andersb at projects.linpro.no (andersb at projects.linpro.no) Date: Mon, 11 Sep 2006 00:23:59 +0200 (CEST) Subject: r950 - trunk/varnish-cache/bin/varnishncsa Message-ID: <20060910222359.DBCE31EC3E3@projects.linpro.no> Author: andersb Date: 2006-09-11 00:23:59 +0200 (Mon, 11 Sep 2006) New Revision: 950 Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c Log: Started to fix output of User-Agent. It was all over the place. Found what I was doing wrong and fixed it. Should work with correct User-Agent now. Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-08 06:47:55 UTC (rev 949) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-10 22:23:59 UTC (rev 950) @@ -48,6 +48,7 @@ unsigned char *df_R; // Datafield for %{Referer}i int df_Rfini; unsigned char *df_U; // Datafield for %{User-agent}i + char df_UN[512]; int df_Ufini; int bogus_req; // Set to 1 if we discover a bogus request }; @@ -193,6 +194,11 @@ case SLT_RxHeader: if (p[1] >= 11 && !strncasecmp((void *)&p[4], "user-agent:",11)){ + // (void)strncpy(ll[u].df_UN, p + 4, sizeof(ll[u].df_UN) - 1); + // ll[u].df_UN[sizeof(ll[u].df_UN) - 1] = '\0'; + // w = strlen(p + 4); + // printf("Lengde: %d\n", w); + ll[u].df_U = strdup(p + 4); ll[u].df_Ufini = 1; } @@ -213,8 +219,7 @@ // We use ReqServTime to find how the time the request was delivered // also to define that a request is finished. - - /* +/* tmpPtra = strdup(p + 4); jalla2 = strlen(p + 4); printf("Lengde av ReqEnd: %d \n", jalla2); @@ -227,7 +232,7 @@ free(tmpPtra); tmpPtra = tmpPtrb; } - printf("ReqServTime number %d: %s\n", i, tmpPtrb); + //printf("ReqServTime number %d: %s\n", i, tmpPtrb); i++; } @@ -242,8 +247,7 @@ req_time = timesec; ll[u].logline_time = localtime(&req_time); strftime (temp_time, 50, "[%d/%b/%Y:%X %z] ", ll[u].logline_time); - */ - +*/ ll[u].df_rfini = 1; //printf("ReqServTime [%d]\n", u); @@ -318,14 +322,23 @@ printf("[%d] %s - - %s ", u, ll[u].df_h, temp_time ); vsb_finish(ob[u]); printf("\"%s\"", vsb_data(ob[u])); - printf(" %s %s \"%s\" \"%s\"", ll[u].df_s, ll[u].df_b, ll[u].df_R, ll[u].df_U); + printf(" %s %s \"%s\"", ll[u].df_s, ll[u].df_b, ll[u].df_R); + if (ll[u].df_Ufini){ + printf(" \"%s\" ", ll[u].df_U); + } + else { + printf(" \"-\" "); + } printf("\n"); } - vsb_finish(ob[u]); + //vsb_finish(ob[u]); vsb_clear(ob[u]); + + ll[u].df_rfini = 0; + // Clear the TxStaus if (ll[u].df_sfini){ @@ -348,6 +361,8 @@ if (ll[u].df_Ufini){ free(ll[u].df_U); ll[u].df_Ufini = 0; + ll[u].df_UN[0] = '\0'; + ll[u].df_U[0] = '\0'; //printf("Freed df_U [%d]\n", u); jalla = strlen(ll[u].df_U); //printf("Jalla: %d\n", jalla); From phk at projects.linpro.no Mon Sep 11 08:42:35 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 11 Sep 2006 10:42:35 +0200 (CEST) Subject: r951 - in trunk/varnish-cache: bin/varnishd include Message-ID: <20060911084235.943AD1EC3E2@projects.linpro.no> Author: phk Date: 2006-09-11 10:42:35 +0200 (Mon, 11 Sep 2006) New Revision: 951 Modified: trunk/varnish-cache/bin/varnishd/cache_response.c trunk/varnish-cache/bin/varnishd/heritage.h trunk/varnish-cache/bin/varnishd/mgt_param.c trunk/varnish-cache/include/stat_field.h Log: Do stats on sendfile/write split. Add param for minimum size of object before we will sendfile it. Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-10 22:23:59 UTC (rev 950) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-11 08:42:35 UTC (rev 951) @@ -8,6 +8,7 @@ #include #include "shmlog.h" +#include "heritage.h" #include "cache.h" /*--------------------------------------------------------------------*/ @@ -232,12 +233,15 @@ * XXX: engaging sendfile for small objects. * XXX: Should use getpagesize() ? */ - if (st->fd >= 0 && st->len >= 8192) { + if (st->fd >= 0 && + st->len >= params->sendfile_threshold) { + VSL_stats->n_objsendfile++; WRK_Sendfile(sp->wrk, st->fd, st->where, st->len); continue; } #endif /* HAVE_SENDFILE */ + VSL_stats->n_objwrite++; WRK_Write(sp->wrk, st->ptr, st->len); } assert(u == sp->obj->len); Modified: trunk/varnish-cache/bin/varnishd/heritage.h =================================================================== --- trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-10 22:23:59 UTC (rev 950) +++ trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-11 08:42:35 UTC (rev 951) @@ -50,6 +50,9 @@ /* Fetcher hints */ unsigned fetch_chunksize; + + /* Sendfile object minimum size */ + unsigned sendfile_threshold; }; extern struct params *params; Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-10 22:23:59 UTC (rev 950) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-11 08:42:35 UTC (rev 951) @@ -205,8 +205,27 @@ cli_out(cli, "%u [kb]\n", params->fetch_chunksize); } +#ifdef HAVE_SENDFILE /*--------------------------------------------------------------------*/ +static void +tweak_sendfile_threshold(struct cli *cli, struct parspec *par, const char *arg) +{ + unsigned u; + + (void)par; + if (arg != NULL) { + u = strtoul(arg, NULL, 0); + params->sendfile_threshold = u; + } + if (cli == NULL) + return; + cli_out(cli, "%u [bytes]\n", params->sendfile_threshold); +} +#endif /* HAVE_SENDFILE */ + +/*--------------------------------------------------------------------*/ + /* * Make sure to end all lines with either a space or newline of the * formatting will go haywire. @@ -277,6 +296,11 @@ { "fetch_chunksize", tweak_fetch_chunksize, "The default chunksize used by fetcher.\n" "Default is 128 kilobytes. ", "128" }, +#ifdef HAVE_SENDFILE + { "sendfile_threshold", tweak_sendfile_threshold, + "The minimum size of objects transmitted with sendfile.\n" + "Default is 8192 bytes.", "8192" }, +#endif /* HAVE_SENDFILE */ { NULL, NULL, NULL } }; Modified: trunk/varnish-cache/include/stat_field.h =================================================================== --- trunk/varnish-cache/include/stat_field.h 2006-09-10 22:23:59 UTC (rev 950) +++ trunk/varnish-cache/include/stat_field.h 2006-09-11 08:42:35 UTC (rev 951) @@ -33,6 +33,9 @@ MAC_STAT(losthdr, uint64_t, "u", "HTTP header overflows") +MAC_STAT(n_objsendfile, uint64_t, "u", "Objects sent with sendfile") +MAC_STAT(n_objwrite, uint64_t, "u", "Objects sent with write") + MAC_STAT(s_sess, uint64_t, "u", "Total Sessions") MAC_STAT(s_req, uint64_t, "u", "Total Requests") MAC_STAT(s_pipe, uint64_t, "u", "Total pipe") From phk at projects.linpro.no Mon Sep 11 08:53:53 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 11 Sep 2006 10:53:53 +0200 (CEST) Subject: r952 - trunk/varnish-cache/bin/varnishd Message-ID: <20060911085353.4F34B1EC3E9@projects.linpro.no> Author: phk Date: 2006-09-11 10:53:53 +0200 (Mon, 11 Sep 2006) New Revision: 952 Modified: trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_pool.c Log: A avoid a time(NULL) call Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-11 08:42:35 UTC (rev 951) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-11 08:53:53 UTC (rev 952) @@ -105,6 +105,7 @@ sp->vcl = NULL; clock_gettime(CLOCK_REALTIME, &te); + sp->wrk->idle = te.tv_sec; dh = cnt_dt(&sp->t_open, &sp->t_req); dp = cnt_dt(&sp->t_req, &sp->t_resp); da = cnt_dt(&sp->t_resp, &te); @@ -240,6 +241,7 @@ int i; VCA_Prep(sp); + sp->wrk->idle = sp->t_open.tv_sec; sp->wrk->acct.sess++; SES_RefSrcAddr(sp); for (;;) { @@ -594,6 +596,7 @@ int done; clock_gettime(CLOCK_REALTIME, &sp->t_req); + sp->wrk->idle = sp->t_req.tv_sec; sp->xid = ++xids; VSL(SLT_ReqStart, sp->fd, "XID %u", sp->xid); Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-11 08:42:35 UTC (rev 951) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-11 08:53:53 UTC (rev 952) @@ -148,7 +148,6 @@ if (w->nobjhead != NULL) CHECK_OBJ(w->nobjhead, OBJHEAD_MAGIC); w->wrq = NULL; - w->idle = time(NULL); LOCK(&wrk_mtx); VSL_stats->n_wrk_busy--; } From phk at projects.linpro.no Mon Sep 11 08:58:42 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 11 Sep 2006 10:58:42 +0200 (CEST) Subject: r953 - trunk/varnish-cache/bin/varnishd Message-ID: <20060911085842.D68291EC3E9@projects.linpro.no> Author: phk Date: 2006-09-11 10:58:42 +0200 (Mon, 11 Sep 2006) New Revision: 953 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_session.c Log: Save more time() calls Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-11 08:53:53 UTC (rev 952) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-11 08:58:42 UTC (rev 953) @@ -251,7 +251,7 @@ struct timespec t_open; struct timespec t_req; struct timespec t_resp; - struct timespec t_idle; + struct timespec t_end; enum step step; unsigned handling; Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-11 08:53:53 UTC (rev 952) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-11 08:58:42 UTC (rev 953) @@ -104,8 +104,8 @@ VCL_Rel(sp->vcl); sp->vcl = NULL; - clock_gettime(CLOCK_REALTIME, &te); - sp->wrk->idle = te.tv_sec; + clock_gettime(CLOCK_REALTIME, &sp->t_end); + sp->wrk->idle = sp->t_end.tv_sec; dh = cnt_dt(&sp->t_open, &sp->t_req); dp = cnt_dt(&sp->t_req, &sp->t_resp); da = cnt_dt(&sp->t_resp, &te); Modified: trunk/varnish-cache/bin/varnishd/cache_session.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-11 08:53:53 UTC (rev 952) +++ trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-11 08:58:42 UTC (rev 953) @@ -72,7 +72,7 @@ u = crc32_2s(sp->addr, ""); v = u % CLIENT_HASH; ch = &srcaddr_hash[v]; - now = time(NULL); + now = sp->t_open.tv_sec; LOCK(&ses_mtx); c3 = NULL; @@ -150,7 +150,7 @@ LOCK(&stat_mtx); ses_sum_acct(b, a); VSL(SLT_StatAddr, 0, "%s 0 %d %ju %ju %ju %ju %ju %ju %ju", - sp->srcaddr->addr, time(NULL) - b->first, + sp->srcaddr->addr, sp->t_end.tv_sec - b->first, b->sess, b->req, b->pipe, b->pass, b->fetch, b->hdrbytes, b->bodybytes); VSL_stats->s_sess += a->sess; @@ -257,7 +257,7 @@ VSL_stats->n_sess--; ses_relsrcaddr(sp); VSL(SLT_StatSess, sp->id, "%s %s %d %ju %ju %ju %ju %ju %ju %ju", - sp->addr, sp->port, time(NULL) - b->first, + sp->addr, sp->port, sp->t_end.tv_sec - b->first, b->sess, b->req, b->pipe, b->pass, b->fetch, b->hdrbytes, b->bodybytes); if (sm->workspace != params->mem_workspace) { From phk at projects.linpro.no Mon Sep 11 09:00:44 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 11 Sep 2006 11:00:44 +0200 (CEST) Subject: r954 - trunk/varnish-cache/bin/varnishd Message-ID: <20060911090044.2864D1EC3E9@projects.linpro.no> Author: phk Date: 2006-09-11 11:00:44 +0200 (Mon, 11 Sep 2006) New Revision: 954 Modified: trunk/varnish-cache/bin/varnishd/cache_center.c Log: braino in last commit. Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-11 08:58:42 UTC (rev 953) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-11 09:00:44 UTC (rev 954) @@ -94,7 +94,6 @@ cnt_done(struct sess *sp) { double dh, dp, da; - struct timespec te; AZ(sp->obj); AZ(sp->vbc); @@ -108,7 +107,7 @@ sp->wrk->idle = sp->t_end.tv_sec; dh = cnt_dt(&sp->t_open, &sp->t_req); dp = cnt_dt(&sp->t_req, &sp->t_resp); - da = cnt_dt(&sp->t_resp, &te); + da = cnt_dt(&sp->t_resp, &sp->t_end); VSL(SLT_ReqEnd, sp->id, "%u %ld.%09ld %.9f %.9f %.9f", sp->xid, (long)sp->t_req.tv_sec, (long)sp->t_req.tv_nsec, dh, dp, da); From phk at projects.linpro.no Mon Sep 11 09:05:39 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 11 Sep 2006 11:05:39 +0200 (CEST) Subject: r955 - trunk/varnish-cache/bin/varnishd Message-ID: <20060911090539.A71D21EC3E9@projects.linpro.no> Author: phk Date: 2006-09-11 11:05:39 +0200 (Mon, 11 Sep 2006) New Revision: 955 Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c Log: Avoid a clock_gettime() call Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-11 09:00:44 UTC (rev 954) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-11 09:05:39 UTC (rev 955) @@ -160,7 +160,7 @@ AZ(sp->vcl); if (sp->fd >= 0) { VSL(SLT_SessionReuse, sp->fd, "%s %s", sp->addr, sp->port); - (void)clock_gettime(CLOCK_REALTIME, &sp->t_open); + sp->t_open = sp->t_end; if (http_RecvPrepAgain(sp->http)) { vca_handover(sp, 0); return; From phk at projects.linpro.no Mon Sep 11 09:14:29 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 11 Sep 2006 11:14:29 +0200 (CEST) Subject: r956 - trunk/varnish-cache/bin/varnishd Message-ID: <20060911091429.766F31EC3F5@projects.linpro.no> Author: phk Date: 2006-09-11 11:14:29 +0200 (Mon, 11 Sep 2006) New Revision: 956 Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c Log: Reduce syscall footprint of expiry and hangman Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-09-11 09:05:39 UTC (rev 955) +++ trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-09-11 09:14:29 UTC (rev 956) @@ -59,8 +59,8 @@ (void)arg; + t = time(NULL); while (1) { - t = time(NULL); LOCK(&exp_mtx); TAILQ_FOREACH(o, &exp_deathrow, deathrow) { CHECK_OBJ(o, OBJECT_MAGIC); @@ -79,6 +79,7 @@ if (o == NULL) { UNLOCK(&exp_mtx); AZ(sleep(1)); + t = time(NULL); continue; } TAILQ_REMOVE(&exp_deathrow, o, deathrow); @@ -111,15 +112,19 @@ sp = SES_New(NULL, 0); XXXAN(sp); + sp->vcl = VCL_Get(); + t = time(NULL); while (1) { - t = time(NULL); LOCK(&exp_mtx); o = binheap_root(exp_heap); if (o != NULL) CHECK_OBJ(o, OBJECT_MAGIC); if (o == NULL || o->ttl > t + expearly) { UNLOCK(&exp_mtx); + VCL_Rel(sp->vcl); AZ(sleep(1)); + sp->vcl = VCL_Get(); + t = time(NULL); continue; } binheap_delete(exp_heap, o->heap_idx); @@ -132,10 +137,8 @@ UNLOCK(&exp_mtx); VSL(SLT_ExpPick, 0, "%u", o->xid); - sp->vcl = VCL_Get(); sp->obj = o; VCL_timeout_method(sp); - VCL_Rel(sp->vcl); if (sp->handling == VCL_RET_DISCARD) { LOCK(&exp_mtx); From des at projects.linpro.no Mon Sep 11 09:16:59 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Mon, 11 Sep 2006 11:16:59 +0200 (CEST) Subject: r957 - trunk/varnish-cache Message-ID: <20060911091659.DD81B1EC3E2@projects.linpro.no> Author: des Date: 2006-09-11 11:16:59 +0200 (Mon, 11 Sep 2006) New Revision: 957 Modified: trunk/varnish-cache/configure.ac Log: Check for sendfile(). Modified: trunk/varnish-cache/configure.ac =================================================================== --- trunk/varnish-cache/configure.ac 2006-09-11 09:14:29 UTC (rev 956) +++ trunk/varnish-cache/configure.ac 2006-09-11 09:16:59 UTC (rev 957) @@ -64,6 +64,7 @@ AC_FUNC_STRERROR_R AC_CHECK_FUNCS([socket]) AC_CHECK_FUNCS([strptime]) +AC_CHECK_FUNCS([sendfile]) # These functions are provided by libcompat on platforms where they # are not available From andersb at projects.linpro.no Mon Sep 11 09:35:43 2006 From: andersb at projects.linpro.no (andersb at projects.linpro.no) Date: Mon, 11 Sep 2006 11:35:43 +0200 (CEST) Subject: r958 - trunk/varnish-cache/bin/varnishncsa Message-ID: <20060911093543.380A51EC3E2@projects.linpro.no> Author: andersb Date: 2006-09-11 11:35:43 +0200 (Mon, 11 Sep 2006) New Revision: 958 Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c Log: Cleaned up User-Agent and Referer. Both should now work correct. As far as I can see, I only have the timestamp left for a sane loggline. Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-11 09:16:59 UTC (rev 957) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-11 09:35:43 UTC (rev 958) @@ -200,12 +200,17 @@ // printf("Lengde: %d\n", w); ll[u].df_U = strdup(p + 4); + //strchr(ll[u].df_U, ':'); + // Jump ahead past "User-Agent: " + ll[u].df_U = ll[u].df_U + 12; ll[u].df_Ufini = 1; } - /* if (p[1] >= 8 && !strncasecmp((void *)&p[4], "referer:",8)){ ll[u].df_R = strdup(p + 4); + ll[u].df_R = ll[u].df_R + 9; + ll[u].df_Rfini = 1; } + /* else if (ll[u].df_R == NULL){ ll[u].df_R = strdup(p + 4); ll[u].df_R[0] = '-'; @@ -322,7 +327,14 @@ printf("[%d] %s - - %s ", u, ll[u].df_h, temp_time ); vsb_finish(ob[u]); printf("\"%s\"", vsb_data(ob[u])); - printf(" %s %s \"%s\"", ll[u].df_s, ll[u].df_b, ll[u].df_R); + printf(" %s %s ", ll[u].df_s, ll[u].df_b, ll[u].df_R); + if (ll[u].df_Rfini){ + printf(" \"%s\" ", ll[u].df_R); + } + else { + printf(" \"-\" "); + } + if (ll[u].df_Ufini){ printf(" \"%s\" ", ll[u].df_U); } @@ -359,6 +371,7 @@ // Clean User-Agent and Referer if (ll[u].df_Ufini){ + ll[u].df_U = ll[u].df_U - 12; free(ll[u].df_U); ll[u].df_Ufini = 0; ll[u].df_UN[0] = '\0'; @@ -368,8 +381,11 @@ //printf("Jalla: %d\n", jalla); } - if (ll[u].df_R != NULL){ + if (ll[u].df_Rfini){ + ll[u].df_R = ll[u].df_R - 9; free(ll[u].df_R); + ll[u].df_R[0] = '\0'; + ll[u].df_Rfini = 0; //printf("Freed df_R [%d]\n", u); jalla = strlen(ll[u].df_R); //printf("Jalla: %d\n", jalla); From phk at projects.linpro.no Mon Sep 11 10:14:29 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 11 Sep 2006 12:14:29 +0200 (CEST) Subject: r959 - trunk/varnish-cache/bin/varnishd Message-ID: <20060911101429.8C0161EC3E3@projects.linpro.no> Author: phk Date: 2006-09-11 12:14:29 +0200 (Mon, 11 Sep 2006) New Revision: 959 Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c Log: Avoid a startup-race Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-09-11 09:35:43 UTC (rev 958) +++ trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-09-11 10:14:29 UTC (rev 959) @@ -112,6 +112,7 @@ sp = SES_New(NULL, 0); XXXAN(sp); + sleep(10); /* Takes time for VCL to arrive */ sp->vcl = VCL_Get(); t = time(NULL); while (1) { From phk at projects.linpro.no Mon Sep 11 10:14:45 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 11 Sep 2006 12:14:45 +0200 (CEST) Subject: r960 - trunk/varnish-cache/bin/varnishd Message-ID: <20060911101445.C389C1EC3ED@projects.linpro.no> Author: phk Date: 2006-09-11 12:14:45 +0200 (Mon, 11 Sep 2006) New Revision: 960 Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c Log: Piggy-back kevent changes on kevent wait call Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-11 10:14:29 UTC (rev 959) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-11 10:14:45 UTC (rev 960) @@ -29,16 +29,21 @@ #define NKEV 100 +static struct kevent ki[NKEV]; +static unsigned nki; + static void vca_kq_sess(struct sess *sp, int arm) { - struct kevent ke; CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); if (sp->fd < 0) return; - EV_SET(&ke, sp->fd, EVFILT_READ, arm, 0, 0, sp); - AZ(kevent(kq, &ke, 1, NULL, 0, NULL)); + EV_SET(&ki[nki], sp->fd, EVFILT_READ, arm, 0, 0, sp); + if (++nki == NKEV) { + AZ(kevent(kq, ki, nki, NULL, 0, NULL)); + nki = 0; + } } static void @@ -46,7 +51,6 @@ { int i, j; struct sess *sp; - struct kevent ke[NKEV]; struct sess *ss[NKEV]; AN(kp->udata); @@ -59,13 +63,13 @@ CHECK_OBJ_NOTNULL(ss[j], SESS_MAGIC); assert(ss[j]->fd >= 0); TAILQ_INSERT_TAIL(&sesshead, ss[j], list); - EV_SET(&ke[j], ss[j]->fd, EVFILT_READ, - EV_ADD, 0, 0, ss[j]); + vca_kq_sess(ss[j], EV_ADD); j++; i -= sizeof ss[0]; } assert(i == 0); - AZ(kevent(kq, ke, j, NULL, 0, NULL)); + assert(j > 0); + assert(j <= NKEV); return; } CAST_OBJ_NOTNULL(sp, kp->udata, SESS_MAGIC); @@ -111,9 +115,11 @@ EV_SET(&ke[j++], pipes[0], EVFILT_READ, EV_ADD, 0, 0, pipes); AZ(kevent(kq, ke, j, NULL, 0, NULL)); + nki = 0; while (1) { - n = kevent(kq, NULL, 0, ke, NKEV, NULL); + n = kevent(kq, ki, nki, ke, NKEV, NULL); assert(n >= 1 && n <= NKEV); + nki = 0; for (kp = ke, j = 0; j < n; j++, kp++) { if (kp->filter == EVFILT_TIMER) continue; From phk at projects.linpro.no Mon Sep 11 10:16:02 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 11 Sep 2006 12:16:02 +0200 (CEST) Subject: r961 - trunk/varnish-cache/bin/varnishd Message-ID: <20060911101602.BD8021EC3EC@projects.linpro.no> Author: phk Date: 2006-09-11 12:16:02 +0200 (Mon, 11 Sep 2006) New Revision: 961 Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c Log: Only expire when the timer fires Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-11 10:14:45 UTC (rev 960) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-11 10:16:02 UTC (rev 961) @@ -101,7 +101,7 @@ vca_kqueue_main(void *arg) { struct kevent ke[NKEV], *kp; - int j, n; + int j, n, dotimer; struct timespec ts; struct sess *sp; @@ -117,15 +117,20 @@ nki = 0; while (1) { + dotimer = 0; n = kevent(kq, ki, nki, ke, NKEV, NULL); assert(n >= 1 && n <= NKEV); nki = 0; for (kp = ke, j = 0; j < n; j++, kp++) { - if (kp->filter == EVFILT_TIMER) + if (kp->filter == EVFILT_TIMER) { + dotimer = 1; continue; + } assert(kp->filter == EVFILT_READ); vca_kev(kp); } + if (!dotimer) + continue; clock_gettime(CLOCK_REALTIME, &ts); ts.tv_sec -= params->sess_timeout; for (;;) { From phk at projects.linpro.no Mon Sep 11 10:35:26 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 11 Sep 2006 12:35:26 +0200 (CEST) Subject: r962 - trunk/varnish-cache/bin/varnishd Message-ID: <20060911103526.515B11EC3ED@projects.linpro.no> Author: phk Date: 2006-09-11 12:35:26 +0200 (Mon, 11 Sep 2006) New Revision: 962 Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c Log: Ignore kevent error return entries Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-11 10:16:02 UTC (rev 961) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-11 10:35:26 UTC (rev 962) @@ -68,8 +68,6 @@ i -= sizeof ss[0]; } assert(i == 0); - assert(j > 0); - assert(j <= NKEV); return; } CAST_OBJ_NOTNULL(sp, kp->udata, SESS_MAGIC); @@ -122,6 +120,8 @@ assert(n >= 1 && n <= NKEV); nki = 0; for (kp = ke, j = 0; j < n; j++, kp++) { + if (kp->flags & EV_ERROR) + continue; if (kp->filter == EVFILT_TIMER) { dotimer = 1; continue; From phk at projects.linpro.no Mon Sep 11 11:55:01 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 11 Sep 2006 13:55:01 +0200 (CEST) Subject: r963 - in trunk/varnish-cache: bin/varnishd include Message-ID: <20060911115501.182361EC3ED@projects.linpro.no> Author: phk Date: 2006-09-11 13:55:00 +0200 (Mon, 11 Sep 2006) New Revision: 963 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/include/libvarnish.h Log: Move LOCK/UNLOCK macros to cache.h where they belong. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-11 10:35:26 UTC (rev 962) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-11 11:55:00 UTC (rev 963) @@ -433,3 +433,14 @@ /* rfc2616.c */ int RFC2616_cache_policy(struct sess *sp, struct http *hp); + +#define LOCKSHM(foo) AZ(pthread_mutex_lock(foo)) +#define UNLOCKSHM(foo) AZ(pthread_mutex_unlock(foo)) + +#if 1 +#define LOCK(foo) AZ(pthread_mutex_lock(foo)) +#define UNLOCK(foo) AZ(pthread_mutex_unlock(foo)) +#else +#define LOCK(foo) do { AZ(pthread_mutex_lock(foo)); VSL(SLT_Debug, 0, "LOCK(%s,%s,%d," #foo ")", __func__, __FILE__, __LINE__); } while (0); +#define UNLOCK(foo) do { AZ(pthread_mutex_unlock(foo)); VSL(SLT_Debug, 0, "UNLOC(%s,%s,%d," #foo ")", __func__, __FILE__, __LINE__); } while (0); +#endif Modified: trunk/varnish-cache/include/libvarnish.h =================================================================== --- trunk/varnish-cache/include/libvarnish.h 2006-09-11 10:35:26 UTC (rev 962) +++ trunk/varnish-cache/include/libvarnish.h 2006-09-11 11:55:00 UTC (rev 963) @@ -56,14 +56,3 @@ #define AN(foo) do { assert((foo) != NULL); } while (0) #define XXXAZ(foo) do { xxxassert((foo) == 0); } while (0) #define XXXAN(foo) do { xxxassert((foo) != NULL); } while (0) - -#define LOCKSHM(foo) AZ(pthread_mutex_lock(foo)) -#define UNLOCKSHM(foo) AZ(pthread_mutex_unlock(foo)) - -#if 1 -#define LOCK(foo) AZ(pthread_mutex_lock(foo)) -#define UNLOCK(foo) AZ(pthread_mutex_unlock(foo)) -#else -#define LOCK(foo) do { AZ(pthread_mutex_lock(foo)); VSL(SLT_Debug, 0, "LOCK(%s,%s,%d," #foo ")", __func__, __FILE__, __LINE__); } while (0); -#define UNLOCK(foo) do { AZ(pthread_mutex_unlock(foo)); VSL(SLT_Debug, 0, "UNLOC(%s,%s,%d," #foo ")", __func__, __FILE__, __LINE__); } while (0); -#endif From phk at projects.linpro.no Mon Sep 11 12:00:50 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 11 Sep 2006 14:00:50 +0200 (CEST) Subject: r964 - trunk/varnish-cache/bin/varnishd Message-ID: <20060911120050.2F66A1EC3ED@projects.linpro.no> Author: phk Date: 2006-09-11 14:00:50 +0200 (Mon, 11 Sep 2006) New Revision: 964 Modified: trunk/varnish-cache/bin/varnishd/cache.h Log: Embellish the mutex debugging a bit Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-11 11:55:00 UTC (rev 963) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-11 12:00:50 UTC (rev 964) @@ -441,6 +441,24 @@ #define LOCK(foo) AZ(pthread_mutex_lock(foo)) #define UNLOCK(foo) AZ(pthread_mutex_unlock(foo)) #else -#define LOCK(foo) do { AZ(pthread_mutex_lock(foo)); VSL(SLT_Debug, 0, "LOCK(%s,%s,%d," #foo ")", __func__, __FILE__, __LINE__); } while (0); -#define UNLOCK(foo) do { AZ(pthread_mutex_unlock(foo)); VSL(SLT_Debug, 0, "UNLOC(%s,%s,%d," #foo ")", __func__, __FILE__, __LINE__); } while (0); +#define LOCK(foo) \ +do { \ + if (pthread_mutex_trylock(foo)) { \ + VSL(SLT_Debug, 0, \ + "MTX_CONTEST(%s,%s,%d," #foo ")", \ + __func__, __FILE__, __LINE__); \ + AZ(pthread_mutex_lock(foo)); \ + } else { \ + VSL(SLT_Debug, 0, \ + "MTXLOCK(%s,%s,%d," #foo ")", \ + __func__, __FILE__, __LINE__); \ + } \ +} while (0); +#define UNLOCK(foo) \ +do { \ + AZ(pthread_mutex_unlock(foo)); \ + VSL(SLT_Debug, 0, \ + "MTX_UNLOCK(%s,%s,%d," #foo ")", \ + __func__, __FILE__, __LINE__); \ +} while (0); #endif From phk at projects.linpro.no Mon Sep 11 14:34:48 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 11 Sep 2006 16:34:48 +0200 (CEST) Subject: r965 - trunk/varnish-cache/bin/varnishd Message-ID: <20060911143448.621371EC055@projects.linpro.no> Author: phk Date: 2006-09-11 16:34:48 +0200 (Mon, 11 Sep 2006) New Revision: 965 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_pool.c Log: Redo the worker thread pool locking a bit, all the while cursing pthreads deficient API design for it's shortcomings. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-11 12:00:50 UTC (rev 964) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-11 14:34:48 UTC (rev 965) @@ -102,6 +102,8 @@ time_t idle; pthread_cond_t cv; + pthread_mutex_t mtx; + TAILQ_ENTRY(worker) list; struct workreq *wrq; Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-11 12:00:50 UTC (rev 964) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-11 14:34:48 UTC (rev 965) @@ -129,15 +129,10 @@ { struct workreq *wrq; - wrq = TAILQ_FIRST(&wrk_reqhead); - AN(wrq); - VSL_stats->n_wrk_busy++; - TAILQ_REMOVE(&wrk_reqhead, wrq, list); - VSL_stats->n_wrk_queue--; - UNLOCK(&wrk_mtx); + AN(w->wrq); + wrq = w->wrq; CHECK_OBJ_NOTNULL(wrq->sess, SESS_MAGIC); wrq->sess->wrk = w; - w->wrq = wrq; if (w->nobj != NULL) CHECK_OBJ(w->nobj, OBJECT_MAGIC); if (w->nobjhead != NULL) @@ -148,8 +143,6 @@ if (w->nobjhead != NULL) CHECK_OBJ(w->nobjhead, OBJHEAD_MAGIC); w->wrq = NULL; - LOCK(&wrk_mtx); - VSL_stats->n_wrk_busy--; } static void * @@ -163,29 +156,42 @@ w->magic = WORKER_MAGIC; w->idle = time(NULL); AZ(pthread_cond_init(&w->cv, NULL)); + AZ(pthread_mutex_init(&w->mtx, NULL)); VSL(SLT_WorkThread, 0, "%p start", w); LOCK(&wrk_mtx); VSL_stats->n_wrk_create++; TAILQ_INSERT_HEAD(&wrk_busy, w, list); + VSL_stats->n_wrk_busy++; while (1) { CHECK_OBJ_NOTNULL(w, WORKER_MAGIC); /* Process overflow requests, if any */ if (wrk_overflow > 0) { wrk_overflow--; + w->wrq = TAILQ_FIRST(&wrk_reqhead); + TAILQ_REMOVE(&wrk_reqhead, w->wrq, list); + VSL_stats->n_wrk_queue--; + UNLOCK(&wrk_mtx); wrk_do_one(w); + LOCK(&wrk_mtx); continue; } TAILQ_REMOVE(&wrk_busy, w, list); TAILQ_INSERT_HEAD(&wrk_idle, w, list); assert(w->idle != 0); - AZ(pthread_cond_wait(&w->cv, &wrk_mtx)); + VSL_stats->n_wrk_busy--; + UNLOCK(&wrk_mtx); + LOCK(&w->mtx); + AZ(pthread_cond_wait(&w->cv, &w->mtx)); + UNLOCK(&w->mtx); if (w->idle == 0) break; wrk_do_one(w); + LOCK(&wrk_mtx); } + LOCK(&wrk_mtx); VSL_stats->n_wrk--; UNLOCK(&wrk_mtx); VSL(SLT_WorkThread, 0, "%p end", w); @@ -204,19 +210,21 @@ sp->workreq.sess = sp; LOCK(&wrk_mtx); - TAILQ_INSERT_TAIL(&wrk_reqhead, &sp->workreq, list); - VSL_stats->n_wrk_queue++; /* If there are idle threads, we tickle the first one into action */ w = TAILQ_FIRST(&wrk_idle); if (w != NULL) { TAILQ_REMOVE(&wrk_idle, w, list); TAILQ_INSERT_TAIL(&wrk_busy, w, list); + VSL_stats->n_wrk_busy++; UNLOCK(&wrk_mtx); + w->wrq = &sp->workreq; AZ(pthread_cond_signal(&w->cv)); return; } + TAILQ_INSERT_TAIL(&wrk_reqhead, &sp->workreq, list); + VSL_stats->n_wrk_queue++; wrk_overflow++; /* Can we create more threads ? */ From phk at projects.linpro.no Mon Sep 11 14:50:56 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 11 Sep 2006 16:50:56 +0200 (CEST) Subject: r966 - trunk/varnish-cache/bin/varnishd Message-ID: <20060911145056.3A96F1EC3EC@projects.linpro.no> Author: phk Date: 2006-09-11 16:50:56 +0200 (Mon, 11 Sep 2006) New Revision: 966 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_pool.c Log: Use a pipe for synchronization instead. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-11 14:34:48 UTC (rev 965) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-11 14:50:56 UTC (rev 966) @@ -101,8 +101,7 @@ time_t idle; - pthread_cond_t cv; - pthread_mutex_t mtx; + int pipe[2]; TAILQ_ENTRY(worker) list; struct workreq *wrq; Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-11 14:34:48 UTC (rev 965) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-11 14:50:56 UTC (rev 966) @@ -149,14 +149,14 @@ wrk_thread(void *priv) { struct worker *w, ww; + char c; (void)priv; w = &ww; memset(w, 0, sizeof *w); w->magic = WORKER_MAGIC; w->idle = time(NULL); - AZ(pthread_cond_init(&w->cv, NULL)); - AZ(pthread_mutex_init(&w->mtx, NULL)); + AZ(pipe(w->pipe)); VSL(SLT_WorkThread, 0, "%p start", w); LOCK(&wrk_mtx); @@ -170,6 +170,7 @@ if (wrk_overflow > 0) { wrk_overflow--; w->wrq = TAILQ_FIRST(&wrk_reqhead); + AN(w->wrq); TAILQ_REMOVE(&wrk_reqhead, w->wrq, list); VSL_stats->n_wrk_queue--; UNLOCK(&wrk_mtx); @@ -183,9 +184,7 @@ assert(w->idle != 0); VSL_stats->n_wrk_busy--; UNLOCK(&wrk_mtx); - LOCK(&w->mtx); - AZ(pthread_cond_wait(&w->cv, &w->mtx)); - UNLOCK(&w->mtx); + assert(1 == read(w->pipe[0], &c, 1)); if (w->idle == 0) break; wrk_do_one(w); @@ -195,7 +194,6 @@ VSL_stats->n_wrk--; UNLOCK(&wrk_mtx); VSL(SLT_WorkThread, 0, "%p end", w); - AZ(pthread_cond_destroy(&w->cv)); return (NULL); } @@ -219,7 +217,7 @@ VSL_stats->n_wrk_busy++; UNLOCK(&wrk_mtx); w->wrq = &sp->workreq; - AZ(pthread_cond_signal(&w->cv)); + assert(1 == write(w->pipe[1], w, 1)); return; } @@ -277,7 +275,7 @@ if (w == NULL) continue; w->idle = 0; - AZ(pthread_cond_signal(&w->cv)); + assert(1 == write(w->pipe[1], w, 1)); } INCOMPL(); } From phk at projects.linpro.no Mon Sep 11 15:12:05 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 11 Sep 2006 17:12:05 +0200 (CEST) Subject: r967 - trunk/varnish-cache/bin/varnishd Message-ID: <20060911151205.EE5991EC3EC@projects.linpro.no> Author: phk Date: 2006-09-11 17:12:05 +0200 (Mon, 11 Sep 2006) New Revision: 967 Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c Log: remember to close pipes Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-11 14:50:56 UTC (rev 966) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-11 15:12:05 UTC (rev 967) @@ -194,6 +194,8 @@ VSL_stats->n_wrk--; UNLOCK(&wrk_mtx); VSL(SLT_WorkThread, 0, "%p end", w); + close(w->pipe[0]); + close(w->pipe[1]); return (NULL); } From phk at projects.linpro.no Mon Sep 11 17:18:31 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 11 Sep 2006 19:18:31 +0200 (CEST) Subject: r968 - trunk/varnish-cache/bin/varnishd Message-ID: <20060911171831.77AA81EC3EC@projects.linpro.no> Author: phk Date: 2006-09-11 19:18:31 +0200 (Mon, 11 Sep 2006) New Revision: 968 Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c Log: If we have more threads than the max, kill one if we can. Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-11 15:12:05 UTC (rev 967) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-11 17:18:31 UTC (rev 968) @@ -269,7 +269,9 @@ now = time(NULL); LOCK(&wrk_mtx); w = TAILQ_LAST(&wrk_idle, workerhead); - if (w != NULL && w->idle + params->wthread_timeout < now) + if (w != NULL && + (w->idle + params->wthread_timeout < now || + VSL_stats->n_wrk <= params->wthread_max) TAILQ_REMOVE(&wrk_idle, w, list); else w = NULL; From andersb at projects.linpro.no Mon Sep 11 23:30:07 2006 From: andersb at projects.linpro.no (andersb at projects.linpro.no) Date: Tue, 12 Sep 2006 01:30:07 +0200 (CEST) Subject: r969 - trunk/varnish-cache/bin/varnishncsa Message-ID: <20060911233007.90EF91EC3F3@projects.linpro.no> Author: andersb Date: 2006-09-12 01:30:07 +0200 (Tue, 12 Sep 2006) New Revision: 969 Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c Log: Getting somewhere. I now have a "full" logline. Apart from writing usernames caught by the auth header, the logline is complete. I have now cleared up my obvious memoryleaks also. The code looks like it has been through a shredder, and needs massive cleaning before alpha. Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-11 17:18:31 UTC (rev 968) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-11 23:30:07 UTC (rev 969) @@ -83,6 +83,36 @@ } } +static struct tm *make_timestring(char *tmpPtra){ + char *tmpPtrb, *tmpPtrc; + int timesec = 0; + time_t req_time; // Timeobject used for making the requesttime. + int i = 0; + int j = 0; + char temp_time[27]; + struct tm *timestring; + + temp_time[0] = '\0'; + for ( tmpPtrb = strtok(tmpPtra," "); tmpPtrb != NULL; tmpPtrb = strtok(NULL, " ")){ + if (i == 1){ + // We have the right time + //printf("Time: %s\n", tmpPtrb); + tmpPtra = tmpPtrb; + } + //printf("ReqServTime number %d: %s\n", i, tmpPtrb); + + i++; + } + strncpy(temp_time, tmpPtra, 10); + temp_time[10] = '\0'; + //printf("inten: %s\n",temp_time); + timesec = atoi(temp_time); + req_time = timesec; + timestring = localtime(&req_time); + return timestring; + +} + static void extended_log_format(unsigned char *p, char *w_opt) { @@ -94,12 +124,6 @@ // Used for requesttime. char *tmpPtra = NULL; - char *tmpPtrb = NULL; - char *tmpPtrc = NULL; - int timesec = 0; // Where we store the utime for request as int. - char temp_time[27]; // Where we store the string we take from the log - time_t req_time; // Timeobject used for making the requesttime. - int i; // Used for cleaning memoryalloc @@ -117,7 +141,6 @@ v = 0; w = 0; - i = 0; j = 0; //ll[u].df_rfini = 0; //ll[u].df_hfini = 0; @@ -210,51 +233,18 @@ ll[u].df_R = ll[u].df_R + 9; ll[u].df_Rfini = 1; } - /* - else if (ll[u].df_R == NULL){ - ll[u].df_R = strdup(p + 4); - ll[u].df_R[0] = '-'; - ll[u].df_R[1] = '\0'; - } - */ + break; - case SLT_ReqEnd: // We use ReqServTime to find how the time the request was delivered // also to define that a request is finished. -/* tmpPtra = strdup(p + 4); - jalla2 = strlen(p + 4); - printf("Lengde av ReqEnd: %d \n", jalla2); - tmpPtrb = malloc(jalla2); - //tmpPtrc = malloc(jalla2); - temp_time[0] = '\0'; - for ( tmpPtrb = strtok(tmpPtra," "); tmpPtrb != NULL; tmpPtrb = strtok(NULL, " ")){ - if (i == 1){ - // We have the right time - free(tmpPtra); - tmpPtra = tmpPtrb; - } - //printf("ReqServTime number %d: %s\n", i, tmpPtrb); - - i++; - } - free(tmpPtrb); - tmpPtrc = strchr(tmpPtra, '.'); - j = strlen(tmpPtrc); // length of timestamp - //printf("j=%d\n", j); - strncpy(temp_time, tmpPtra, j); - temp_time[j] = '\0'; - //printf("inten: %s\n",temp_time); - timesec = atoi(temp_time); - req_time = timesec; - ll[u].logline_time = localtime(&req_time); - strftime (temp_time, 50, "[%d/%b/%Y:%X %z] ", ll[u].logline_time); -*/ + ll[u].logline_time = make_timestring(tmpPtra); + free(tmpPtra); ll[u].df_rfini = 1; - //printf("ReqServTime [%d]\n", u); + //printf("ReqServTime %s\n", temp_time); break; @@ -318,13 +308,17 @@ // int jalla; + char temp_time[27]; // Where we store the string we take from the log + // make temp_time + strftime (temp_time, 28, "[%d/%b/%Y:%X %z] ", ll[u].logline_time); + if (ll[u].df_h[0] == '\0' || ll[u].bogus_req){ ll[u].bogus_req = 0; //printf("Tom IP \n"); } else{ - printf("[%d] %s - - %s ", u, ll[u].df_h, temp_time ); + printf("%s - - %s ", ll[u].df_h, temp_time ); vsb_finish(ob[u]); printf("\"%s\"", vsb_data(ob[u])); printf(" %s %s ", ll[u].df_s, ll[u].df_b, ll[u].df_R); @@ -346,6 +340,7 @@ //vsb_finish(ob[u]); vsb_clear(ob[u]); + temp_time[0] = '\0'; ll[u].df_rfini = 0; @@ -394,9 +389,9 @@ // Clean up ReqEnd/Time variables //if (tmpPtra != NULL){ - free(tmpPtra); + // free(tmpPtra); //printf("Freed tmpPtra [%d]\n", u); - jalla = strlen(tmpPtra); + // jalla = strlen(tmpPtra); //printf("Jalla: %d\n", jalla); //} From phk at projects.linpro.no Tue Sep 12 09:38:29 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Tue, 12 Sep 2006 11:38:29 +0200 (CEST) Subject: r970 - trunk/varnish-cache/bin/varnishd Message-ID: <20060912093829.1E6C01EC3E2@projects.linpro.no> Author: phk Date: 2006-09-12 11:38:28 +0200 (Tue, 12 Sep 2006) New Revision: 970 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_pool.c Log: fix typo Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-11 23:30:07 UTC (rev 969) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-12 09:38:28 UTC (rev 970) @@ -451,7 +451,7 @@ AZ(pthread_mutex_lock(foo)); \ } else { \ VSL(SLT_Debug, 0, \ - "MTXLOCK(%s,%s,%d," #foo ")", \ + "MTX_LOCK(%s,%s,%d," #foo ")", \ __func__, __FILE__, __LINE__); \ } \ } while (0); Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-11 23:30:07 UTC (rev 969) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-12 09:38:28 UTC (rev 970) @@ -271,7 +271,7 @@ w = TAILQ_LAST(&wrk_idle, workerhead); if (w != NULL && (w->idle + params->wthread_timeout < now || - VSL_stats->n_wrk <= params->wthread_max) + VSL_stats->n_wrk <= params->wthread_max)) TAILQ_REMOVE(&wrk_idle, w, list); else w = NULL; From des at projects.linpro.no Tue Sep 12 10:12:34 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 12 Sep 2006 12:12:34 +0200 (CEST) Subject: r971 - trunk/varnish-cache/bin/varnishd Message-ID: <20060912101234.76E3B1EC3E2@projects.linpro.no> Author: des Date: 2006-09-12 12:12:34 +0200 (Tue, 12 Sep 2006) New Revision: 971 Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c Log: Implement sendfile() support for Linux. Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-12 09:38:28 UTC (rev 970) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-12 10:12:34 UTC (rev 971) @@ -102,19 +102,33 @@ void WRK_Sendfile(struct worker *w, int fd, off_t off, unsigned len) { - struct sf_hdtr sfh; int i; CHECK_OBJ_NOTNULL(w, WORKER_MAGIC); assert(fd >= 0); assert(len > 0); - memset(&sfh, 0, sizeof sfh); - if (w->niov > 0) { - sfh.headers = w->iov; - sfh.hdr_cnt = w->niov; - } - i = sendfile(fd, *w->wfd, off, len, &sfh, NULL, 0); +#if defined(__FreeBSD__) + do { + struct sf_hdtr sfh; + memset(&sfh, 0, sizeof sfh); + if (w->niov > 0) { + sfh.headers = w->iov; + sfh.hdr_cnt = w->niov; + } + i = sendfile(fd, *w->wfd, off, len, &sfh, NULL, 0); + } while (0); +#elif defined(__linux__) + do { + if (w->niov > 0 && + (i = writev(*w->wfd, w->iov, w->niov)) != 0) + break; + WRK_Flush(w); + i = sendfile(*w->wfd, fd, off, len); + } while (0); +#else +#error Unknown sendfile() implementation +#endif if (i != 0) w->werr++; w->liov = 0; From phk at projects.linpro.no Tue Sep 12 19:41:52 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Tue, 12 Sep 2006 21:41:52 +0200 (CEST) Subject: r972 - trunk/varnish-cache/bin/varnishd Message-ID: <20060912194152.265371EC450@projects.linpro.no> Author: phk Date: 2006-09-12 21:41:52 +0200 (Tue, 12 Sep 2006) New Revision: 972 Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c Log: There may be error returns from kevent, don't assert there are none. Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-12 10:12:34 UTC (rev 971) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-12 19:41:52 UTC (rev 972) @@ -41,7 +41,8 @@ return; EV_SET(&ki[nki], sp->fd, EVFILT_READ, arm, 0, 0, sp); if (++nki == NKEV) { - AZ(kevent(kq, ki, nki, NULL, 0, NULL)); + (void)kevent(kq, ki, nki, NULL, 0, NULL); + /* XXX: we could check the error returns here */ nki = 0; } } From phk at projects.linpro.no Tue Sep 12 20:06:55 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Tue, 12 Sep 2006 22:06:55 +0200 (CEST) Subject: r973 - trunk/varnish-cache/bin/varnishd Message-ID: <20060912200655.8C7011ED7F3@projects.linpro.no> Author: phk Date: 2006-09-12 22:06:55 +0200 (Tue, 12 Sep 2006) New Revision: 973 Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c Log: chunksize is in kilobytes Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-12 19:41:52 UTC (rev 972) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-12 20:06:55 UTC (rev 973) @@ -198,11 +198,11 @@ (void)par; if (arg != NULL) { u = strtoul(arg, NULL, 0); - params->fetch_chunksize = u; + params->fetch_chunksize = u * 1024; } if (cli == NULL) return; - cli_out(cli, "%u [kb]\n", params->fetch_chunksize); + cli_out(cli, "%u [kb]\n", params->fetch_chunksize * 1024); } #ifdef HAVE_SENDFILE From phk at phk.freebsd.dk Tue Sep 12 20:08:37 2006 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Tue, 12 Sep 2006 20:08:37 +0000 Subject: r973 - trunk/varnish-cache/bin/varnishd In-Reply-To: Your message of "Tue, 12 Sep 2006 22:06:55 +0200." <20060912200655.8C7011ED7F3@projects.linpro.no> Message-ID: <15305.1158091717@critter.freebsd.dk> In message <20060912200655.8C7011ED7F3 at projects.linpro.no>, phk at projects.linpro .no writes: >New Revision: 973 > >Modified: > trunk/varnish-cache/bin/varnishd/mgt_param.c >Log: >chunksize is in kilobytes This is actually quite important, without this fix the file storage can produce horibly fragmented objects under certain circumstances. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From phk at projects.linpro.no Tue Sep 12 20:17:35 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Tue, 12 Sep 2006 22:17:35 +0200 (CEST) Subject: r974 - trunk/varnish-cache/bin/varnishd Message-ID: <20060912201735.5CB611EC44A@projects.linpro.no> Author: phk Date: 2006-09-12 22:17:35 +0200 (Tue, 12 Sep 2006) New Revision: 974 Modified: trunk/varnish-cache/bin/varnishd/cache_center.c Log: Fix timestamps in shm tag StatSess for sessions with no requests. Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-12 20:06:55 UTC (rev 973) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-12 20:17:35 UTC (rev 974) @@ -245,27 +245,24 @@ SES_RefSrcAddr(sp); for (;;) { i = http_RecvSome(sp->fd, sp->http); - switch (i) { - case -1: + if (i == -1) continue; - case 0: + if (i == 0) { sp->step = STP_RECV; return (0); - case 1: + } + if (i == 1) vca_close_session(sp, "overflow"); - SES_Charge(sp); - vca_return_session(sp); - sp->step = STP_DONE; - return (1); - case 2: + else if (i == 2) vca_close_session(sp, "no request"); - SES_Charge(sp); - vca_return_session(sp); - sp->step = STP_DONE; - return (1); - default: + else INCOMPL(); - } + clock_gettime(CLOCK_REALTIME, &sp->t_end); + sp->wrk->idle = sp->t_end.tv_sec; + SES_Charge(sp); + vca_return_session(sp); + sp->step = STP_DONE; + return (1); } } From phk at projects.linpro.no Tue Sep 12 20:50:19 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Tue, 12 Sep 2006 22:50:19 +0200 (CEST) Subject: r975 - trunk/varnish-cache/bin/varnishd Message-ID: <20060912205019.C0DAD1ED7F5@projects.linpro.no> Author: phk Date: 2006-09-12 22:50:19 +0200 (Tue, 12 Sep 2006) New Revision: 975 Modified: trunk/varnish-cache/bin/varnishd/cache_center.c Log: Distinguish the explanation for the first request from the one used on subsequent requests. Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-12 20:17:35 UTC (rev 974) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-12 20:50:19 UTC (rev 975) @@ -252,9 +252,9 @@ return (0); } if (i == 1) - vca_close_session(sp, "overflow"); + vca_close_session(sp, "blast"); else if (i == 2) - vca_close_session(sp, "no request"); + vca_close_session(sp, "silent"); else INCOMPL(); clock_gettime(CLOCK_REALTIME, &sp->t_end); From andersb at projects.linpro.no Tue Sep 12 21:02:09 2006 From: andersb at projects.linpro.no (andersb at projects.linpro.no) Date: Tue, 12 Sep 2006 23:02:09 +0200 (CEST) Subject: r976 - trunk/varnish-cache/bin/varnishncsa Message-ID: <20060912210209.8178F3BC13C@projects.linpro.no> Author: andersb Date: 2006-09-12 23:02:09 +0200 (Tue, 12 Sep 2006) New Revision: 976 Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c Log: Made the code more robust but fixing a bug that caused coredumps. Haven't seen dumps after fix. Cleared some unused variables. Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-12 20:50:19 UTC (rev 975) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-12 21:02:09 UTC (rev 976) @@ -48,7 +48,6 @@ unsigned char *df_R; // Datafield for %{Referer}i int df_Rfini; unsigned char *df_U; // Datafield for %{User-agent}i - char df_UN[512]; int df_Ufini; int bogus_req; // Set to 1 if we discover a bogus request }; @@ -84,11 +83,10 @@ } static struct tm *make_timestring(char *tmpPtra){ - char *tmpPtrb, *tmpPtrc; + char *tmpPtrb; int timesec = 0; time_t req_time; // Timeobject used for making the requesttime. int i = 0; - int j = 0; char temp_time[27]; struct tm *timestring; @@ -114,7 +112,7 @@ } static void -extended_log_format(unsigned char *p, char *w_opt) +extended_log_format(unsigned char *p) { unsigned u,v,w; @@ -123,16 +121,8 @@ int j; // Used for requesttime. - char *tmpPtra = NULL; + char *tmpPtra; - // Used for cleaning memoryalloc - - int df_s_set = 0; - int df_b_set = 0; - - int jalla2 = 0; - - u = (p[2] << 8) | p[3]; if (ob[u] == NULL) { ob[u] = vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND); @@ -153,11 +143,15 @@ // We also catch IP in SessionReuse because we can not always // be sure we see a SessionOpen when we start logging. - + //printf("IP %s\n", p+4); + ll[u].df_h[0] = '\0'; tmpPtr = strchr(p + 4, ' '); - j = strlen(p + 4) - strlen(tmpPtr); // length of IP - strncpy(ll[u].df_h, p + 4, j); - ll[u].df_h[j] = '\0'; // put on a NULL at end of buffer. + if (tmpPtr != NULL){ + + j = strlen(p + 4) - strlen(tmpPtr); // length of IP + strncpy(ll[u].df_h, p + 4, j); + ll[u].df_h[j] = '\0'; // put on a NULL at end of buffer. + } //printf("New session [%d]: %s \n",u, ll[u].df_h); break; @@ -217,13 +211,7 @@ case SLT_RxHeader: if (p[1] >= 11 && !strncasecmp((void *)&p[4], "user-agent:",11)){ - // (void)strncpy(ll[u].df_UN, p + 4, sizeof(ll[u].df_UN) - 1); - // ll[u].df_UN[sizeof(ll[u].df_UN) - 1] = '\0'; - // w = strlen(p + 4); - // printf("Lengde: %d\n", w); - ll[u].df_U = strdup(p + 4); - //strchr(ll[u].df_U, ':'); // Jump ahead past "User-Agent: " ll[u].df_U = ll[u].df_U + 12; ll[u].df_Ufini = 1; @@ -282,11 +270,14 @@ if (ll[u].df_h[0] == '\0'){ // We don't have IP, fetch it. + // tmpPtr = strchr(p + 4, ' '); - j = strlen(p + 4) - strlen(tmpPtr); // length of IP - strncpy(ll[u].df_h, p + 4, j); - ll[u].df_h[j] = '\0'; // put on a NULL at end of buffer. + if (tmpPtr != NULL){ + j = strlen(p + 4) - strlen(tmpPtr); // length of IP + strncpy(ll[u].df_h, p + 4, j); + ll[u].df_h[j] = '\0'; // put on a NULL at end of buffer. + } //printf("Got IP from Reuse [%d] : %s\n", u, ll[u].df_h); } @@ -307,7 +298,6 @@ // and clear variables that are different for each request. // - int jalla; char temp_time[27]; // Where we store the string we take from the log // make temp_time @@ -321,7 +311,7 @@ printf("%s - - %s ", ll[u].df_h, temp_time ); vsb_finish(ob[u]); printf("\"%s\"", vsb_data(ob[u])); - printf(" %s %s ", ll[u].df_s, ll[u].df_b, ll[u].df_R); + printf(" %s %s ", ll[u].df_s, ll[u].df_b); if (ll[u].df_Rfini){ printf(" \"%s\" ", ll[u].df_R); } @@ -337,6 +327,7 @@ } printf("\n"); } + fflush(stdout); //vsb_finish(ob[u]); vsb_clear(ob[u]); @@ -352,16 +343,12 @@ free(ll[u].df_s); ll[u].df_sfini = 0; //printf("Freed df_s [%d]\n", u); - jalla = strlen(ll[u].df_s); - //printf("Jalla: %d\n", jalla); } if (ll[u].df_bfini){ free(ll[u].df_b); ll[u].df_bfini = 0; //printf("Freed df_b [%d]\n", u); - jalla = strlen(ll[u].df_b); - //printf("Jalla: %d\n", jalla); } // Clean User-Agent and Referer @@ -369,11 +356,8 @@ ll[u].df_U = ll[u].df_U - 12; free(ll[u].df_U); ll[u].df_Ufini = 0; - ll[u].df_UN[0] = '\0'; ll[u].df_U[0] = '\0'; //printf("Freed df_U [%d]\n", u); - jalla = strlen(ll[u].df_U); - //printf("Jalla: %d\n", jalla); } if (ll[u].df_Rfini){ @@ -382,8 +366,6 @@ ll[u].df_R[0] = '\0'; ll[u].df_Rfini = 0; //printf("Freed df_R [%d]\n", u); - jalla = strlen(ll[u].df_R); - //printf("Jalla: %d\n", jalla); } // Clean up ReqEnd/Time variables @@ -391,22 +373,16 @@ //if (tmpPtra != NULL){ // free(tmpPtra); //printf("Freed tmpPtra [%d]\n", u); - // jalla = strlen(tmpPtra); - //printf("Jalla: %d\n", jalla); //} /* if (tmpPtrb != NULL){ free(tmpPtrb); //printf("Freed tmpPtrb [%d]\n", u); - jalla = strlen(tmpPtrb); - //printf("Jalla: %d\n", jalla); } if (tmpPtrc != NULL){ free(tmpPtrc); //printf("Freed tmpPtrc [%d]\n", u); - jalla = strlen(tmpPtrc); - //printf("Jalla: %d\n", jalla); } */ temp_time[0] = '\0'; @@ -498,7 +474,7 @@ } v = 0; - extended_log_format(p, w_opt); + extended_log_format(p); } clean_order(); From phk at projects.linpro.no Tue Sep 12 21:21:36 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Tue, 12 Sep 2006 23:21:36 +0200 (CEST) Subject: r977 - trunk/varnish-cache/bin/varnishd Message-ID: <20060912212136.D4DCE1ED7F3@projects.linpro.no> Author: phk Date: 2006-09-12 23:21:36 +0200 (Tue, 12 Sep 2006) New Revision: 977 Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c Log: Double the default workspace for the benefit of Blackberris and other low-bandwidth devices which for some reason include their entire lifehistory in the HTTP requests. Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-12 21:02:09 UTC (rev 976) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-12 21:21:36 UTC (rev 977) @@ -270,8 +270,8 @@ "This space must be big enough for the entire HTTP protocol " "header and any edits done to it in the VCL code.\n" SHOULD_RESTART - "Default is 4096 bytes. " - "Minimum is 1024 bytes. ", "4096" }, + "Default is 8192 bytes. " + "Minimum is 1024 bytes. ", "8192" }, { "sess_timeout", tweak_sess_timeout, "Idle timeout for persistent sessions. " "If a HTTP request has not been received in this many " From phk at projects.linpro.no Wed Sep 13 19:07:52 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 13 Sep 2006 21:07:52 +0200 (CEST) Subject: r978 - trunk/varnish-cache/bin/varnishd Message-ID: <20060913190752.9B6E21EC44A@projects.linpro.no> Author: phk Date: 2006-09-13 21:07:52 +0200 (Wed, 13 Sep 2006) New Revision: 978 Modified: trunk/varnish-cache/bin/varnishd/cache_response.c Log: Dike out Linux senfile, it doesn't work. Isolated by: Xing Li Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-12 21:21:36 UTC (rev 977) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-13 19:07:52 UTC (rev 978) @@ -226,6 +226,7 @@ AN(st->stevedore); u += st->len; sp->wrk->acct.bodybytes += st->len; +#ifdef __FreeBSD__ #ifdef HAVE_SENDFILE /* * XXX: the overhead of setting up senddile is not @@ -241,6 +242,7 @@ continue; } #endif /* HAVE_SENDFILE */ +#endif /* __FreeBSD__ */ VSL_stats->n_objwrite++; WRK_Write(sp->wrk, st->ptr, st->len); } From phk at projects.linpro.no Wed Sep 13 20:43:14 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 13 Sep 2006 22:43:14 +0200 (CEST) Subject: r979 - trunk/varnish-cache/bin/varnishd Message-ID: <20060913204314.549C71EC44D@projects.linpro.no> Author: phk Date: 2006-09-13 22:43:14 +0200 (Wed, 13 Sep 2006) New Revision: 979 Modified: trunk/varnish-cache/bin/varnishd/cache_center.c Log: Add the end time as timestamp to the ReqEnd SHM record. Vector failures of the the FIRST case via DONE as well to avoid code duplication. Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-13 19:07:52 UTC (rev 978) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-13 20:43:14 UTC (rev 979) @@ -100,16 +100,24 @@ if (sp->fd >= 0 && sp->doclose != NULL) vca_close_session(sp, sp->doclose); sp->backend = NULL; - VCL_Rel(sp->vcl); - sp->vcl = NULL; + if (sp->vcl != NULL) { + VCL_Rel(sp->vcl); + sp->vcl = NULL; + } clock_gettime(CLOCK_REALTIME, &sp->t_end); sp->wrk->idle = sp->t_end.tv_sec; - dh = cnt_dt(&sp->t_open, &sp->t_req); + if (sp->xid == 0) { + sp->t_req = sp->t_end; + sp->t_resp = sp->t_end; + } dp = cnt_dt(&sp->t_req, &sp->t_resp); da = cnt_dt(&sp->t_resp, &sp->t_end); - VSL(SLT_ReqEnd, sp->id, "%u %ld.%09ld %.9f %.9f %.9f", - sp->xid, (long)sp->t_req.tv_sec, (long)sp->t_req.tv_nsec, + dh = cnt_dt(&sp->t_open, &sp->t_req); + VSL(SLT_ReqEnd, sp->id, "%u %ld.%09ld %ld.%09ld %.9f %.9f %.9f", + sp->xid, + (long)sp->t_req.tv_sec, (long)sp->t_req.tv_nsec, + (long)sp->t_end.tv_sec, (long)sp->t_end.tv_nsec, dh, dp, da); SES_Charge(sp); @@ -234,36 +242,34 @@ INCOMPL(); } +/*-------------------------------------------------------------------- + * The very first request + */ static int cnt_first(struct sess *sp) { int i; + assert(sp->xid == 0); VCA_Prep(sp); sp->wrk->idle = sp->t_open.tv_sec; sp->wrk->acct.sess++; SES_RefSrcAddr(sp); - for (;;) { + do i = http_RecvSome(sp->fd, sp->http); - if (i == -1) - continue; - if (i == 0) { - sp->step = STP_RECV; - return (0); - } - if (i == 1) - vca_close_session(sp, "blast"); - else if (i == 2) - vca_close_session(sp, "silent"); - else - INCOMPL(); - clock_gettime(CLOCK_REALTIME, &sp->t_end); - sp->wrk->idle = sp->t_end.tv_sec; - SES_Charge(sp); - vca_return_session(sp); - sp->step = STP_DONE; - return (1); + while (i == -1); + if (i == 0) { + sp->step = STP_RECV; + return (0); } + if (i == 1) + vca_close_session(sp, "blast"); + else if (i == 2) + vca_close_session(sp, "silent"); + else + INCOMPL(); + sp->step = STP_DONE; + return (0); } /*-------------------------------------------------------------------- From andersb at projects.linpro.no Wed Sep 13 21:26:01 2006 From: andersb at projects.linpro.no (andersb at projects.linpro.no) Date: Wed, 13 Sep 2006 23:26:01 +0200 (CEST) Subject: r980 - trunk/varnish-cache/bin/varnishncsa Message-ID: <20060913212601.E7BA41EC450@projects.linpro.no> Author: andersb Date: 2006-09-13 23:26:01 +0200 (Wed, 13 Sep 2006) New Revision: 980 Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c Log: Fixed timestamp so thats it's correct. PHK added a new variable to ReqEnd that contains a correct endtime. Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-13 20:43:14 UTC (rev 979) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-13 21:26:01 UTC (rev 980) @@ -82,7 +82,7 @@ } } -static struct tm *make_timestring(char *tmpPtra){ +static struct tm *make_timestruct(char *tmpPtra){ char *tmpPtrb; int timesec = 0; time_t req_time; // Timeobject used for making the requesttime. @@ -92,17 +92,19 @@ temp_time[0] = '\0'; for ( tmpPtrb = strtok(tmpPtra," "); tmpPtrb != NULL; tmpPtrb = strtok(NULL, " ")){ - if (i == 1){ + if (i == 2){ // We have the right time //printf("Time: %s\n", tmpPtrb); tmpPtra = tmpPtrb; + strncpy(temp_time, tmpPtra, 10); + temp_time[11] = '\0'; } //printf("ReqServTime number %d: %s\n", i, tmpPtrb); i++; } - strncpy(temp_time, tmpPtra, 10); - temp_time[10] = '\0'; + + //strncpy(temp_time, tmpPtra, 20); //printf("inten: %s\n",temp_time); timesec = atoi(temp_time); req_time = timesec; @@ -229,7 +231,7 @@ // We use ReqServTime to find how the time the request was delivered // also to define that a request is finished. tmpPtra = strdup(p + 4); - ll[u].logline_time = make_timestring(tmpPtra); + ll[u].logline_time = make_timestruct(tmpPtra); free(tmpPtra); ll[u].df_rfini = 1; //printf("ReqServTime %s\n", temp_time); @@ -301,7 +303,7 @@ char temp_time[27]; // Where we store the string we take from the log // make temp_time - strftime (temp_time, 28, "[%d/%b/%Y:%X %z] ", ll[u].logline_time); + strftime (temp_time, 29, "[%d/%b/%Y:%X %z] ", ll[u].logline_time); if (ll[u].df_h[0] == '\0' || ll[u].bogus_req){ ll[u].bogus_req = 0; From des at linpro.no Thu Sep 14 10:19:08 2006 From: des at linpro.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) Date: Thu, 14 Sep 2006 12:19:08 +0200 Subject: r978 - trunk/varnish-cache/bin/varnishd References: <20060913190752.9B6E21EC44A@projects.linpro.no> Message-ID: phk at projects.linpro.no writes: > Log: > Dike out Linux senfile, it doesn't work. > > Isolated by: Xing Li Xing clearly stated that r956 has the same problem; Linux sendfile support was added in r971. DES -- Dag-Erling Sm?rgrav Senior Software Developer Linpro AS - www.linpro.no From phk at projects.linpro.no Fri Sep 15 07:14:37 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Fri, 15 Sep 2006 09:14:37 +0200 (CEST) Subject: r981 - trunk/varnish-cache/bin/varnishncsa Message-ID: <20060915071437.7BB8A1EC3F5@projects.linpro.no> Author: phk Date: 2006-09-15 09:14:37 +0200 (Fri, 15 Sep 2006) New Revision: 981 Added: trunk/varnish-cache/bin/varnishncsa/flint.lnt trunk/varnish-cache/bin/varnishncsa/flint.sh Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c Log: Overhaul NCSA logging. Reduce memory footprint by only allocating space for a fd first time we see it. Few if any servers will ever see 64k fd's in use. Move the sbuf into the logline structure for simplicity. Access the logline structure through a pointer instead of indexing the array all the time. Reduce amount of malloc/free traffic for performance. Use the "cooked" SHMlog api where the length, fd, etc are broken out as arguments for us. Pass the FILE* where we want the stuff to go as private data (stdout for now). Add FlexeLint files. Now over to Anders again... Added: trunk/varnish-cache/bin/varnishncsa/flint.lnt =================================================================== --- trunk/varnish-cache/bin/varnishncsa/flint.lnt 2006-09-13 21:26:01 UTC (rev 980) +++ trunk/varnish-cache/bin/varnishncsa/flint.lnt 2006-09-15 07:14:37 UTC (rev 981) @@ -0,0 +1,60 @@ +-passes=3 + +-header(../../config.h) + ++d__attribute__()= + +// Fix strchr() semtics, it can only return NULL if arg2 != 0 +-sem(strchr, 1p, type(1), 2n == 0 ? (@p < 1p) : (@p < 1p || @p == 0 )) + +-ffc // No automatic custody + +-e763 // Redundant declaration for symbol '...' previously declared +-e726 // Extraneous comma ignored +-e728 // Symbol ... not explicitly initialized +-e716 // while(1) ... +-e785 // Too few initializers for aggregate +-e786 // String concatenation within initializer + +-emacro(740, TAILQ_PREV) // Unusual pointer cast (incompatible indirect types) +-emacro((826), TAILQ_PREV) // Suspicious pointer-to-pointer conversion (area too small) + + +-esym(534, printf) // Ignoring return value of function +-esym(534, fprintf) // Ignoring return value of function +-esym(534, memset) // Ignoring return value of function +-esym(534, memcpy) // Ignoring return value of function +-esym(534, memmove) // Ignoring return value of function +-esym(534, strcpy) // Ignoring return value of function +-esym(534, vsb_printf) // Ignoring return value of function +-esym(534, vsb_cat) // Ignoring return value of function + +// cache.h +-emacro(506, INCOMPL) // Constant value Boolean + +// cache_center.c +-efunc(525, CNT_Session) // Negative indentation from line +-efunc(525, http_FilterHeader) // Negative indentation from line +-efunc(539, http_FilterHeader) // Positive indentation from line + +// cache_vcl.c +-efunc(525, vcl_handlingname) // Negative indentation from line +-esym(528, vcl_handlingname) // Not referenced +-e641 // Converting enum 'cli_status_e' to int + +// Review all below this line /////////////////////////////////////////////// + +-e767 // Macro redef (system queue.h vs ours ) + +-e574 // Signed-unsigned mix with relational +-e712 // Loss of precision (assignment) (long long to +-e747 // Significant prototype coercion (arg. no. 2) long +-e713 // Loss of precision (assignment) (unsigned long long to long long) +-e506 // Constant value boolean +-e818 // Pointer parameter '...' could be declared as pointing to const +-e774 // Boolean within 'if' always evaluates to False +-e534 // Ignoring return value of function +-e557 // unrecog format +-e732 // Loss of sign (arg. no. 2) (int to unsigned +-e737 // [45] Loss of sign in promotion from int to unsigned + Added: trunk/varnish-cache/bin/varnishncsa/flint.sh =================================================================== --- trunk/varnish-cache/bin/varnishncsa/flint.sh 2006-09-13 21:26:01 UTC (rev 980) +++ trunk/varnish-cache/bin/varnishncsa/flint.sh 2006-09-15 07:14:37 UTC (rev 981) @@ -0,0 +1,29 @@ +#!/bin/sh + +T=/tmp/_$$ +flexelint \ + -I/usr/include \ + -I. \ + -I../../include \ + flint.lnt \ + *.c > $T 2>&1 + +for t in Error Warning Info +do + sed -n "/$t [0-9][0-9][0-9]:/s/.*\($t [0-9][0-9][0-9]\).*/\1/p" $T +done | awk ' +$2 == 830 { next } +$2 == 831 { next } + { + i=$2"_"$1 + h[i]++ + n++ + } +END { + printf "%5d %s\n", n, "Total" + for (i in h) + printf "%5d %s\n", h[i], i + } +' | sort -rn + +cat $T Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-13 21:26:01 UTC (rev 980) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-15 07:14:37 UTC (rev 981) @@ -27,385 +27,133 @@ #include "shmlog.h" #include "varnishapi.h" +static struct logline { + char df_h[4 * (3 + 1)]; /* Datafield for %h (IP adress) */ + char df_s[4]; /* Datafield for %s, Status */ + char df_b[12]; /* Datafield for %b, Bytes */ + char *df_R; /* Datafield for %{Referer} */ + char *df_U; /* Datafield for %{User-agent} */ + int bogus_req; /* bogus request */ + struct vsb *sb; +} *ll[65536]; -/* Ordering-----------------------------------------------------------*/ - - -/* Adding a struct to hold the data for the logline - * - */ - -struct logline { - char df_h[4 * (3 + 1)]; // Datafield for %h (IP adress) - int df_hfini; // Set to 1 when a SessionClose is seen. - unsigned char *df_r; // Datafield for %r (Request) - int df_rfini; // Set to 1 when a ReqServTime has come. - unsigned char *df_s; // Datafield for %s, Status - int df_sfini; - unsigned char *df_b; // Datafield for %b, Bytes - int df_bfini; - struct tm *logline_time; // Datafield for %t - unsigned char *df_R; // Datafield for %{Referer}i - int df_Rfini; - unsigned char *df_U; // Datafield for %{User-agent}i - int df_Ufini; - int bogus_req; // Set to 1 if we discover a bogus request -}; - -/* We make a array of pointers to vsb's. Sbuf is a string buffer. - * * The buffer can be made/extended/cleared etc. through a API. - * * The array is 65536 long because we will use sessionid as key. - * * - * */ - -static struct vsb *ob[65536]; -static struct logline ll[65536]; - - -/* -* Clean order is called once in a while. It clears all the sessions that -* where never finished (SLT_SessionClose). Because the data is not complete -* we disregard the data. -* -*/ - -static void -clean_order(void) +/* Check if string starts with pfx */ +static int +ispfx(const char *ptr, unsigned len, const char *pfx) { - unsigned u; + unsigned l; - for (u = 0; u < 65536; u++) { - if (ob[u] == NULL) - continue; - vsb_finish(ob[u]); - vsb_clear(ob[u]); - } + l = strlen(pfx); + if (l > len) + return (0); + if (strncasecmp(ptr, pfx, l)) + return (0); + return (1); } -static struct tm *make_timestruct(char *tmpPtra){ - char *tmpPtrb; - int timesec = 0; - time_t req_time; // Timeobject used for making the requesttime. - int i = 0; - char temp_time[27]; - struct tm *timestring; - - temp_time[0] = '\0'; - for ( tmpPtrb = strtok(tmpPtra," "); tmpPtrb != NULL; tmpPtrb = strtok(NULL, " ")){ - if (i == 2){ - // We have the right time - //printf("Time: %s\n", tmpPtrb); - tmpPtra = tmpPtrb; - strncpy(temp_time, tmpPtra, 10); - temp_time[11] = '\0'; - } - //printf("ReqServTime number %d: %s\n", i, tmpPtrb); - - i++; - } - - //strncpy(temp_time, tmpPtra, 20); - //printf("inten: %s\n",temp_time); - timesec = atoi(temp_time); - req_time = timesec; - timestring = localtime(&req_time); - return timestring; - -} - -static void -extended_log_format(unsigned char *p) +static int +extended_log_format(void *priv, unsigned tag, unsigned fd, unsigned len, unsigned spec, const char *ptr) { - unsigned u,v,w; + const char *p; + char *q; + FILE *fo; + time_t t; + long l; + struct tm tm; + char tbuf[40]; + struct logline *lp; - // Used for getting IP. - unsigned char *tmpPtr; - int j; + if (!(spec &VSL_S_CLIENT)) + return (0); - // Used for requesttime. - char *tmpPtra; - - u = (p[2] << 8) | p[3]; - if (ob[u] == NULL) { - ob[u] = vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND); - assert(ob[u] != NULL); + if (ll[fd] == NULL) { + ll[fd] = calloc(sizeof *ll[fd], 1); + assert(ll[fd] != NULL); + ll[fd]->sb = vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND); + assert(ll[fd]->sb != NULL); } - - v = 0; - w = 0; - j = 0; - //ll[u].df_rfini = 0; - //ll[u].df_hfini = 0; + lp = ll[fd]; - switch (p[0]) { + switch (tag) { case SLT_SessionOpen: - - // We catch the IP adress of the session. - // We also catch IP in SessionReuse because we can not always - // be sure we see a SessionOpen when we start logging. - - //printf("IP %s\n", p+4); - ll[u].df_h[0] = '\0'; - tmpPtr = strchr(p + 4, ' '); - if (tmpPtr != NULL){ - - j = strlen(p + 4) - strlen(tmpPtr); // length of IP - strncpy(ll[u].df_h, p + 4, j); - ll[u].df_h[j] = '\0'; // put on a NULL at end of buffer. - } - //printf("New session [%d]: %s \n",u, ll[u].df_h); - + for (p = ptr, q = lp->df_h; *p && *p != ' ';) + *q++ = *p++; + *q = '\0'; break; case SLT_ReqStart: - - // We use XID to catch that a new request is comming inn. - + vsb_clear(lp->sb); break; case SLT_RxRequest: - - vsb_clear(ob[u]); - - if (p[1] >= 4 && !strncasecmp((void *)&p[4], "HEAD",4)){ - vsb_bcat(ob[u], p + 4, strlen(p + 4)); - //printf("Got a HEAD\n"); + if (ispfx(ptr, len, "HEAD")) { + vsb_bcat(lp->sb, ptr, len); + } else if (ispfx(ptr, len, "POST")) { + vsb_bcat(lp->sb, ptr, len); + } else if (ispfx(ptr, len, "GET")) { + vsb_bcat(lp->sb, ptr, len); + } else { + lp->bogus_req = 1; } + break; - else if (p[1] >= 4 && !strncasecmp((void *)&p[4], "POST",4)){ - vsb_bcat(ob[u], p + 4, strlen(p + 4)); - //printf("Got a POST\n"); - } - - else if (p[1] >= 3 && !strncasecmp((void *)&p[4], "GET",3)){ - vsb_bcat(ob[u], p + 4, strlen(p + 4)); - //printf("Got a GET\n"); - } - - else { - //vsb_bcat(ob[u], p + 4, strlen(p + 4)); - //printf("Got something other than HEAD, POST, GET\n"); - ll[u].bogus_req = 1; - } - break; - case SLT_RxURL: - - vsb_cat(ob[u], " "); - vsb_bcat(ob[u], p + 4, strlen(p + 4)); - + vsb_cat(lp->sb, " "); + vsb_bcat(lp->sb, ptr, len); break; case SLT_RxProtocol: - - vsb_cat(ob[u], " "); - vsb_bcat(ob[u], p + 4, strlen(p + 4)); - + vsb_cat(lp->sb, " "); + vsb_bcat(lp->sb, ptr, len); break; case SLT_TxStatus: - - ll[u].df_s = strdup(p + 4); - ll[u].df_sfini = 1; - + strcpy(lp->df_s, ptr); break; case SLT_RxHeader: - if (p[1] >= 11 && !strncasecmp((void *)&p[4], "user-agent:",11)){ - ll[u].df_U = strdup(p + 4); - // Jump ahead past "User-Agent: " - ll[u].df_U = ll[u].df_U + 12; - ll[u].df_Ufini = 1; - } - if (p[1] >= 8 && !strncasecmp((void *)&p[4], "referer:",8)){ - ll[u].df_R = strdup(p + 4); - ll[u].df_R = ll[u].df_R + 9; - ll[u].df_Rfini = 1; - } - + if (ispfx(ptr, len, "user-agent:")) + lp->df_U = strdup(ptr + 12); + else if (ispfx(ptr, len, "referer:")) + lp->df_R = strdup(ptr + 9); break; - case SLT_ReqEnd: - - // We use ReqServTime to find how the time the request was delivered - // also to define that a request is finished. - tmpPtra = strdup(p + 4); - ll[u].logline_time = make_timestruct(tmpPtra); - free(tmpPtra); - ll[u].df_rfini = 1; - //printf("ReqServTime %s\n", temp_time); - - break; - case SLT_Length: - - // XXX ask DES or PHK about this one. Am I overflowing? - - ll[u].df_b = strdup(p + 4); - ll[u].df_bfini = 1; - if (!atoi(ll[u].df_b)){ - ll[u].df_b = malloc(2); - ll[u].df_b[0] = '-'; - ll[u].df_b[1] = '\0'; - } - + if (strcmp(ptr, "0")) + strcpy(lp->df_b, ptr); + else + strcpy(lp->df_b, "-"); break; - case SLT_SessionClose: - - // Session is closed, we clean up things. But do not write. - - //printf("Session close [%d]\n", u); - - ll[u].df_hfini = 1; - - break; - - case SLT_SessionReuse: - - // We use SessionReuse to catch the IP adress of a session that has already - // started with a SessionOpen that we did not catch. - // Other than that it is not used. - - // Catch IP if not already done. - - if (ll[u].df_h[0] == '\0'){ - // We don't have IP, fetch it. - // - - tmpPtr = strchr(p + 4, ' '); - if (tmpPtr != NULL){ - j = strlen(p + 4) - strlen(tmpPtr); // length of IP - strncpy(ll[u].df_h, p + 4, j); - ll[u].df_h[j] = '\0'; // put on a NULL at end of buffer. - } - //printf("Got IP from Reuse [%d] : %s\n", u, ll[u].df_h); - } - - //printf("Session reuse [%d]\n", u); - - break; - default: - - // printf("DEBUG: %s\n", p+4); - break; } + if (tag != SLT_ReqEnd) + return (0); - - if (ll[u].df_rfini) { - // We have a ReqServTime. Lets print the logline - // and clear variables that are different for each request. - // - - char temp_time[27]; // Where we store the string we take from the log - - // make temp_time - strftime (temp_time, 29, "[%d/%b/%Y:%X %z] ", ll[u].logline_time); - - if (ll[u].df_h[0] == '\0' || ll[u].bogus_req){ - ll[u].bogus_req = 0; - //printf("Tom IP \n"); - } - else{ - printf("%s - - %s ", ll[u].df_h, temp_time ); - vsb_finish(ob[u]); - printf("\"%s\"", vsb_data(ob[u])); - printf(" %s %s ", ll[u].df_s, ll[u].df_b); - if (ll[u].df_Rfini){ - printf(" \"%s\" ", ll[u].df_R); - } - else { - printf(" \"-\" "); - } - - if (ll[u].df_Ufini){ - printf(" \"%s\" ", ll[u].df_U); - } - else { - printf(" \"-\" "); - } - printf("\n"); - } - fflush(stdout); - - //vsb_finish(ob[u]); - vsb_clear(ob[u]); - temp_time[0] = '\0'; - - - ll[u].df_rfini = 0; - - - // Clear the TxStaus - - if (ll[u].df_sfini){ - free(ll[u].df_s); - ll[u].df_sfini = 0; - //printf("Freed df_s [%d]\n", u); - } - - if (ll[u].df_bfini){ - free(ll[u].df_b); - ll[u].df_bfini = 0; - //printf("Freed df_b [%d]\n", u); - } - - // Clean User-Agent and Referer - if (ll[u].df_Ufini){ - ll[u].df_U = ll[u].df_U - 12; - free(ll[u].df_U); - ll[u].df_Ufini = 0; - ll[u].df_U[0] = '\0'; - //printf("Freed df_U [%d]\n", u); - } - - if (ll[u].df_Rfini){ - ll[u].df_R = ll[u].df_R - 9; - free(ll[u].df_R); - ll[u].df_R[0] = '\0'; - ll[u].df_Rfini = 0; - //printf("Freed df_R [%d]\n", u); - } - - // Clean up ReqEnd/Time variables - - //if (tmpPtra != NULL){ - // free(tmpPtra); - //printf("Freed tmpPtra [%d]\n", u); - //} - - /* - if (tmpPtrb != NULL){ - free(tmpPtrb); - //printf("Freed tmpPtrb [%d]\n", u); - } - if (tmpPtrc != NULL){ - free(tmpPtrc); - //printf("Freed tmpPtrc [%d]\n", u); - } - */ - temp_time[0] = '\0'; - - - if (ll[u].df_hfini) { - // We have a SessionClose. Lets clean data. - // - // Clean IP adress - ll[u].df_h[0] = '\0'; - //printf("Clearer [%d]\n", u); - ll[u].df_hfini = 0; - - } - - - - + fo = priv; + assert(1 == sscanf(ptr, "%*u %*u.%*u %ld.", &l)); + t = l; + localtime_r(&t, &tm); + strftime(tbuf, sizeof tbuf, "%d/%b/%Y:%T %z", &tm); + fprintf(fo, "%s - - %s", lp->df_h, tbuf); + vsb_finish(lp->sb); + fprintf(fo, " \"%s\"", vsb_data(lp->sb)); + fprintf(fo, " %s", lp->df_b); + if (lp->df_R != NULL) { + fprintf(fo, " \"%s\"", lp->df_R); + free(lp->df_R); + lp->df_R = NULL; } - - + if (lp->df_U != NULL) { + fprintf(fo, " \"%s\"", lp->df_U); + free(lp->df_U); + lp->df_U = NULL; + } + fprintf(fo, "\n"); + + return (0); } /*--------------------------------------------------------------------*/ @@ -421,15 +169,11 @@ main(int argc, char **argv) { int i, c; - unsigned u, v; - unsigned char *p; - char *w_opt = NULL; - FILE *wfile = NULL; struct VSL_data *vd; vd = VSL_New(); - while ((c = getopt(argc, argv, VSL_ARGS "w:")) != -1) { + while ((c = getopt(argc, argv, VSL_ARGS "")) != -1) { i = VSL_Arg(vd, c, optarg); if (i < 0) exit (1); @@ -439,9 +183,6 @@ case 'V': varnish_version("varnishncsa"); exit(0); - case 'w': - w_opt = optarg; - break; default: usage(); } @@ -450,36 +191,11 @@ if (VSL_OpenLog(vd)) exit (1); - if (w_opt != NULL) { - wfile = fopen(w_opt, "w"); - if (wfile == NULL) { - perror(w_opt); - exit (1); - } - } - u = 0; - v = 0; - while (1) { - i = VSL_NextLog(vd, &p); + i = VSL_Dispatch(vd, extended_log_format, stdout); if (i < 0) break; - if (i == 0) { - if (w_opt == NULL) { - if (++v == 100){ - clean_order(); - fflush(stdout); - } - } - usleep(50000); - continue; - } - v = 0; - - extended_log_format(p); } - - clean_order(); return (0); } From phk at projects.linpro.no Fri Sep 15 07:37:21 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Fri, 15 Sep 2006 09:37:21 +0200 (CEST) Subject: r982 - trunk/varnish-cache/bin/varnishd Message-ID: <20060915073721.1F6771ED7FE@projects.linpro.no> Author: phk Date: 2006-09-15 09:37:20 +0200 (Fri, 15 Sep 2006) New Revision: 982 Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/steps.h Log: If after handling a request we find anything in our input buffer, don't waste time putting the session on the herder, but go right back and take the next request in the current worker thread. Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-15 07:14:37 UTC (rev 981) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-15 07:37:20 UTC (rev 982) @@ -158,14 +158,6 @@ CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); AZ(sp->obj); AZ(sp->vcl); - if (sp->fd >= 0) { - VSL(SLT_SessionReuse, sp->fd, "%s %s", sp->addr, sp->port); - sp->t_open = sp->t_end; - if (http_RecvPrepAgain(sp->http)) { - vca_handover(sp, 0); - return; - } - } vca_act->recycle(sp); } Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-15 07:14:37 UTC (rev 981) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-15 07:37:20 UTC (rev 982) @@ -41,6 +41,39 @@ static unsigned xids; /*-------------------------------------------------------------------- + * The very first request + */ +static int +cnt_again(struct sess *sp) +{ + int i; + + assert(sp->xid == 0); + sp->wrk->idle = sp->t_open.tv_sec; + + if (http_RecvPrepAgain(sp->http)) { + sp->step = STP_RECV; + return (0); + } + do + i = http_RecvSome(sp->fd, sp->http); + while (i == -1); + if (i == 0) { + sp->step = STP_RECV; + return (0); + } + if (i == 1) + vca_close_session(sp, "overflow"); + else if (i == 2) + vca_close_session(sp, "no request"); + else + INCOMPL(); + sp->step = STP_DONE; + return (0); +} + + +/*-------------------------------------------------------------------- * We have a refcounted object on the session, now deliver it. * DOT subgraph cluster_deliver { @@ -120,6 +153,23 @@ (long)sp->t_end.tv_sec, (long)sp->t_end.tv_nsec, dh, dp, da); + sp->xid = 0; + sp->t_open = sp->t_end; + if (sp->fd > 0) { + VSL(SLT_SessionReuse, sp->fd, "%s %s", sp->addr, sp->port); + + /* If we have anything in the input buffer, start over */ + /* + * XXX: we might even want to do a short timed read (poll) + * XXX: here to see if something is pending in the kernel + */ + + if (sp->http->t < sp->http->v) { + sp->step = STP_AGAIN; + return (0); + } + } + SES_Charge(sp); vca_return_session(sp); return (1); Modified: trunk/varnish-cache/bin/varnishd/steps.h =================================================================== --- trunk/varnish-cache/bin/varnishd/steps.h 2006-09-15 07:14:37 UTC (rev 981) +++ trunk/varnish-cache/bin/varnishd/steps.h 2006-09-15 07:37:20 UTC (rev 982) @@ -1,5 +1,6 @@ /* $Id$ */ +STEP(again, AGAIN) STEP(first, FIRST) STEP(recv, RECV) STEP(pipe, PIPE) From des at linpro.no Fri Sep 15 07:55:07 2006 From: des at linpro.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) Date: Fri, 15 Sep 2006 09:55:07 +0200 Subject: r982 - trunk/varnish-cache/bin/varnishd References: <20060915073721.1F6771ED7FE@projects.linpro.no> Message-ID: phk at projects.linpro.no writes: > If after handling a request we find anything in our input buffer, > don't waste time putting the session on the herder, but go right > back and take the next request in the current worker thread. This should reduce lock contention under high load, shouldn't it? DES -- Dag-Erling Sm?rgrav Senior Software Developer Linpro AS - www.linpro.no From phk at projects.linpro.no Fri Sep 15 08:08:28 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Fri, 15 Sep 2006 10:08:28 +0200 (CEST) Subject: r983 - trunk/varnish-cache/bin/varnishd Message-ID: <20060915080828.5C1181EC44D@projects.linpro.no> Author: phk Date: 2006-09-15 10:08:28 +0200 (Fri, 15 Sep 2006) New Revision: 983 Modified: trunk/varnish-cache/bin/varnishd/cache_center.c Log: Avoid parking a worker thread on trailing space Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-15 07:37:20 UTC (rev 982) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-15 08:08:28 UTC (rev 983) @@ -49,12 +49,7 @@ int i; assert(sp->xid == 0); - sp->wrk->idle = sp->t_open.tv_sec; - if (http_RecvPrepAgain(sp->http)) { - sp->step = STP_RECV; - return (0); - } do i = http_RecvSome(sp->fd, sp->http); while (i == -1); @@ -139,7 +134,6 @@ } clock_gettime(CLOCK_REALTIME, &sp->t_end); - sp->wrk->idle = sp->t_end.tv_sec; if (sp->xid == 0) { sp->t_req = sp->t_end; sp->t_resp = sp->t_end; @@ -155,6 +149,7 @@ sp->xid = 0; sp->t_open = sp->t_end; + SES_Charge(sp); if (sp->fd > 0) { VSL(SLT_SessionReuse, sp->fd, "%s %s", sp->addr, sp->port); @@ -164,13 +159,17 @@ * XXX: here to see if something is pending in the kernel */ + if (http_RecvPrepAgain(sp->http)) { + sp->step = STP_RECV; + return (0); + } if (sp->http->t < sp->http->v) { sp->step = STP_AGAIN; return (0); } } - SES_Charge(sp); + sp->wrk->idle = sp->t_open.tv_sec; vca_return_session(sp); return (1); } From des at projects.linpro.no Fri Sep 15 08:14:36 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 15 Sep 2006 10:14:36 +0200 (CEST) Subject: r984 - trunk/varnish-cache/bin/varnishd Message-ID: <20060915081436.7F5101EC3F5@projects.linpro.no> Author: des Date: 2006-09-15 10:14:36 +0200 (Fri, 15 Sep 2006) New Revision: 984 Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c trunk/varnish-cache/bin/varnishd/cache_response.c Log: Fix sendfile() on Linux: - use the correct headers - don't duplicate WRK_Flush() - pass the offset correctly Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-15 08:08:28 UTC (rev 983) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-15 08:14:36 UTC (rev 984) @@ -4,14 +4,23 @@ * XXX: automatic thread-pool size adaptation. */ +#include +#include + +#ifdef HAVE_SENDFILE +#if defined(__FreeBSD__) +#include +#elif defined(__linux__) +#include +#else +#error Unknown sendfile() implementation +#endif +#endif /* HAVE_SENDFILE */ + +#include #include -#include #include #include -#ifdef HAVE_SENDFILE -#include -#include -#endif /* HAVE_SENDFILE */ #include #include "heritage.h" @@ -102,7 +111,6 @@ void WRK_Sendfile(struct worker *w, int fd, off_t off, unsigned len) { - int i; CHECK_OBJ_NOTNULL(w, WORKER_MAGIC); assert(fd >= 0); @@ -116,23 +124,21 @@ sfh.headers = w->iov; sfh.hdr_cnt = w->niov; } - i = sendfile(fd, *w->wfd, off, len, &sfh, NULL, 0); + if (sendfile(fd, *w->wfd, off, len, &sfh, NULL, 0) != 0) + w->werr++; + w->liov = 0; + w->niov = 0; } while (0); #elif defined(__linux__) do { - if (w->niov > 0 && - (i = writev(*w->wfd, w->iov, w->niov)) != 0) - break; - WRK_Flush(w); - i = sendfile(*w->wfd, fd, off, len); + if (WRK_Flush(w) == 0) { + if (sendfile(*w->wfd, fd, &off, len) != 0) + w->werr++; + } } while (0); #else #error Unknown sendfile() implementation #endif - if (i != 0) - w->werr++; - w->liov = 0; - w->niov = 0; } #endif /* HAVE_SENDFILE */ Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-15 08:08:28 UTC (rev 983) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-15 08:14:36 UTC (rev 984) @@ -226,7 +226,6 @@ AN(st->stevedore); u += st->len; sp->wrk->acct.bodybytes += st->len; -#ifdef __FreeBSD__ #ifdef HAVE_SENDFILE /* * XXX: the overhead of setting up senddile is not @@ -242,7 +241,6 @@ continue; } #endif /* HAVE_SENDFILE */ -#endif /* __FreeBSD__ */ VSL_stats->n_objwrite++; WRK_Write(sp->wrk, st->ptr, st->len); } From phk at phk.freebsd.dk Fri Sep 15 08:14:47 2006 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Fri, 15 Sep 2006 08:14:47 +0000 Subject: r982 - trunk/varnish-cache/bin/varnishd In-Reply-To: Your message of "Fri, 15 Sep 2006 09:55:07 +0200." Message-ID: <42069.1158308087@critter.freebsd.dk> In message , Dag-Erling =?iso-8859-1?Q?Sm=F8rgra v?= writes: >phk at projects.linpro.no writes: >> If after handling a request we find anything in our input buffer, >> don't waste time putting the session on the herder, but go right >> back and take the next request in the current worker thread. > >This should reduce lock contention under high load, shouldn't it? I think the bigger saving is context switches, basically a void a write, a read and a context switch for any session which pipelines. This is mostly Opera at this point in time. I'm considering putting in a .1 second timed read there to give the other browsers a chance as well. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From phk at projects.linpro.no Fri Sep 15 08:43:39 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Fri, 15 Sep 2006 10:43:39 +0200 (CEST) Subject: r985 - trunk/varnish-cache/bin/varnishncsa Message-ID: <20060915084339.334581EC3F3@projects.linpro.no> Author: phk Date: 2006-09-15 10:43:39 +0200 (Fri, 15 Sep 2006) New Revision: 985 Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c Log: Print '-' if we don't have an IP# on startup. Also skip IP# from SessionReuse records. Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-15 08:14:36 UTC (rev 984) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-15 08:43:39 UTC (rev 985) @@ -71,12 +71,14 @@ assert(ll[fd] != NULL); ll[fd]->sb = vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND); assert(ll[fd]->sb != NULL); + strcpy(ll[fd]->df_h, "-"); } lp = ll[fd]; switch (tag) { case SLT_SessionOpen: + case SLT_SessionReuse: for (p = ptr, q = lp->df_h; *p && *p != ' ';) *q++ = *p++; *q = '\0'; From phk at projects.linpro.no Fri Sep 15 08:48:13 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Fri, 15 Sep 2006 10:48:13 +0200 (CEST) Subject: r986 - trunk/varnish-cache/bin/varnishd Message-ID: <20060915084813.DC97C1EC44D@projects.linpro.no> Author: phk Date: 2006-09-15 10:48:13 +0200 (Fri, 15 Sep 2006) New Revision: 986 Modified: trunk/varnish-cache/bin/varnishd/cache_session.c Log: Add XXX comment Modified: trunk/varnish-cache/bin/varnishd/cache_session.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-15 08:43:39 UTC (rev 985) +++ trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-15 08:48:13 UTC (rev 986) @@ -10,6 +10,15 @@ * * We identify srcaddrs instead of full addr+port because the desired level * of granularity is "whois is abuse@ or tech-c@ in the RIPE database. + * + * XXX: The two-list session management is actually not a good idea + * XXX: come to think of it, because we want the sessions reused in + * XXX: Most Recently Used order. + * XXX: Another and maybe more interesting option would be to cache + * XXX: free sessions in the worker threads and postpone session + * XXX: allocation until then. This does not quite implment MRU order + * XXX: but it does save some locking, although not that much because + * XXX: we still have to do the source-addr lookup. */ #include From phk at projects.linpro.no Fri Sep 15 09:43:56 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Fri, 15 Sep 2006 11:43:56 +0200 (CEST) Subject: r987 - in trunk/varnish-cache: bin/varnishd include Message-ID: <20060915094356.F0A861EC44D@projects.linpro.no> Author: phk Date: 2006-09-15 11:43:56 +0200 (Fri, 15 Sep 2006) New Revision: 987 Modified: trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/heritage.h trunk/varnish-cache/bin/varnishd/mgt_param.c trunk/varnish-cache/include/stat_field.h Log: Try to avoid sending EOF'ed or ready sessions to the herder. Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-15 08:48:13 UTC (rev 986) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-15 09:43:56 UTC (rev 987) @@ -33,8 +33,10 @@ #include #include #include +#include #include "shmlog.h" +#include "heritage.h" #include "vcl.h" #include "cache.h" @@ -122,6 +124,8 @@ cnt_done(struct sess *sp) { double dh, dp, da; + struct pollfd fds[1]; + int i; AZ(sp->obj); AZ(sp->vbc); @@ -150,25 +154,47 @@ sp->xid = 0; sp->t_open = sp->t_end; SES_Charge(sp); - if (sp->fd > 0) { + if (sp->fd < 0) { + VSL_stats->sess_closed++; + sp->wrk->idle = sp->t_open.tv_sec; + vca_return_session(sp); + return (1); + } + + if (http_RecvPrepAgain(sp->http)) { + VSL_stats->sess_pipeline++; VSL(SLT_SessionReuse, sp->fd, "%s %s", sp->addr, sp->port); - - /* If we have anything in the input buffer, start over */ - /* - * XXX: we might even want to do a short timed read (poll) - * XXX: here to see if something is pending in the kernel - */ - - if (http_RecvPrepAgain(sp->http)) { - sp->step = STP_RECV; - return (0); - } - if (sp->http->t < sp->http->v) { - sp->step = STP_AGAIN; - return (0); - } + sp->step = STP_RECV; + return (0); } - + if (sp->http->t < sp->http->v) { + VSL_stats->sess_readahead++; + VSL(SLT_SessionReuse, sp->fd, "%s %s", sp->addr, sp->port); + sp->step = STP_AGAIN; + return (0); + } + if (params->session_grace == 0) { + VSL_stats->sess_herd++; + sp->wrk->idle = sp->t_open.tv_sec; + vca_return_session(sp); + return (1); + } + fds[0].fd = sp->fd; + fds[0].events = POLLIN; + fds[0].revents = 0; + i = poll(fds, 1, params->session_grace); + if (i == 1 && (fds[0].revents & POLLHUP)) { + VSL_stats->sess_EOF++; + vca_close_session(sp, "EOF"); + } else if (i == 1 && (fds[0].revents & POLLIN)) { + VSL_stats->sess_ready++; + VSL(SLT_SessionReuse, sp->fd, "%s %s", + sp->addr, sp->port); + sp->step = STP_AGAIN; + return (0); + } else { + VSL_stats->sess_herd++; + } sp->wrk->idle = sp->t_open.tv_sec; vca_return_session(sp); return (1); Modified: trunk/varnish-cache/bin/varnishd/heritage.h =================================================================== --- trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-15 08:48:13 UTC (rev 986) +++ trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-15 09:43:56 UTC (rev 987) @@ -53,6 +53,9 @@ /* Sendfile object minimum size */ unsigned sendfile_threshold; + + /* Session dispostion grace period */ + unsigned session_grace; }; extern struct params *params; Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-15 08:48:13 UTC (rev 986) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-15 09:43:56 UTC (rev 987) @@ -169,6 +169,28 @@ /*--------------------------------------------------------------------*/ static void +tweak_session_grace(struct cli *cli, struct parspec *par, const char *arg) +{ + unsigned u; + + (void)par; + if (arg != NULL) { + u = strtoul(arg, NULL, 0); + if (u == 0) { + cli_out(cli, "Timeout must be greater than zero\n"); + cli_result(cli, CLIS_PARAM); + return; + } + params->session_grace = u; + } + if (cli == NULL) + return; + cli_out(cli, "%u [milliseconds]\n", params->session_grace); +} + +/*--------------------------------------------------------------------*/ + +static void tweak_auto_restart(struct cli *cli, struct parspec *par, const char *arg) { unsigned u; @@ -301,6 +323,10 @@ "The minimum size of objects transmitted with sendfile.\n" "Default is 8192 bytes.", "8192" }, #endif /* HAVE_SENDFILE */ + { "session_grace", tweak_session_grace, + "How long a workerthread waits for a new request to arrive " + "before sending the session to the herder.\n" + "Default is 10 msec.", "10" }, { NULL, NULL, NULL } }; Modified: trunk/varnish-cache/include/stat_field.h =================================================================== --- trunk/varnish-cache/include/stat_field.h 2006-09-15 08:48:13 UTC (rev 986) +++ trunk/varnish-cache/include/stat_field.h 2006-09-15 09:43:56 UTC (rev 987) @@ -43,3 +43,10 @@ MAC_STAT(s_fetch, uint64_t, "u", "Total fetch") MAC_STAT(s_hdrbytes, uint64_t, "u", "Total header bytes") MAC_STAT(s_bodybytes, uint64_t, "u", "Total body bytes") + +MAC_STAT(sess_closed, uint64_t, "u", "Session Closed") +MAC_STAT(sess_pipeline, uint64_t, "u", "Session Pipeline") +MAC_STAT(sess_readahead, uint64_t, "u", "Session Read Ahead") +MAC_STAT(sess_EOF, uint64_t, "u", "Session EOF") +MAC_STAT(sess_ready, uint64_t, "u", "Session Ready") +MAC_STAT(sess_herd, uint64_t, "u", "Session herd") From phk at projects.linpro.no Fri Sep 15 09:54:52 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Fri, 15 Sep 2006 11:54:52 +0200 (CEST) Subject: r988 - trunk/varnish-cache/bin/varnishd Message-ID: <20060915095452.4CEB51EC44D@projects.linpro.no> Author: phk Date: 2006-09-15 11:54:52 +0200 (Fri, 15 Sep 2006) New Revision: 988 Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c Log: Allow session_grace to be set to zero Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-15 09:43:56 UTC (rev 987) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-15 09:54:52 UTC (rev 988) @@ -176,11 +176,6 @@ (void)par; if (arg != NULL) { u = strtoul(arg, NULL, 0); - if (u == 0) { - cli_out(cli, "Timeout must be greater than zero\n"); - cli_result(cli, CLIS_PARAM); - return; - } params->session_grace = u; } if (cli == NULL) From phk at projects.linpro.no Fri Sep 15 10:01:45 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Fri, 15 Sep 2006 12:01:45 +0200 (CEST) Subject: r989 - trunk/varnish-cache/lib/libvarnishapi Message-ID: <20060915100145.56E3D1EC3F5@projects.linpro.no> Author: phk Date: 2006-09-15 12:01:45 +0200 (Fri, 15 Sep 2006) New Revision: 989 Modified: trunk/varnish-cache/lib/libvarnishapi/shmlog.c Log: Improve portability: Since all log strings are NUL terminated we do not need to use REG_STARTEND any more. Modified: trunk/varnish-cache/lib/libvarnishapi/shmlog.c =================================================================== --- trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2006-09-15 09:54:52 UTC (rev 988) +++ trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2006-09-15 10:01:45 UTC (rev 989) @@ -243,14 +243,14 @@ if (vd->regincl != NULL) { rm.rm_so = 0; rm.rm_eo = p[1]; - i = regexec(vd->regincl, p + 4, 1, &rm, REG_STARTEND); + i = regexec(vd->regincl, p + 4, 1, &rm, 0); if (i == REG_NOMATCH) continue; } if (vd->regexcl != NULL) { rm.rm_so = 0; rm.rm_eo = p[1]; - i = regexec(vd->regexcl, p + 4, 1, &rm, REG_STARTEND); + i = regexec(vd->regexcl, p + 4, 1, &rm, 0); if (i != REG_NOMATCH) continue; } From phk at projects.linpro.no Fri Sep 15 10:03:24 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Fri, 15 Sep 2006 12:03:24 +0200 (CEST) Subject: r990 - trunk/varnish-cache/bin/varnishd Message-ID: <20060915100324.B19411ED7F5@projects.linpro.no> Author: phk Date: 2006-09-15 12:03:24 +0200 (Fri, 15 Sep 2006) New Revision: 990 Modified: trunk/varnish-cache/bin/varnishd/cache_center.c Log: Add missing SessionReuse log entries Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-15 10:01:45 UTC (rev 989) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-15 10:03:24 UTC (rev 990) @@ -175,6 +175,7 @@ } if (params->session_grace == 0) { VSL_stats->sess_herd++; + VSL(SLT_SessionReuse, sp->fd, "%s %s", sp->addr, sp->port); sp->wrk->idle = sp->t_open.tv_sec; vca_return_session(sp); return (1); @@ -188,11 +189,11 @@ vca_close_session(sp, "EOF"); } else if (i == 1 && (fds[0].revents & POLLIN)) { VSL_stats->sess_ready++; - VSL(SLT_SessionReuse, sp->fd, "%s %s", - sp->addr, sp->port); + VSL(SLT_SessionReuse, sp->fd, "%s %s", sp->addr, sp->port); sp->step = STP_AGAIN; return (0); } else { + VSL(SLT_SessionReuse, sp->fd, "%s %s", sp->addr, sp->port); VSL_stats->sess_herd++; } sp->wrk->idle = sp->t_open.tv_sec; From phk at projects.linpro.no Fri Sep 15 10:23:34 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Fri, 15 Sep 2006 12:23:34 +0200 (CEST) Subject: r991 - trunk/varnish-cache/bin/varnishd Message-ID: <20060915102334.6B2EA1EC44E@projects.linpro.no> Author: phk Date: 2006-09-15 12:23:34 +0200 (Fri, 15 Sep 2006) New Revision: 991 Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c trunk/varnish-cache/bin/varnishd/cache_center.c Log: Fix stats. Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-15 10:03:24 UTC (rev 990) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-15 10:23:34 UTC (rev 991) @@ -115,7 +115,6 @@ return; } sp->step = STP_RECV; - VSL_stats->client_req++; WRK_QueueSession(sp); } Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-15 10:03:24 UTC (rev 990) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-15 10:23:34 UTC (rev 991) @@ -673,6 +673,7 @@ { int done; + VSL_stats->client_req++; clock_gettime(CLOCK_REALTIME, &sp->t_req); sp->wrk->idle = sp->t_req.tv_sec; sp->xid = ++xids; From phk at projects.linpro.no Fri Sep 15 10:24:50 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Fri, 15 Sep 2006 12:24:50 +0200 (CEST) Subject: r992 - trunk/varnish-cache/bin/varnishd Message-ID: <20060915102450.178B11ED7F5@projects.linpro.no> Author: phk Date: 2006-09-15 12:24:49 +0200 (Fri, 15 Sep 2006) New Revision: 992 Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c Log: fix more stats Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-15 10:23:34 UTC (rev 991) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-15 10:24:49 UTC (rev 992) @@ -174,7 +174,6 @@ continue; http_RecvPrep(sp->http); sp->step = STP_FIRST; - VSL_stats->client_req++; WRK_QueueSession(sp); } } From phk at projects.linpro.no Fri Sep 15 10:30:27 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Fri, 15 Sep 2006 12:30:27 +0200 (CEST) Subject: r993 - trunk/varnish-cache/bin/varnishd Message-ID: <20060915103027.320261EC44E@projects.linpro.no> Author: phk Date: 2006-09-15 12:30:27 +0200 (Fri, 15 Sep 2006) New Revision: 993 Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c Log: Disable session_grace for now. It is not clear if this is a benefit or not. There seems to be a significant (100msec ?) inter-request gap and seeting the grace period that long means tying up worker threads doing basically nothing. Setting a short timeout (10msec) results in an extra system call which practically never does anything good. Unless benefit is shown, this stuff should be removed again. Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-15 10:24:49 UTC (rev 992) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-15 10:30:27 UTC (rev 993) @@ -321,7 +321,8 @@ { "session_grace", tweak_session_grace, "How long a workerthread waits for a new request to arrive " "before sending the session to the herder.\n" - "Default is 10 msec.", "10" }, + "Units are milliseconds, zero disables.\n" + "Default is disabled.", "0" }, { NULL, NULL, NULL } }; From phk at projects.linpro.no Fri Sep 15 16:10:15 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Fri, 15 Sep 2006 18:10:15 +0200 (CEST) Subject: r994 - in trunk/varnish-cache: bin/varnishd bin/varnishncsa include Message-ID: <20060915161015.CA8021EC22B@projects.linpro.no> Author: phk Date: 2006-09-15 18:10:15 +0200 (Fri, 15 Sep 2006) New Revision: 994 Modified: trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishncsa/varnishncsa.c trunk/varnish-cache/include/shmlog_tags.h Log: Remove the SessionReuse shmem tag, we have little or no benefit from knowing this at the end of a request. Instead put the address + port in the ReqStart shmtag where it does a lot of good. Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-15 10:30:27 UTC (rev 993) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-15 16:10:15 UTC (rev 994) @@ -163,19 +163,16 @@ if (http_RecvPrepAgain(sp->http)) { VSL_stats->sess_pipeline++; - VSL(SLT_SessionReuse, sp->fd, "%s %s", sp->addr, sp->port); sp->step = STP_RECV; return (0); } if (sp->http->t < sp->http->v) { VSL_stats->sess_readahead++; - VSL(SLT_SessionReuse, sp->fd, "%s %s", sp->addr, sp->port); sp->step = STP_AGAIN; return (0); } if (params->session_grace == 0) { VSL_stats->sess_herd++; - VSL(SLT_SessionReuse, sp->fd, "%s %s", sp->addr, sp->port); sp->wrk->idle = sp->t_open.tv_sec; vca_return_session(sp); return (1); @@ -189,11 +186,9 @@ vca_close_session(sp, "EOF"); } else if (i == 1 && (fds[0].revents & POLLIN)) { VSL_stats->sess_ready++; - VSL(SLT_SessionReuse, sp->fd, "%s %s", sp->addr, sp->port); sp->step = STP_AGAIN; return (0); } else { - VSL(SLT_SessionReuse, sp->fd, "%s %s", sp->addr, sp->port); VSL_stats->sess_herd++; } sp->wrk->idle = sp->t_open.tv_sec; @@ -677,7 +672,7 @@ clock_gettime(CLOCK_REALTIME, &sp->t_req); sp->wrk->idle = sp->t_req.tv_sec; sp->xid = ++xids; - VSL(SLT_ReqStart, sp->fd, "XID %u", sp->xid); + VSL(SLT_ReqStart, sp->fd, "%s %s %u", sp->addr, sp->port, sp->xid); AZ(sp->vcl); sp->vcl = VCL_Get(); Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-15 10:30:27 UTC (rev 993) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-15 16:10:15 UTC (rev 994) @@ -78,13 +78,10 @@ switch (tag) { case SLT_SessionOpen: - case SLT_SessionReuse: + case SLT_ReqStart: for (p = ptr, q = lp->df_h; *p && *p != ' ';) *q++ = *p++; *q = '\0'; - break; - - case SLT_ReqStart: vsb_clear(lp->sb); break; Modified: trunk/varnish-cache/include/shmlog_tags.h =================================================================== --- trunk/varnish-cache/include/shmlog_tags.h 2006-09-15 10:30:27 UTC (rev 993) +++ trunk/varnish-cache/include/shmlog_tags.h 2006-09-15 16:10:15 UTC (rev 994) @@ -15,7 +15,6 @@ SLTM(StatSess) SLTM(ReqEnd) SLTM(SessionOpen) -SLTM(SessionReuse) SLTM(SessionClose) SLTM(BackendOpen) SLTM(BackendXID) From phk at projects.linpro.no Fri Sep 15 16:18:27 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Fri, 15 Sep 2006 18:18:27 +0200 (CEST) Subject: r995 - in trunk/varnish-cache: bin/varnishd include Message-ID: <20060915161827.036BA1EC22E@projects.linpro.no> Author: phk Date: 2006-09-15 18:18:27 +0200 (Fri, 15 Sep 2006) New Revision: 995 Modified: trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/mgt_param.c trunk/varnish-cache/include/stat_field.h Log: Eliminate the session_grace thing, the inter-request interval is to large in general (think RTT) for this to make sense, it costs a syscall and if a delay is used, at least two context switches. We still capture sessions that do pipe-line avoiding the context switch in that case, without incurring the syscall overhead. Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-15 16:10:15 UTC (rev 994) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-15 16:18:27 UTC (rev 995) @@ -33,7 +33,6 @@ #include #include #include -#include #include "shmlog.h" #include "heritage.h" @@ -124,8 +123,6 @@ cnt_done(struct sess *sp) { double dh, dp, da; - struct pollfd fds[1]; - int i; AZ(sp->obj); AZ(sp->vbc); @@ -171,26 +168,7 @@ sp->step = STP_AGAIN; return (0); } - if (params->session_grace == 0) { - VSL_stats->sess_herd++; - sp->wrk->idle = sp->t_open.tv_sec; - vca_return_session(sp); - return (1); - } - fds[0].fd = sp->fd; - fds[0].events = POLLIN; - fds[0].revents = 0; - i = poll(fds, 1, params->session_grace); - if (i == 1 && (fds[0].revents & POLLHUP)) { - VSL_stats->sess_EOF++; - vca_close_session(sp, "EOF"); - } else if (i == 1 && (fds[0].revents & POLLIN)) { - VSL_stats->sess_ready++; - sp->step = STP_AGAIN; - return (0); - } else { - VSL_stats->sess_herd++; - } + VSL_stats->sess_herd++; sp->wrk->idle = sp->t_open.tv_sec; vca_return_session(sp); return (1); Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-15 16:10:15 UTC (rev 994) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-15 16:18:27 UTC (rev 995) @@ -169,23 +169,6 @@ /*--------------------------------------------------------------------*/ static void -tweak_session_grace(struct cli *cli, struct parspec *par, const char *arg) -{ - unsigned u; - - (void)par; - if (arg != NULL) { - u = strtoul(arg, NULL, 0); - params->session_grace = u; - } - if (cli == NULL) - return; - cli_out(cli, "%u [milliseconds]\n", params->session_grace); -} - -/*--------------------------------------------------------------------*/ - -static void tweak_auto_restart(struct cli *cli, struct parspec *par, const char *arg) { unsigned u; @@ -318,11 +301,6 @@ "The minimum size of objects transmitted with sendfile.\n" "Default is 8192 bytes.", "8192" }, #endif /* HAVE_SENDFILE */ - { "session_grace", tweak_session_grace, - "How long a workerthread waits for a new request to arrive " - "before sending the session to the herder.\n" - "Units are milliseconds, zero disables.\n" - "Default is disabled.", "0" }, { NULL, NULL, NULL } }; Modified: trunk/varnish-cache/include/stat_field.h =================================================================== --- trunk/varnish-cache/include/stat_field.h 2006-09-15 16:10:15 UTC (rev 994) +++ trunk/varnish-cache/include/stat_field.h 2006-09-15 16:18:27 UTC (rev 995) @@ -47,6 +47,4 @@ MAC_STAT(sess_closed, uint64_t, "u", "Session Closed") MAC_STAT(sess_pipeline, uint64_t, "u", "Session Pipeline") MAC_STAT(sess_readahead, uint64_t, "u", "Session Read Ahead") -MAC_STAT(sess_EOF, uint64_t, "u", "Session EOF") -MAC_STAT(sess_ready, uint64_t, "u", "Session Ready") MAC_STAT(sess_herd, uint64_t, "u", "Session herd") From phk at projects.linpro.no Fri Sep 15 19:25:06 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Fri, 15 Sep 2006 21:25:06 +0200 (CEST) Subject: r996 - in trunk/varnish-cache: include lib/libvarnishapi Message-ID: <20060915192506.53D601EC367@projects.linpro.no> Author: phk Date: 2006-09-15 21:25:06 +0200 (Fri, 15 Sep 2006) New Revision: 996 Added: trunk/varnish-cache/lib/libvarnishapi/base64.c Modified: trunk/varnish-cache/include/varnishapi.h trunk/varnish-cache/lib/libvarnishapi/Makefile.am Log: Add a base64 decoder. Modified: trunk/varnish-cache/include/varnishapi.h =================================================================== --- trunk/varnish-cache/include/varnishapi.h 2006-09-15 16:18:27 UTC (rev 995) +++ trunk/varnish-cache/include/varnishapi.h 2006-09-15 19:25:06 UTC (rev 996) @@ -7,6 +7,10 @@ #define V_DEAD __attribute__ ((noreturn)) +/* base64.c */ +void base64_init(void); +int base64_decode(char *d, unsigned dlen, const char *s); + /* shmlog.c */ typedef int vsl_handler(void *priv, unsigned tag, unsigned fd, unsigned len, unsigned spec, const char *ptr); #define VSL_S_CLIENT (1 << 0) Modified: trunk/varnish-cache/lib/libvarnishapi/Makefile.am =================================================================== --- trunk/varnish-cache/lib/libvarnishapi/Makefile.am 2006-09-15 16:18:27 UTC (rev 995) +++ trunk/varnish-cache/lib/libvarnishapi/Makefile.am 2006-09-15 19:25:06 UTC (rev 996) @@ -5,6 +5,7 @@ lib_LTLIBRARIES = libvarnishapi.la libvarnishapi_la_SOURCES = \ + base64.c \ shmlog.c libvarnishapi_la_CFLAGS = -include config.h Added: trunk/varnish-cache/lib/libvarnishapi/base64.c =================================================================== --- trunk/varnish-cache/lib/libvarnishapi/base64.c 2006-09-15 16:18:27 UTC (rev 995) +++ trunk/varnish-cache/lib/libvarnishapi/base64.c 2006-09-15 19:25:06 UTC (rev 996) @@ -0,0 +1,78 @@ +/* $Id$ */ + +static const char *b64 = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + +static char i64[256]; + +void +base64_init(void) +{ + int i; + const char *p; + + for (i = 0; i < 256; i++) + i64[i] = -1; + for (p = b64, i = 0; *p; p++, i++) + i64[*p] = i; + i64['='] = 0; +} + +int +base64_decode(char *d, unsigned dlen, const char *s) +{ + unsigned u, v, l; + int i; + + l = 0; + while (*s) { + for (v = 0; v < 4; v++) { + if (!*s) + break; + i = i64[*s++]; + if (i < 0) + return (-1); + u <<= 6; + u |= i; + } + for (v = 0; v < 3; v++) { + if (l >= dlen - 1) + return (-1); + *d = (u >> 16) & 0xff; + u <<= 8; + l++; + d++; + } + } + printf("\n"); + *d = '\0'; + return (0); +} + +#ifdef TEST_DRIVER +#include + +const char *test1 = +"TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlz" +"IHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2Yg" +"dGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0aGUgY29udGlu" +"dWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdlLCBleGNlZWRzIHRo" +"ZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4="; + +int +main(int argc, char **argv) +{ + int i; + char buf[BUFSIZ]; + unsigned l; + + (void)argc; + (void)argv; + + base64_init(); + l = sizeof buf; + base64_decode(buf, &l, test1); + printf("%s\n", buf); + return (0); +} +#endif From phk at projects.linpro.no Sat Sep 16 07:44:15 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 09:44:15 +0200 (CEST) Subject: r997 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916074415.86AA31EC372@projects.linpro.no> Author: phk Date: 2006-09-16 09:44:15 +0200 (Sat, 16 Sep 2006) New Revision: 997 Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c trunk/varnish-cache/bin/varnishd/heritage.h trunk/varnish-cache/bin/varnishd/mgt_param.c Log: Make the shmlog'ing of vcl execution a parameter. VCL tracing is responsible for a very large fraction of the shmlog records and will generally only be used for debugging of VCL code. Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt.c 2006-09-15 19:25:06 UTC (rev 996) +++ trunk/varnish-cache/bin/varnishd/cache_vrt.c 2006-09-16 07:44:15 UTC (rev 997) @@ -10,6 +10,7 @@ #include #include "shmlog.h" +#include "heritage.h" #include "vrt.h" #include "vrt_obj.h" #include "vcl.h" @@ -34,9 +35,9 @@ { CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); - VSL(SLT_VCL_trace, sp->fd, "%u %d.%d", u, - sp->vcl->ref[u].line, - sp->vcl->ref[u].pos); + if (params->vcl_trace) + VSL(SLT_VCL_trace, sp->fd, "%u %d.%d", u, + sp->vcl->ref[u].line, sp->vcl->ref[u].pos); } /*--------------------------------------------------------------------*/ Modified: trunk/varnish-cache/bin/varnishd/heritage.h =================================================================== --- trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-15 19:25:06 UTC (rev 996) +++ trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-16 07:44:15 UTC (rev 997) @@ -54,8 +54,8 @@ /* Sendfile object minimum size */ unsigned sendfile_threshold; - /* Session dispostion grace period */ - unsigned session_grace; + /* VCL traces */ + unsigned vcl_trace; }; extern struct params *params; Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-15 19:25:06 UTC (rev 996) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-16 07:44:15 UTC (rev 997) @@ -226,6 +226,34 @@ /*--------------------------------------------------------------------*/ +static void +tweak_vcl_trace(struct cli *cli, struct parspec *par, const char *arg) +{ + (void)par; + if (arg != NULL) { + if (!strcasecmp(arg, "off")) + params->vcl_trace = 0; + else if (!strcasecmp(arg, "disable")) + params->vcl_trace = 0; + else if (!strcasecmp(arg, "no")) + params->vcl_trace = 0; + else if (!strcasecmp(arg, "on")) + params->vcl_trace = 1; + else if (!strcasecmp(arg, "enable")) + params->vcl_trace = 1; + else if (!strcasecmp(arg, "yes")) + params->vcl_trace = 1; + else { + cli_out(cli, "use \"on\" or \"off\"\n"); + cli_result(cli, CLIS_PARAM); + return; + } + } + cli_out(cli, params->vcl_trace ? "on" : "off"); +} + +/*--------------------------------------------------------------------*/ + /* * Make sure to end all lines with either a space or newline of the * formatting will go haywire. @@ -301,6 +329,9 @@ "The minimum size of objects transmitted with sendfile.\n" "Default is 8192 bytes.", "8192" }, #endif /* HAVE_SENDFILE */ + { "vcl_trace", tweak_vcl_trace, + "Trace VCL execution in the shmlog\n" + "Default is off", "off" }, { NULL, NULL, NULL } }; From phk at projects.linpro.no Sat Sep 16 07:49:35 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 09:49:35 +0200 (CEST) Subject: r998 - in trunk/varnish-cache: bin/varnishd include Message-ID: <20060916074935.892B21EC36E@projects.linpro.no> Author: phk Date: 2006-09-16 09:49:35 +0200 (Sat, 16 Sep 2006) New Revision: 998 Modified: trunk/varnish-cache/bin/varnishd/cache_cli.c trunk/varnish-cache/bin/varnishd/mgt_cli.c trunk/varnish-cache/include/cli.h Log: Rename the config.* CLI command family to vcl.*. It is more intuitive that way and we may eventually want a config file for varnishd to control obscure parameters. Modified: trunk/varnish-cache/bin/varnishd/cache_cli.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_cli.c 2006-09-16 07:44:15 UTC (rev 997) +++ trunk/varnish-cache/bin/varnishd/cache_cli.c 2006-09-16 07:49:35 UTC (rev 998) @@ -40,10 +40,10 @@ { CLI_URL_QUERY, cli_func_url_query }, #endif { CLI_URL_PURGE, cli_func_url_purge }, - { CLI_CONFIG_LOAD, cli_func_config_load }, - { CLI_CONFIG_LIST, cli_func_config_list }, - { CLI_CONFIG_DISCARD, cli_func_config_discard }, - { CLI_CONFIG_USE, cli_func_config_use }, + { CLI_VCL_LOAD, cli_func_config_load }, + { CLI_VCL_LIST, cli_func_config_list }, + { CLI_VCL_DISCARD, cli_func_config_discard }, + { CLI_VCL_USE, cli_func_config_use }, /* Undocumented */ { "dump.pool", "dump.pool", Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_cli.c 2006-09-16 07:44:15 UTC (rev 997) +++ trunk/varnish-cache/bin/varnishd/mgt_cli.c 2006-09-16 07:49:35 UTC (rev 998) @@ -110,11 +110,11 @@ { CLI_SERVER_START, mcf_server_startstop, NULL }, { CLI_SERVER_STOP, mcf_server_startstop, &cli_proto }, { CLI_STATS, mcf_stats, NULL }, - { CLI_CONFIG_LOAD, mcf_config_load, NULL }, - { CLI_CONFIG_INLINE, mcf_config_inline, NULL }, - { CLI_CONFIG_USE, mcf_config_use, NULL }, - { CLI_CONFIG_DISCARD, mcf_config_discard, NULL }, - { CLI_CONFIG_LIST, mcf_config_list, NULL }, + { CLI_VCL_LOAD, mcf_config_load, NULL }, + { CLI_VCL_INLINE, mcf_config_inline, NULL }, + { CLI_VCL_USE, mcf_config_use, NULL }, + { CLI_VCL_DISCARD, mcf_config_discard, NULL }, + { CLI_VCL_LIST, mcf_config_list, NULL }, { CLI_PARAM_SHOW, mcf_param_show, NULL }, { CLI_PARAM_SET, mcf_param_set, NULL }, { CLI_HELP, cli_func_help, NULL }, Modified: trunk/varnish-cache/include/cli.h =================================================================== --- trunk/varnish-cache/include/cli.h 2006-09-16 07:44:15 UTC (rev 997) +++ trunk/varnish-cache/include/cli.h 2006-09-16 07:49:35 UTC (rev 998) @@ -47,33 +47,33 @@ "\tReturns all metadata for the specified URL", \ 1, 1 -#define CLI_CONFIG_LOAD \ - "config.load", \ - "config.load ", \ +#define CLI_VCL_LOAD \ + "vcl.load", \ + "vcl.load ", \ "\tCompile and load the VCL file under the name provided.", \ 2, 2 -#define CLI_CONFIG_INLINE \ - "config.inline", \ - "config.inline ", \ +#define CLI_VCL_INLINE \ + "vcl.inline", \ + "vcl.inline ", \ "\tCompile and load the VCL data under the name provided.", \ 2, 2 -#define CLI_CONFIG_DISCARD \ - "config.discard", \ - "config.discard ", \ +#define CLI_VCL_DISCARD \ + "vcl.discard", \ + "vcl.discard ", \ "\tUnload the named configuration (when possible).", \ 1, 1 -#define CLI_CONFIG_LIST \ - "config.list", \ - "config.list", \ +#define CLI_VCL_LIST \ + "vcl.list", \ + "vcl.list", \ "\tList all loaded configuration.", \ 0, 0 -#define CLI_CONFIG_USE \ - "config.use", \ - "config.use ", \ +#define CLI_VCL_USE \ + "vcl.use", \ + "vcl.use ", \ "\tSwitch to the named configuration immediately.", \ 1, 1 From phk at projects.linpro.no Sat Sep 16 08:20:39 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 10:20:39 +0200 (CEST) Subject: r999 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916082039.7D2531EC367@projects.linpro.no> Author: phk Date: 2006-09-16 10:20:39 +0200 (Sat, 16 Sep 2006) New Revision: 999 Modified: trunk/varnish-cache/bin/varnishd/heritage.h trunk/varnish-cache/bin/varnishd/mgt_child.c trunk/varnish-cache/bin/varnishd/mgt_param.c trunk/varnish-cache/bin/varnishd/mgt_vcc.c trunk/varnish-cache/bin/varnishd/varnishd.c Log: Open and close the listen socket when we start and stop the child. Make the listen address a parameter. Modified: trunk/varnish-cache/bin/varnishd/heritage.h =================================================================== --- trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-16 07:49:35 UTC (rev 998) +++ trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-16 08:20:39 UTC (rev 999) @@ -56,6 +56,11 @@ /* VCL traces */ unsigned vcl_trace; + + /* Listen address */ + char *listen_address; + char *listen_host; + char *listen_port; }; extern struct params *params; Modified: trunk/varnish-cache/bin/varnishd/mgt_child.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-09-16 07:49:35 UTC (rev 998) +++ trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-09-16 08:20:39 UTC (rev 999) @@ -102,6 +102,13 @@ if (child_state != CH_STOPPED && child_state != CH_DIED) return; + if (heritage.socket < 0) { + heritage.socket = + TCP_open(params->listen_host, params->listen_port, 1); + if (heritage.socket < 0) + return; + } + child_state = CH_STARTING; AZ(pipe(&heritage.fds[0])); @@ -179,6 +186,8 @@ if (child_state != CH_RUNNING) return; + close(heritage.socket); + heritage.socket = -1; child_state = CH_STOPPING; if (ev_poker != NULL) { @@ -249,8 +258,11 @@ if (child_state == CH_DIED && params->auto_restart) start_child(); - else if (child_state == CH_DIED) + else if (child_state == CH_DIED) { + close(heritage.socket); + heritage.socket = -1; child_state = CH_STOPPED; + } else if (child_state == CH_STOPPING) child_state = CH_STOPPED; return (0); Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-16 07:49:35 UTC (rev 998) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-16 08:20:39 UTC (rev 999) @@ -249,11 +249,43 @@ return; } } - cli_out(cli, params->vcl_trace ? "on" : "off"); + if (cli == NULL) + return; + cli_out(cli, params->vcl_trace ? "on\n" : "off\n"); } /*--------------------------------------------------------------------*/ +static void +tweak_listen_address(struct cli *cli, struct parspec *par, const char *arg) +{ + char *a, *p; + + (void)par; + if (arg != NULL) { + if (TCP_parse(arg, &a, &p) != 0) { + cli_out(cli, "Invalid listen address"); + cli_result(cli, CLIS_PARAM); + return; + } + free(params->listen_address); + free(params->listen_host); + free(params->listen_port); + params->listen_address = strdup(arg); + AN(params->listen_address); + params->listen_host = a; + if (p == NULL) { + p = strdup("http"); + AN(p); + } + params->listen_port = p; + } + if (cli == NULL) + return; + cli_out(cli, "%s", params->listen_address); +} +/*--------------------------------------------------------------------*/ + /* * Make sure to end all lines with either a space or newline of the * formatting will go haywire. @@ -332,6 +364,10 @@ { "vcl_trace", tweak_vcl_trace, "Trace VCL execution in the shmlog\n" "Default is off", "off" }, + { "listen_address", tweak_listen_address, + "The network address/port where Varnish services requests.\n" + MUST_RESTART + "Default is \"0.0.0.0:80\"", "0.0.0.0:80" }, { NULL, NULL, NULL } }; Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2006-09-16 07:49:35 UTC (rev 998) +++ trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2006-09-16 08:20:39 UTC (rev 999) @@ -179,13 +179,13 @@ TAILQ_FOREACH(vp, &vclhead, list) { if (mgt_cli_askchild(status, p, - "config.load %s %s\n", vp->name, vp->fname)) + "vcl.load %s %s\n", vp->name, vp->fname)) return (1); free(*p); if (!vp->active) continue; - if (mgt_cli_askchild(status, p, "config.use %s\n", - vp->name, vp->fname)) + if (mgt_cli_askchild(status, p, + "vcl.use %s\n", vp->name)) return (1); free(*p); } Modified: trunk/varnish-cache/bin/varnishd/varnishd.c =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-16 07:49:35 UTC (rev 998) +++ trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-16 08:20:39 UTC (rev 999) @@ -321,7 +321,7 @@ int o; unsigned d_flag = 0; char *addr, *port; - const char *a_arg = "0.0.0.0:http"; + const char *a_arg = NULL; const char *b_arg = NULL; const char *f_arg = NULL; const char *h_flag = "classic"; @@ -332,6 +332,7 @@ setbuf(stdout, NULL); setbuf(stderr, NULL); + heritage.socket = -1; memset(¶m, 0, sizeof param); params = ¶m; mgt_vcc_init(); @@ -397,20 +398,19 @@ setup_storage(s_arg); setup_hash(h_flag); - /* - * XXX: Lacking the suspend/resume facility (due to the socket API - * missing an unlisten(2) facility) we may want to push this into - * the child to limit the amount of time where the socket(s) exists - * but do not answer. That, on the other hand, would eliminate the - * possibility of doing a "no-glitch" restart of the child process. - */ - if (TCP_parse(a_arg, &addr, &port) != 0) - fprintf(stderr, "invalid listen address\n"); - heritage.socket = TCP_open(addr, port ? port : "http", 1); - free(addr); - free(port); - if (heritage.socket < 0) - exit (2); + if (a_arg != NULL) { + if (TCP_parse(a_arg, &addr, &port) != 0) { + fprintf(stderr, "invalid listen address\n"); + exit (2); + } + free(params->listen_address); + free(params->listen_host); + free(params->listen_port); + params->listen_address = strdup(a_arg); + AN(params->listen_address); + params->listen_host = addr; + params->listen_port = port; + } VSL_MgtInit(SHMLOG_FILENAME, 8*1024*1024); From phk at projects.linpro.no Sat Sep 16 09:01:22 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 11:01:22 +0200 (CEST) Subject: r1000 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916090122.1072A1EC372@projects.linpro.no> Author: phk Date: 2006-09-16 11:01:21 +0200 (Sat, 16 Sep 2006) New Revision: 1000 Modified: trunk/varnish-cache/bin/varnishd/common.h trunk/varnish-cache/bin/varnishd/mgt.h trunk/varnish-cache/bin/varnishd/mgt_param.c trunk/varnish-cache/bin/varnishd/tcp.c trunk/varnish-cache/bin/varnishd/varnishd.c Log: Generalize parameter setting at start up. Give the managers main a struct cli and use that to call into the paramter stuff for setting listen address. More params to follow. When setting the listen address, check that getaddrinfo() doesn't hate it. Modified: trunk/varnish-cache/bin/varnishd/common.h =================================================================== --- trunk/varnish-cache/bin/varnishd/common.h 2006-09-16 08:20:39 UTC (rev 999) +++ trunk/varnish-cache/bin/varnishd/common.h 2006-09-16 09:01:21 UTC (rev 1000) @@ -2,6 +2,7 @@ * $Id$ */ +struct cli; struct sockaddr; /* shmlog.c */ @@ -17,3 +18,5 @@ void TCP_myname(int sock, char *abuf, unsigned alen, char *pbuf, unsigned plen); int TCP_parse(const char *str, char **addr, char **port); int TCP_open(const char *addr, const char *port, int http); +void TCP_check(struct cli *cli, const char *addr, const char *port); + Modified: trunk/varnish-cache/bin/varnishd/mgt.h =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt.h 2006-09-16 08:20:39 UTC (rev 999) +++ trunk/varnish-cache/bin/varnishd/mgt.h 2006-09-16 09:01:21 UTC (rev 1000) @@ -7,6 +7,8 @@ #include "libvarnish.h" +struct cli; + extern struct evbase *mgt_evb; /* mgt_child.c */ @@ -23,7 +25,8 @@ int mgt_cli_telnet(const char *T_arg); /* mgt_param.c */ -void MCF_ParamInit(void); +void MCF_ParamInit(struct cli *); +void MCF_ParamSet(struct cli *, const char *param, const char *val); /* mgt_vcc.c */ void mgt_vcc_init(void); Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-16 08:20:39 UTC (rev 999) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-16 09:01:21 UTC (rev 1000) @@ -2,6 +2,7 @@ * $Id$ */ +#include #include #include #include @@ -9,9 +10,11 @@ #include "cli.h" #include "cli_priv.h" +#include "cli_common.h" #include "mgt.h" #include "mgt_cli.h" +#include "vsb.h" #include "heritage.h" struct parspec; @@ -40,10 +43,8 @@ return; } *dst = u; - } - if (cli == NULL) - return; - cli_out(cli, "%u [seconds]\n", *dst); + } else + cli_out(cli, "%u [seconds]\n", *dst); } /*--------------------------------------------------------------------*/ @@ -55,9 +56,8 @@ (void)par; if (arg != NULL) params->default_ttl = strtoul(arg, NULL, 0); - if (cli == NULL) - return; - cli_out(cli, "%u [seconds]\n", params->default_ttl); + else + cli_out(cli, "%u [seconds]\n", params->default_ttl); } /*--------------------------------------------------------------------*/ @@ -76,10 +76,8 @@ return; } params->wthread_min = u; - } - if (cli == NULL) - return; - cli_out(cli, "%u [threads]\n", params->wthread_min); + } else + cli_out(cli, "%u [threads]\n", params->wthread_min); } /*--------------------------------------------------------------------*/ @@ -99,8 +97,6 @@ } params->wthread_max = u; } - if (cli == NULL) - return; if (params->wthread_max == UINT_MAX) cli_out(cli, "unlimited\n"); else @@ -133,10 +129,8 @@ return; } params->mem_workspace = u; - } - if (cli == NULL) - return; - cli_out(cli, "%u [bytes]\n", params->mem_workspace); + } else + cli_out(cli, "%u [bytes]\n", params->mem_workspace); } /*--------------------------------------------------------------------*/ @@ -182,10 +176,8 @@ return; } params->auto_restart = u; - } - if (cli == NULL) - return; - cli_out(cli, "%u {1 = yes, 0 = no}\n", params->auto_restart); + } else + cli_out(cli, "%u {1 = yes, 0 = no}\n", params->auto_restart); } /*--------------------------------------------------------------------*/ @@ -199,10 +191,8 @@ if (arg != NULL) { u = strtoul(arg, NULL, 0); params->fetch_chunksize = u * 1024; - } - if (cli == NULL) - return; - cli_out(cli, "%u [kb]\n", params->fetch_chunksize * 1024); + } else + cli_out(cli, "%u [kb]\n", params->fetch_chunksize * 1024); } #ifdef HAVE_SENDFILE @@ -217,10 +207,8 @@ if (arg != NULL) { u = strtoul(arg, NULL, 0); params->sendfile_threshold = u; - } - if (cli == NULL) - return; - cli_out(cli, "%u [bytes]\n", params->sendfile_threshold); + } else + cli_out(cli, "%u [bytes]\n", params->sendfile_threshold); } #endif /* HAVE_SENDFILE */ @@ -248,10 +236,8 @@ cli_result(cli, CLIS_PARAM); return; } - } - if (cli == NULL) - return; - cli_out(cli, params->vcl_trace ? "on\n" : "off\n"); + } else + cli_out(cli, params->vcl_trace ? "on\n" : "off\n"); } /*--------------------------------------------------------------------*/ @@ -268,21 +254,22 @@ cli_result(cli, CLIS_PARAM); return; } + if (p == NULL) { + p = strdup("http"); + AN(p); + } + TCP_check(cli, a, p); + if (cli->result != CLIS_OK) + return; free(params->listen_address); free(params->listen_host); free(params->listen_port); params->listen_address = strdup(arg); AN(params->listen_address); params->listen_host = a; - if (p == NULL) { - p = strdup("http"); - AN(p); - } params->listen_port = p; - } - if (cli == NULL) - return; - cli_out(cli, "%s", params->listen_address); + } else + cli_out(cli, "%s\n", params->listen_address); } /*--------------------------------------------------------------------*/ @@ -429,31 +416,38 @@ /*--------------------------------------------------------------------*/ void -mcf_param_set(struct cli *cli, char **av, void *priv) +MCF_ParamSet(struct cli *cli, const char *param, const char *val) { struct parspec *pp; - (void)priv; for (pp = parspec; pp->name != NULL; pp++) { - if (!strcmp(pp->name, av[2])) { - cli_out(cli, "%-20s ", pp->name); - pp->func(cli, pp, av[3]); + if (!strcmp(pp->name, param)) { + pp->func(cli, pp, val); return; } } - if (av[2] != NULL) { - cli_result(cli, CLIS_PARAM); - cli_out(cli, "Unknown paramter \"%s\".", av[2]); - } + cli_result(cli, CLIS_PARAM); + cli_out(cli, "Unknown paramter \"%s\".", param); } + /*--------------------------------------------------------------------*/ void -MCF_ParamInit(void) +mcf_param_set(struct cli *cli, char **av, void *priv) { + + (void)priv; + MCF_ParamSet(cli, av[2], av[3]); +} + +/*--------------------------------------------------------------------*/ + +void +MCF_ParamInit(struct cli *cli) +{ struct parspec *pp; for (pp = parspec; pp->name != NULL; pp++) - pp->func(NULL, pp, pp->def); + pp->func(cli, pp, pp->def); } Modified: trunk/varnish-cache/bin/varnishd/tcp.c =================================================================== --- trunk/varnish-cache/bin/varnishd/tcp.c 2006-09-16 08:20:39 UTC (rev 999) +++ trunk/varnish-cache/bin/varnishd/tcp.c 2006-09-16 09:01:21 UTC (rev 1000) @@ -22,6 +22,8 @@ #endif #include "mgt.h" +#include "cli.h" +#include "cli_priv.h" /*--------------------------------------------------------------------*/ @@ -109,6 +111,27 @@ return (0); } +/*--------------------------------------------------------------------*/ + +void +TCP_check(struct cli *cli, const char *addr, const char *port) +{ + struct addrinfo hints, *res; + int ret; + + memset(&hints, 0, sizeof hints); + hints.ai_socktype = SOCK_STREAM; + hints.ai_flags = AI_PASSIVE; + ret = getaddrinfo(addr, port, &hints, &res); + if (ret == 0) { + freeaddrinfo(res); + return; + } + cli_out(cli, "getaddrinfo(%s, %s): %s\n", + addr, port, gai_strerror(ret)); + cli_result(cli, CLIS_PARAM); +} + int TCP_open(const char *addr, const char *port, int http) { Modified: trunk/varnish-cache/bin/varnishd/varnishd.c =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-16 08:20:39 UTC (rev 999) +++ trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-16 09:01:21 UTC (rev 1000) @@ -315,12 +315,25 @@ /*--------------------------------------------------------------------*/ +static void +cli_check(struct cli *cli) +{ + if (cli->result == CLIS_OK) { + vsb_clear(cli->sb); + return; + } + vsb_finish(cli->sb); + fprintf(stderr, "Error:\n%s\n", vsb_data(cli->sb)); + exit (2); +} + +/*--------------------------------------------------------------------*/ + int main(int argc, char *argv[]) { int o; unsigned d_flag = 0; - char *addr, *port; const char *a_arg = NULL; const char *b_arg = NULL; const char *f_arg = NULL; @@ -328,16 +341,23 @@ const char *s_arg = "file"; const char *T_arg = NULL; struct params param; + struct cli cli[1]; setbuf(stdout, NULL); setbuf(stderr, NULL); + memset(cli, 0, sizeof cli); + cli->sb = vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND); + XXXAN(cli->sb); + cli->result = CLIS_OK; + heritage.socket = -1; memset(¶m, 0, sizeof param); params = ¶m; mgt_vcc_init(); - MCF_ParamInit(); + MCF_ParamInit(cli); + cli_check(cli); while ((o = getopt(argc, argv, "a:b:df:h:s:t:T:Vw:")) != -1) switch (o) { @@ -398,19 +418,9 @@ setup_storage(s_arg); setup_hash(h_flag); - if (a_arg != NULL) { - if (TCP_parse(a_arg, &addr, &port) != 0) { - fprintf(stderr, "invalid listen address\n"); - exit (2); - } - free(params->listen_address); - free(params->listen_host); - free(params->listen_port); - params->listen_address = strdup(a_arg); - AN(params->listen_address); - params->listen_host = addr; - params->listen_port = port; - } + if (a_arg != NULL) + MCF_ParamSet(cli, "listen_address", a_arg); + cli_check(cli); VSL_MgtInit(SHMLOG_FILENAME, 8*1024*1024); From phk at projects.linpro.no Sat Sep 16 09:06:45 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 11:06:45 +0200 (CEST) Subject: r1001 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916090645.EDD5C1EC372@projects.linpro.no> Author: phk Date: 2006-09-16 11:06:45 +0200 (Sat, 16 Sep 2006) New Revision: 1001 Modified: trunk/varnish-cache/bin/varnishd/varnishd.c Log: Add -p param=value command line argument. Modified: trunk/varnish-cache/bin/varnishd/varnishd.c =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-16 09:01:21 UTC (rev 1000) +++ trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-16 09:06:45 UTC (rev 1001) @@ -145,6 +145,8 @@ " -h classic,"); fprintf(stderr, " %-28s # %s\n", "", " -h classic,,"); + fprintf(stderr, " %-28s # %s\n", "-p param=value", + "set parameter"); fprintf(stderr, " %-28s # %s\n", "-s kind[,storageoptions]", "Backend storage specification"); fprintf(stderr, " %-28s # %s\n", "", @@ -334,12 +336,12 @@ { int o; unsigned d_flag = 0; - const char *a_arg = NULL; const char *b_arg = NULL; const char *f_arg = NULL; const char *h_flag = "classic"; const char *s_arg = "file"; const char *T_arg = NULL; + char *p; struct params param; struct cli cli[1]; @@ -359,10 +361,11 @@ MCF_ParamInit(cli); cli_check(cli); - while ((o = getopt(argc, argv, "a:b:df:h:s:t:T:Vw:")) != -1) + while ((o = getopt(argc, argv, "a:b:df:h:p:s:t:T:Vw:")) != -1) switch (o) { case 'a': - a_arg = optarg; + MCF_ParamSet(cli, "listen_address", optarg); + cli_check(cli); break; case 'b': b_arg = optarg; @@ -376,6 +379,14 @@ case 'h': h_flag = optarg; break; + case 'p': + p = strchr(optarg, '='); + if (p == NULL) + usage(); + *p++ = '\0'; + MCF_ParamSet(cli, optarg, p); + cli_check(cli); + break; case 's': s_arg = optarg; break; @@ -418,10 +429,6 @@ setup_storage(s_arg); setup_hash(h_flag); - if (a_arg != NULL) - MCF_ParamSet(cli, "listen_address", a_arg); - cli_check(cli); - VSL_MgtInit(SHMLOG_FILENAME, 8*1024*1024); if (d_flag == 1) From phk at projects.linpro.no Sat Sep 16 09:38:09 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 11:38:09 +0200 (CEST) Subject: r1002 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916093809.BCA191EC36E@projects.linpro.no> Author: phk Date: 2006-09-16 11:38:09 +0200 (Sat, 16 Sep 2006) New Revision: 1002 Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c trunk/varnish-cache/bin/varnishd/heritage.h trunk/varnish-cache/bin/varnishd/mgt_param.c trunk/varnish-cache/bin/varnishd/tcp.c Log: Make the listen depth a paramter. Clean up the paramter stuff even more. Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-16 09:06:45 UTC (rev 1001) +++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-16 09:38:09 UTC (rev 1002) @@ -103,9 +103,9 @@ /* Get some storage if we don't have any */ if (st == NULL || st->len == st->space) { v = u; - if (u < params->fetch_chunksize && + if (u < params->fetch_chunksize * 1024 && stevedore->trim != NULL) - v = params->fetch_chunksize; + v = params->fetch_chunksize * 1024; st = stevedore->alloc(stevedore, v); XXXAN(st->stevedore); TAILQ_INSERT_TAIL(&sp->obj->store, st, list); @@ -180,7 +180,8 @@ st = NULL; while (1) { if (v == 0) { - st = stevedore->alloc(stevedore, params->fetch_chunksize); + st = stevedore->alloc(stevedore, + params->fetch_chunksize * 1024); XXXAN(st->stevedore); TAILQ_INSERT_TAIL(&sp->obj->store, st, list); p = st->ptr + st->len; Modified: trunk/varnish-cache/bin/varnishd/heritage.h =================================================================== --- trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-16 09:06:45 UTC (rev 1001) +++ trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-16 09:38:09 UTC (rev 1002) @@ -61,6 +61,9 @@ char *listen_address; char *listen_host; char *listen_port; + + /* Listen depth */ + unsigned listen_depth; }; extern struct params *params; Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-16 09:06:45 UTC (rev 1001) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-16 09:38:09 UTC (rev 1002) @@ -26,6 +26,7 @@ tweak_t *func; const char *expl; const char *def; + const char *units; }; /*--------------------------------------------------------------------*/ @@ -44,20 +45,74 @@ } *dst = u; } else - cli_out(cli, "%u [seconds]\n", *dst); + cli_out(cli, "%u", *dst); } /*--------------------------------------------------------------------*/ static void +tweak_generic_bool(struct cli *cli, unsigned *dest, const char *arg) +{ + if (arg != NULL) { + if (!strcasecmp(arg, "off")) + *dest = 0; + else if (!strcasecmp(arg, "disable")) + *dest = 0; + else if (!strcasecmp(arg, "no")) + *dest = 0; + else if (!strcasecmp(arg, "on")) + *dest = 1; + else if (!strcasecmp(arg, "enable")) + *dest = 1; + else if (!strcasecmp(arg, "yes")) + *dest = 1; + else { + cli_out(cli, "use \"on\" or \"off\"\n"); + cli_result(cli, CLIS_PARAM); + return; + } + } else + cli_out(cli, *dest ? "on" : "off"); +} + +/*--------------------------------------------------------------------*/ + +static void +tweak_generic_uint(struct cli *cli, unsigned *dest, const char *arg, unsigned min, unsigned max) +{ + unsigned u; + + if (arg != NULL) { + if (!strcasecmp(arg, "unlimited")) + u = UINT_MAX; + else + u = strtoul(arg, NULL, 0); + if (u < min) { + cli_out(cli, "Must be at least %u", min); + cli_result(cli, CLIS_PARAM); + return; + } + if (u > max) { + cli_out(cli, "Must be no more than %u", max); + cli_result(cli, CLIS_PARAM); + return; + } + *dest = u; + } else if (*dest == UINT_MAX) { + cli_out(cli, "unlimited", *dest); + } else { + cli_out(cli, "%u", *dest); + } +} + +/*--------------------------------------------------------------------*/ + +static void tweak_default_ttl(struct cli *cli, struct parspec *par, const char *arg) { (void)par; - if (arg != NULL) - params->default_ttl = strtoul(arg, NULL, 0); - else - cli_out(cli, "%u [seconds]\n", params->default_ttl); + tweak_generic_uint(cli, ¶ms->default_ttl, arg, 0, UINT_MAX); } /*--------------------------------------------------------------------*/ @@ -65,19 +120,10 @@ static void tweak_thread_pool_min(struct cli *cli, struct parspec *par, const char *arg) { - unsigned u; (void)par; - if (arg != NULL) { - u = strtoul(arg, NULL, 0); - if (u >= params->wthread_max) { - cli_out(cli, "Minimum must be less than maximum\n"); - cli_result(cli, CLIS_PARAM); - return; - } - params->wthread_min = u; - } else - cli_out(cli, "%u [threads]\n", params->wthread_min); + tweak_generic_uint(cli, ¶ms->wthread_min, arg, + 0, params->wthread_max); } /*--------------------------------------------------------------------*/ @@ -85,22 +131,10 @@ static void tweak_thread_pool_max(struct cli *cli, struct parspec *par, const char *arg) { - unsigned u; (void)par; - if (arg != NULL) { - u = strtoul(arg, NULL, 0); - if (u <= params->wthread_min) { - cli_out(cli, "Maximum must be greater than minimum\n"); - cli_result(cli, CLIS_PARAM); - return; - } - params->wthread_max = u; - } - if (params->wthread_max == UINT_MAX) - cli_out(cli, "unlimited\n"); - else - cli_out(cli, "%u [threads]\n", params->wthread_max); + tweak_generic_uint(cli, ¶ms->wthread_max, arg, + params->wthread_min, UINT_MAX); } /*--------------------------------------------------------------------*/ @@ -118,19 +152,10 @@ static void tweak_http_workspace(struct cli *cli, struct parspec *par, const char *arg) { - unsigned u; (void)par; - if (arg != NULL) { - u = strtoul(arg, NULL, 0); - if (u <= 1024) { - cli_out(cli, "Workspace must be at least 1024 bytes\n"); - cli_result(cli, CLIS_PARAM); - return; - } - params->mem_workspace = u; - } else - cli_out(cli, "%u [bytes]\n", params->mem_workspace); + tweak_generic_uint(cli, ¶ms->mem_workspace, arg, + 1024, UINT_MAX); } /*--------------------------------------------------------------------*/ @@ -165,19 +190,9 @@ static void tweak_auto_restart(struct cli *cli, struct parspec *par, const char *arg) { - unsigned u; (void)par; - if (arg != NULL) { - u = strtoul(arg, NULL, 0); - if (u != 0 && u != 1) { - cli_out(cli, "Only zero and one allowed.\n"); - cli_result(cli, CLIS_PARAM); - return; - } - params->auto_restart = u; - } else - cli_out(cli, "%u {1 = yes, 0 = no}\n", params->auto_restart); + tweak_generic_bool(cli, ¶ms->auto_restart, arg); } /*--------------------------------------------------------------------*/ @@ -185,14 +200,10 @@ static void tweak_fetch_chunksize(struct cli *cli, struct parspec *par, const char *arg) { - unsigned u; (void)par; - if (arg != NULL) { - u = strtoul(arg, NULL, 0); - params->fetch_chunksize = u * 1024; - } else - cli_out(cli, "%u [kb]\n", params->fetch_chunksize * 1024); + tweak_generic_uint(cli, ¶ms->fetch_chunksize, arg, + 4, UINT_MAX / 1024); } #ifdef HAVE_SENDFILE @@ -201,14 +212,9 @@ static void tweak_sendfile_threshold(struct cli *cli, struct parspec *par, const char *arg) { - unsigned u; (void)par; - if (arg != NULL) { - u = strtoul(arg, NULL, 0); - params->sendfile_threshold = u; - } else - cli_out(cli, "%u [bytes]\n", params->sendfile_threshold); + tweak_generic_uint(cli, ¶ms->sendfile_threshold, arg, 0, UINT_MAX); } #endif /* HAVE_SENDFILE */ @@ -218,26 +224,7 @@ tweak_vcl_trace(struct cli *cli, struct parspec *par, const char *arg) { (void)par; - if (arg != NULL) { - if (!strcasecmp(arg, "off")) - params->vcl_trace = 0; - else if (!strcasecmp(arg, "disable")) - params->vcl_trace = 0; - else if (!strcasecmp(arg, "no")) - params->vcl_trace = 0; - else if (!strcasecmp(arg, "on")) - params->vcl_trace = 1; - else if (!strcasecmp(arg, "enable")) - params->vcl_trace = 1; - else if (!strcasecmp(arg, "yes")) - params->vcl_trace = 1; - else { - cli_out(cli, "use \"on\" or \"off\"\n"); - cli_result(cli, CLIS_PARAM); - return; - } - } else - cli_out(cli, params->vcl_trace ? "on\n" : "off\n"); + tweak_generic_bool(cli, ¶ms->vcl_trace, arg); } /*--------------------------------------------------------------------*/ @@ -269,10 +256,20 @@ params->listen_host = a; params->listen_port = p; } else - cli_out(cli, "%s\n", params->listen_address); + cli_out(cli, "%s", params->listen_address); } + /*--------------------------------------------------------------------*/ +static void +tweak_listen_depth(struct cli *cli, struct parspec *par, const char *arg) +{ + (void)par; + tweak_generic_uint(cli, ¶ms->listen_depth, arg, 0, UINT_MAX); +} + +/*--------------------------------------------------------------------*/ + /* * Make sure to end all lines with either a space or newline of the * formatting will go haywire. @@ -297,64 +294,69 @@ "Objects already cached will not be affected by changes " "made until they are fetched from the backend again.\n" "To force an immediate effect at the expense of a total " - "flush of the cache use \"url.purge .\"\n" - "Default is 120 seconds. ", "120" }, + "flush of the cache use \"url.purge .\"", + "120", "seconds" }, { "thread_pool_max", tweak_thread_pool_max, "The maximum number of threads in the worker pool.\n" - DELAYED_EFFECT - "Default is no limit.", "-1" }, + "-1 is unlimited.\n" + DELAYED_EFFECT, + "-1", "threads" }, { "thread_pool_min", tweak_thread_pool_min, "The minimum number of threads in the worker pool.\n" DELAYED_EFFECT - "Default is 1 thread. " - "Minimum is 1 thread. ", "1" }, + "Minimum is 1 thread. ", + "1", "threads" }, { "thread_pool_timeout", tweak_thread_pool_timeout, "Thread dies after this many seconds of inactivity.\n" - "Default is 120 seconds. " - "Minimum is 1 second. ", "120" }, + "Minimum is 1 second. ", + "120", "seconds" }, { "http_workspace", tweak_http_workspace, "Bytes of HTTP protocol workspace allocated. " "This space must be big enough for the entire HTTP protocol " "header and any edits done to it in the VCL code.\n" SHOULD_RESTART - "Default is 8192 bytes. " - "Minimum is 1024 bytes. ", "8192" }, + "Minimum is 1024 bytes. ", + "8192", "bytes" }, { "sess_timeout", tweak_sess_timeout, "Idle timeout for persistent sessions. " "If a HTTP request has not been received in this many " - "seconds, the session is closed.\n" - "Default is 5 seconds. ", "5" }, + "seconds, the session is closed.\n", + "5", "seconds" }, { "pipe_timeout", tweak_pipe_timeout, "Idle timeout for PIPE sessions. " "If nothing have been received in either directoin for " - "this many seconds, the session is closed.\n" - "Default is 60 seconds. ", "60" }, + "this many seconds, the session is closed.\n", + "60", "seconds" }, { "send_timeout", tweak_send_timeout, "Send timeout for client connections. " "If no data has been sent to the client in this many seconds, " "the session is closed.\n" DELAYED_EFFECT - "See getopt(3) under SO_SNDTIMEO for more information.\n" - "Default is 600 seconds. ", "600" }, + "See getopt(3) under SO_SNDTIMEO for more information.\n", + "600", "seconds" }, { "auto_restart", tweak_auto_restart, - "Restart child process automatically if it dies. " - "1 = yes, 0 = no.\n" - "Default is 1. ", "1" }, + "Restart child process automatically if it dies.\n" + "Minimum is 4 kilobytes.\n", + "on", "bool" }, { "fetch_chunksize", tweak_fetch_chunksize, - "The default chunksize used by fetcher.\n" - "Default is 128 kilobytes. ", "128" }, + "The default chunksize used by fetcher.\n", + "128", "kilobytes" }, #ifdef HAVE_SENDFILE { "sendfile_threshold", tweak_sendfile_threshold, - "The minimum size of objects transmitted with sendfile.\n" - "Default is 8192 bytes.", "8192" }, + "The minimum size of objects transmitted with sendfile.\n", + "8192", "bytes" }, #endif /* HAVE_SENDFILE */ { "vcl_trace", tweak_vcl_trace, - "Trace VCL execution in the shmlog\n" - "Default is off", "off" }, + "Trace VCL execution in the shmlog\n", + "off", "bool" }, { "listen_address", tweak_listen_address, "The network address/port where Varnish services requests.\n" - MUST_RESTART - "Default is \"0.0.0.0:80\"", "0.0.0.0:80" }, + MUST_RESTART, + "0.0.0.0:80" }, + { "listen_depth", tweak_listen_depth, + "Listen(2) queue depth.\n" + MUST_RESTART, + "1024", "connections" }, { NULL, NULL, NULL } }; @@ -384,7 +386,12 @@ continue; } pp->func(cli, pp, NULL); + if (pp->units != NULL) + cli_out(cli, " [%s]\n", pp->units); + else + cli_out(cli, "\n"); if (av[2] != NULL) { + cli_out(cli, "%-20s Default is %s\n", "", pp->def); /* Format text to 72 col width */ for (p = pp->expl; *p != '\0'; ) { q = strchr(p, '\n'); @@ -448,6 +455,10 @@ { struct parspec *pp; - for (pp = parspec; pp->name != NULL; pp++) + for (pp = parspec; pp->name != NULL; pp++) { + cli_out(cli, "Set Default for %s = %s\n", pp->name, pp->def); pp->func(cli, pp, pp->def); + if (cli->result != CLIS_OK) + return; + } } Modified: trunk/varnish-cache/bin/varnishd/tcp.c =================================================================== --- trunk/varnish-cache/bin/varnishd/tcp.c 2006-09-16 09:06:45 UTC (rev 1001) +++ trunk/varnish-cache/bin/varnishd/tcp.c 2006-09-16 09:38:09 UTC (rev 1002) @@ -21,6 +21,7 @@ #include "compat/strndup.h" #endif +#include "heritage.h" #include "mgt.h" #include "cli.h" #include "cli_priv.h" @@ -165,7 +166,7 @@ close(sd); return (-1); } - if (listen(sd, http ? 1024 : 16) != 0) { + if (listen(sd, http ? params->listen_depth : 16) != 0) { perror("listen()"); freeaddrinfo(res); close(sd); From phk at phk.freebsd.dk Sat Sep 16 09:39:45 2006 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Sat, 16 Sep 2006 09:39:45 +0000 Subject: r1000 - trunk/varnish-cache/bin/varnishd In-Reply-To: Your message of "Sat, 16 Sep 2006 11:01:22 +0200." <20060916090122.1072A1EC372@projects.linpro.no> Message-ID: <50888.1158399585@critter.freebsd.dk> In message <20060916090122.1072A1EC372 at projects.linpro.no>, phk at projects.linpro .no writes: >Author: phk >Date: 2006-09-16 11:01:21 +0200 (Sat, 16 Sep 2006) >New Revision: 1000 Wheee ---------^ -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From phk at projects.linpro.no Sat Sep 16 09:49:51 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 11:49:51 +0200 (CEST) Subject: r1003 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916094951.9053F1EC367@projects.linpro.no> Author: phk Date: 2006-09-16 11:49:51 +0200 (Sat, 16 Sep 2006) New Revision: 1003 Modified: trunk/varnish-cache/bin/varnishd/varnishd.c Log: Use generic param setting stuff Modified: trunk/varnish-cache/bin/varnishd/varnishd.c =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-16 09:38:09 UTC (rev 1002) +++ trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-16 09:49:51 UTC (rev 1003) @@ -391,7 +391,7 @@ s_arg = optarg; break; case 't': - params->default_ttl = strtoul(optarg, NULL, 0); + MCF_ParamSet(cli, "default_ttl", optarg); break; case 'T': T_arg = optarg; From des at linpro.no Sat Sep 16 09:50:08 2006 From: des at linpro.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) Date: Sat, 16 Sep 2006 11:50:08 +0200 Subject: r1000 - trunk/varnish-cache/bin/varnishd References: <20060916090122.1072A1EC372@projects.linpro.no> Message-ID: phk at projects.linpro.no writes: > Log: > Generalize parameter setting at start up. > > Give the managers main a struct cli and use that to call into > the paramter stuff for setting listen address. More params to follow. > > When setting the listen address, check that getaddrinfo() doesn't > hate it. I'd suggest adding the following parameters: - worker thread min/max/timeout (replaces the -w option) - hard minimum TTL (replaces the -t option) and possibly: - hash algorithm (rehash when it changes) - storage file (discard previous when it changes) DES -- Dag-Erling Sm?rgrav Senior Software Developer Linpro AS - www.linpro.no From phk at phk.freebsd.dk Sat Sep 16 10:02:40 2006 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Sat, 16 Sep 2006 10:02:40 +0000 Subject: r1000 - trunk/varnish-cache/bin/varnishd In-Reply-To: Your message of "Sat, 16 Sep 2006 11:50:08 +0200." Message-ID: <51593.1158400960@critter.freebsd.dk> In message , Dag-Erling =?iso-8859-1?Q?Sm=F8rgra v?= writes: >phk at projects.linpro.no writes: >> Generalize parameter setting at start up. >I'd suggest adding the following parameters: Yes, there are many things we can tweak here, but I don't think this is the time to get carried away. > - hash algorithm (rehash when it changes) No way. It will require a child restart. > - storage file (discard previous when it changes) Same. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From des at projects.linpro.no Sat Sep 16 10:36:24 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 16 Sep 2006 12:36:24 +0200 (CEST) Subject: r1004 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916103624.1A4721EC36E@projects.linpro.no> Author: des Date: 2006-09-16 12:36:23 +0200 (Sat, 16 Sep 2006) New Revision: 1004 Modified: trunk/varnish-cache/bin/varnishd/varnishd.c Log: The buckets_per_mutex parameter was removed in r813. Modified: trunk/varnish-cache/bin/varnishd/varnishd.c =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-16 09:49:51 UTC (rev 1003) +++ trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-16 10:36:23 UTC (rev 1004) @@ -143,8 +143,6 @@ " -h classic [default]"); fprintf(stderr, " %-28s # %s\n", "", " -h classic,"); - fprintf(stderr, " %-28s # %s\n", "", - " -h classic,,"); fprintf(stderr, " %-28s # %s\n", "-p param=value", "set parameter"); fprintf(stderr, " %-28s # %s\n", From phk at projects.linpro.no Sat Sep 16 11:00:08 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 13:00:08 +0200 (CEST) Subject: r1005 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916110008.DC84A1EC36E@projects.linpro.no> Author: phk Date: 2006-09-16 13:00:08 +0200 (Sat, 16 Sep 2006) New Revision: 1005 Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c Log: Forgot about embedded CLI commands here. Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2006-09-16 10:36:23 UTC (rev 1004) +++ trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2006-09-16 11:00:08 UTC (rev 1005) @@ -245,7 +245,7 @@ } vsb_delete(sb); if (child_pid >= 0 && - mgt_cli_askchild(&status, &p, "config.load %s %s\n", av[2], vf)) { + mgt_cli_askchild(&status, &p, "vcl.load %s %s\n", av[2], vf)) { cli_result(cli, status); cli_out(cli, "%s", p); free(p); @@ -276,7 +276,7 @@ } vsb_delete(sb); if (child_pid >= 0 && - mgt_cli_askchild(&status, &p, "config.load %s %s\n", av[2], vf)) { + mgt_cli_askchild(&status, &p, "vcl.load %s %s\n", av[2], vf)) { cli_result(cli, status); cli_out(cli, "%s", p); free(p); @@ -311,7 +311,7 @@ vp = mcf_find_vcl(cli, av[2]); if (vp != NULL && vp->active == 0) { if (child_pid >= 0 && - mgt_cli_askchild(&status, &p, "config.use %s\n", av[2])) { + mgt_cli_askchild(&status, &p, "vcl.use %s\n", av[2])) { cli_result(cli, status); cli_out(cli, "%s", p); free(p); @@ -342,7 +342,7 @@ } else if (vp != NULL) { if (child_pid >= 0 && mgt_cli_askchild(&status, &p, - "config.discard %s\n", av[2])) { + "vcl.discard %s\n", av[2])) { cli_result(cli, status); cli_out(cli, "%s", p); free(p); @@ -362,7 +362,7 @@ (void)av; (void)priv; if (child_pid >= 0) { - mgt_cli_askchild(&status, &p, "config.list\n"); + mgt_cli_askchild(&status, &p, "vcl.list\n"); cli_result(cli, status); cli_out(cli, "%s", p); free(p); From des at projects.linpro.no Sat Sep 16 11:01:07 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 16 Sep 2006 13:01:07 +0200 (CEST) Subject: r1006 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916110107.A82D01EC371@projects.linpro.no> Author: des Date: 2006-09-16 13:01:07 +0200 (Sat, 16 Sep 2006) New Revision: 1006 Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 Log: Bring up-to-date. Still lacks descriptions for management commands and run-time parameters. Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.1 2006-09-16 11:00:08 UTC (rev 1005) +++ trunk/varnish-cache/bin/varnishd/varnishd.1 2006-09-16 11:01:07 UTC (rev 1006) @@ -9,14 +9,17 @@ .Nd HTTP accelerator daemon .Sh SYNOPSIS .Nm +.Op Fl a Ar addrss Ns Op : Ns Ar port .Op Fl b Ar host Ns Op : Ns Ar port .Op Fl d .Op Fl f Ar config .Op Fl h Ar type Ns Op , Ns Ar options -.Op Fl p Ar port +.Op Fl p Ar param Ns = Ns Ar value .Op Fl s Ar type Ns Op , Ns Ar options .Op Fl t Ar ttl -.Op Fl w Ar min Ns Op , Ns Ar max +.Op Fl T Ar address Ns Op : Ns Ar port +.Op Fl V +.Op Fl w Ar min Ns Op , Ns Ar max Ns Op , Ns Ar timeout .Sh DESCRIPTION The .Nm @@ -26,6 +29,25 @@ .Pp The following options are available: .Bl -tag -width Fl +.It Fl a Ar address Ns Op : Ns Ar port +Listen for client requests on the specified +.Ar address +and +.Ar port . +The +.Ar address +can be a host name, an IPv4 dotted-quad, or an IPv6 address enclosed +in square brackets. +If +.Ar address +is not specified, +.Nm +will listen on all available interfaces. +If +.Ar port +is not specified, the default HTTP port as listed in +.Pa /etc/services +is used. .It Fl b Ar host Ns Op : Ns Ar port Use the specified .Ar host @@ -36,37 +58,170 @@ .It Fl d Enables debugging mode. .It Fl f Ar config -Specifies a VCL configuration file to use instead of the hardcoded +Use the specified VCL configuration file instead of the builtin default. .It Fl h Ar type Ns Op , Ns Ar options Specifies the hash algorithm. -.It Fl p Ar port -Specifies which port to listen on for incoming client connections. +See +.Sx Hash Algorithms +for a list of supported algorithms. +.It Fl p Ar param Ns = Ns Ar value +Set the parameter specified by +.Ar param +to the specified +.Ar value . +See +.Sx Run-Time Parameters +for a list of parameters. .It Fl s Ar type Ns Op , Ns Ar options -Specifies the storage backend. +Use the specified storage backend. +See +.Sx Storage Types +for a list of supported storage types. .It Fl t Ar ttl Specifies a hard minimum time to live for cached documents. -.It Fl w Ar min Ns Op , Ns Ar max -Specifies the number of worker threads to start. +.It Fl T Ar address Ns Op : Ns Ar port +Offer a management interface on the specified +.Ar address +and +.Ar port . +See +.Sx Management Interface +for a list of management commands. +.It Fl V +Display the version number and exit. +.It Fl w Ar min Ns Op , Ns Ar max Ns Op , Ns Ar timeout +Start at least +.Ar min +but no more than +.Ar max +worker threads with the specified idle timeout. +.Pp If only .Ar min is specified, .Nm will start .Ar min -threads. +threads and will not kill idle threads. +.Pp If both .Ar min and .Ar max -are specified, +are specified, the number of threads is allowed to vary within the +specified range according to system load. +Idle threads are killed after +.Ar timeout +seconds. +.Pp +The default values are 1 for +.Ar min , +infinity for +.Ar max , +and 10 for +.Ar timeout . +.El +.Ss Hash Algorithms +The following hash algorithms are available: +.Bl -tag -width=4 +.It Cm simple_list +A simple doubly-linked list. +Not recommended for production use. +.It Cm classic Ns Op Ns , Ns Ar buckets +A standard hash table. +The hash key is the CRC32 of the object's URL modulo the size of the +hash table. +Each table entry points to a list of elements which share the same +hash key. +.Pp +The +.Ar buckets +parameter specifies the number of entries in the hash table. +The default is 16383. +.El +.Ss Storage Types +The following storage types are available: +.Bl -tag -width=4 +.It Cm malloc +Storage for each object is allocated with +.Xr malloc 3 . +Not recommended for production use. +.It Cm file Ns Op Ns , Ns Ar path Ns Op Ns , Ns Ar size +Storage for each object is allocated from an arena backed by a file. +.Pp +The +.Ar path +parameter specifies either the path to the backing file or the path to +a directory in which .Nm -the number of worker threads will vary within the specified range -according to system load. +will create the backing file. +The default is +.Pa /tmp . +.Pp +The +.Ar size +parameter specifies the size of the backing file. +If the backing file already exists, it will be truncated or expanded +to the specified size. +.Pp +Note that if +.Nm +has to create or expand the file, it will not pre-allocate the added +space, leading to fragmentation, which may adversely impact +performance. +Pre-creating the storage file using +.Xr dd 1 +will reduce fragmentation to a minimum. .El +.Ss Management Interface +If the +.Fl -T +option was specified, +.Nm +will offer a command-line management interface on the specified +address and port. +The following commands are available: +.Bl -tag -width=4 +.It Cm dump.pool +.It Cm help +.It Cm param.set Ar param Ar value +.It Cm param.show Ar param +.It Cm param.show Op Fl l +.It Cm ping Op Ns Ar timestamp +.It Cm start +.It Cm stats +.It Cm stop +.It Cm url.purge Ar regexp +.It Cm vcl.discard Ar configname +.It Cm vcl.inline Ar configname Ar vcl +.It Cm vcl.list +.It Cm vcl.load Ar configname Ar filename +.It Cm vcl.use Ar configname +.El +.Ss Run-Time Parameters +.Bl -tag -width=4 +.It Va auto_restart +.It Va default_ttl +.It Va fetch_chunksize +.It Va http_workspace +.It Va listen_address +.It Va listen_depth +.It Va pipe_timeout +.It Va send_timeout +.It Va sendfile_threshold +.It Va sess_timeout +.It Va thread_pool_max +.It Va thread_pool_min +.It Va thread_pool_timeout +.It Va vcl_trace +.El .Sh SEE ALSO .Xr varnishlog 1 , -.Xr varnishstat 1 +.Xr varnishhist 1 , +.Xr varnishncsa 1 , +.Xr varnishstat 1 , +.Xr varnishtop 1 .\" .Sh STANDARDS .\" .Rs .\" .%A R. Fielding From des at projects.linpro.no Sat Sep 16 11:28:50 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 16 Sep 2006 13:28:50 +0200 (CEST) Subject: r1007 - in trunk/varnish-cache/lib: libvarnish libvarnishapi Message-ID: <20060916112850.B8F3A1EC36E@projects.linpro.no> Author: des Date: 2006-09-16 13:28:50 +0200 (Sat, 16 Sep 2006) New Revision: 1007 Modified: trunk/varnish-cache/lib/libvarnish/crc32.c trunk/varnish-cache/lib/libvarnishapi/base64.c Log: Expand keywords. Property changes on: trunk/varnish-cache/lib/libvarnish/crc32.c ___________________________________________________________________ Name: svn:keywords + Id Property changes on: trunk/varnish-cache/lib/libvarnishapi/base64.c ___________________________________________________________________ Name: svn:keywords + Id From phk at projects.linpro.no Sat Sep 16 11:34:25 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 13:34:25 +0200 (CEST) Subject: r1008 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916113425.A437D1EC36E@projects.linpro.no> Author: phk Date: 2006-09-16 13:34:25 +0200 (Sat, 16 Sep 2006) New Revision: 1008 Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c Log: Just in case. Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-09-16 11:28:50 UTC (rev 1007) +++ trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-09-16 11:34:25 UTC (rev 1008) @@ -62,8 +62,10 @@ struct addrinfo *res, hint; int error; - if (bp->addr != NULL) + if (bp->addr != NULL) { freeaddrinfo(bp->addr); + bp->addr = NULL; + } memset(&hint, 0, sizeof hint); hint.ai_family = PF_UNSPEC; From des at projects.linpro.no Sat Sep 16 12:23:33 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 16 Sep 2006 14:23:33 +0200 (CEST) Subject: r1009 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916122333.DD62E1EC36B@projects.linpro.no> Author: des Date: 2006-09-16 14:23:33 +0200 (Sat, 16 Sep 2006) New Revision: 1009 Modified: trunk/varnish-cache/bin/varnishd/storage_file.c Log: Tweak storage file size calculations. Avoid overflow when calculating 80% of available storage on 32-bit Linux (most fields in struct statfs are long instead of int64_t as in BSD) Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-16 11:34:25 UTC (rev 1008) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-16 12:23:33 UTC (rev 1009) @@ -147,23 +147,26 @@ } } + /* + * This trickery wouldn't be necessary if X/Open would + * just add OFF_MAX to ... + */ o = l; if (o != l || o < 0) { - fprintf(stderr, - "Warning: size reduced to system limit (off_t)\n"); do { l >>= 1; o = l; } while (o != l || o < 0); + fprintf(stderr, "WARNING: storage file size reduced" + " to %ju due to system limitations\n", l); } if (l < st.st_size) { AZ(ftruncate(sc->fd, l)); } else if (l - st.st_size > fsst.f_bsize * fsst.f_bavail) { - fprintf(stderr, - "Warning: size larger than filesystem free space," - " reduced to 80%% of free space.\n"); - l = (fsst.f_bsize * fsst.f_bavail * 80) / 100; + l = ((uintmax_t)fsst.f_bsize * fsst.f_bavail * 80) / 100; + fprintf(stderr, "WARNING: storage file size reduced" + " to %ju (80%% of available disk space)\n", l); } } @@ -177,13 +180,13 @@ exit (2); } - if (expl < 3 && sizeof(void *) == 4 && l > (1ULL << 31)) { + if (expl < 3 && sizeof(void *) == 4 && l > INT32_MAX) { fprintf(stderr, "NB: Limiting size to 2GB on 32 bit architecture to" " prevent running out of\naddress space." " Specifiy explicit size to override.\n" ); - l = 1ULL << 31; + l = INT32_MAX; } printf("file %s size %ju bytes (%ju fs-blocks, %ju pages)\n", From des at projects.linpro.no Sat Sep 16 12:25:36 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 16 Sep 2006 14:25:36 +0200 (CEST) Subject: r1010 - trunk/varnish-cache/include Message-ID: <20060916122536.94E0E1EC36E@projects.linpro.no> Author: des Date: 2006-09-16 14:25:36 +0200 (Sat, 16 Sep 2006) New Revision: 1010 Modified: trunk/varnish-cache/include/varnishapi.h Log: Add a usage string for the standard VSL options. Modified: trunk/varnish-cache/include/varnishapi.h =================================================================== --- trunk/varnish-cache/include/varnishapi.h 2006-09-16 12:23:33 UTC (rev 1009) +++ trunk/varnish-cache/include/varnishapi.h 2006-09-16 12:25:36 UTC (rev 1010) @@ -16,6 +16,7 @@ #define VSL_S_CLIENT (1 << 0) #define VSL_S_BACKEND (1 << 1) #define VSL_ARGS "bcdr:i:x:CI:X:" +#define VSL_USAGE "[-bcCd] [-r file] [-i tag] [-x tag] [-I regexp] [-X regexp]" vsl_handler VSL_H_Print; struct VSL_data; struct VSL_data *VSL_New(void); From des at projects.linpro.no Sat Sep 16 12:26:45 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 16 Sep 2006 14:26:45 +0200 (CEST) Subject: r1011 - trunk/varnish-cache/bin/varnishlog Message-ID: <20060916122645.85FBE1EC36B@projects.linpro.no> Author: des Date: 2006-09-16 14:26:45 +0200 (Sat, 16 Sep 2006) New Revision: 1011 Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.c Log: Add a -a option to control append / overwrite when writing to a file. Fix the usage string. Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.c =================================================================== --- trunk/varnish-cache/bin/varnishlog/varnishlog.c 2006-09-16 12:25:36 UTC (rev 1010) +++ trunk/varnish-cache/bin/varnishlog/varnishlog.c 2006-09-16 12:26:45 UTC (rev 1011) @@ -174,15 +174,16 @@ /*--------------------------------------------------------------------*/ static void -do_write(struct VSL_data *vd, const char *w_opt) +do_write(struct VSL_data *vd, const char *w_opt, int a_flag) { - int fd, i; + int fd, flags, i; unsigned char *p; + flags = (a_flag ? O_APPEND : O_TRUNC) | O_WRONLY | O_CREAT; if (!strcmp(w_opt, "-")) fd = STDOUT_FILENO; else - fd = open(w_opt, O_WRONLY|O_APPEND|O_CREAT, 0644); + fd = open(w_opt, flags, 0644); if (fd < 0) { perror(w_opt); exit (1); @@ -208,7 +209,7 @@ usage(void) { fprintf(stderr, - "usage: varnishlog [(stdopts)] [-oV] [-w file] [-r file]\n"); + "usage: varnishlog %s [-aoV] [-w file]\n", VSL_USAGE); exit(1); } @@ -216,14 +217,17 @@ main(int argc, char **argv) { int i, c; - int o_flag = 0; + int a_flag = 0, o_flag = 0; char *w_opt = NULL; struct VSL_data *vd; vd = VSL_New(); - while ((c = getopt(argc, argv, VSL_ARGS "oVw:")) != -1) { + while ((c = getopt(argc, argv, VSL_ARGS "aoVw:")) != -1) { switch (c) { + case 'a': + a_flag = 1; + break; case 'o': o_flag = 1; break; @@ -257,7 +261,7 @@ exit (1); if (w_opt != NULL) - do_write(vd, w_opt); + do_write(vd, w_opt, a_flag); if (o_flag) do_order(vd, argc - optind, argv + optind); From des at projects.linpro.no Sat Sep 16 12:28:34 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 16 Sep 2006 14:28:34 +0200 (CEST) Subject: r1012 - trunk/varnish-cache/bin/varnishncsa Message-ID: <20060916122834.6A0D11EC371@projects.linpro.no> Author: des Date: 2006-09-16 14:28:34 +0200 (Sat, 16 Sep 2006) New Revision: 1012 Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c Log: Add the ability to write to a file (it was previously documented but not implemented). Fix the usage string. Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-16 12:26:45 UTC (rev 1011) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-16 12:28:34 UTC (rev 1012) @@ -160,7 +160,7 @@ static void usage(void) { - fprintf(stderr, "usage: varnishncsa [-V] [-w file] [-r file]\n"); + fprintf(stderr, "usage: varnishncsa %s [-aV] [-w file]\n", VSL_ARGS); exit(1); } @@ -169,32 +169,52 @@ { int i, c; struct VSL_data *vd; + const char *ofn = NULL; + FILE *of = stdout; + int append = 0; vd = VSL_New(); - while ((c = getopt(argc, argv, VSL_ARGS "")) != -1) { + while ((c = getopt(argc, argv, VSL_ARGS "aVw:")) != -1) { i = VSL_Arg(vd, c, optarg); if (i < 0) exit (1); if (i > 0) continue; switch (c) { + case 'a': + append = 1; + break; case 'V': varnish_version("varnishncsa"); exit(0); + case 'w': + ofn = optarg; + break; default: + if (VSL_Arg(vd, c, optarg) > 0) + break; usage(); } } if (VSL_OpenLog(vd)) - exit (1); + exit(1); - while (1) { - i = VSL_Dispatch(vd, extended_log_format, stdout); - if (i < 0) - break; + if (ofn && (of = fopen(ofn, append ? "a" : "w")) == NULL) { + perror(ofn); + exit(1); + } else { + ofn = "stdout"; } - return (0); + + while (VSL_Dispatch(vd, extended_log_format, of) == 0) { + if (fflush(of) != 0) { + perror(ofn); + exit(1); + } + } + + exit(0); } From des at projects.linpro.no Sat Sep 16 12:28:59 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 16 Sep 2006 14:28:59 +0200 (CEST) Subject: r1013 - trunk/varnish-cache/bin/varnishhist Message-ID: <20060916122859.61AD11EC371@projects.linpro.no> Author: des Date: 2006-09-16 14:28:59 +0200 (Sat, 16 Sep 2006) New Revision: 1013 Modified: trunk/varnish-cache/bin/varnishhist/varnishhist.c Log: Add -V option, fix usage string. Modified: trunk/varnish-cache/bin/varnishhist/varnishhist.c =================================================================== --- trunk/varnish-cache/bin/varnishhist/varnishhist.c 2006-09-16 12:28:34 UTC (rev 1012) +++ trunk/varnish-cache/bin/varnishhist/varnishhist.c 2006-09-16 12:28:59 UTC (rev 1013) @@ -145,7 +145,7 @@ usage(void) { fprintf(stderr, - "usage: varnishhist"); + "usage: varnishhist %s [-V] [-w delay]\n", VSL_USAGE); exit(1); } @@ -157,8 +157,11 @@ vd = VSL_New(); - while ((c = getopt(argc, argv, VSL_ARGS "w:")) != -1) { + while ((c = getopt(argc, argv, VSL_ARGS "Vw:")) != -1) { switch (c) { + case 'V': + varnish_version("varnishhist"); + exit(0); case 'w': delay = atoi(optarg); break; From des at projects.linpro.no Sat Sep 16 12:29:08 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 16 Sep 2006 14:29:08 +0200 (CEST) Subject: r1014 - trunk/varnish-cache/bin/varnishtop Message-ID: <20060916122908.46CED1EC36B@projects.linpro.no> Author: des Date: 2006-09-16 14:29:08 +0200 (Sat, 16 Sep 2006) New Revision: 1014 Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.c Log: Fix usage string. Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.c =================================================================== --- trunk/varnish-cache/bin/varnishtop/varnishtop.c 2006-09-16 12:28:59 UTC (rev 1013) +++ trunk/varnish-cache/bin/varnishtop/varnishtop.c 2006-09-16 12:29:08 UTC (rev 1014) @@ -38,7 +38,7 @@ static void usage(void) { - fprintf(stderr, "usage: varnishtop [-1V]\n"); + fprintf(stderr, "usage: varnishtop %s [-1V]\n", VSL_USAGE); exit(1); } From des at projects.linpro.no Sat Sep 16 12:43:11 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 16 Sep 2006 14:43:11 +0200 (CEST) Subject: r1015 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916124311.501431EC22E@projects.linpro.no> Author: des Date: 2006-09-16 14:43:11 +0200 (Sat, 16 Sep 2006) New Revision: 1015 Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 trunk/varnish-cache/bin/varnishd/varnishd.c Log: Sort options correctly. Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.1 2006-09-16 12:29:08 UTC (rev 1014) +++ trunk/varnish-cache/bin/varnishd/varnishd.1 2006-09-16 12:43:11 UTC (rev 1015) @@ -16,8 +16,8 @@ .Op Fl h Ar type Ns Op , Ns Ar options .Op Fl p Ar param Ns = Ns Ar value .Op Fl s Ar type Ns Op , Ns Ar options +.Op Fl T Ar address Ns Op : Ns Ar port .Op Fl t Ar ttl -.Op Fl T Ar address Ns Op : Ns Ar port .Op Fl V .Op Fl w Ar min Ns Op , Ns Ar max Ns Op , Ns Ar timeout .Sh DESCRIPTION @@ -78,8 +78,6 @@ See .Sx Storage Types for a list of supported storage types. -.It Fl t Ar ttl -Specifies a hard minimum time to live for cached documents. .It Fl T Ar address Ns Op : Ns Ar port Offer a management interface on the specified .Ar address @@ -88,6 +86,8 @@ See .Sx Management Interface for a list of management commands. +.It Fl t Ar ttl +Specifies a hard minimum time to live for cached documents. .It Fl V Display the version number and exit. .It Fl w Ar min Ns Op , Ns Ar max Ns Op , Ns Ar timeout Modified: trunk/varnish-cache/bin/varnishd/varnishd.c =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-16 12:29:08 UTC (rev 1014) +++ trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-16 12:43:11 UTC (rev 1015) @@ -359,7 +359,7 @@ MCF_ParamInit(cli); cli_check(cli); - while ((o = getopt(argc, argv, "a:b:df:h:p:s:t:T:Vw:")) != -1) + while ((o = getopt(argc, argv, "a:b:df:h:p:s:T:t:Vw:")) != -1) switch (o) { case 'a': MCF_ParamSet(cli, "listen_address", optarg); From des at projects.linpro.no Sat Sep 16 12:43:50 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 16 Sep 2006 14:43:50 +0200 (CEST) Subject: r1016 - trunk/varnish-cache/bin/varnishlog Message-ID: <20060916124350.79CCD1EC36E@projects.linpro.no> Author: des Date: 2006-09-16 14:43:50 +0200 (Sat, 16 Sep 2006) New Revision: 1016 Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.1 Log: Bring up-to-date, and sort options correctly. Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.1 =================================================================== --- trunk/varnish-cache/bin/varnishlog/varnishlog.1 2006-09-16 12:43:11 UTC (rev 1015) +++ trunk/varnish-cache/bin/varnishlog/varnishlog.1 2006-09-16 12:43:50 UTC (rev 1016) @@ -9,15 +9,18 @@ .Nd HTTP accelerator log watcher .Sh SYNOPSIS .Nm +.Op Fl a +.Op Fl b .Op Fl C -.Op Fl b .Op Fl c -.Op Fl o +.Op Fl d .Op Fl I Ar regex -.Op Fl X Ar regex .Op Fl i Ar tag +.Op Fl o .Op Fl r Ar file +.Op Fl V .Op Fl w Ar file +.Op Fl X Ar regex .Op Fl x Ar tag .Sh DESCRIPTION The @@ -28,8 +31,8 @@ .Pp The following options are available: .Bl -tag -width Fl -.It Fl C -Ignore case when matching regular expressions. +.It Fl a +When writing to a file, append to it rather than overwrite it. .It Fl b Include log entries which result from communication with a backend server. @@ -40,6 +43,8 @@ is specified, .Nm acts as if they both were. +.It Fl C +Ignore case when matching regular expressions. .It Fl c Include log entries which result from communication with a client. If neither @@ -49,8 +54,12 @@ is specified, .Nm acts as if they both were. -.It Fl o -Group log entries by request ID. +.It Fl d +Process old log entries on startup. +Normally, +.Nm +will only process entries which are written to the log after it +starts. .It Fl I Ar regex Include log entries which match the specified regular expression. If neither @@ -58,8 +67,6 @@ nor .Fl i is specified, all log entries are included. -.It Fl X Ar regex -Exclude log entries which match the specified regular expression. .It Fl i Ar tag Include log entries with the specified tag. If neither @@ -67,14 +74,23 @@ nor .Fl i is specified, all log entries are included. +.It Fl o +Group log entries by request ID. .It Fl r Ar file Read log entries from .Ar file instead of shared memory. +.It Fl V +Display the version number and exit. .It Fl w Ar file Write log entries to .Ar file instead of displaying them. +The file will be overwritten unless the +.Fl a +option was specified. +.It Fl X Ar regex +Exclude log entries which match the specified regular expression. .It Fl x Ar tag Exclude log entries with the specified tag. .El @@ -88,7 +104,6 @@ .It Dv BackendOpen .It Dv BackendReuse .It Dv BackendXID -.It Dv BldHdr .It Dv CLI .It Dv ClientAddr .It Dv Debug @@ -96,24 +111,44 @@ .It Dv ExpBan .It Dv ExpKill .It Dv ExpPick -.It Dv Header .It Dv Hit +.It Dv HitPass .It Dv HttpError +.It Dv HttpGarbage .It Dv Length -.It Dv LostHeader -.It Dv Protocol -.It Dv Request -.It Dv Response +.It Dv ObjHeader +.It Dv ObjLostHeader +.It Dv ObjProtocol +.It Dv ObjRequest +.It Dv ObjResponse +.It Dv ObjStatus +.It Dv ObjURL +.It Dv ReqEnd +.It Dv ReqStart +.It Dv RxHeader +.It Dv RxLostHeader +.It Dv RxProtocol +.It Dv RxRequest +.It Dv RxResponse +.It Dv RxStatus +.It Dv RxURL .It Dv SessionClose .It Dv SessionOpen -.It Dv SessionReuse -.It Dv Status -.It Dv URL +.It Dv StatAddr +.It Dv StatSess +.It Dv TTL +.It Dv TxHeader +.It Dv TxLostHeader +.It Dv TxProtocol +.It Dv TxRequest +.It Dv TxResponse +.It Dv TxStatus +.It Dv TxURL +.It Dv VCL_acl .It Dv VCL_call .It Dv VCL_return .It Dv VCL_trace .It Dv WorkThread -.It Dv XID .El .Sh SEE ALSO .Xr varnishd 1 , From des at projects.linpro.no Sat Sep 16 12:45:00 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 16 Sep 2006 14:45:00 +0200 (CEST) Subject: r1017 - trunk/varnish-cache/include Message-ID: <20060916124500.925831EC22E@projects.linpro.no> Author: des Date: 2006-09-16 14:45:00 +0200 (Sat, 16 Sep 2006) New Revision: 1017 Modified: trunk/varnish-cache/include/varnishapi.h Log: Sort options correctly. Modified: trunk/varnish-cache/include/varnishapi.h =================================================================== --- trunk/varnish-cache/include/varnishapi.h 2006-09-16 12:43:50 UTC (rev 1016) +++ trunk/varnish-cache/include/varnishapi.h 2006-09-16 12:45:00 UTC (rev 1017) @@ -15,8 +15,8 @@ typedef int vsl_handler(void *priv, unsigned tag, unsigned fd, unsigned len, unsigned spec, const char *ptr); #define VSL_S_CLIENT (1 << 0) #define VSL_S_BACKEND (1 << 1) -#define VSL_ARGS "bcdr:i:x:CI:X:" -#define VSL_USAGE "[-bcCd] [-r file] [-i tag] [-x tag] [-I regexp] [-X regexp]" +#define VSL_ARGS "bCcdI:i:r:X:x:" +#define VSL_USAGE "[-bCcd] [-i tag] [-I regexp] [-r file] [-X regexp] [-x tag]" vsl_handler VSL_H_Print; struct VSL_data; struct VSL_data *VSL_New(void); From des at projects.linpro.no Sat Sep 16 12:59:41 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 16 Sep 2006 14:59:41 +0200 (CEST) Subject: r1018 - trunk/varnish-cache/bin/varnishstat Message-ID: <20060916125941.D87C63BC1D9@projects.linpro.no> Author: des Date: 2006-09-16 14:59:41 +0200 (Sat, 16 Sep 2006) New Revision: 1018 Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.c Log: -c collides with one of the standard VSL options, so replace it with -1, which has the opposite meaning (IMHO, the continuous display is the most useful) Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.c =================================================================== --- trunk/varnish-cache/bin/varnishstat/varnishstat.c 2006-09-16 12:45:00 UTC (rev 1017) +++ trunk/varnish-cache/bin/varnishstat/varnishstat.c 2006-09-16 12:59:41 UTC (rev 1018) @@ -99,7 +99,7 @@ static void usage(void) { - fprintf(stderr, "usage: varnishstat [-cV]\n"); + fprintf(stderr, "usage: varnishstat [-1V]\n"); exit(1); } @@ -108,14 +108,14 @@ { int c; struct varnish_stats *VSL_stats; - int c_flag = 0; + int once = 0; VSL_stats = VSL_OpenStats(); - while ((c = getopt(argc, argv, "cV")) != -1) { + while ((c = getopt(argc, argv, "1V")) != -1) { switch (c) { - case 'c': - c_flag = 1; + case '1': + once = 1; break; case 'V': varnish_version("varnishstat"); @@ -125,7 +125,7 @@ } } - if (c_flag) { + if (!once) { do_curses(VSL_stats); } else { From des at projects.linpro.no Sat Sep 16 13:02:24 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 16 Sep 2006 15:02:24 +0200 (CEST) Subject: r1019 - trunk/varnish-cache/bin/varnishlog Message-ID: <20060916130224.B5D493BC1D9@projects.linpro.no> Author: des Date: 2006-09-16 15:02:24 +0200 (Sat, 16 Sep 2006) New Revision: 1019 Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.1 Log: Bump date and add cross-references to all log programs. Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.1 =================================================================== --- trunk/varnish-cache/bin/varnishlog/varnishlog.1 2006-09-16 12:59:41 UTC (rev 1018) +++ trunk/varnish-cache/bin/varnishlog/varnishlog.1 2006-09-16 13:02:24 UTC (rev 1019) @@ -1,7 +1,7 @@ .\" .\" $Id$ .\" -.Dd July 11, 2006 +.Dd September 16, 2006 .Dt VARNISHLOG 1 .Os .Sh NAME @@ -152,7 +152,10 @@ .El .Sh SEE ALSO .Xr varnishd 1 , -.Xr varnishstat 1 +.Xr varnishhist 1 , +.Xr varnishncsa 1 , +.Xr varnishstat 1 , +.Xr varnishtop 1 .Sh HISTORY The .Nm From des at projects.linpro.no Sat Sep 16 13:02:40 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 16 Sep 2006 15:02:40 +0200 (CEST) Subject: r1020 - trunk/varnish-cache/bin/varnishstat Message-ID: <20060916130240.D2B111EC371@projects.linpro.no> Author: des Date: 2006-09-16 15:02:40 +0200 (Sat, 16 Sep 2006) New Revision: 1020 Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.1 Log: Bring up-to-date. Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.1 =================================================================== --- trunk/varnish-cache/bin/varnishstat/varnishstat.1 2006-09-16 13:02:24 UTC (rev 1019) +++ trunk/varnish-cache/bin/varnishstat/varnishstat.1 2006-09-16 13:02:40 UTC (rev 1020) @@ -1,7 +1,7 @@ .\" .\" $Id$ .\" -.Dd July 6, 2006 +.Dd September 16, 2006 .Dt VARNISHSTAT 1 .Os .Sh NAME @@ -9,7 +9,17 @@ .Nd HTTP accelerator statistics .Sh SYNOPSIS .Nm +.Op Fl 1 +.Op Fl b +.Op Fl C .Op Fl c +.Op Fl d +.Op Fl I Ar regex +.Op Fl i Ar tag +.Op Fl r Ar file +.Op Fl V +.Op Fl X Ar regex +.Op Fl x Ar tag .Sh DESCRIPTION The .Nm @@ -19,13 +29,69 @@ .Pp The following options are available: .Bl -tag -width Fl +.It Fl 1 +Instead of presenting of a continuously updated display, print the +statistics once and exit. +.It Fl a +When writing to a file, append to it rather than overwrite it. +.It Fl b +Include log entries which result from communication with a backend +server. +If neither +.Fl b +nor +.Fl c +is specified, +.Nm +acts as if they both were. +.It Fl C +Ignore case when matching regular expressions. .It Fl c -Present a continuously updating display using -.Xr curses 3 . +Include log entries which result from communication with a client. +If neither +.Fl b +nor +.Fl c +is specified, +.Nm +acts as if they both were. +.It Fl d +Process old log entries on startup. +Normally, +.Nm +will only process entries which are written to the log after it +starts. +.It Fl I Ar regex +Include log entries which match the specified regular expression. +If neither +.Fl I +nor +.Fl i +is specified, all log entries are included. +.It Fl i Ar tag +Include log entries with the specified tag. +If neither +.Fl I +nor +.Fl i +is specified, all log entries are included. +.It Fl r Ar file +Read log entries from +.Ar file +instead of shared memory. +.It Fl V +Display the version number and exit. +.It Fl X Ar regex +Exclude log entries which match the specified regular expression. +.It Fl x Ar tag +Exclude log entries with the specified tag. .El .Sh SEE ALSO .Xr varnishd 1 , +.Xr varnishhist 1 , .Xr varnishlog 1 , +.Xr varnishncsa 1 , +.Xr varnishtop 1 , .Xr curses 3 .Sh HISTORY The From des at projects.linpro.no Sat Sep 16 13:06:01 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 16 Sep 2006 15:06:01 +0200 (CEST) Subject: r1021 - trunk/varnish-cache/bin/varnishstat Message-ID: <20060916130601.F32591EC22E@projects.linpro.no> Author: des Date: 2006-09-16 15:06:01 +0200 (Sat, 16 Sep 2006) New Revision: 1021 Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.1 Log: Remove stray -a description. Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.1 =================================================================== --- trunk/varnish-cache/bin/varnishstat/varnishstat.1 2006-09-16 13:02:40 UTC (rev 1020) +++ trunk/varnish-cache/bin/varnishstat/varnishstat.1 2006-09-16 13:06:01 UTC (rev 1021) @@ -32,8 +32,6 @@ .It Fl 1 Instead of presenting of a continuously updated display, print the statistics once and exit. -.It Fl a -When writing to a file, append to it rather than overwrite it. .It Fl b Include log entries which result from communication with a backend server. From des at projects.linpro.no Sat Sep 16 13:08:38 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 16 Sep 2006 15:08:38 +0200 (CEST) Subject: r1022 - trunk/varnish-cache/bin/varnishncsa Message-ID: <20060916130838.531401EC36E@projects.linpro.no> Author: des Date: 2006-09-16 15:08:38 +0200 (Sat, 16 Sep 2006) New Revision: 1022 Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.1 Log: Bring up-to-date. Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.1 =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.1 2006-09-16 13:06:01 UTC (rev 1021) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.1 2006-09-16 13:08:38 UTC (rev 1022) @@ -1,35 +1,38 @@ .\" .\" $Id$ .\" -.Dd July 11, 2006 +.Dd September 16, 2006 .Dt VARNISHNCSA 1 .Os .Sh NAME .Nm varnishncsa -.Nd Generate NCSA common / combined logs +.Nd Generate NCSA logs .Sh SYNOPSIS .Nm -.Op Fl C +.Op Fl a .Op Fl b +.Op Fl C .Op Fl c -.Op Fl o +.Op Fl d .Op Fl I Ar regex -.Op Fl X Ar regex .Op Fl i Ar tag .Op Fl r Ar file +.Op Fl V .Op Fl w Ar file +.Op Fl X Ar regex .Op Fl x Ar tag .Sh DESCRIPTION The .Nm -utility reads and presents +utility reads .Xr varnishd 1 -shared memory logs. +shared memory logs and presents them in the NCSA "common" or +"combined" log format. .Pp The following options are available: .Bl -tag -width Fl -.It Fl C -Ignore case when matching regular expressions. +.It Fl a +When writing to a file, append to it rather than overwrite it. .It Fl b Include log entries which result from communication with a backend server. @@ -40,6 +43,8 @@ is specified, .Nm acts as if they both were. +.It Fl C +Ignore case when matching regular expressions. .It Fl c Include log entries which result from communication with a client. If neither @@ -49,8 +54,12 @@ is specified, .Nm acts as if they both were. -.It Fl o -Group log entries by request ID. +.It Fl d +Process old log entries on startup. +Normally, +.Nm +will only process entries which are written to the log after it +starts. .It Fl I Ar regex Include log entries which match the specified regular expression. If neither @@ -58,8 +67,6 @@ nor .Fl i is specified, all log entries are included. -.It Fl X Ar regex -Exclude log entries which match the specified regular expression. .It Fl i Ar tag Include log entries with the specified tag. If neither @@ -71,53 +78,26 @@ Read log entries from .Ar file instead of shared memory. +.It Fl V +Display the version number and exit. .It Fl w Ar file Write log entries to .Ar file instead of displaying them. +The file will be overwritten unless the +.Fl a +option was specified. +.It Fl X Ar regex +Exclude log entries which match the specified regular expression. .It Fl x Ar tag Exclude log entries with the specified tag. .El -.Sh TAGS -The following log entry tags are currently defined: -.\" keep in sync with include/shmlog_tags.h -.\" XXX add descriptions -.Bl -tag -width 16 -.It Dv Backend -.It Dv BackendClose -.It Dv BackendOpen -.It Dv BackendReuse -.It Dv BackendXID -.It Dv BldHdr -.It Dv CLI -.It Dv ClientAddr -.It Dv Debug -.It Dv Error -.It Dv ExpBan -.It Dv ExpKill -.It Dv ExpPick -.It Dv Header -.It Dv Hit -.It Dv HttpError -.It Dv Length -.It Dv LostHeader -.It Dv Protocol -.It Dv Request -.It Dv Response -.It Dv SessionClose -.It Dv SessionOpen -.It Dv SessionReuse -.It Dv Status -.It Dv URL -.It Dv VCL_call -.It Dv VCL_return -.It Dv VCL_trace -.It Dv WorkThread -.It Dv XID -.El .Sh SEE ALSO .Xr varnishd 1 , -.Xr varnishstat 1 +.Xr varnishhist 1 , +.Xr varnishlog 1 , +.Xr varnishstat 1 , +.Xr varnishtop 1 , .Sh HISTORY The .Nm From des at projects.linpro.no Sat Sep 16 14:06:57 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 16 Sep 2006 16:06:57 +0200 (CEST) Subject: r1023 - trunk/varnish-cache/bin/varnishstat Message-ID: <20060916140657.D1D9E1EC22E@projects.linpro.no> Author: des Date: 2006-09-16 16:06:57 +0200 (Sat, 16 Sep 2006) New Revision: 1023 Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.1 Log: Umm, what have I been smoking? varnishstat is not a logger and does not support VSL_ARGS. Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.1 =================================================================== --- trunk/varnish-cache/bin/varnishstat/varnishstat.1 2006-09-16 13:08:38 UTC (rev 1022) +++ trunk/varnish-cache/bin/varnishstat/varnishstat.1 2006-09-16 14:06:57 UTC (rev 1023) @@ -10,16 +10,7 @@ .Sh SYNOPSIS .Nm .Op Fl 1 -.Op Fl b -.Op Fl C -.Op Fl c -.Op Fl d -.Op Fl I Ar regex -.Op Fl i Ar tag -.Op Fl r Ar file .Op Fl V -.Op Fl X Ar regex -.Op Fl x Ar tag .Sh DESCRIPTION The .Nm @@ -32,57 +23,8 @@ .It Fl 1 Instead of presenting of a continuously updated display, print the statistics once and exit. -.It Fl b -Include log entries which result from communication with a backend -server. -If neither -.Fl b -nor -.Fl c -is specified, -.Nm -acts as if they both were. -.It Fl C -Ignore case when matching regular expressions. -.It Fl c -Include log entries which result from communication with a client. -If neither -.Fl b -nor -.Fl c -is specified, -.Nm -acts as if they both were. -.It Fl d -Process old log entries on startup. -Normally, -.Nm -will only process entries which are written to the log after it -starts. -.It Fl I Ar regex -Include log entries which match the specified regular expression. -If neither -.Fl I -nor -.Fl i -is specified, all log entries are included. -.It Fl i Ar tag -Include log entries with the specified tag. -If neither -.Fl I -nor -.Fl i -is specified, all log entries are included. -.It Fl r Ar file -Read log entries from -.Ar file -instead of shared memory. .It Fl V Display the version number and exit. -.It Fl X Ar regex -Exclude log entries which match the specified regular expression. -.It Fl x Ar tag -Exclude log entries with the specified tag. .El .Sh SEE ALSO .Xr varnishd 1 , From des at projects.linpro.no Sat Sep 16 14:21:04 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 16 Sep 2006 16:21:04 +0200 (CEST) Subject: r1024 - trunk/varnish-cache/bin/varnishhist Message-ID: <20060916142104.DB4E83BC1D9@projects.linpro.no> Author: des Date: 2006-09-16 16:21:04 +0200 (Sat, 16 Sep 2006) New Revision: 1024 Added: trunk/varnish-cache/bin/varnishhist/varnishhist.1 Modified: trunk/varnish-cache/bin/varnishhist/Makefile.am Log: Add a man page. Modified: trunk/varnish-cache/bin/varnishhist/Makefile.am =================================================================== --- trunk/varnish-cache/bin/varnishhist/Makefile.am 2006-09-16 14:06:57 UTC (rev 1023) +++ trunk/varnish-cache/bin/varnishhist/Makefile.am 2006-09-16 14:21:04 UTC (rev 1024) @@ -4,7 +4,7 @@ bin_PROGRAMS = varnishhist -# dist_man_MANS = varnishlog.1 +dist_man_MANS = varnishhist.1 varnishhist_SOURCES = varnishhist.c Added: trunk/varnish-cache/bin/varnishhist/varnishhist.1 =================================================================== --- trunk/varnish-cache/bin/varnishhist/varnishhist.1 2006-09-16 14:06:57 UTC (rev 1023) +++ trunk/varnish-cache/bin/varnishhist/varnishhist.1 2006-09-16 14:21:04 UTC (rev 1024) @@ -0,0 +1,108 @@ +.\" +.\" $Id$ +.\" +.Dd September 16, 2006 +.Dt VARNISHHIST 1 +.Os +.Sh NAME +.Nm varnishhist +.Nd Varnish request histogram +.Sh SYNOPSIS +.Nm +.Op Fl b +.Op Fl C +.Op Fl c +.Op Fl d +.Op Fl I Ar regex +.Op Fl i Ar tag +.Op Fl r Ar file +.Op Fl V +.Op Fl w Ar delay +.Op Fl X Ar regex +.Op Fl x Ar tag +.Sh DESCRIPTION +The +.Nm +utility reads +.Xr varnishd 1 +shared memory logs and presents a continuously updated histogram +showing the distribution of requests by their processing time. +Hits are marked with a pipe character ("|"), and misses are marked +with a hash character ("#"). +.Pp +The following options are available: +.Bl -tag -width Fl +.It Fl b +Include log entries which result from communication with a backend +server. +If neither +.Fl b +nor +.Fl c +is specified, +.Nm +acts as if they both were. +.It Fl C +Ignore case when matching regular expressions. +.It Fl c +Include log entries which result from communication with a client. +If neither +.Fl b +nor +.Fl c +is specified, +.Nm +acts as if they both were. +.It Fl d +Process old log entries on startup. +Normally, +.Nm +will only process entries which are written to the log after it +starts. +.It Fl I Ar regex +Include log entries which match the specified regular expression. +If neither +.Fl I +nor +.Fl i +is specified, all log entries are included. +.It Fl i Ar tag +Include log entries with the specified tag. +If neither +.Fl I +nor +.Fl i +is specified, all log entries are included. +.It Fl r Ar file +Read log entries from +.Ar file +instead of shared memory. +.It Fl V +Display the version number and exit. +.It Fl w Ar delay +Wait at least +.Ar delay +seconds between each update. +The default is 1. +.Ar file +instead of displaying them. +The file will be overwritten unless the +.Fl a +option was specified. +.It Fl X Ar regex +Exclude log entries which match the specified regular expression. +.It Fl x Ar tag +Exclude log entries with the specified tag. +.El +.Sh SEE ALSO +.Xr varnishd 1 , +.Xr varnishlog 1 , +.Xr varnishncsa 1 , +.Xr varnishstat 1 , +.Xr varnishtop 1 +.Sh HISTORY +The +.Nm +utility was developed by +.An Poul-Henning Kamp Aq phk at freebsd.dk +in cooperation with Verdens Gang AS and Linpro AS. Property changes on: trunk/varnish-cache/bin/varnishhist/varnishhist.1 ___________________________________________________________________ Name: svn:keywords + Id From des at projects.linpro.no Sat Sep 16 14:50:09 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 16 Sep 2006 16:50:09 +0200 (CEST) Subject: r1025 - in trunk/varnish-cache: include lib/libvarnishapi Message-ID: <20060916145009.346811EC22E@projects.linpro.no> Author: des Date: 2006-09-16 16:50:09 +0200 (Sat, 16 Sep 2006) New Revision: 1025 Modified: trunk/varnish-cache/include/varnishapi.h trunk/varnish-cache/lib/libvarnishapi/shmlog.c Log: Add a non-blocking mode to the log reader. Modified: trunk/varnish-cache/include/varnishapi.h =================================================================== --- trunk/varnish-cache/include/varnishapi.h 2006-09-16 14:21:04 UTC (rev 1024) +++ trunk/varnish-cache/include/varnishapi.h 2006-09-16 14:50:09 UTC (rev 1025) @@ -22,6 +22,7 @@ struct VSL_data *VSL_New(void); void VSL_Select(struct VSL_data *vd, unsigned tag); int VSL_OpenLog(struct VSL_data *vd); +void VSL_NonBlocking(struct VSL_data *vd, int nb); int VSL_Dispatch(struct VSL_data *vd, vsl_handler *func, void *priv); int VSL_NextLog(struct VSL_data *lh, unsigned char **pp); int VSL_Arg(struct VSL_data *vd, int arg, const char *opt); Modified: trunk/varnish-cache/lib/libvarnishapi/shmlog.c =================================================================== --- trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2006-09-16 14:21:04 UTC (rev 1024) +++ trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2006-09-16 14:50:09 UTC (rev 1025) @@ -42,6 +42,7 @@ unsigned flags; #define F_SEEN_IX (1 << 0) +#define F_NON_BLOCKING (1 << 1) unsigned char map[NFD]; #define M_CLIENT (1 << 0) @@ -165,6 +166,17 @@ /*--------------------------------------------------------------------*/ +void +VSL_NonBlocking(struct VSL_data *vd, int nb) +{ + if (nb) + vd->flags |= F_NON_BLOCKING; + else + vd->flags &= ~F_NON_BLOCKING; +} + +/*--------------------------------------------------------------------*/ + static int vsl_nextlog(struct VSL_data *vd, unsigned char **pp) { @@ -191,6 +203,8 @@ continue; } if (*p == SLT_ENDMARKER) { + if (vd->flags & F_NON_BLOCKING) + return (-1); w += SLEEP_USEC; usleep(SLEEP_USEC); continue; From des at projects.linpro.no Sat Sep 16 14:53:56 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sat, 16 Sep 2006 16:53:56 +0200 (CEST) Subject: r1026 - trunk/varnish-cache/bin/varnishtop Message-ID: <20060916145356.56A5A1EC36E@projects.linpro.no> Author: des Date: 2006-09-16 16:53:56 +0200 (Sat, 16 Sep 2006) New Revision: 1026 Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.c Log: Rename -1 to -f, and add a -1 option meaning "once". It currently does not work very well; it should use a non-curses method to display the ranking. Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.c =================================================================== --- trunk/varnish-cache/bin/varnishtop/varnishtop.c 2006-09-16 14:50:09 UTC (rev 1025) +++ trunk/varnish-cache/bin/varnishtop/varnishtop.c 2006-09-16 14:53:56 UTC (rev 1026) @@ -86,12 +86,12 @@ struct VSL_data *vd; unsigned u, v; struct top *tp, *tp2; - unsigned one_flag = 0; + int f_flag = 0; vd = VSL_New(); - while ((c = getopt(argc, argv, VSL_ARGS "1V")) != -1) { + while ((c = getopt(argc, argv, VSL_ARGS "1fV")) != -1) { i = VSL_Arg(vd, c, optarg); if (i < 0) exit (1); @@ -99,8 +99,11 @@ continue; switch (c) { case '1': - one_flag = 1; + VSL_NonBlocking(vd, 1); break; + case 'f': + f_flag = 1; + break; case 'V': varnish_version("varnishtop"); exit(0); @@ -130,7 +133,7 @@ u = 0; q = p + 4; for (i = 0; i < p[1]; i++, q++) { - if (one_flag && (*q == ':' || isspace(*q))) + if (f_flag && (*q == ':' || isspace(*q))) break; u += *q; } From des at linpro.no Sat Sep 16 14:55:00 2006 From: des at linpro.no (Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?=) Date: Sat, 16 Sep 2006 16:55:00 +0200 Subject: r1024 - trunk/varnish-cache/bin/varnishhist References: <20060916142104.DB4E83BC1D9@projects.linpro.no> Message-ID: des at projects.linpro.no writes: > Author: des > Date: 2006-09-16 16:21:04 +0200 (Sat, 16 Sep 2006) > New Revision: 1024 ^^^^ :) DES -- Dag-Erling Sm?rgrav Senior Software Developer Linpro AS - www.linpro.no From phk at projects.linpro.no Sat Sep 16 15:51:43 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 17:51:43 +0200 (CEST) Subject: r1027 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916155143.7F88E1EC371@projects.linpro.no> Author: phk Date: 2006-09-16 17:51:43 +0200 (Sat, 16 Sep 2006) New Revision: 1027 Modified: trunk/varnish-cache/bin/varnishd/storage_file.c Log: correctly round INT32_MAX down to page boundary Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-16 14:53:56 UTC (rev 1026) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-16 15:51:43 UTC (rev 1027) @@ -187,6 +187,7 @@ " Specifiy explicit size to override.\n" ); l = INT32_MAX; + l -= (l % bs); } printf("file %s size %ju bytes (%ju fs-blocks, %ju pages)\n", From phk at projects.linpro.no Sat Sep 16 15:52:53 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 17:52:53 +0200 (CEST) Subject: r1028 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916155253.3F41E1EC36E@projects.linpro.no> Author: phk Date: 2006-09-16 17:52:53 +0200 (Sat, 16 Sep 2006) New Revision: 1028 Modified: trunk/varnish-cache/bin/varnishd/mgt_child.c Log: wrap line Modified: trunk/varnish-cache/bin/varnishd/mgt_child.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-09-16 15:51:43 UTC (rev 1027) +++ trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-09-16 15:52:53 UTC (rev 1028) @@ -71,7 +71,8 @@ return (1); } buf[i] = '\0'; - fprintf(stderr, "Child said (%d, %d): <<%s>>\n", child_state, child_pid, buf); + fprintf(stderr, "Child said (%d, %d): <<%s>>\n", + child_state, child_pid, buf); return (0); } From phk at projects.linpro.no Sat Sep 16 15:54:57 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 17:54:57 +0200 (CEST) Subject: r1029 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916155457.07A201EC36E@projects.linpro.no> Author: phk Date: 2006-09-16 17:54:56 +0200 (Sat, 16 Sep 2006) New Revision: 1029 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_backend.c trunk/varnish-cache/bin/varnishd/cache_cli.c trunk/varnish-cache/bin/varnishd/cache_expire.c trunk/varnish-cache/bin/varnishd/cache_hash.c trunk/varnish-cache/bin/varnishd/cache_pool.c trunk/varnish-cache/bin/varnishd/cache_session.c trunk/varnish-cache/bin/varnishd/cache_vcl.c trunk/varnish-cache/bin/varnishd/hash_classic.c trunk/varnish-cache/bin/varnishd/hash_simple_list.c trunk/varnish-cache/bin/varnishd/shmlog.c trunk/varnish-cache/bin/varnishd/storage_file.c Log: Wrap mutex more completely so that experimentation becomes easier. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-16 15:52:53 UTC (rev 1028) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-16 15:54:56 UTC (rev 1029) @@ -439,8 +439,11 @@ #define UNLOCKSHM(foo) AZ(pthread_mutex_unlock(foo)) #if 1 -#define LOCK(foo) AZ(pthread_mutex_lock(foo)) -#define UNLOCK(foo) AZ(pthread_mutex_unlock(foo)) +#define MTX pthread_mutex_t +#define MTX_INIT(foo) AZ(pthread_mutex_init(foo, NULL)) +#define MTX_DESTROY(foo) AZ(pthread_mutex_destroy(foo)) +#define LOCK(foo) AZ(pthread_mutex_lock(foo)) +#define UNLOCK(foo) AZ(pthread_mutex_unlock(foo)) #else #define LOCK(foo) \ do { \ Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-09-16 15:52:53 UTC (rev 1028) +++ trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-09-16 15:54:56 UTC (rev 1029) @@ -29,7 +29,7 @@ static TAILQ_HEAD(,vbe_conn) vbe_head = TAILQ_HEAD_INITIALIZER(vbe_head); -static pthread_mutex_t vbemtx; +static MTX vbemtx; /*--------------------------------------------------------------------*/ @@ -293,5 +293,5 @@ VBE_Init(void) { - AZ(pthread_mutex_init(&vbemtx, NULL)); + MTX_INIT(&vbemtx); } Modified: trunk/varnish-cache/bin/varnishd/cache_cli.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_cli.c 2006-09-16 15:52:53 UTC (rev 1028) +++ trunk/varnish-cache/bin/varnishd/cache_cli.c 2006-09-16 15:54:56 UTC (rev 1029) @@ -70,6 +70,7 @@ buf = malloc(lbuf); XXXAN(buf); nbuf = 0; + printf("CLI ready\n"); while (1) { pfd[0].fd = heritage.fds[2]; pfd[0].events = POLLIN; Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-09-16 15:52:53 UTC (rev 1028) +++ trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-09-16 15:54:56 UTC (rev 1029) @@ -21,7 +21,7 @@ static pthread_t exp_thread; static struct binheap *exp_heap; -static pthread_mutex_t exp_mtx; +static MTX exp_mtx; static unsigned expearly = 30; static TAILQ_HEAD(,object) exp_deathrow = TAILQ_HEAD_INITIALIZER(exp_deathrow); @@ -181,7 +181,7 @@ EXP_Init(void) { - AZ(pthread_mutex_init(&exp_mtx, NULL)); + MTX_INIT(&exp_mtx); exp_heap = binheap_new(NULL, object_cmp, object_update); XXXAN(exp_heap); AZ(pthread_create(&exp_thread, NULL, exp_prefetch, NULL)); Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_hash.c 2006-09-16 15:52:53 UTC (rev 1028) +++ trunk/varnish-cache/bin/varnishd/cache_hash.c 2006-09-16 15:54:56 UTC (rev 1029) @@ -60,7 +60,7 @@ XXXAN(w->nobjhead); w->nobjhead->magic = OBJHEAD_MAGIC; TAILQ_INIT(&w->nobjhead->objects); - AZ(pthread_mutex_init(&w->nobjhead->mtx, NULL)); + MTX_INIT(&w->nobjhead->mtx); VSL_stats->n_objecthead++; } else CHECK_OBJ_NOTNULL(w->nobjhead, OBJHEAD_MAGIC); @@ -209,7 +209,7 @@ if (hash->deref(oh)) return; assert(TAILQ_EMPTY(&oh->objects)); - AZ(pthread_mutex_destroy(&oh->mtx)); + MTX_DESTROY(&oh->mtx); VSL_stats->n_objecthead--; free(oh); } Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-16 15:52:53 UTC (rev 1028) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-16 15:54:56 UTC (rev 1029) @@ -29,7 +29,7 @@ #include "cli_priv.h" #include "cache.h" -static pthread_mutex_t wrk_mtx; +static MTX wrk_mtx; /* Number of work requests queued in excess of worker threads available */ static unsigned wrk_overflow; @@ -312,7 +312,7 @@ pthread_t tp; int i; - AZ(pthread_mutex_init(&wrk_mtx, NULL)); + MTX_INIT(&wrk_mtx); AZ(pthread_create(&tp, NULL, wrk_reaperthread, NULL)); AZ(pthread_detach(tp)); Modified: trunk/varnish-cache/bin/varnishd/cache_session.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-16 15:52:53 UTC (rev 1028) +++ trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-16 15:54:56 UTC (rev 1029) @@ -57,9 +57,9 @@ TAILQ_HEAD(srcaddrhead ,srcaddr); static struct srcaddrhead srcaddr_hash[CLIENT_HASH]; -static pthread_mutex_t ses_mtx; -static pthread_mutex_t stat_mtx; -static pthread_mutex_t ses_mem_mtx; +static MTX ses_mtx; +static MTX stat_mtx; +static MTX ses_mem_mtx; /*-------------------------------------------------------------------- * Assign a srcaddr to this session. @@ -288,7 +288,7 @@ for (i = 0; i < CLIENT_HASH; i++) TAILQ_INIT(&srcaddr_hash[i]); - AZ(pthread_mutex_init(&ses_mtx, NULL)); - AZ(pthread_mutex_init(&stat_mtx, NULL)); - AZ(pthread_mutex_init(&ses_mem_mtx, NULL)); + MTX_INIT(&ses_mtx); + MTX_INIT(&stat_mtx); + MTX_INIT(&ses_mem_mtx); } Modified: trunk/varnish-cache/bin/varnishd/cache_vcl.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vcl.c 2006-09-16 15:52:53 UTC (rev 1028) +++ trunk/varnish-cache/bin/varnishd/cache_vcl.c 2006-09-16 15:54:56 UTC (rev 1029) @@ -37,7 +37,7 @@ static struct vcls *vcl_active; /* protected by vcl_mtx */ -static pthread_mutex_t vcl_mtx; +static MTX vcl_mtx; /*--------------------------------------------------------------------*/ @@ -284,5 +284,5 @@ VCL_Init() { - AZ(pthread_mutex_init(&vcl_mtx, NULL)); + MTX_INIT(&vcl_mtx); } Modified: trunk/varnish-cache/bin/varnishd/hash_classic.c =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_classic.c 2006-09-16 15:52:53 UTC (rev 1028) +++ trunk/varnish-cache/bin/varnishd/hash_classic.c 2006-09-16 15:54:56 UTC (rev 1029) @@ -31,7 +31,7 @@ unsigned magic; #define HCL_HEAD_MAGIC 0x0f327016 TAILQ_HEAD(, hcl_entry) head; - pthread_mutex_t mtx; + MTX mtx; }; static unsigned hcl_nhash = 16383; @@ -79,7 +79,7 @@ for (u = 0; u < hcl_nhash; u++) { TAILQ_INIT(&hcl_head[u].head); - AZ(pthread_mutex_init(&hcl_head[u].mtx, NULL)); + MTX_INIT(&hcl_head[u].mtx); hcl_head[u].magic = HCL_HEAD_MAGIC; } } Modified: trunk/varnish-cache/bin/varnishd/hash_simple_list.c =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_simple_list.c 2006-09-16 15:52:53 UTC (rev 1028) +++ trunk/varnish-cache/bin/varnishd/hash_simple_list.c 2006-09-16 15:54:56 UTC (rev 1029) @@ -22,7 +22,7 @@ }; static TAILQ_HEAD(, hsl_entry) hsl_head = TAILQ_HEAD_INITIALIZER(hsl_head); -static pthread_mutex_t hsl_mutex; +static MTX hsl_mutex; /*-------------------------------------------------------------------- * The ->init method is called during process start and allows @@ -33,7 +33,7 @@ hsl_start(void) { - AZ(pthread_mutex_init(&hsl_mutex, NULL)); + MTX_INIT(&hsl_mutex); } /*-------------------------------------------------------------------- Modified: trunk/varnish-cache/bin/varnishd/shmlog.c =================================================================== --- trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-16 15:52:53 UTC (rev 1028) +++ trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-16 15:54:56 UTC (rev 1029) @@ -27,7 +27,7 @@ struct varnish_stats *VSL_stats; static struct shmloghead *loghead; static unsigned char *logstart; -static pthread_mutex_t vsl_mtx; +static MTX vsl_mtx; /* * This variant copies a byte-range directly to the log, without @@ -135,7 +135,7 @@ assert(loghead->hdrsize == sizeof *loghead); /* XXX more check sanity of loghead ? */ logstart = (unsigned char *)loghead + loghead->start; - AZ(pthread_mutex_init(&vsl_mtx, NULL)); + MTX_INIT(&vsl_mtx); loghead->starttime = time(NULL); memset(VSL_stats, 0, sizeof *VSL_stats); } Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-16 15:52:53 UTC (rev 1028) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-16 15:54:56 UTC (rev 1029) @@ -77,7 +77,7 @@ struct smfhead order; struct smfhead free[NBUCKET]; struct smfhead used; - pthread_mutex_t mtx; + MTX mtx; }; /*--------------------------------------------------------------------*/ @@ -492,6 +492,7 @@ { struct smf *sp, *sp2; + assert(!(len % sc->pagesize)); sp = calloc(sizeof *sp, 1); XXXAN(sp); sp->magic = SMF_MAGIC; @@ -534,6 +535,7 @@ off_t h; assert(sz != 0); + assert(!(sz % sc->pagesize)); if (*fail < (uintmax_t)sc->pagesize * MINPAGES) return; @@ -576,7 +578,7 @@ /* XXX */ if (sum < MINPAGES * (uintmax_t)getpagesize()) exit (2); - AZ(pthread_mutex_init(&sc->mtx, NULL)); + MTX_INIT(&sc->mtx); } /*--------------------------------------------------------------------*/ From phk at projects.linpro.no Sat Sep 16 16:00:48 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 18:00:48 +0200 (CEST) Subject: r1030 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916160048.775E41EC371@projects.linpro.no> Author: phk Date: 2006-09-16 18:00:48 +0200 (Sat, 16 Sep 2006) New Revision: 1030 Modified: trunk/varnish-cache/bin/varnishd/cache.h Log: fix debug locks Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-16 15:54:56 UTC (rev 1029) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-16 16:00:48 UTC (rev 1030) @@ -445,6 +445,9 @@ #define LOCK(foo) AZ(pthread_mutex_lock(foo)) #define UNLOCK(foo) AZ(pthread_mutex_unlock(foo)) #else +#define MTX pthread_mutex_t +#define MTX_INIT(foo) AZ(pthread_mutex_init(foo, NULL)) +#define MTX_DESTROY(foo) AZ(pthread_mutex_destroy(foo)) #define LOCK(foo) \ do { \ if (pthread_mutex_trylock(foo)) { \ @@ -452,17 +455,18 @@ "MTX_CONTEST(%s,%s,%d," #foo ")", \ __func__, __FILE__, __LINE__); \ AZ(pthread_mutex_lock(foo)); \ - } else { \ + } else if (1) { \ VSL(SLT_Debug, 0, \ - "MTX_LOCK(%s,%s,%d," #foo ")", \ + "MTX_LOCK(%s,%s,%d," #foo ")", \ __func__, __FILE__, __LINE__); \ } \ } while (0); #define UNLOCK(foo) \ do { \ AZ(pthread_mutex_unlock(foo)); \ - VSL(SLT_Debug, 0, \ - "MTX_UNLOCK(%s,%s,%d," #foo ")", \ - __func__, __FILE__, __LINE__); \ + if (1) \ + VSL(SLT_Debug, 0, \ + "MTX_UNLOCK(%s,%s,%d," #foo ")", \ + __func__, __FILE__, __LINE__); \ } while (0); #endif From phk at projects.linpro.no Sat Sep 16 19:54:34 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 21:54:34 +0200 (CEST) Subject: r1031 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916195434.BF5883BC1D9@projects.linpro.no> Author: phk Date: 2006-09-16 21:54:34 +0200 (Sat, 16 Sep 2006) New Revision: 1031 Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c trunk/varnish-cache/bin/varnishd/heritage.h trunk/varnish-cache/bin/varnishd/mgt_param.c Log: Make it possible to have multiple worker pools. The acceptor selects the pool based on filedescriptor modulus number of pools. This is an attempt to reduce lock contention. Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-16 16:00:48 UTC (rev 1030) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-16 19:54:34 UTC (rev 1031) @@ -29,17 +29,22 @@ #include "cli_priv.h" #include "cache.h" -static MTX wrk_mtx; +TAILQ_HEAD(workerhead, worker); /* Number of work requests queued in excess of worker threads available */ -static unsigned wrk_overflow; -TAILQ_HEAD(workerhead, worker); +struct wq { + MTX mtx; + struct workerhead idle; + TAILQ_HEAD(, workreq) req; + unsigned overflow; +}; -static struct workerhead wrk_idle = TAILQ_HEAD_INITIALIZER(wrk_idle); -static struct workerhead wrk_busy = TAILQ_HEAD_INITIALIZER(wrk_busy); -static TAILQ_HEAD(, workreq) wrk_reqhead = TAILQ_HEAD_INITIALIZER(wrk_reqhead); +static MTX tmtx; +static struct wq **wq; +static unsigned nwq; + /*-------------------------------------------------------------------- * Write data to fd * We try to use writev() if possible in order to minimize number of @@ -169,9 +174,10 @@ wrk_thread(void *priv) { struct worker *w, ww; + struct wq *qp; char c; - (void)priv; + qp = priv; w = &ww; memset(w, 0, sizeof *w); w->magic = WORKER_MAGIC; @@ -179,40 +185,38 @@ AZ(pipe(w->pipe)); VSL(SLT_WorkThread, 0, "%p start", w); - LOCK(&wrk_mtx); + LOCK(&qp->mtx); VSL_stats->n_wrk_create++; - TAILQ_INSERT_HEAD(&wrk_busy, w, list); VSL_stats->n_wrk_busy++; while (1) { CHECK_OBJ_NOTNULL(w, WORKER_MAGIC); /* Process overflow requests, if any */ - if (wrk_overflow > 0) { - wrk_overflow--; - w->wrq = TAILQ_FIRST(&wrk_reqhead); + if (qp->overflow > 0) { + qp->overflow--; + w->wrq = TAILQ_FIRST(&qp->req); AN(w->wrq); - TAILQ_REMOVE(&wrk_reqhead, w->wrq, list); + TAILQ_REMOVE(&qp->req, w->wrq, list); VSL_stats->n_wrk_queue--; - UNLOCK(&wrk_mtx); + UNLOCK(&qp->mtx); wrk_do_one(w); - LOCK(&wrk_mtx); + LOCK(&qp->mtx); continue; } - TAILQ_REMOVE(&wrk_busy, w, list); - TAILQ_INSERT_HEAD(&wrk_idle, w, list); + TAILQ_INSERT_HEAD(&qp->idle, w, list); assert(w->idle != 0); VSL_stats->n_wrk_busy--; - UNLOCK(&wrk_mtx); + UNLOCK(&qp->mtx); assert(1 == read(w->pipe[0], &c, 1)); if (w->idle == 0) break; wrk_do_one(w); - LOCK(&wrk_mtx); + LOCK(&qp->mtx); } - LOCK(&wrk_mtx); + LOCK(&tmtx); VSL_stats->n_wrk--; - UNLOCK(&wrk_mtx); + UNLOCK(&tmtx); VSL(SLT_WorkThread, 0, "%p end", w); close(w->pipe[0]); close(w->pipe[1]); @@ -226,39 +230,42 @@ { struct worker *w; pthread_t tp; + struct wq *qp; sp->workreq.sess = sp; + qp = wq[sp->fd % nwq]; - LOCK(&wrk_mtx); + LOCK(&qp->mtx); /* If there are idle threads, we tickle the first one into action */ - w = TAILQ_FIRST(&wrk_idle); + w = TAILQ_FIRST(&qp->idle); if (w != NULL) { - TAILQ_REMOVE(&wrk_idle, w, list); - TAILQ_INSERT_TAIL(&wrk_busy, w, list); + TAILQ_REMOVE(&qp->idle, w, list); VSL_stats->n_wrk_busy++; - UNLOCK(&wrk_mtx); + UNLOCK(&qp->mtx); w->wrq = &sp->workreq; assert(1 == write(w->pipe[1], w, 1)); return; } - TAILQ_INSERT_TAIL(&wrk_reqhead, &sp->workreq, list); + TAILQ_INSERT_TAIL(&qp->req, &sp->workreq, list); VSL_stats->n_wrk_queue++; - wrk_overflow++; + qp->overflow++; + UNLOCK(&qp->mtx); + LOCK(&tmtx); /* Can we create more threads ? */ if (VSL_stats->n_wrk >= params->wthread_max) { VSL_stats->n_wrk_max++; - UNLOCK(&wrk_mtx); + UNLOCK(&tmtx); return; } /* Try to create a thread */ VSL_stats->n_wrk++; - UNLOCK(&wrk_mtx); + UNLOCK(&tmtx); - if (!pthread_create(&tp, NULL, wrk_thread, NULL)) { + if (!pthread_create(&tp, NULL, wrk_thread, qp)) { AZ(pthread_detach(tp)); return; } @@ -266,40 +273,75 @@ VSL(SLT_Debug, 0, "Create worker thread failed %d %s", errno, strerror(errno)); + LOCK(&tmtx); /* Register overflow */ - LOCK(&wrk_mtx); VSL_stats->n_wrk--; VSL_stats->n_wrk_failed++; - UNLOCK(&wrk_mtx); + UNLOCK(&tmtx); } /*--------------------------------------------------------------------*/ + +static void +wrk_addpools(unsigned t) +{ + struct wq **pwq, **owq; + unsigned u; + + if (t <= nwq) + return; + + pwq = calloc(sizeof *pwq, params->wthread_pools); + if (pwq == NULL) + return; + if (wq != NULL) + memcpy(pwq, wq, sizeof *pwq * nwq); + owq = wq; + wq = pwq; + for (u = nwq; u < t; u++) { + wq[u] = calloc(sizeof *wq[u], 1); + XXXAN(wq[u]); + MTX_INIT(&wq[u]->mtx); + TAILQ_INIT(&wq[u]->idle); + TAILQ_INIT(&wq[u]->req); + } + free(owq); + nwq = t; +} + +/*--------------------------------------------------------------------*/ static void * wrk_reaperthread(void *priv) { time_t now; struct worker *w; + struct wq *qp; + unsigned u; (void)priv; while (1) { + wrk_addpools(params->wthread_pools); sleep(1); if (VSL_stats->n_wrk <= params->wthread_min) continue; now = time(NULL); - LOCK(&wrk_mtx); - w = TAILQ_LAST(&wrk_idle, workerhead); - if (w != NULL && - (w->idle + params->wthread_timeout < now || - VSL_stats->n_wrk <= params->wthread_max)) - TAILQ_REMOVE(&wrk_idle, w, list); - else - w = NULL; - UNLOCK(&wrk_mtx); - if (w == NULL) - continue; - w->idle = 0; - assert(1 == write(w->pipe[1], w, 1)); + for (u = 0; u < nwq; u++) { + qp = wq[u]; + LOCK(&qp->mtx); + w = TAILQ_LAST(&qp->idle, workerhead); + if (w != NULL && + (w->idle + params->wthread_timeout < now || + VSL_stats->n_wrk <= params->wthread_max)) + TAILQ_REMOVE(&qp->idle, w, list); + else + w = NULL; + UNLOCK(&qp->mtx); + if (w == NULL) + continue; + w->idle = 0; + assert(1 == write(w->pipe[1], w, 1)); + } } INCOMPL(); } @@ -310,53 +352,20 @@ WRK_Init(void) { pthread_t tp; - int i; - MTX_INIT(&wrk_mtx); - + wrk_addpools(params->wthread_pools); + MTX_INIT(&tmtx); AZ(pthread_create(&tp, NULL, wrk_reaperthread, NULL)); AZ(pthread_detach(tp)); - - VSL(SLT_Debug, 0, "Starting %u worker threads", params->wthread_min); - for (i = 0; i < params->wthread_min; i++) { - VSL_stats->n_wrk++; - AZ(pthread_create(&tp, NULL, wrk_thread, NULL)); - AZ(pthread_detach(tp)); - } } - /*--------------------------------------------------------------------*/ void cli_func_dump_pool(struct cli *cli, char **av, void *priv) { - unsigned u; - struct sess *s; - time_t t; + (void)cli; (void)av; (void)priv; - struct worker *w; - LOCK(&wrk_mtx); - t = time(NULL); - TAILQ_FOREACH(w, &wrk_busy, list) { - cli_out(cli, "\n"); - cli_out(cli, "W %p", w); - if (w->wrq == NULL) - continue; - s = w->wrq->sess; - if (s == NULL) - continue; - cli_out(cli, "sess %p fd %d xid %u step %d handling %d age %d", - s, s->fd, s->xid, s->step, s->handling, - t - s->t_req.tv_sec); - } - cli_out(cli, "\n"); - - u = 0; - TAILQ_FOREACH(w, &wrk_idle, list) - u++; - cli_out(cli, "%u idle workers\n", u); - UNLOCK(&wrk_mtx); } Modified: trunk/varnish-cache/bin/varnishd/heritage.h =================================================================== --- trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-16 16:00:48 UTC (rev 1030) +++ trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-16 19:54:34 UTC (rev 1031) @@ -36,6 +36,7 @@ unsigned wthread_min; unsigned wthread_max; unsigned wthread_timeout; + unsigned wthread_pools; /* Memory allocation hints */ unsigned mem_workspace; Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-16 16:00:48 UTC (rev 1030) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-16 19:54:34 UTC (rev 1031) @@ -118,6 +118,18 @@ /*--------------------------------------------------------------------*/ static void +tweak_thread_pools(struct cli *cli, struct parspec *par, const char *arg) +{ + + (void)par; + tweak_generic_uint(cli, ¶ms->wthread_pools, arg, + 1, UINT_MAX); +} + + +/*--------------------------------------------------------------------*/ + +static void tweak_thread_pool_min(struct cli *cli, struct parspec *par, const char *arg) { @@ -296,6 +308,9 @@ "To force an immediate effect at the expense of a total " "flush of the cache use \"url.purge .\"", "120", "seconds" }, + { "thread_pools", tweak_thread_pools, + "Number of thread pools.\n", + "1", "pools" }, { "thread_pool_max", tweak_thread_pool_max, "The maximum number of threads in the worker pool.\n" "-1 is unlimited.\n" From phk at projects.linpro.no Sat Sep 16 20:17:15 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 22:17:15 +0200 (CEST) Subject: r1032 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916201715.BAED83BC1D9@projects.linpro.no> Author: phk Date: 2006-09-16 22:17:15 +0200 (Sat, 16 Sep 2006) New Revision: 1032 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_expire.c trunk/varnish-cache/bin/varnishd/cache_pool.c trunk/varnish-cache/bin/varnishd/cache_vcl.c Log: VCL configs change relatively seldom so we can cache the requests VCL reference in the worker thread when the request is done and with a cheap check reuse it for the next request handled by this thread. This should reduce mutex contention. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-16 19:54:34 UTC (rev 1031) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-16 20:17:15 UTC (rev 1032) @@ -113,6 +113,7 @@ size_t liov; struct acct acct; + struct VCL_conf *vcl; }; struct workreq { @@ -415,8 +416,9 @@ /* cache_vcl.c */ void VCL_Init(void); -void VCL_Rel(struct VCL_conf *vc); -struct VCL_conf *VCL_Get(void); +void VCL_Refresh(struct VCL_conf **vcc); +void VCL_Rel(struct VCL_conf **vcc); +void VCL_Get(struct VCL_conf **vcc); #define VCL_RET_MAC(l,u,b,n) #define VCL_MET_MAC(l,u,b) void VCL_##l##_method(struct sess *); Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-16 19:54:34 UTC (rev 1031) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-16 20:17:15 UTC (rev 1032) @@ -130,7 +130,9 @@ vca_close_session(sp, sp->doclose); sp->backend = NULL; if (sp->vcl != NULL) { - VCL_Rel(sp->vcl); + if (sp->wrk->vcl != NULL) + VCL_Rel(&sp->wrk->vcl); + sp->wrk->vcl = sp->vcl; sp->vcl = NULL; } @@ -653,7 +655,9 @@ VSL(SLT_ReqStart, sp->fd, "%s %s %u", sp->addr, sp->port, sp->xid); AZ(sp->vcl); - sp->vcl = VCL_Get(); + VCL_Refresh(&sp->wrk->vcl); + sp->vcl = sp->wrk->vcl; + sp->wrk->vcl = NULL; AZ(sp->obj); AZ(sp->vbc); Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-09-16 19:54:34 UTC (rev 1031) +++ trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-09-16 20:17:15 UTC (rev 1032) @@ -113,7 +113,7 @@ sp = SES_New(NULL, 0); XXXAN(sp); sleep(10); /* Takes time for VCL to arrive */ - sp->vcl = VCL_Get(); + VCL_Get(&sp->vcl); t = time(NULL); while (1) { LOCK(&exp_mtx); @@ -122,9 +122,9 @@ CHECK_OBJ(o, OBJECT_MAGIC); if (o == NULL || o->ttl > t + expearly) { UNLOCK(&exp_mtx); - VCL_Rel(sp->vcl); + VCL_Rel(&sp->vcl); AZ(sleep(1)); - sp->vcl = VCL_Get(); + VCL_Get(&sp->vcl); t = time(NULL); continue; } Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-16 19:54:34 UTC (rev 1031) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-16 20:17:15 UTC (rev 1032) @@ -218,6 +218,8 @@ VSL_stats->n_wrk--; UNLOCK(&tmtx); VSL(SLT_WorkThread, 0, "%p end", w); + if (w->vcl != NULL) + VCL_Rel(&w->vcl); close(w->pipe[0]); close(w->pipe[1]); return (NULL); Modified: trunk/varnish-cache/bin/varnishd/cache_vcl.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vcl.c 2006-09-16 19:54:34 UTC (rev 1031) +++ trunk/varnish-cache/bin/varnishd/cache_vcl.c 2006-09-16 20:17:15 UTC (rev 1032) @@ -41,25 +41,37 @@ /*--------------------------------------------------------------------*/ -struct VCL_conf * -VCL_Get(void) +void +VCL_Refresh(struct VCL_conf **vcc) { - struct VCL_conf *vc; + if (*vcc == vcl_active->conf) + return; + if (*vcc != NULL) + VCL_Rel(vcc); + VCL_Get(vcc); +} +void +VCL_Get(struct VCL_conf **vcc) +{ + LOCK(&vcl_mtx); AN(vcl_active); - vc = vcl_active->conf; - AN(vc); - vc->busy++; + *vcc = vcl_active->conf; + AN(*vcc); + (*vcc)->busy++; UNLOCK(&vcl_mtx); - return (vc); } void -VCL_Rel(struct VCL_conf *vc) +VCL_Rel(struct VCL_conf **vcc) { struct vcls *vcl; + struct VCL_conf *vc; + vc = *vcc; + *vcc = NULL; + LOCK(&vcl_mtx); assert(vc->busy > 0); vc->busy--; From phk at projects.linpro.no Sat Sep 16 20:52:35 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 22:52:35 +0200 (CEST) Subject: r1033 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916205235.485193BC1D9@projects.linpro.no> Author: phk Date: 2006-09-16 22:52:35 +0200 (Sat, 16 Sep 2006) New Revision: 1033 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_session.c trunk/varnish-cache/bin/varnishd/heritage.h trunk/varnish-cache/bin/varnishd/mgt_param.c Log: Give the srcaddr stats an overhaul. Make the number of buckets a parameter (needs restart though). Make the ttl a parameter and have zero disable srcaddr accounting. Give each hash bucket its own mutex. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-16 20:17:15 UTC (rev 1032) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-16 20:52:35 UTC (rev 1033) @@ -213,22 +213,6 @@ /* -------------------------------------------------------------------*/ -struct srcaddr { - unsigned magic; -#define SRCADDR_MAGIC 0x375111db - - unsigned hash; - TAILQ_ENTRY(srcaddr) list; - struct srcaddrhead *sah; - - char addr[TCP_ADDRBUFSIZE]; - unsigned nref; - - time_t ttl; - - struct acct acct; -}; - struct sess { unsigned magic; #define SESS_MAGIC 0x2c2f9c5a Modified: trunk/varnish-cache/bin/varnishd/cache_session.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-16 20:17:15 UTC (rev 1032) +++ trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-16 20:52:35 UTC (rev 1033) @@ -30,9 +30,6 @@ #include "shmlog.h" #include "cache.h" -#define CLIENT_HASH 1024 -#define CLIENT_TTL 30 - /*--------------------------------------------------------------------*/ struct sessmem { @@ -46,20 +43,41 @@ TAILQ_ENTRY(sessmem) list; }; -/*--------------------------------------------------------------------*/ - static TAILQ_HEAD(,sessmem) ses_free_mem[2] = { TAILQ_HEAD_INITIALIZER(ses_free_mem[0]), TAILQ_HEAD_INITIALIZER(ses_free_mem[1]), }; static unsigned ses_qp; +static MTX ses_mem_mtx; -TAILQ_HEAD(srcaddrhead ,srcaddr); -static struct srcaddrhead srcaddr_hash[CLIENT_HASH]; -static MTX ses_mtx; +/*--------------------------------------------------------------------*/ + +struct srcaddr { + unsigned magic; +#define SRCADDR_MAGIC 0x375111db + + unsigned hash; + TAILQ_ENTRY(srcaddr) list; + struct srcaddrhead *sah; + + char addr[TCP_ADDRBUFSIZE]; + unsigned nref; + + time_t ttl; + + struct acct acct; +}; + +static struct srcaddrhead { + unsigned magic; +#define SRCADDRHEAD_MAGIC 0x38231a8b + TAILQ_HEAD(,srcaddr) head; + MTX mtx; +} *srchash; + +unsigned nsrchash; static MTX stat_mtx; -static MTX ses_mem_mtx; /*-------------------------------------------------------------------- * Assign a srcaddr to this session. @@ -77,29 +95,34 @@ struct srcaddrhead *ch; time_t now; + if (params->srcaddr_ttl == 0) { + sp->srcaddr = NULL; + return; + } AZ(sp->srcaddr); u = crc32_2s(sp->addr, ""); - v = u % CLIENT_HASH; - ch = &srcaddr_hash[v]; + v = u % nsrchash; + ch = &srchash[v]; + CHECK_OBJ(ch, SRCADDRHEAD_MAGIC); now = sp->t_open.tv_sec; - LOCK(&ses_mtx); + LOCK(&ch->mtx); c3 = NULL; - TAILQ_FOREACH_SAFE(c, ch, list, c2) { + TAILQ_FOREACH_SAFE(c, &ch->head, list, c2) { if (c->hash == u && !strcmp(c->addr, sp->addr)) { if (c->nref == 0) VSL_stats->n_srcaddr_act++; c->nref++; - c->ttl = now + CLIENT_TTL; + c->ttl = now + params->srcaddr_ttl; sp->srcaddr = c; - TAILQ_REMOVE(ch, c, list); - TAILQ_INSERT_TAIL(ch, c, list); + TAILQ_REMOVE(&ch->head, c, list); + TAILQ_INSERT_TAIL(&ch->head, c, list); if (0 && c3 != NULL) { - TAILQ_REMOVE(ch, c3, list); + TAILQ_REMOVE(&ch->head, c3, list); VSL_stats->n_srcaddr--; free(c3); } - UNLOCK(&ses_mtx); + UNLOCK(&ch->mtx); return; } if (c->nref > 0 || c->ttl > now) @@ -108,7 +131,7 @@ c3 = c; continue; } - TAILQ_REMOVE(ch, c, list); + TAILQ_REMOVE(&ch->head, c, list); free(c); VSL_stats->n_srcaddr--; } @@ -118,24 +141,46 @@ if (c3 != NULL) VSL_stats->n_srcaddr++; } else - TAILQ_REMOVE(ch, c3, list); + TAILQ_REMOVE(&ch->head, c3, list); AN(c3); if (c3 != NULL) { memset(c3, 0, sizeof *c3); strcpy(c3->addr, sp->addr); c3->hash = u; c3->acct.first = now; - c3->ttl = now + CLIENT_TTL; + c3->ttl = now + params->srcaddr_ttl; c3->nref = 1; c3->sah = ch; VSL_stats->n_srcaddr_act++; - TAILQ_INSERT_TAIL(ch, c3, list); + TAILQ_INSERT_TAIL(&ch->head, c3, list); sp->srcaddr = c3; } - UNLOCK(&ses_mtx); + UNLOCK(&ch->mtx); } +/*--------------------------------------------------------------------*/ + static void +ses_relsrcaddr(struct sess *sp) +{ + struct srcaddrhead *ch; + + if (sp->srcaddr == NULL) + return; + ch = sp->srcaddr->sah; + CHECK_OBJ(ch, SRCADDRHEAD_MAGIC); + LOCK(&ch->mtx); + assert(sp->srcaddr->nref > 0); + sp->srcaddr->nref--; + if (sp->srcaddr->nref == 0) + VSL_stats->n_srcaddr_act--; + sp->srcaddr = NULL; + UNLOCK(&ch->mtx); +} + +/*--------------------------------------------------------------------*/ + +static void ses_sum_acct(struct acct *sum, struct acct *inc) { @@ -152,16 +197,19 @@ SES_Charge(struct sess *sp) { struct acct *a = &sp->wrk->acct; - struct acct *b = &sp->srcaddr->acct; + struct acct *b; ses_sum_acct(&sp->acct, a); LOCK(&stat_mtx); - ses_sum_acct(b, a); - VSL(SLT_StatAddr, 0, "%s 0 %d %ju %ju %ju %ju %ju %ju %ju", - sp->srcaddr->addr, sp->t_end.tv_sec - b->first, - b->sess, b->req, b->pipe, b->pass, - b->fetch, b->hdrbytes, b->bodybytes); + if (sp->srcaddr != NULL) { + b = &sp->srcaddr->acct; + ses_sum_acct(b, a); + VSL(SLT_StatAddr, 0, "%s 0 %d %ju %ju %ju %ju %ju %ju %ju", + sp->srcaddr->addr, sp->t_end.tv_sec - b->first, + b->sess, b->req, b->pipe, b->pass, + b->fetch, b->hdrbytes, b->bodybytes); + } VSL_stats->s_sess += a->sess; VSL_stats->s_req += a->req; VSL_stats->s_pipe += a->pipe; @@ -173,24 +221,6 @@ memset(a, 0, sizeof *a); } -static void -ses_relsrcaddr(struct sess *sp) -{ - - if (sp->srcaddr == NULL) { - /* If we never get to work pool (illegal req) */ - return; - } - AN(sp->srcaddr); - LOCK(&ses_mtx); - assert(sp->srcaddr->nref > 0); - sp->srcaddr->nref--; - if (sp->srcaddr->nref == 0) - VSL_stats->n_srcaddr_act--; - sp->srcaddr = NULL; - UNLOCK(&ses_mtx); -} - /*--------------------------------------------------------------------*/ struct sess * @@ -286,9 +316,14 @@ { int i; - for (i = 0; i < CLIENT_HASH; i++) - TAILQ_INIT(&srcaddr_hash[i]); - MTX_INIT(&ses_mtx); + nsrchash = params->srcaddr_hash; + srchash = calloc(sizeof *srchash, nsrchash); + XXXAN(srchash); + for (i = 0; i < nsrchash; i++) { + srchash[i].magic = SRCADDRHEAD_MAGIC; + TAILQ_INIT(&srchash[i].head); + MTX_INIT(&srchash[i].mtx); + } MTX_INIT(&stat_mtx); MTX_INIT(&ses_mem_mtx); } Modified: trunk/varnish-cache/bin/varnishd/heritage.h =================================================================== --- trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-16 20:17:15 UTC (rev 1032) +++ trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-16 20:52:35 UTC (rev 1033) @@ -65,6 +65,10 @@ /* Listen depth */ unsigned listen_depth; + + /* Srcaddr hash */ + unsigned srcaddr_hash; + unsigned srcaddr_ttl; }; extern struct params *params; Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-16 20:17:15 UTC (rev 1032) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-16 20:52:35 UTC (rev 1033) @@ -282,6 +282,24 @@ /*--------------------------------------------------------------------*/ +static void +tweak_srcaddr_hash(struct cli *cli, struct parspec *par, const char *arg) +{ + (void)par; + tweak_generic_uint(cli, ¶ms->srcaddr_hash, arg, 64, UINT_MAX); +} + +/*--------------------------------------------------------------------*/ + +static void +tweak_srcaddr_ttl(struct cli *cli, struct parspec *par, const char *arg) +{ + (void)par; + tweak_generic_uint(cli, ¶ms->srcaddr_ttl, arg, 0, UINT_MAX); +} + +/*--------------------------------------------------------------------*/ + /* * Make sure to end all lines with either a space or newline of the * formatting will go haywire. @@ -372,6 +390,13 @@ "Listen(2) queue depth.\n" MUST_RESTART, "1024", "connections" }, + { "srcaddr_hash", tweak_srcaddr_hash, + "Number of source address hash buckets.\n" + MUST_RESTART, + "1024", "buckets" }, + { "srcaddr_ttl", tweak_srcaddr_ttl, + "Lifetime of srcaddr entries.\n", + "30", "seconds" }, { NULL, NULL, NULL } }; From phk at projects.linpro.no Sat Sep 16 20:59:35 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 22:59:35 +0200 (CEST) Subject: r1034 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916205935.9A5C23BC1D9@projects.linpro.no> Author: phk Date: 2006-09-16 22:59:35 +0200 (Sat, 16 Sep 2006) New Revision: 1034 Modified: trunk/varnish-cache/bin/varnishd/cache_session.c Log: Use srcaddr mutex for srcaddr stats update to reduce contention on stat_mtx Modified: trunk/varnish-cache/bin/varnishd/cache_session.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-16 20:52:35 UTC (rev 1033) +++ trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-16 20:59:35 UTC (rev 1034) @@ -201,15 +201,17 @@ ses_sum_acct(&sp->acct, a); - LOCK(&stat_mtx); if (sp->srcaddr != NULL) { + LOCK(&sp->srcaddr->sah->mtx); b = &sp->srcaddr->acct; ses_sum_acct(b, a); VSL(SLT_StatAddr, 0, "%s 0 %d %ju %ju %ju %ju %ju %ju %ju", sp->srcaddr->addr, sp->t_end.tv_sec - b->first, b->sess, b->req, b->pipe, b->pass, b->fetch, b->hdrbytes, b->bodybytes); + UNLOCK(&sp->srcaddr->sah->mtx); } + LOCK(&stat_mtx); VSL_stats->s_sess += a->sess; VSL_stats->s_req += a->req; VSL_stats->s_pipe += a->pipe; From phk at projects.linpro.no Sat Sep 16 21:05:45 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 23:05:45 +0200 (CEST) Subject: r1035 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916210545.4D6163BC1D9@projects.linpro.no> Author: phk Date: 2006-09-16 23:05:45 +0200 (Sat, 16 Sep 2006) New Revision: 1035 Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c Log: twiddle explanations and defaults. Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-16 20:59:35 UTC (rev 1034) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-16 21:05:45 UTC (rev 1035) @@ -286,7 +286,7 @@ tweak_srcaddr_hash(struct cli *cli, struct parspec *par, const char *arg) { (void)par; - tweak_generic_uint(cli, ¶ms->srcaddr_hash, arg, 64, UINT_MAX); + tweak_generic_uint(cli, ¶ms->srcaddr_hash, arg, 63, UINT_MAX); } /*--------------------------------------------------------------------*/ @@ -392,10 +392,12 @@ "1024", "connections" }, { "srcaddr_hash", tweak_srcaddr_hash, "Number of source address hash buckets.\n" + "Powers of two are bad, prime numbers are good.\n" MUST_RESTART, - "1024", "buckets" }, + "1049", "buckets" }, { "srcaddr_ttl", tweak_srcaddr_ttl, - "Lifetime of srcaddr entries.\n", + "Lifetime of srcaddr entries.\n" + "Zero will disable srcaddr accounting.\n", "30", "seconds" }, { NULL, NULL, NULL } }; From phk at projects.linpro.no Sat Sep 16 21:14:13 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 23:14:13 +0200 (CEST) Subject: r1036 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916211413.1E72E3BC1D9@projects.linpro.no> Author: phk Date: 2006-09-16 23:14:13 +0200 (Sat, 16 Sep 2006) New Revision: 1036 Modified: trunk/varnish-cache/bin/varnishd/varnishd.c Log: make flexelint marginally happier Modified: trunk/varnish-cache/bin/varnishd/varnishd.c =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-16 21:05:45 UTC (rev 1035) +++ trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-16 21:14:13 UTC (rev 1036) @@ -381,6 +381,7 @@ p = strchr(optarg, '='); if (p == NULL) usage(); + AN(p); *p++ = '\0'; MCF_ParamSet(cli, optarg, p); cli_check(cli); From phk at projects.linpro.no Sat Sep 16 21:14:29 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 23:14:29 +0200 (CEST) Subject: r1037 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916211429.480D73BC1D9@projects.linpro.no> Author: phk Date: 2006-09-16 23:14:29 +0200 (Sat, 16 Sep 2006) New Revision: 1037 Modified: trunk/varnish-cache/bin/varnishd/cache_session.c Log: use miniobj on srcaddr's Modified: trunk/varnish-cache/bin/varnishd/cache_session.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-16 21:14:13 UTC (rev 1036) +++ trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-16 21:14:29 UTC (rev 1037) @@ -146,6 +146,7 @@ if (c3 != NULL) { memset(c3, 0, sizeof *c3); strcpy(c3->addr, sp->addr); + c3->magic = SRCADDR_MAGIC; c3->hash = u; c3->acct.first = now; c3->ttl = now + params->srcaddr_ttl; @@ -167,6 +168,7 @@ if (sp->srcaddr == NULL) return; + CHECK_OBJ(sp->srcaddr, SRCADDR_MAGIC); ch = sp->srcaddr->sah; CHECK_OBJ(ch, SRCADDRHEAD_MAGIC); LOCK(&ch->mtx); @@ -202,6 +204,7 @@ ses_sum_acct(&sp->acct, a); if (sp->srcaddr != NULL) { + CHECK_OBJ(sp->srcaddr, SRCADDR_MAGIC); LOCK(&sp->srcaddr->sah->mtx); b = &sp->srcaddr->acct; ses_sum_acct(b, a); From phk at projects.linpro.no Sat Sep 16 21:20:37 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 23:20:37 +0200 (CEST) Subject: r1038 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916212037.BD47D3BC1D9@projects.linpro.no> Author: phk Date: 2006-09-16 23:20:37 +0200 (Sat, 16 Sep 2006) New Revision: 1038 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_pass.c trunk/varnish-cache/bin/varnishd/cache_response.c trunk/varnish-cache/bin/varnishd/cache_session.c Log: Account directly into the session. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-16 21:14:29 UTC (rev 1037) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-16 21:20:37 UTC (rev 1038) @@ -112,7 +112,6 @@ unsigned niov; size_t liov; - struct acct acct; struct VCL_conf *vcl; }; Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-16 21:14:29 UTC (rev 1037) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-16 21:20:37 UTC (rev 1038) @@ -284,7 +284,7 @@ AZ(sp->vbc); HSH_Ref(sp->obj); /* get another, STP_DELIVER will deref */ HSH_Unbusy(sp->obj); - sp->wrk->acct.fetch++; + sp->acct.fetch++; sp->step = STP_DELIVER; return (0); } @@ -304,7 +304,7 @@ assert(sp->xid == 0); VCA_Prep(sp); sp->wrk->idle = sp->t_open.tv_sec; - sp->wrk->acct.sess++; + sp->acct.sess++; SES_RefSrcAddr(sp); do i = http_RecvSome(sp->fd, sp->http); @@ -583,7 +583,7 @@ cnt_passbody(struct sess *sp) { - sp->wrk->acct.pass++; + sp->acct.pass++; AN(sp->vbc); PassBody(sp); AZ(sp->vbc); @@ -610,7 +610,7 @@ cnt_pipe(struct sess *sp) { - sp->wrk->acct.pipe++; + sp->acct.pipe++; PipeSession(sp); sp->step = STP_DONE; return (0); @@ -662,7 +662,7 @@ AZ(sp->obj); AZ(sp->vbc); - sp->wrk->acct.req++; + sp->acct.req++; done = http_DissectRequest(sp->http, sp->fd); if (done != 0) { RES_Error(sp, done, NULL); Modified: trunk/varnish-cache/bin/varnishd/cache_pass.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-16 21:14:29 UTC (rev 1037) +++ trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-16 21:20:37 UTC (rev 1038) @@ -49,7 +49,7 @@ vca_close_session(sp, "backend closed"); return (1); } - sp->wrk->acct.bodybytes += WRK_Write(sp->wrk, buf, i); + sp->acct.bodybytes += WRK_Write(sp->wrk, buf, i); if (WRK_Flush(sp->wrk)) vca_close_session(sp, "remote closed"); cl -= i; @@ -104,7 +104,7 @@ /* we just received the final zero-length chunk */ if (u == 0) { - sp->wrk->acct.bodybytes += WRK_Write(sp->wrk, p, q - p); + sp->acct.bodybytes += WRK_Write(sp->wrk, p, q - p); break; } @@ -118,7 +118,7 @@ j = u; if (bp - p < j) j = bp - p; - sp->wrk->acct.bodybytes += WRK_Write(sp->wrk, p, j); + sp->acct.bodybytes += WRK_Write(sp->wrk, p, j); WRK_Flush(sp->wrk); p += j; assert(u >= j); @@ -164,7 +164,7 @@ if (http_HdrIs(vc->http, H_Transfer_Encoding, "chunked")) http_PrintfHeader(sp->fd, sp->http, "Transfer-Encoding: chunked"); WRK_Reset(sp->wrk, &sp->fd); - sp->wrk->acct.hdrbytes += http_Write(sp->wrk, sp->http, 1); + sp->acct.hdrbytes += http_Write(sp->wrk, sp->http, 1); if (http_GetHdr(vc->http, H_Content_Length, &b)) cls = pass_straight(sp, vc->fd, vc->http, b); Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-16 21:14:29 UTC (rev 1037) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-16 21:20:37 UTC (rev 1038) @@ -127,7 +127,7 @@ "\r\n"); vsb_finish(sb); WRK_Reset(sp->wrk, &sp->fd); - sp->wrk->acct.hdrbytes += WRK_Write(sp->wrk, vsb_data(sb), vsb_len(sb)); + sp->acct.hdrbytes += WRK_Write(sp->wrk, vsb_data(sb), vsb_len(sb)); WRK_Flush(sp->wrk); VSL(SLT_TxStatus, sp->id, "%d", code); VSL(SLT_TxProtocol, sp->id, "HTTP/1.1"); @@ -158,7 +158,7 @@ if (sp->doclose != NULL) http_SetHeader(sp->fd, sp->http, "Connection: close"); WRK_Reset(sp->wrk, &sp->fd); - sp->wrk->acct.hdrbytes += http_Write(sp->wrk, sp->http, 1); + sp->acct.hdrbytes += http_Write(sp->wrk, sp->http, 1); if (WRK_Flush(sp->wrk)) vca_close_session(sp, "remote closed"); } @@ -216,7 +216,7 @@ if (sp->doclose != NULL) http_SetHeader(sp->fd, sp->http, "Connection: close"); WRK_Reset(sp->wrk, &sp->fd); - sp->wrk->acct.hdrbytes += http_Write(sp->wrk, sp->http, 1); + sp->acct.hdrbytes += http_Write(sp->wrk, sp->http, 1); CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); if (sp->wantbody) { @@ -225,7 +225,7 @@ CHECK_OBJ_NOTNULL(st, STORAGE_MAGIC); AN(st->stevedore); u += st->len; - sp->wrk->acct.bodybytes += st->len; + sp->acct.bodybytes += st->len; #ifdef HAVE_SENDFILE /* * XXX: the overhead of setting up senddile is not Modified: trunk/varnish-cache/bin/varnishd/cache_session.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-16 21:14:29 UTC (rev 1037) +++ trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-16 21:20:37 UTC (rev 1038) @@ -198,11 +198,9 @@ void SES_Charge(struct sess *sp) { - struct acct *a = &sp->wrk->acct; + struct acct *a = &sp->acct; struct acct *b; - ses_sum_acct(&sp->acct, a); - if (sp->srcaddr != NULL) { CHECK_OBJ(sp->srcaddr, SRCADDR_MAGIC); LOCK(&sp->srcaddr->sah->mtx); From phk at projects.linpro.no Sat Sep 16 21:35:44 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 23:35:44 +0200 (CEST) Subject: r1039 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916213544.58C083BC1D9@projects.linpro.no> Author: phk Date: 2006-09-16 23:35:44 +0200 (Sat, 16 Sep 2006) New Revision: 1039 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_pool.c trunk/varnish-cache/bin/varnishd/cache_session.c Log: Preallocate a srcaddr per workerthread to speed up locked section. Remember to free preallocated storage in workerthread. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-16 21:20:37 UTC (rev 1038) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-16 21:35:44 UTC (rev 1039) @@ -113,6 +113,7 @@ size_t liov; struct VCL_conf *vcl; + struct srcaddr *srcaddr; }; struct workreq { Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-16 21:20:37 UTC (rev 1038) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-16 21:35:44 UTC (rev 1039) @@ -222,6 +222,12 @@ VCL_Rel(&w->vcl); close(w->pipe[0]); close(w->pipe[1]); + if (w->srcaddr != NULL) + free(w->srcaddr); + if (w->nobjhead != NULL) + free(w->nobjhead); + if (w->nobj!= NULL) + free(w->nobj); return (NULL); } Modified: trunk/varnish-cache/bin/varnishd/cache_session.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-16 21:20:37 UTC (rev 1038) +++ trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-16 21:35:44 UTC (rev 1039) @@ -105,6 +105,10 @@ ch = &srchash[v]; CHECK_OBJ(ch, SRCADDRHEAD_MAGIC); now = sp->t_open.tv_sec; + if (sp->wrk->srcaddr == NULL) { + sp->wrk->srcaddr = calloc(sizeof *sp->wrk->srcaddr, 1); + XXXAN(sp->wrk->srcaddr); + } LOCK(&ch->mtx); c3 = NULL; @@ -117,45 +121,38 @@ sp->srcaddr = c; TAILQ_REMOVE(&ch->head, c, list); TAILQ_INSERT_TAIL(&ch->head, c, list); - if (0 && c3 != NULL) { + if (c3 != NULL) { TAILQ_REMOVE(&ch->head, c3, list); VSL_stats->n_srcaddr--; - free(c3); } UNLOCK(&ch->mtx); + if (c3 != NULL) + free(c3); return; } if (c->nref > 0 || c->ttl > now) continue; - if (c3 == NULL) { + if (c3 == NULL) c3 = c; - continue; - } - TAILQ_REMOVE(&ch->head, c, list); - free(c); - VSL_stats->n_srcaddr--; } if (c3 == NULL) { - c3 = malloc(sizeof *c3); - XXXAN(c3); - if (c3 != NULL) - VSL_stats->n_srcaddr++; + c3 = sp->wrk->srcaddr; + sp->wrk->srcaddr = NULL; + VSL_stats->n_srcaddr++; } else TAILQ_REMOVE(&ch->head, c3, list); AN(c3); - if (c3 != NULL) { - memset(c3, 0, sizeof *c3); - strcpy(c3->addr, sp->addr); - c3->magic = SRCADDR_MAGIC; - c3->hash = u; - c3->acct.first = now; - c3->ttl = now + params->srcaddr_ttl; - c3->nref = 1; - c3->sah = ch; - VSL_stats->n_srcaddr_act++; - TAILQ_INSERT_TAIL(&ch->head, c3, list); - sp->srcaddr = c3; - } + memset(c3, 0, sizeof *c3); + c3->magic = SRCADDR_MAGIC; + strcpy(c3->addr, sp->addr); + c3->hash = u; + c3->acct.first = now; + c3->ttl = now + params->srcaddr_ttl; + c3->nref = 1; + c3->sah = ch; + VSL_stats->n_srcaddr_act++; + TAILQ_INSERT_TAIL(&ch->head, c3, list); + sp->srcaddr = c3; UNLOCK(&ch->mtx); } From phk at projects.linpro.no Sat Sep 16 21:45:28 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 16 Sep 2006 23:45:28 +0200 (CEST) Subject: r1040 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916214528.13B9E3BC1D9@projects.linpro.no> Author: phk Date: 2006-09-16 23:45:27 +0200 (Sat, 16 Sep 2006) New Revision: 1040 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_pass.c trunk/varnish-cache/bin/varnishd/cache_response.c trunk/varnish-cache/bin/varnishd/cache_session.c Log: Duh! We need to count stats in per workerthread and summarize into session, otherwise we cannot correctly summarize into srcaddr and global. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-16 21:35:44 UTC (rev 1039) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-16 21:45:27 UTC (rev 1040) @@ -114,6 +114,7 @@ struct VCL_conf *vcl; struct srcaddr *srcaddr; + struct acct acct; }; struct workreq { Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-16 21:35:44 UTC (rev 1039) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-16 21:45:27 UTC (rev 1040) @@ -284,7 +284,7 @@ AZ(sp->vbc); HSH_Ref(sp->obj); /* get another, STP_DELIVER will deref */ HSH_Unbusy(sp->obj); - sp->acct.fetch++; + sp->wrk->acct.fetch++; sp->step = STP_DELIVER; return (0); } @@ -304,7 +304,7 @@ assert(sp->xid == 0); VCA_Prep(sp); sp->wrk->idle = sp->t_open.tv_sec; - sp->acct.sess++; + sp->wrk->acct.sess++; SES_RefSrcAddr(sp); do i = http_RecvSome(sp->fd, sp->http); @@ -583,7 +583,7 @@ cnt_passbody(struct sess *sp) { - sp->acct.pass++; + sp->wrk->acct.pass++; AN(sp->vbc); PassBody(sp); AZ(sp->vbc); @@ -610,7 +610,7 @@ cnt_pipe(struct sess *sp) { - sp->acct.pipe++; + sp->wrk->acct.pipe++; PipeSession(sp); sp->step = STP_DONE; return (0); @@ -662,7 +662,7 @@ AZ(sp->obj); AZ(sp->vbc); - sp->acct.req++; + sp->wrk->acct.req++; done = http_DissectRequest(sp->http, sp->fd); if (done != 0) { RES_Error(sp, done, NULL); Modified: trunk/varnish-cache/bin/varnishd/cache_pass.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-16 21:35:44 UTC (rev 1039) +++ trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-16 21:45:27 UTC (rev 1040) @@ -49,7 +49,7 @@ vca_close_session(sp, "backend closed"); return (1); } - sp->acct.bodybytes += WRK_Write(sp->wrk, buf, i); + sp->wrk->acct.bodybytes += WRK_Write(sp->wrk, buf, i); if (WRK_Flush(sp->wrk)) vca_close_session(sp, "remote closed"); cl -= i; @@ -104,7 +104,7 @@ /* we just received the final zero-length chunk */ if (u == 0) { - sp->acct.bodybytes += WRK_Write(sp->wrk, p, q - p); + sp->wrk->acct.bodybytes += WRK_Write(sp->wrk, p, q - p); break; } @@ -118,7 +118,7 @@ j = u; if (bp - p < j) j = bp - p; - sp->acct.bodybytes += WRK_Write(sp->wrk, p, j); + sp->wrk->acct.bodybytes += WRK_Write(sp->wrk, p, j); WRK_Flush(sp->wrk); p += j; assert(u >= j); @@ -164,7 +164,7 @@ if (http_HdrIs(vc->http, H_Transfer_Encoding, "chunked")) http_PrintfHeader(sp->fd, sp->http, "Transfer-Encoding: chunked"); WRK_Reset(sp->wrk, &sp->fd); - sp->acct.hdrbytes += http_Write(sp->wrk, sp->http, 1); + sp->wrk->acct.hdrbytes += http_Write(sp->wrk, sp->http, 1); if (http_GetHdr(vc->http, H_Content_Length, &b)) cls = pass_straight(sp, vc->fd, vc->http, b); Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-16 21:35:44 UTC (rev 1039) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-16 21:45:27 UTC (rev 1040) @@ -127,7 +127,7 @@ "\r\n"); vsb_finish(sb); WRK_Reset(sp->wrk, &sp->fd); - sp->acct.hdrbytes += WRK_Write(sp->wrk, vsb_data(sb), vsb_len(sb)); + sp->wrk->acct.hdrbytes += WRK_Write(sp->wrk, vsb_data(sb), vsb_len(sb)); WRK_Flush(sp->wrk); VSL(SLT_TxStatus, sp->id, "%d", code); VSL(SLT_TxProtocol, sp->id, "HTTP/1.1"); @@ -158,7 +158,7 @@ if (sp->doclose != NULL) http_SetHeader(sp->fd, sp->http, "Connection: close"); WRK_Reset(sp->wrk, &sp->fd); - sp->acct.hdrbytes += http_Write(sp->wrk, sp->http, 1); + sp->wrk->acct.hdrbytes += http_Write(sp->wrk, sp->http, 1); if (WRK_Flush(sp->wrk)) vca_close_session(sp, "remote closed"); } @@ -216,7 +216,7 @@ if (sp->doclose != NULL) http_SetHeader(sp->fd, sp->http, "Connection: close"); WRK_Reset(sp->wrk, &sp->fd); - sp->acct.hdrbytes += http_Write(sp->wrk, sp->http, 1); + sp->wrk->acct.hdrbytes += http_Write(sp->wrk, sp->http, 1); CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); if (sp->wantbody) { @@ -225,7 +225,7 @@ CHECK_OBJ_NOTNULL(st, STORAGE_MAGIC); AN(st->stevedore); u += st->len; - sp->acct.bodybytes += st->len; + sp->wrk->acct.bodybytes += st->len; #ifdef HAVE_SENDFILE /* * XXX: the overhead of setting up senddile is not Modified: trunk/varnish-cache/bin/varnishd/cache_session.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-16 21:35:44 UTC (rev 1039) +++ trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-16 21:45:27 UTC (rev 1040) @@ -195,19 +195,20 @@ void SES_Charge(struct sess *sp) { - struct acct *a = &sp->acct; - struct acct *b; + struct acct *a = &sp->wrk->acct; + struct acct b; + ses_sum_acct(&sp->acct, a); if (sp->srcaddr != NULL) { CHECK_OBJ(sp->srcaddr, SRCADDR_MAGIC); LOCK(&sp->srcaddr->sah->mtx); - b = &sp->srcaddr->acct; - ses_sum_acct(b, a); + ses_sum_acct(&sp->srcaddr->acct, a); + b = sp->srcaddr->acct; + UNLOCK(&sp->srcaddr->sah->mtx); VSL(SLT_StatAddr, 0, "%s 0 %d %ju %ju %ju %ju %ju %ju %ju", - sp->srcaddr->addr, sp->t_end.tv_sec - b->first, - b->sess, b->req, b->pipe, b->pass, - b->fetch, b->hdrbytes, b->bodybytes); - UNLOCK(&sp->srcaddr->sah->mtx); + sp->srcaddr->addr, sp->t_end.tv_sec - b.first, + b.sess, b.req, b.pipe, b.pass, + b.fetch, b.hdrbytes, b.bodybytes); } LOCK(&stat_mtx); VSL_stats->s_sess += a->sess; From phk at projects.linpro.no Sat Sep 16 22:00:35 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sun, 17 Sep 2006 00:00:35 +0200 (CEST) Subject: r1041 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916220035.4DD383BC1D9@projects.linpro.no> Author: phk Date: 2006-09-17 00:00:35 +0200 (Sun, 17 Sep 2006) New Revision: 1041 Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c Log: Change statistics from gauge to counter Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-16 21:45:27 UTC (rev 1040) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-16 22:00:35 UTC (rev 1041) @@ -197,7 +197,6 @@ w->wrq = TAILQ_FIRST(&qp->req); AN(w->wrq); TAILQ_REMOVE(&qp->req, w->wrq, list); - VSL_stats->n_wrk_queue--; UNLOCK(&qp->mtx); wrk_do_one(w); LOCK(&qp->mtx); @@ -257,11 +256,11 @@ } TAILQ_INSERT_TAIL(&qp->req, &sp->workreq, list); - VSL_stats->n_wrk_queue++; qp->overflow++; UNLOCK(&qp->mtx); LOCK(&tmtx); + VSL_stats->n_wrk_queue++; /* Can we create more threads ? */ if (VSL_stats->n_wrk >= params->wthread_max) { VSL_stats->n_wrk_max++; From phk at projects.linpro.no Sat Sep 16 22:32:00 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sun, 17 Sep 2006 00:32:00 +0200 (CEST) Subject: r1042 - trunk/varnish-cache/bin/varnishd Message-ID: <20060916223200.BFE0D1EC36E@projects.linpro.no> Author: phk Date: 2006-09-17 00:32:00 +0200 (Sun, 17 Sep 2006) New Revision: 1042 Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c Log: Embellish the parameter descriptions somewhat. Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-16 22:00:35 UTC (rev 1041) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-16 22:32:00 UTC (rev 1042) @@ -316,7 +316,11 @@ "\nNB: This parameter will not take any effect until the " \ "child process has been restarted.\n" +#define EXPERIMENTAL \ + "\nNB: We don't know yet if it is a good idea to change " \ + "this parameter. Caution adviced.\n" + static struct parspec parspec[] = { { "default_ttl", tweak_default_ttl, "The TTL assigned to objects if neither the backend nor " @@ -327,28 +331,37 @@ "flush of the cache use \"url.purge .\"", "120", "seconds" }, { "thread_pools", tweak_thread_pools, - "Number of thread pools.\n", + "Number of worker pools. " + "Increasing number of worker pools decreases lock " + "contention but increases the number of threads as well. " + "Can be increased on the fly, but decreases require a " + "restart to take effect.\n" + EXPERIMENTAL, "1", "pools" }, { "thread_pool_max", tweak_thread_pool_max, - "The maximum number of threads in the worker pool.\n" + "The maximum number of threads in the total worker pool.\n" "-1 is unlimited.\n" + EXPERIMENTAL DELAYED_EFFECT, - "-1", "threads" }, + "1000", "threads" }, { "thread_pool_min", tweak_thread_pool_min, "The minimum number of threads in the worker pool.\n" - DELAYED_EFFECT - "Minimum is 1 thread. ", + "Minimum is 1 thread. " + EXPERIMENTAL + DELAYED_EFFECT, "1", "threads" }, { "thread_pool_timeout", tweak_thread_pool_timeout, "Thread dies after this many seconds of inactivity.\n" - "Minimum is 1 second. ", + "Minimum is 1 second. " + EXPERIMENTAL + DELAYED_EFFECT, "120", "seconds" }, { "http_workspace", tweak_http_workspace, "Bytes of HTTP protocol workspace allocated. " "This space must be big enough for the entire HTTP protocol " "header and any edits done to it in the VCL code.\n" - SHOULD_RESTART - "Minimum is 1024 bytes. ", + "Minimum is 1024 bytes. " + DELAYED_EFFECT, "8192", "bytes" }, { "sess_timeout", tweak_sess_timeout, "Idle timeout for persistent sessions. " @@ -357,30 +370,52 @@ "5", "seconds" }, { "pipe_timeout", tweak_pipe_timeout, "Idle timeout for PIPE sessions. " - "If nothing have been received in either directoin for " + "If nothing have been received in either direction for " "this many seconds, the session is closed.\n", "60", "seconds" }, { "send_timeout", tweak_send_timeout, "Send timeout for client connections. " "If no data has been sent to the client in this many seconds, " "the session is closed.\n" - DELAYED_EFFECT - "See getopt(3) under SO_SNDTIMEO for more information.\n", + "See getopt(3) under SO_SNDTIMEO for more information.\n" + DELAYED_EFFECT, "600", "seconds" }, { "auto_restart", tweak_auto_restart, - "Restart child process automatically if it dies.\n" - "Minimum is 4 kilobytes.\n", + "Restart child process automatically if it dies.\n", "on", "bool" }, { "fetch_chunksize", tweak_fetch_chunksize, - "The default chunksize used by fetcher.\n", + "The default chunksize used by fetcher. " + "This should be bigger than the majority of objects with " + "short TTLs.\n" + "Internal limits in the storage_file module makes increases " + "above 128kb a dubious idea.\n" + EXPERIMENTAL, "128", "kilobytes" }, #ifdef HAVE_SENDFILE { "sendfile_threshold", tweak_sendfile_threshold, - "The minimum size of objects transmitted with sendfile.\n", + "The minimum size of objects transmitted with sendfile.\n" +#if defined(__FreeBSD__) + "In \"plenty-of-RAM\" scenarios this is unlikely to " + "have any effect. Once disk-I/O becomes frequent " + "we guess smaller values are likely to be better.\n" +#elif defined(__Linux__) + "Linux sendfile(2) does not allow for inclusion of " + "header data and therefore using sendfile(2) means " + "an extra system call, compared to using writev(2) for " + "both the header and body.\n" + "We suspect that sendfile(2) on Linux will only start " + "to be beneficial in low-ram scenarios. Therefore it " + "may make sense to set this to \"unlimited\".\n" +#endif + EXPERIMENTAL, "8192", "bytes" }, #endif /* HAVE_SENDFILE */ { "vcl_trace", tweak_vcl_trace, - "Trace VCL execution in the shmlog\n", + "Trace VCL execution in the shmlog.\n" + "Enabling this will allow you to see the path each " + "request has taken through the VCL program.\n" + "This generates a lot of logrecords so it is off by " + "default. ", "off", "bool" }, { "listen_address", tweak_listen_address, "The network address/port where Varnish services requests.\n" @@ -388,16 +423,22 @@ "0.0.0.0:80" }, { "listen_depth", tweak_listen_depth, "Listen(2) queue depth.\n" +#if defined(__FreeBSD__) + "Please see FreeBSDs tuning(7) manual page for more " + "information.\n" +#endif MUST_RESTART, "1024", "connections" }, { "srcaddr_hash", tweak_srcaddr_hash, "Number of source address hash buckets.\n" "Powers of two are bad, prime numbers are good.\n" + EXPERIMENTAL MUST_RESTART, "1049", "buckets" }, { "srcaddr_ttl", tweak_srcaddr_ttl, "Lifetime of srcaddr entries.\n" - "Zero will disable srcaddr accounting.\n", + "Zero will disable srcaddr accounting entirely.\n" + EXPERIMENTAL, "30", "seconds" }, { NULL, NULL, NULL } }; From phk at projects.linpro.no Sun Sep 17 06:45:22 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sun, 17 Sep 2006 08:45:22 +0200 (CEST) Subject: r1043 - trunk/varnish-cache/bin/varnishd Message-ID: <20060917064522.B6EFB1EC367@projects.linpro.no> Author: phk Date: 2006-09-17 08:45:22 +0200 (Sun, 17 Sep 2006) New Revision: 1043 Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c Log: Possibly better logic. Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-16 22:32:00 UTC (rev 1042) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-17 06:45:22 UTC (rev 1043) @@ -41,8 +41,7 @@ return; EV_SET(&ki[nki], sp->fd, EVFILT_READ, arm, 0, 0, sp); if (++nki == NKEV) { - (void)kevent(kq, ki, nki, NULL, 0, NULL); - /* XXX: we could check the error returns here */ + assert(kevent(kq, ki, nki, NULL, 0, NULL) <= 0); nki = 0; } } @@ -84,14 +83,12 @@ SES_Delete(sp); } return; - } - if (kp->flags == EV_EOF) { + } else if (kp->flags == EV_EOF) { TAILQ_REMOVE(&sesshead, sp, list); vca_close_session(sp, "EOF"); SES_Delete(sp); return; } - INCOMPL(); } /*--------------------------------------------------------------------*/ From des at projects.linpro.no Sun Sep 17 08:39:37 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Sun, 17 Sep 2006 10:39:37 +0200 (CEST) Subject: r1044 - trunk/varnish-cache/bin/varnishd Message-ID: <20060917083937.DCA021EC369@projects.linpro.no> Author: des Date: 2006-09-17 10:39:37 +0200 (Sun, 17 Sep 2006) New Revision: 1044 Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c trunk/varnish-cache/bin/varnishd/varnishd.1 Log: Update the parameter list in the man page, and add reminders to keep the lists in synch. Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-17 06:45:22 UTC (rev 1043) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-17 08:39:37 UTC (rev 1044) @@ -318,9 +318,13 @@ #define EXPERIMENTAL \ "\nNB: We don't know yet if it is a good idea to change " \ - "this parameter. Caution adviced.\n" + "this parameter. Caution advised.\n" +/* + * Remember to update varnishd.1 whenever you add / remove a parameter or + * change its default value. + */ static struct parspec parspec[] = { { "default_ttl", tweak_default_ttl, "The TTL assigned to objects if neither the backend nor " Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.1 2006-09-17 06:45:22 UTC (rev 1043) +++ trunk/varnish-cache/bin/varnishd/varnishd.1 2006-09-17 08:39:37 UTC (rev 1044) @@ -200,6 +200,7 @@ .It Cm vcl.use Ar configname .El .Ss Run-Time Parameters +.\" Keep in synch with parspec[] in mgt_param.c .Bl -tag -width=4 .It Va auto_restart .It Va default_ttl @@ -208,11 +209,14 @@ .It Va listen_address .It Va listen_depth .It Va pipe_timeout +.It Va sendfile_threshold .It Va send_timeout -.It Va sendfile_threshold .It Va sess_timeout +.It Va srcaddr_hash +.It Va srcaddr_ttl .It Va thread_pool_max .It Va thread_pool_min +.It Va thread_pools .It Va thread_pool_timeout .It Va vcl_trace .El From phk at projects.linpro.no Sun Sep 17 08:44:54 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sun, 17 Sep 2006 10:44:54 +0200 (CEST) Subject: r1045 - trunk/varnish-cache/bin/varnishd Message-ID: <20060917084454.152541EC36F@projects.linpro.no> Author: phk Date: 2006-09-17 10:44:53 +0200 (Sun, 17 Sep 2006) New Revision: 1045 Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c Log: Set sockopts on the listen socket and probe the accepted socket (once) to see which we do not need to set there because they are inherited. This could potentially save three syscalls per session. Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-17 08:39:37 UTC (rev 1044) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-17 08:44:53 UTC (rev 1045) @@ -42,68 +42,114 @@ static struct acceptor *vca_act; static pthread_t vca_thread_acct; +static struct timeval tv_sndtimeo; +static struct timeval tv_rcvtimeo; +static struct linger linger; -static struct sess * -vca_accept_sess(int fd) +static unsigned char need_sndtimeo, need_rcvtimeo, need_linger, need_test; + +static void +sock_test(int fd) { + struct linger lin; + struct timeval tv; socklen_t l; - struct sockaddr addr[2]; /* XXX: IPv6 hack */ - struct sess *sp; - int i; - VSL_stats->client_conn++; + l = sizeof lin; + AZ(getsockopt(fd, SOL_SOCKET, SO_LINGER, &lin, &l)); + assert(l == sizeof lin); + if (memcmp(&lin, &linger, l)) + need_linger = 1; - l = sizeof addr; - i = accept(fd, addr, &l); - if (i < 0) { - VSL(SLT_Debug, fd, "Accept failed errno=%d", errno); - /* XXX: stats ? */ - return (NULL); - } - sp = SES_New(addr, l); - XXXAN(sp); + l = sizeof tv; + AZ(getsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &tv, &l)); + assert(l == sizeof tv); + if (memcmp(&tv, &tv_sndtimeo, l)) + need_sndtimeo = 1; - sp->fd = i; - sp->id = i; - (void)clock_gettime(CLOCK_REALTIME, &sp->t_open); - - return (sp); + l = sizeof tv; + AZ(getsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, &l)); + assert(l == sizeof tv); + if (memcmp(&tv, &tv_rcvtimeo, l)) + need_rcvtimeo = 1; + need_test = 0; + printf("socktest: linger=%d sndtimeo=%d rcvtimeo=%d\n", + need_linger, need_sndtimeo, need_rcvtimeo); } void VCA_Prep(struct sess *sp) { - struct linger linger; TCP_name(sp->sockaddr, sp->sockaddrlen, sp->addr, sizeof sp->addr, sp->port, sizeof sp->port); VSL(SLT_SessionOpen, sp->fd, "%s %s", sp->addr, sp->port); sp->acct.first = sp->t_open.tv_sec; -#ifdef SO_LINGER /* XXX Linux*/ - linger.l_onoff = 0; - linger.l_linger = 0; - AZ(setsockopt(sp->fd, SOL_SOCKET, SO_LINGER, &linger, sizeof linger)); -#endif -#ifdef SO_SNDTIMEO - { - struct timeval tv; + if (need_test) + sock_test(sp->fd); + if (need_linger) + AZ(setsockopt(sp->fd, SOL_SOCKET, SO_LINGER, + &linger, sizeof linger)); + if (need_sndtimeo) + AZ(setsockopt(sp->fd, SOL_SOCKET, SO_SNDTIMEO, + &tv_sndtimeo, sizeof tv_sndtimeo)); + if (need_rcvtimeo) + AZ(setsockopt(sp->fd, SOL_SOCKET, SO_RCVTIMEO, + &tv_rcvtimeo, sizeof tv_rcvtimeo)); +} - tv.tv_sec = params->send_timeout; - tv.tv_usec = 0; - AZ(setsockopt(sp->fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof tv)); - } -#endif -#ifdef SO_RCVTIMEO - { - struct timeval tv; +/*--------------------------------------------------------------------*/ - tv.tv_sec = params->sess_timeout; - tv.tv_usec = 0; - AZ(setsockopt(sp->fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof tv)); +static void * +vca_acct(void *arg) +{ + struct sess *sp; + socklen_t l; + struct sockaddr addr[2]; /* XXX: IPv6 hack */ + int i; + + (void)arg; + need_test = 1; + AZ(setsockopt(heritage.socket, SOL_SOCKET, SO_LINGER, + &linger, sizeof linger)); + while (1) { + if (params->send_timeout != tv_sndtimeo.tv_sec) { + need_test = 1; + tv_sndtimeo.tv_sec = params->send_timeout; + AZ(setsockopt(heritage.socket, SOL_SOCKET, + SO_SNDTIMEO, &tv_sndtimeo, sizeof tv_sndtimeo)); + } + if (params->sess_timeout != tv_rcvtimeo.tv_sec) { + need_test = 1; + tv_rcvtimeo.tv_sec = params->sess_timeout; + AZ(setsockopt(heritage.socket, SOL_SOCKET, + SO_RCVTIMEO, &tv_rcvtimeo, sizeof tv_rcvtimeo)); + } + VSL_stats->client_conn++; + + l = sizeof addr; + i = accept(heritage.socket, addr, &l); + if (i < 0) { + VSL(SLT_Debug, heritage.socket, + "Accept failed errno=%d", errno); + /* XXX: stats ? */ + continue; + } + sp = SES_New(addr, l); + XXXAN(sp); + + sp->fd = i; + sp->id = i; + (void)clock_gettime(CLOCK_REALTIME, &sp->t_open); + + http_RecvPrep(sp->http); + sp->step = STP_FIRST; + WRK_QueueSession(sp); } -#endif } +/*--------------------------------------------------------------------*/ + void vca_handover(struct sess *sp, int bad) { @@ -160,25 +206,7 @@ vca_act->recycle(sp); } -/*--------------------------------------------------------------------*/ -static void * -vca_acct(void *arg) -{ - struct sess *sp; - - (void)arg; - while (1) { - sp = vca_accept_sess(heritage.socket); - if (sp == NULL) - continue; - http_RecvPrep(sp->http); - sp->step = STP_FIRST; - WRK_QueueSession(sp); - } -} - - /*--------------------------------------------------------------------*/ void From phk at phk.freebsd.dk Sun Sep 17 08:48:33 2006 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Sun, 17 Sep 2006 08:48:33 +0000 Subject: r1045 - trunk/varnish-cache/bin/varnishd In-Reply-To: Your message of "Sun, 17 Sep 2006 10:44:54 +0200." <20060917084454.152541EC36F@projects.linpro.no> Message-ID: <75914.1158482913@critter.freebsd.dk> In message <20060917084454.152541EC36F at projects.linpro.no>, phk at projects.linpro .no writes: >Author: phk >Date: 2006-09-17 10:44:53 +0200 (Sun, 17 Sep 2006) >New Revision: 1045 > >Modified: > trunk/varnish-cache/bin/varnishd/cache_acceptor.c >Log: >Set sockopts on the listen socket and probe the accepted socket (once) >to see which we do not need to set there because they are inherited. > >This could potentially save three syscalls per session. In FreeBSD this already saves one setsockopt(SO_LINGER), and the other two will be saved once version 1.281 of src/sys/kern/uipc_socket.c makes it into production. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk at FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From phk at projects.linpro.no Sun Sep 17 09:06:08 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sun, 17 Sep 2006 11:06:08 +0200 (CEST) Subject: r1046 - trunk/varnish-cache/bin/varnishd Message-ID: <20060917090608.676D11EC36F@projects.linpro.no> Author: phk Date: 2006-09-17 11:06:08 +0200 (Sun, 17 Sep 2006) New Revision: 1046 Modified: trunk/varnish-cache/bin/varnishd/mgt_child.c Log: Make sure we get the error messages from a dying child. Modified: trunk/varnish-cache/bin/varnishd/mgt_child.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-09-17 08:44:53 UTC (rev 1045) +++ trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-09-17 09:06:08 UTC (rev 1046) @@ -173,7 +173,9 @@ if (mgt_push_vcls_and_start(&i, &p)) { fprintf(stderr, "Pushing vcls failed:\n%s\n", p); free(p); - exit (2); + /* Pick up any stuff lingering on stdout/stderr */ + child_listener(NULL, EV_RD); + exit(2); } child_state = CH_RUNNING; } @@ -235,6 +237,9 @@ fprintf(stderr, "Cache child died pid=%d status=0x%x\n", r, status); child_pid = -1; + /* Pick up any stuff lingering on stdout/stderr */ + child_listener(NULL, EV_RD); + if (child_state == CH_RUNNING) { child_state = CH_DIED; fprintf(stderr, "Clean child\n"); From phk at projects.linpro.no Sun Sep 17 09:06:16 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sun, 17 Sep 2006 11:06:16 +0200 (CEST) Subject: r1047 - trunk/varnish-cache/bin/varnishd Message-ID: <20060917090616.48E381EC376@projects.linpro.no> Author: phk Date: 2006-09-17 11:06:16 +0200 (Sun, 17 Sep 2006) New Revision: 1047 Modified: trunk/varnish-cache/bin/varnishd/cache_main.c Log: Whitespace Modified: trunk/varnish-cache/bin/varnishd/cache_main.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_main.c 2006-09-17 09:06:08 UTC (rev 1046) +++ trunk/varnish-cache/bin/varnishd/cache_main.c 2006-09-17 09:06:16 UTC (rev 1047) @@ -50,4 +50,3 @@ printf("Child dies\n"); } - From phk at projects.linpro.no Sun Sep 17 09:26:24 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sun, 17 Sep 2006 11:26:24 +0200 (CEST) Subject: r1048 - trunk/varnish-cache/bin/varnishd Message-ID: <20060917092624.7B5251EC36F@projects.linpro.no> Author: phk Date: 2006-09-17 11:26:24 +0200 (Sun, 17 Sep 2006) New Revision: 1048 Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c Log: Fix logic bug so we don't reap worker threads all the time. Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-17 09:06:16 UTC (rev 1047) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-17 09:26:24 UTC (rev 1048) @@ -339,7 +339,7 @@ w = TAILQ_LAST(&qp->idle, workerhead); if (w != NULL && (w->idle + params->wthread_timeout < now || - VSL_stats->n_wrk <= params->wthread_max)) + VSL_stats->n_wrk > params->wthread_max)) TAILQ_REMOVE(&qp->idle, w, list); else w = NULL; From phk at projects.linpro.no Sun Sep 17 18:30:05 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sun, 17 Sep 2006 20:30:05 +0200 (CEST) Subject: r1049 - trunk/varnish-cache/bin/varnishd Message-ID: <20060917183005.641211EC22B@projects.linpro.no> Author: phk Date: 2006-09-17 20:30:05 +0200 (Sun, 17 Sep 2006) New Revision: 1049 Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c Log: Use the worker pools in round-robin fashion. Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-17 09:26:24 UTC (rev 1048) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-17 18:30:05 UTC (rev 1049) @@ -238,9 +238,15 @@ struct worker *w; pthread_t tp; struct wq *qp; + static unsigned nq; + unsigned onq; + onq = nq + 1; + if (onq > nwq) + onq = 0; sp->workreq.sess = sp; - qp = wq[sp->fd % nwq]; + qp = wq[onq]; + nq = onq; LOCK(&qp->mtx); From phk at projects.linpro.no Sun Sep 17 18:31:31 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sun, 17 Sep 2006 20:31:31 +0200 (CEST) Subject: r1050 - trunk/varnish-cache/bin/varnishd Message-ID: <20060917183131.E8C4F1EC377@projects.linpro.no> Author: phk Date: 2006-09-17 20:31:31 +0200 (Sun, 17 Sep 2006) New Revision: 1050 Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c Log: Oops, off by one. Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-17 18:30:05 UTC (rev 1049) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-17 18:31:31 UTC (rev 1050) @@ -242,7 +242,7 @@ unsigned onq; onq = nq + 1; - if (onq > nwq) + if (onq >= nwq) onq = 0; sp->workreq.sess = sp; qp = wq[onq]; From phk at projects.linpro.no Sun Sep 17 19:30:31 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sun, 17 Sep 2006 21:30:31 +0200 (CEST) Subject: r1051 - in trunk/varnish-cache: bin/varnishd include Message-ID: <20060917193031.446C71EC376@projects.linpro.no> Author: phk Date: 2006-09-17 21:30:31 +0200 (Sun, 17 Sep 2006) New Revision: 1051 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/shmlog.c trunk/varnish-cache/include/Makefile.am trunk/varnish-cache/include/stat_field.h Log: Keep track of shmlog mutex contests Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-17 18:31:31 UTC (rev 1050) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-17 19:30:31 UTC (rev 1051) @@ -422,9 +422,6 @@ /* rfc2616.c */ int RFC2616_cache_policy(struct sess *sp, struct http *hp); -#define LOCKSHM(foo) AZ(pthread_mutex_lock(foo)) -#define UNLOCKSHM(foo) AZ(pthread_mutex_unlock(foo)) - #if 1 #define MTX pthread_mutex_t #define MTX_INIT(foo) AZ(pthread_mutex_init(foo, NULL)) Modified: trunk/varnish-cache/bin/varnishd/shmlog.c =================================================================== --- trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-17 18:31:31 UTC (rev 1050) +++ trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-17 19:30:31 UTC (rev 1051) @@ -16,6 +16,16 @@ #include "heritage.h" +#define LOCKSHM(foo) \ + do { \ + if (pthread_mutex_trylock(foo)) { \ + AZ(pthread_mutex_lock(foo)); \ + VSL_stats->shm_cont++; \ + } \ + } while (0); + +#define UNLOCKSHM(foo) AZ(pthread_mutex_unlock(foo)) + #ifndef MAP_HASSEMAPHORE #define MAP_HASSEMAPHORE 0 /* XXX Linux */ #endif Modified: trunk/varnish-cache/include/Makefile.am =================================================================== --- trunk/varnish-cache/include/Makefile.am 2006-09-17 18:31:31 UTC (rev 1050) +++ trunk/varnish-cache/include/Makefile.am 2006-09-17 19:30:31 UTC (rev 1051) @@ -24,7 +24,6 @@ shmlog_tags.h \ stat_field.h \ stats.h \ - tree.h \ varnish/assert.h \ varnishapi.h \ vcl.h \ Modified: trunk/varnish-cache/include/stat_field.h =================================================================== --- trunk/varnish-cache/include/stat_field.h 2006-09-17 18:31:31 UTC (rev 1050) +++ trunk/varnish-cache/include/stat_field.h 2006-09-17 19:30:31 UTC (rev 1051) @@ -48,3 +48,5 @@ MAC_STAT(sess_pipeline, uint64_t, "u", "Session Pipeline") MAC_STAT(sess_readahead, uint64_t, "u", "Session Read Ahead") MAC_STAT(sess_herd, uint64_t, "u", "Session herd") + +MAC_STAT(shm_cont, uint64_t, "u", "SHM MTX contention") From phk at projects.linpro.no Sun Sep 17 19:31:27 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sun, 17 Sep 2006 21:31:27 +0200 (CEST) Subject: r1052 - trunk/varnish-cache/include Message-ID: <20060917193127.C55AC3BC1D9@projects.linpro.no> Author: phk Date: 2006-09-17 21:31:27 +0200 (Sun, 17 Sep 2006) New Revision: 1052 Removed: trunk/varnish-cache/include/tree.h Log: Part of this commit leaked into the previous commit: We don't use splay trees. Deleted: trunk/varnish-cache/include/tree.h =================================================================== --- trunk/varnish-cache/include/tree.h 2006-09-17 19:30:31 UTC (rev 1051) +++ trunk/varnish-cache/include/tree.h 2006-09-17 19:31:27 UTC (rev 1052) @@ -1,682 +0,0 @@ -/* $Id$ */ -/* $NetBSD: tree.h,v 1.12 2005/12/28 15:33:47 yamt Exp $ */ -/* $OpenBSD: tree.h,v 1.7 2002/10/17 21:51:54 art Exp $ */ -/* - * Copyright 2002 Niels Provos - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _SYS_TREE_H_ -#define _SYS_TREE_H_ - -/* - * This file defines data structures for different types of trees: - * splay trees and red-black trees. - * - * A splay tree is a self-organizing data structure. Every operation - * on the tree causes a splay to happen. The splay moves the requested - * node to the root of the tree and partly rebalances it. - * - * This has the benefit that request locality causes faster lookups as - * the requested nodes move to the top of the tree. On the other hand, - * every lookup causes memory writes. - * - * The Balance Theorem bounds the total access time for m operations - * and n inserts on an initially empty tree as O((m + n)lg n). The - * amortized cost for a sequence of m accesses to a splay tree is O(lg n); - * - * A red-black tree is a binary search tree with the node color as an - * extra attribute. It fulfills a set of conditions: - * - every search path from the root to a leaf consists of the - * same number of black nodes, - * - each red node (except for the root) has a black parent, - * - each leaf node is black. - * - * Every operation on a red-black tree is bounded as O(lg n). - * The maximum height of a red-black tree is 2lg (n+1). - */ - -#define SPLAY_HEAD(name, type) \ -struct name { \ - struct type *sph_root; /* root of the tree */ \ -} - -#define SPLAY_INITIALIZER(root) \ - { NULL } - -#define SPLAY_INIT(root) do { \ - (root)->sph_root = NULL; \ -} while (/*CONSTCOND*/ 0) - -#define SPLAY_ENTRY(type) \ -struct { \ - struct type *spe_left; /* left element */ \ - struct type *spe_right; /* right element */ \ -} - -#define SPLAY_LEFT(elm, field) (elm)->field.spe_left -#define SPLAY_RIGHT(elm, field) (elm)->field.spe_right -#define SPLAY_ROOT(head) (head)->sph_root -#define SPLAY_EMPTY(head) (SPLAY_ROOT(head) == NULL) - -/* SPLAY_ROTATE_{LEFT,RIGHT} expect that tmp hold SPLAY_{RIGHT,LEFT} */ -#define SPLAY_ROTATE_RIGHT(head, tmp, field) do { \ - SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \ - SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ - (head)->sph_root = tmp; \ -} while (/*CONSTCOND*/ 0) - -#define SPLAY_ROTATE_LEFT(head, tmp, field) do { \ - SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \ - SPLAY_LEFT(tmp, field) = (head)->sph_root; \ - (head)->sph_root = tmp; \ -} while (/*CONSTCOND*/ 0) - -#define SPLAY_LINKLEFT(head, tmp, field) do { \ - SPLAY_LEFT(tmp, field) = (head)->sph_root; \ - tmp = (head)->sph_root; \ - (head)->sph_root = SPLAY_LEFT((head)->sph_root, field); \ -} while (/*CONSTCOND*/ 0) - -#define SPLAY_LINKRIGHT(head, tmp, field) do { \ - SPLAY_RIGHT(tmp, field) = (head)->sph_root; \ - tmp = (head)->sph_root; \ - (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field); \ -} while (/*CONSTCOND*/ 0) - -#define SPLAY_ASSEMBLE(head, node, left, right, field) do { \ - SPLAY_RIGHT(left, field) = SPLAY_LEFT((head)->sph_root, field); \ - SPLAY_LEFT(right, field) = SPLAY_RIGHT((head)->sph_root, field);\ - SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(node, field); \ - SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(node, field); \ -} while (/*CONSTCOND*/ 0) - -/* Generates prototypes and inline functions */ - -#define SPLAY_PROTOTYPE(name, type, field, cmp) \ -void name##_SPLAY(struct name *, struct type *); \ -void name##_SPLAY_MINMAX(struct name *, int); \ -struct type *name##_SPLAY_INSERT(struct name *, struct type *); \ -struct type *name##_SPLAY_REMOVE(struct name *, struct type *); \ - \ -/* Finds the node with the same key as elm */ \ -static __inline struct type * \ -name##_SPLAY_FIND(struct name *head, struct type *elm) \ -{ \ - if (SPLAY_EMPTY(head)) \ - return(NULL); \ - name##_SPLAY(head, elm); \ - if ((cmp)(elm, (head)->sph_root) == 0) \ - return (head->sph_root); \ - return (NULL); \ -} \ - \ -static __inline struct type * \ -name##_SPLAY_NEXT(struct name *head, struct type *elm) \ -{ \ - name##_SPLAY(head, elm); \ - if (SPLAY_RIGHT(elm, field) != NULL) { \ - elm = SPLAY_RIGHT(elm, field); \ - while (SPLAY_LEFT(elm, field) != NULL) { \ - elm = SPLAY_LEFT(elm, field); \ - } \ - } else \ - elm = NULL; \ - return (elm); \ -} \ - \ -static __inline struct type * \ -name##_SPLAY_MIN_MAX(struct name *head, int val) \ -{ \ - name##_SPLAY_MINMAX(head, val); \ - return (SPLAY_ROOT(head)); \ -} - -/* Main splay operation. - * Moves node close to the key of elm to top - */ -#define SPLAY_GENERATE(name, type, field, cmp) \ -struct type * \ -name##_SPLAY_INSERT(struct name *head, struct type *elm) \ -{ \ - if (SPLAY_EMPTY(head)) { \ - SPLAY_LEFT(elm, field) = SPLAY_RIGHT(elm, field) = NULL; \ - } else { \ - int __comp; \ - name##_SPLAY(head, elm); \ - __comp = (cmp)(elm, (head)->sph_root); \ - if(__comp < 0) { \ - SPLAY_LEFT(elm, field) = SPLAY_LEFT((head)->sph_root, field);\ - SPLAY_RIGHT(elm, field) = (head)->sph_root; \ - SPLAY_LEFT((head)->sph_root, field) = NULL; \ - } else if (__comp > 0) { \ - SPLAY_RIGHT(elm, field) = SPLAY_RIGHT((head)->sph_root, field);\ - SPLAY_LEFT(elm, field) = (head)->sph_root; \ - SPLAY_RIGHT((head)->sph_root, field) = NULL; \ - } else \ - return ((head)->sph_root); \ - } \ - (head)->sph_root = (elm); \ - return (NULL); \ -} \ - \ -struct type * \ -name##_SPLAY_REMOVE(struct name *head, struct type *elm) \ -{ \ - struct type *__tmp; \ - if (SPLAY_EMPTY(head)) \ - return (NULL); \ - name##_SPLAY(head, elm); \ - if ((cmp)(elm, (head)->sph_root) == 0) { \ - if (SPLAY_LEFT((head)->sph_root, field) == NULL) { \ - (head)->sph_root = SPLAY_RIGHT((head)->sph_root, field);\ - } else { \ - __tmp = SPLAY_RIGHT((head)->sph_root, field); \ - (head)->sph_root = SPLAY_LEFT((head)->sph_root, field);\ - name##_SPLAY(head, elm); \ - SPLAY_RIGHT((head)->sph_root, field) = __tmp; \ - } \ - return (elm); \ - } \ - return (NULL); \ -} \ - \ -void \ -name##_SPLAY(struct name *head, struct type *elm) \ -{ \ - struct type __node, *__left, *__right, *__tmp; \ - int __comp; \ -\ - SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\ - __left = __right = &__node; \ -\ - while ((__comp = (cmp)(elm, (head)->sph_root)) != 0) { \ - if (__comp < 0) { \ - __tmp = SPLAY_LEFT((head)->sph_root, field); \ - if (__tmp == NULL) \ - break; \ - if ((cmp)(elm, __tmp) < 0){ \ - SPLAY_ROTATE_RIGHT(head, __tmp, field); \ - if (SPLAY_LEFT((head)->sph_root, field) == NULL)\ - break; \ - } \ - SPLAY_LINKLEFT(head, __right, field); \ - } else if (__comp > 0) { \ - __tmp = SPLAY_RIGHT((head)->sph_root, field); \ - if (__tmp == NULL) \ - break; \ - if ((cmp)(elm, __tmp) > 0){ \ - SPLAY_ROTATE_LEFT(head, __tmp, field); \ - if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\ - break; \ - } \ - SPLAY_LINKRIGHT(head, __left, field); \ - } \ - } \ - SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ -} \ - \ -/* Splay with either the minimum or the maximum element \ - * Used to find minimum or maximum element in tree. \ - */ \ -void name##_SPLAY_MINMAX(struct name *head, int __comp) \ -{ \ - struct type __node, *__left, *__right, *__tmp; \ -\ - SPLAY_LEFT(&__node, field) = SPLAY_RIGHT(&__node, field) = NULL;\ - __left = __right = &__node; \ -\ - while (1) { \ - if (__comp < 0) { \ - __tmp = SPLAY_LEFT((head)->sph_root, field); \ - if (__tmp == NULL) \ - break; \ - if (__comp < 0){ \ - SPLAY_ROTATE_RIGHT(head, __tmp, field); \ - if (SPLAY_LEFT((head)->sph_root, field) == NULL)\ - break; \ - } \ - SPLAY_LINKLEFT(head, __right, field); \ - } else if (__comp > 0) { \ - __tmp = SPLAY_RIGHT((head)->sph_root, field); \ - if (__tmp == NULL) \ - break; \ - if (__comp > 0) { \ - SPLAY_ROTATE_LEFT(head, __tmp, field); \ - if (SPLAY_RIGHT((head)->sph_root, field) == NULL)\ - break; \ - } \ - SPLAY_LINKRIGHT(head, __left, field); \ - } \ - } \ - SPLAY_ASSEMBLE(head, &__node, __left, __right, field); \ -} - -#define SPLAY_NEGINF -1 -#define SPLAY_INF 1 - -#define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y) -#define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y) -#define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y) -#define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y) -#define SPLAY_MIN(name, x) (SPLAY_EMPTY(x) ? NULL \ - : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF)) -#define SPLAY_MAX(name, x) (SPLAY_EMPTY(x) ? NULL \ - : name##_SPLAY_MIN_MAX(x, SPLAY_INF)) - -#define SPLAY_FOREACH(x, name, head) \ - for ((x) = SPLAY_MIN(name, head); \ - (x) != NULL; \ - (x) = SPLAY_NEXT(name, head, x)) - -/* Macros that define a red-black tree */ -#define RB_HEAD(name, type) \ -struct name { \ - struct type *rbh_root; /* root of the tree */ \ -} - -#define RB_INITIALIZER(root) \ - { NULL } - -#define RB_INIT(root) do { \ - (root)->rbh_root = NULL; \ -} while (/*CONSTCOND*/ 0) - -#define RB_BLACK 0 -#define RB_RED 1 -#define RB_ENTRY(type) \ -struct { \ - struct type *rbe_left; /* left element */ \ - struct type *rbe_right; /* right element */ \ - struct type *rbe_parent; /* parent element */ \ - int rbe_color; /* node color */ \ -} - -#define RB_LEFT(elm, field) (elm)->field.rbe_left -#define RB_RIGHT(elm, field) (elm)->field.rbe_right -#define RB_PARENT(elm, field) (elm)->field.rbe_parent -#define RB_COLOR(elm, field) (elm)->field.rbe_color -#define RB_ROOT(head) (head)->rbh_root -#define RB_EMPTY(head) (RB_ROOT(head) == NULL) - -#define RB_SET(elm, parent, field) do { \ - RB_PARENT(elm, field) = parent; \ - RB_LEFT(elm, field) = RB_RIGHT(elm, field) = NULL; \ - RB_COLOR(elm, field) = RB_RED; \ -} while (/*CONSTCOND*/ 0) - -#define RB_SET_BLACKRED(black, red, field) do { \ - RB_COLOR(black, field) = RB_BLACK; \ - RB_COLOR(red, field) = RB_RED; \ -} while (/*CONSTCOND*/ 0) - -#ifndef RB_AUGMENT -#define RB_AUGMENT(x) -#endif - -#define RB_ROTATE_LEFT(head, elm, tmp, field) do { \ - (tmp) = RB_RIGHT(elm, field); \ - if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field)) != NULL) { \ - RB_PARENT(RB_LEFT(tmp, field), field) = (elm); \ - } \ - RB_AUGMENT(elm); \ - if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \ - if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ - RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ - else \ - RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ - } else \ - (head)->rbh_root = (tmp); \ - RB_LEFT(tmp, field) = (elm); \ - RB_PARENT(elm, field) = (tmp); \ - RB_AUGMENT(tmp); \ - if ((RB_PARENT(tmp, field))) \ - RB_AUGMENT(RB_PARENT(tmp, field)); \ -} while (/*CONSTCOND*/ 0) - -#define RB_ROTATE_RIGHT(head, elm, tmp, field) do { \ - (tmp) = RB_LEFT(elm, field); \ - if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field)) != NULL) { \ - RB_PARENT(RB_RIGHT(tmp, field), field) = (elm); \ - } \ - RB_AUGMENT(elm); \ - if ((RB_PARENT(tmp, field) = RB_PARENT(elm, field)) != NULL) { \ - if ((elm) == RB_LEFT(RB_PARENT(elm, field), field)) \ - RB_LEFT(RB_PARENT(elm, field), field) = (tmp); \ - else \ - RB_RIGHT(RB_PARENT(elm, field), field) = (tmp); \ - } else \ - (head)->rbh_root = (tmp); \ - RB_RIGHT(tmp, field) = (elm); \ - RB_PARENT(elm, field) = (tmp); \ - RB_AUGMENT(tmp); \ - if ((RB_PARENT(tmp, field))) \ - RB_AUGMENT(RB_PARENT(tmp, field)); \ -} while (/*CONSTCOND*/ 0) - -/* Generates prototypes and inline functions */ -#define RB_PROTOTYPE(name, type, field, cmp) \ -void name##_RB_INSERT_COLOR(struct name *, struct type *); \ -void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\ -struct type *name##_RB_REMOVE(struct name *, struct type *); \ -struct type *name##_RB_INSERT(struct name *, struct type *); \ -struct type *name##_RB_FIND(struct name *, struct type *); \ -struct type *name##_RB_NEXT(struct type *); \ -struct type *name##_RB_MINMAX(struct name *, int); \ - \ - -/* Main rb operation. - * Moves node close to the key of elm to top - */ -#define RB_GENERATE(name, type, field, cmp) \ -void \ -name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \ -{ \ - struct type *parent, *gparent, *tmp; \ - while ((parent = RB_PARENT(elm, field)) != NULL && \ - RB_COLOR(parent, field) == RB_RED) { \ - gparent = RB_PARENT(parent, field); \ - if (parent == RB_LEFT(gparent, field)) { \ - tmp = RB_RIGHT(gparent, field); \ - if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ - RB_COLOR(tmp, field) = RB_BLACK; \ - RB_SET_BLACKRED(parent, gparent, field);\ - elm = gparent; \ - continue; \ - } \ - if (RB_RIGHT(parent, field) == elm) { \ - RB_ROTATE_LEFT(head, parent, tmp, field);\ - tmp = parent; \ - parent = elm; \ - elm = tmp; \ - } \ - RB_SET_BLACKRED(parent, gparent, field); \ - RB_ROTATE_RIGHT(head, gparent, tmp, field); \ - } else { \ - tmp = RB_LEFT(gparent, field); \ - if (tmp && RB_COLOR(tmp, field) == RB_RED) { \ - RB_COLOR(tmp, field) = RB_BLACK; \ - RB_SET_BLACKRED(parent, gparent, field);\ - elm = gparent; \ - continue; \ - } \ - if (RB_LEFT(parent, field) == elm) { \ - RB_ROTATE_RIGHT(head, parent, tmp, field);\ - tmp = parent; \ - parent = elm; \ - elm = tmp; \ - } \ - RB_SET_BLACKRED(parent, gparent, field); \ - RB_ROTATE_LEFT(head, gparent, tmp, field); \ - } \ - } \ - RB_COLOR(head->rbh_root, field) = RB_BLACK; \ -} \ - \ -void \ -name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, struct type *elm) \ -{ \ - struct type *tmp; \ - while ((elm == NULL || RB_COLOR(elm, field) == RB_BLACK) && \ - elm != RB_ROOT(head)) { \ - if (RB_LEFT(parent, field) == elm) { \ - tmp = RB_RIGHT(parent, field); \ - if (RB_COLOR(tmp, field) == RB_RED) { \ - RB_SET_BLACKRED(tmp, parent, field); \ - RB_ROTATE_LEFT(head, parent, tmp, field);\ - tmp = RB_RIGHT(parent, field); \ - } \ - if ((RB_LEFT(tmp, field) == NULL || \ - RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\ - (RB_RIGHT(tmp, field) == NULL || \ - RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\ - RB_COLOR(tmp, field) = RB_RED; \ - elm = parent; \ - parent = RB_PARENT(elm, field); \ - } else { \ - if (RB_RIGHT(tmp, field) == NULL || \ - RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK) {\ - struct type *oleft; \ - if ((oleft = RB_LEFT(tmp, field)) \ - != NULL) \ - RB_COLOR(oleft, field) = RB_BLACK;\ - RB_COLOR(tmp, field) = RB_RED; \ - RB_ROTATE_RIGHT(head, tmp, oleft, field);\ - tmp = RB_RIGHT(parent, field); \ - } \ - RB_COLOR(tmp, field) = RB_COLOR(parent, field);\ - RB_COLOR(parent, field) = RB_BLACK; \ - if (RB_RIGHT(tmp, field)) \ - RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK;\ - RB_ROTATE_LEFT(head, parent, tmp, field);\ - elm = RB_ROOT(head); \ - break; \ - } \ - } else { \ - tmp = RB_LEFT(parent, field); \ - if (RB_COLOR(tmp, field) == RB_RED) { \ - RB_SET_BLACKRED(tmp, parent, field); \ - RB_ROTATE_RIGHT(head, parent, tmp, field);\ - tmp = RB_LEFT(parent, field); \ - } \ - if ((RB_LEFT(tmp, field) == NULL || \ - RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) &&\ - (RB_RIGHT(tmp, field) == NULL || \ - RB_COLOR(RB_RIGHT(tmp, field), field) == RB_BLACK)) {\ - RB_COLOR(tmp, field) = RB_RED; \ - elm = parent; \ - parent = RB_PARENT(elm, field); \ - } else { \ - if (RB_LEFT(tmp, field) == NULL || \ - RB_COLOR(RB_LEFT(tmp, field), field) == RB_BLACK) {\ - struct type *oright; \ - if ((oright = RB_RIGHT(tmp, field)) \ - != NULL) \ - RB_COLOR(oright, field) = RB_BLACK;\ - RB_COLOR(tmp, field) = RB_RED; \ - RB_ROTATE_LEFT(head, tmp, oright, field);\ - tmp = RB_LEFT(parent, field); \ - } \ - RB_COLOR(tmp, field) = RB_COLOR(parent, field);\ - RB_COLOR(parent, field) = RB_BLACK; \ - if (RB_LEFT(tmp, field)) \ - RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK;\ - RB_ROTATE_RIGHT(head, parent, tmp, field);\ - elm = RB_ROOT(head); \ - break; \ - } \ - } \ - } \ - if (elm) \ - RB_COLOR(elm, field) = RB_BLACK; \ -} \ - \ -struct type * \ -name##_RB_REMOVE(struct name *head, struct type *elm) \ -{ \ - struct type *child, *parent, *old = elm; \ - int color; \ - if (RB_LEFT(elm, field) == NULL) \ - child = RB_RIGHT(elm, field); \ - else if (RB_RIGHT(elm, field) == NULL) \ - child = RB_LEFT(elm, field); \ - else { \ - struct type *left; \ - elm = RB_RIGHT(elm, field); \ - while ((left = RB_LEFT(elm, field)) != NULL) \ - elm = left; \ - child = RB_RIGHT(elm, field); \ - parent = RB_PARENT(elm, field); \ - color = RB_COLOR(elm, field); \ - if (child) \ - RB_PARENT(child, field) = parent; \ - if (parent) { \ - if (RB_LEFT(parent, field) == elm) \ - RB_LEFT(parent, field) = child; \ - else \ - RB_RIGHT(parent, field) = child; \ - RB_AUGMENT(parent); \ - } else \ - RB_ROOT(head) = child; \ - if (RB_PARENT(elm, field) == old) \ - parent = elm; \ - (elm)->field = (old)->field; \ - if (RB_PARENT(old, field)) { \ - if (RB_LEFT(RB_PARENT(old, field), field) == old)\ - RB_LEFT(RB_PARENT(old, field), field) = elm;\ - else \ - RB_RIGHT(RB_PARENT(old, field), field) = elm;\ - RB_AUGMENT(RB_PARENT(old, field)); \ - } else \ - RB_ROOT(head) = elm; \ - RB_PARENT(RB_LEFT(old, field), field) = elm; \ - if (RB_RIGHT(old, field)) \ - RB_PARENT(RB_RIGHT(old, field), field) = elm; \ - if (parent) { \ - left = parent; \ - do { \ - RB_AUGMENT(left); \ - } while ((left = RB_PARENT(left, field)) != NULL); \ - } \ - goto color; \ - } \ - parent = RB_PARENT(elm, field); \ - color = RB_COLOR(elm, field); \ - if (child) \ - RB_PARENT(child, field) = parent; \ - if (parent) { \ - if (RB_LEFT(parent, field) == elm) \ - RB_LEFT(parent, field) = child; \ - else \ - RB_RIGHT(parent, field) = child; \ - RB_AUGMENT(parent); \ - } else \ - RB_ROOT(head) = child; \ -color: \ - if (color == RB_BLACK) \ - name##_RB_REMOVE_COLOR(head, parent, child); \ - return (old); \ -} \ - \ -/* Inserts a node into the RB tree */ \ -struct type * \ -name##_RB_INSERT(struct name *head, struct type *elm) \ -{ \ - struct type *tmp; \ - struct type *parent = NULL; \ - int comp = 0; \ - tmp = RB_ROOT(head); \ - while (tmp) { \ - parent = tmp; \ - comp = (cmp)(elm, parent); \ - if (comp < 0) \ - tmp = RB_LEFT(tmp, field); \ - else if (comp > 0) \ - tmp = RB_RIGHT(tmp, field); \ - else \ - return (tmp); \ - } \ - RB_SET(elm, parent, field); \ - if (parent != NULL) { \ - if (comp < 0) \ - RB_LEFT(parent, field) = elm; \ - else \ - RB_RIGHT(parent, field) = elm; \ - RB_AUGMENT(parent); \ - } else \ - RB_ROOT(head) = elm; \ - name##_RB_INSERT_COLOR(head, elm); \ - return (NULL); \ -} \ - \ -/* Finds the node with the same key as elm */ \ -struct type * \ -name##_RB_FIND(struct name *head, struct type *elm) \ -{ \ - struct type *tmp = RB_ROOT(head); \ - int comp; \ - while (tmp) { \ - comp = cmp(elm, tmp); \ - if (comp < 0) \ - tmp = RB_LEFT(tmp, field); \ - else if (comp > 0) \ - tmp = RB_RIGHT(tmp, field); \ - else \ - return (tmp); \ - } \ - return (NULL); \ -} \ - \ -/* ARGSUSED */ \ -struct type * \ -name##_RB_NEXT(struct type *elm) \ -{ \ - if (RB_RIGHT(elm, field)) { \ - elm = RB_RIGHT(elm, field); \ - while (RB_LEFT(elm, field)) \ - elm = RB_LEFT(elm, field); \ - } else { \ - if (RB_PARENT(elm, field) && \ - (elm == RB_LEFT(RB_PARENT(elm, field), field))) \ - elm = RB_PARENT(elm, field); \ - else { \ - while (RB_PARENT(elm, field) && \ - (elm == RB_RIGHT(RB_PARENT(elm, field), field)))\ - elm = RB_PARENT(elm, field); \ - elm = RB_PARENT(elm, field); \ - } \ - } \ - return (elm); \ -} \ - \ -struct type * \ -name##_RB_MINMAX(struct name *head, int val) \ -{ \ - struct type *tmp = RB_ROOT(head); \ - struct type *parent = NULL; \ - while (tmp) { \ - parent = tmp; \ - if (val < 0) \ - tmp = RB_LEFT(tmp, field); \ - else \ - tmp = RB_RIGHT(tmp, field); \ - } \ - return (parent); \ -} - -#define RB_NEGINF -1 -#define RB_INF 1 - -#define RB_INSERT(name, x, y) name##_RB_INSERT(x, y) -#define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y) -#define RB_FIND(name, x, y) name##_RB_FIND(x, y) -#define RB_NEXT(name, x, y) name##_RB_NEXT(y) -#define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF) -#define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF) - -#define RB_FOREACH(x, name, head) \ - for ((x) = RB_MIN(name, head); \ - (x) != NULL; \ - (x) = name##_RB_NEXT(x)) - -#endif /* _SYS_TREE_H_ */ From phk at projects.linpro.no Sun Sep 17 19:57:52 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sun, 17 Sep 2006 21:57:52 +0200 (CEST) Subject: r1053 - trunk/varnish-cache/bin/varnishd Message-ID: <20060917195752.25E063BC1D9@projects.linpro.no> Author: phk Date: 2006-09-17 21:57:51 +0200 (Sun, 17 Sep 2006) New Revision: 1053 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_fetch.c trunk/varnish-cache/bin/varnishd/cache_http.c trunk/varnish-cache/bin/varnishd/cache_pass.c trunk/varnish-cache/bin/varnishd/cache_pool.c trunk/varnish-cache/bin/varnishd/shmlog.c Log: Decontest the shared memory mutex: Add a log buffer to the worker threads, log a lot of stuff to that and flush it into the "real" shmbuffer every so often. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-17 19:31:27 UTC (rev 1052) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-17 19:57:51 UTC (rev 1053) @@ -30,6 +30,9 @@ #define MAX_IOVS (HTTP_HDR_MAX * 2) +/* Amount of per-worker logspace */ +#define WLOGSPACE 8192 + struct cli; struct vsb; struct sess; @@ -115,6 +118,8 @@ struct VCL_conf *vcl; struct srcaddr *srcaddr; struct acct acct; + unsigned char wlog[WLOGSPACE]; + unsigned char *wlp, *wle; }; struct workreq { @@ -348,8 +353,8 @@ int http_RecvPrepAgain(struct http *hp); int http_RecvSome(int fd, struct http *hp); int http_RecvHead(struct http *hp, int fd); -int http_DissectRequest(struct http *sp, int fd); -int http_DissectResponse(struct http *sp, int fd); +int http_DissectRequest(struct worker *w, struct http *sp, int fd); +int http_DissectResponse(struct worker *w, struct http *sp, int fd); void http_DoConnection(struct sess *sp); #define HTTPH(a, b, c, d, e, f, g) extern char b[]; @@ -387,6 +392,9 @@ #ifdef SHMLOGHEAD_MAGIC void VSLR(enum shmlogtag tag, unsigned id, const char *b, const char *e); void VSL(enum shmlogtag tag, unsigned id, const char *fmt, ...); +void WSLR(struct worker *w, enum shmlogtag tag, unsigned id, const char *b, const char *e); +void WSL(struct worker *w, enum shmlogtag tag, unsigned id, const char *fmt, ...); +void WSL_Flush(struct worker *w); #define HERE() VSL(SLT_Debug, 0, "HERE: %s(%d)", __func__, __LINE__) #define INCOMPL() do { \ VSL(SLT_Debug, 0, "INCOMPLETE AT: %s(%d)", __func__, __LINE__); \ Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-17 19:31:27 UTC (rev 1052) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-17 19:57:51 UTC (rev 1053) @@ -144,7 +144,7 @@ dp = cnt_dt(&sp->t_req, &sp->t_resp); da = cnt_dt(&sp->t_resp, &sp->t_end); dh = cnt_dt(&sp->t_open, &sp->t_req); - VSL(SLT_ReqEnd, sp->id, "%u %ld.%09ld %ld.%09ld %.9f %.9f %.9f", + WSL(sp->wrk, SLT_ReqEnd, sp->id, "%u %ld.%09ld %ld.%09ld %.9f %.9f %.9f", sp->xid, (long)sp->t_req.tv_sec, (long)sp->t_req.tv_nsec, (long)sp->t_end.tv_sec, (long)sp->t_end.tv_nsec, @@ -438,7 +438,7 @@ /* If we encountered busy-object, disembark worker thread */ if (o == NULL) { - VSL(SLT_Debug, sp->fd, + WSL(sp->wrk, SLT_Debug, sp->fd, "on waiting list on obj %u", sp->obj->xid); SES_Charge(sp); return (1); @@ -456,10 +456,10 @@ /* Account separately for pass and cache objects */ if (sp->obj->pass) { VSL_stats->cache_hitpass++; - VSL(SLT_HitPass, sp->fd, "%u", sp->obj->xid); + WSL(sp->wrk, SLT_HitPass, sp->fd, "%u", sp->obj->xid); } else { VSL_stats->cache_hit++; - VSL(SLT_Hit, sp->fd, "%u", sp->obj->xid); + WSL(sp->wrk, SLT_Hit, sp->fd, "%u", sp->obj->xid); } sp->step = STP_HIT; return (0); @@ -652,7 +652,7 @@ clock_gettime(CLOCK_REALTIME, &sp->t_req); sp->wrk->idle = sp->t_req.tv_sec; sp->xid = ++xids; - VSL(SLT_ReqStart, sp->fd, "%s %s %u", sp->addr, sp->port, sp->xid); + WSL(sp->wrk, SLT_ReqStart, sp->fd, "%s %s %u", sp->addr, sp->port, sp->xid); AZ(sp->vcl); VCL_Refresh(&sp->wrk->vcl); @@ -663,7 +663,7 @@ AZ(sp->vbc); sp->wrk->acct.req++; - done = http_DissectRequest(sp->http, sp->fd); + done = http_DissectRequest(sp->wrk, sp->http, sp->fd); if (done != 0) { RES_Error(sp, done, NULL); sp->step = STP_DONE; @@ -743,6 +743,7 @@ if (w->nobjhead != NULL) CHECK_OBJ(w->nobjhead, OBJHEAD_MAGIC); } + WSL_Flush(w); } /* Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-17 19:31:27 UTC (rev 1052) +++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-17 19:57:51 UTC (rev 1053) @@ -317,7 +317,7 @@ i = http_RecvHead(vc->http, vc->fd); xxxassert(i == 0); - xxxassert(http_DissectResponse(vc->http, vc->fd) == 0); + xxxassert(http_DissectResponse(sp->wrk, vc->http, vc->fd) == 0); CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC); CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC); Modified: trunk/varnish-cache/bin/varnishd/cache_http.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_http.c 2006-09-17 19:31:27 UTC (rev 1052) +++ trunk/varnish-cache/bin/varnishd/cache_http.c 2006-09-17 19:57:51 UTC (rev 1053) @@ -61,6 +61,9 @@ #define VSLH(ax, bx, cx, dx) \ VSLR(T((cx), (ax)), (bx), (cx)->hd[(dx)].b, (cx)->hd[(dx)].e); +#define WSLH(wx, ax, bx, cx, dx) \ + WSLR(wx, T((cx), (ax)), (bx), (cx)->hd[(dx)].b, (cx)->hd[(dx)].e); + /*--------------------------------------------------------------------*/ void @@ -294,7 +297,7 @@ */ static int -http_dissect_hdrs(struct http *hp, int fd, char *p) +http_dissect_hdrs(struct worker *w, struct http *hp, int fd, char *p) { char *q, *r; @@ -325,11 +328,11 @@ hp->hdf[hp->nhd] = 0; hp->hd[hp->nhd].b = p; hp->hd[hp->nhd].e = q; - VSLH(HTTP_T_Header, fd, hp, hp->nhd); + WSLH(w, HTTP_T_Header, fd, hp, hp->nhd); hp->nhd++; } else { VSL_stats->losthdr++; - VSLR(T(hp, HTTP_T_LostHeader), fd, p, q); + WSLR(w, T(hp, HTTP_T_LostHeader), fd, p, q); } } assert(hp->t <= hp->v); @@ -340,7 +343,7 @@ /*--------------------------------------------------------------------*/ int -http_DissectRequest(struct http *hp, int fd) +http_DissectRequest(struct worker *w, struct http *hp, int fd) { char *p; @@ -358,23 +361,23 @@ for (; isalpha(*p); p++) ; hp->hd[HTTP_HDR_REQ].e = p; - VSLH(HTTP_T_Request, fd, hp, HTTP_HDR_REQ); + WSLH(w, HTTP_T_Request, fd, hp, HTTP_HDR_REQ); *p++ = '\0'; /* Next find the URI */ while (isspace(*p) && *p != '\n') p++; if (*p == '\n') { - VSLR(SLT_HttpGarbage, fd, hp->s, hp->v); + WSLR(w, SLT_HttpGarbage, fd, hp->s, hp->v); return (400); } hp->hd[HTTP_HDR_URL].b = p; while (!isspace(*p)) p++; hp->hd[HTTP_HDR_URL].e = p; - VSLH(HTTP_T_URL, fd, hp, HTTP_HDR_URL); + WSLH(w, HTTP_T_URL, fd, hp, HTTP_HDR_URL); if (*p == '\n') { - VSLR(SLT_HttpGarbage, fd, hp->s, hp->v); + WSLR(w, SLT_HttpGarbage, fd, hp->s, hp->v); return (400); } *p++ = '\0'; @@ -383,31 +386,31 @@ while (isspace(*p) && *p != '\n') p++; if (*p == '\n') { - VSLR(SLT_HttpGarbage, fd, hp->s, hp->v); + WSLR(w, SLT_HttpGarbage, fd, hp->s, hp->v); return (400); } hp->hd[HTTP_HDR_PROTO].b = p; while (!isspace(*p)) p++; hp->hd[HTTP_HDR_PROTO].e = p; - VSLH(HTTP_T_Protocol, fd, hp, HTTP_HDR_PROTO); + WSLH(w, HTTP_T_Protocol, fd, hp, HTTP_HDR_PROTO); if (*p != '\n') *p++ = '\0'; while (isspace(*p) && *p != '\n') p++; if (*p != '\n') { - VSLR(SLT_HttpGarbage, fd, hp->s, hp->v); + WSLR(w, SLT_HttpGarbage, fd, hp->s, hp->v); return (400); } *p++ = '\0'; - return (http_dissect_hdrs(hp, fd, p)); + return (http_dissect_hdrs(w, hp, fd, p)); } /*--------------------------------------------------------------------*/ int -http_DissectResponse(struct http *hp, int fd) +http_DissectResponse(struct worker *w, struct http *hp, int fd) { char *p, *q; @@ -425,7 +428,7 @@ while (!isspace(*p)) p++; hp->hd[HTTP_HDR_PROTO].e = p; - VSLH(HTTP_T_Protocol, fd, hp, HTTP_HDR_PROTO); + WSLH(w, HTTP_T_Protocol, fd, hp, HTTP_HDR_PROTO); *p++ = '\0'; /* Next find the status */ @@ -435,7 +438,7 @@ while (!isspace(*p)) p++; hp->hd[HTTP_HDR_STATUS].e = p; - VSLH(HTTP_T_Status, fd, hp, HTTP_HDR_STATUS); + WSLH(w, HTTP_T_Status, fd, hp, HTTP_HDR_STATUS); *p++ = '\0'; /* Next find the response */ @@ -449,10 +452,10 @@ continue; *q = '\0'; hp->hd[HTTP_HDR_RESPONSE].e = q; - VSLH(HTTP_T_Response, fd, hp, HTTP_HDR_RESPONSE); + WSLH(w, HTTP_T_Response, fd, hp, HTTP_HDR_RESPONSE); p++; - return (http_dissect_hdrs(hp, fd, p)); + return (http_dissect_hdrs(w, hp, fd, p)); } /*--------------------------------------------------------------------*/ Modified: trunk/varnish-cache/bin/varnishd/cache_pass.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-17 19:31:27 UTC (rev 1052) +++ trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-17 19:57:51 UTC (rev 1053) @@ -207,7 +207,7 @@ RES_Error(sp, 503, "Backend did not respond."); return (1); } - VSL(SLT_Backend, sp->fd, "%d %s", vc->fd, sp->backend->vcl_name); + WSL(w, SLT_Backend, sp->fd, "%d %s", vc->fd, sp->backend->vcl_name); http_CopyReq(vc->fd, vc->http, sp->http); http_FilterHeader(vc->fd, vc->http, sp->http, HTTPH_R_PASS); @@ -221,7 +221,7 @@ i = http_RecvHead(vc->http, vc->fd); xxxassert(i == 0); - http_DissectResponse(vc->http, vc->fd); + http_DissectResponse(w, vc->http, vc->fd); assert(sp->vbc == NULL); sp->vbc = vc; Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-17 19:31:27 UTC (rev 1052) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-17 19:57:51 UTC (rev 1053) @@ -182,6 +182,8 @@ memset(w, 0, sizeof *w); w->magic = WORKER_MAGIC; w->idle = time(NULL); + w->wlp = w->wlog; + w->wle = w->wlog + sizeof w->wlog; AZ(pipe(w->pipe)); VSL(SLT_WorkThread, 0, "%p start", w); Modified: trunk/varnish-cache/bin/varnishd/shmlog.c =================================================================== --- trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-17 19:31:27 UTC (rev 1052) +++ trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-17 19:57:51 UTC (rev 1053) @@ -52,6 +52,8 @@ logstart[loghead->ptr] = SLT_WRAPMARKER; loghead->ptr = 0; } + +/*--------------------------------------------------------------------*/ void VSLR(enum shmlogtag tag, unsigned id, const char *b, const char *e) @@ -92,6 +94,7 @@ p[0] = tag; } +/*--------------------------------------------------------------------*/ void VSL(enum shmlogtag tag, unsigned id, const char *fmt, ...) @@ -112,7 +115,7 @@ assert(loghead->ptr < loghead->size); /* Wrap if we cannot fit a full size record */ - if (loghead->ptr + 5 + 255 + 1 > loghead->size) + if (loghead->ptr + 5 + 255 + 1 >= loghead->size) vsl_wrap(); p = logstart + loghead->ptr; @@ -137,7 +140,113 @@ va_end(ap); } + +/*--------------------------------------------------------------------*/ + void +WSL_Flush(struct worker *w) +{ + unsigned char *p; + unsigned l; + + if (w->wlp == w->wlog) + return; + l = w->wlp - w->wlog; + LOCKSHM(&vsl_mtx); + if (loghead->ptr + l + 1 >= loghead->size) + vsl_wrap(); + p = logstart + loghead->ptr; + memcpy(p + 1, w->wlog + 1, l - 1); + p[l] = SLT_ENDMARKER; + loghead->ptr += l; + assert(loghead->ptr < loghead->size); + p[0] = w->wlog[0]; + UNLOCKSHM(&vsl_mtx); + w->wlp = w->wlog; +} + +/*--------------------------------------------------------------------*/ + +void +WSLR(struct worker *w, enum shmlogtag tag, unsigned id, const char *b, const char *e) +{ + unsigned char *p; + unsigned l; + + assert(b != NULL); + if (e == NULL) + e = strchr(b, '\0'); + + /* Truncate */ + l = e - b; + if (l > 255) { + l = 255; + e = b + l; + } + + assert(w->wlp < w->wle); + + /* Wrap if necessary */ + if (w->wlp + 5 + l + 1 >= w->wle) + WSL_Flush(w); + p = w->wlp; + w->wlp += 5 + l; + assert(w->wlp < w->wle); + p[5 + l] = SLT_ENDMARKER; + + p[1] = l & 0xff; + p[2] = (id >> 8) & 0xff; + p[3] = id & 0xff; + memcpy(p + 4, b, l); + p[4 + l] = '\0'; + p[0] = tag; +} + +/*--------------------------------------------------------------------*/ + +void +WSL(struct worker *w, enum shmlogtag tag, unsigned id, const char *fmt, ...) +{ + va_list ap; + unsigned char *p; + unsigned n; + + va_start(ap, fmt); + + p = strchr(fmt, '%'); + if (p == NULL) { + WSLR(w, tag, id, fmt, NULL); + return; + } + + assert(w->wlp < w->wle); + + /* Wrap if we cannot fit a full size record */ + if (w->wlp + 5 + 255 + 1 >= w->wle) + WSL_Flush(w); + + p = w->wlp; + n = 0; + if (fmt != NULL) { + n = vsnprintf((char *)(p + 4), 256, fmt, ap); + if (n > 255) + n = 255; /* we truncate long fields */ + } + p[1] = n & 0xff; + p[2] = (id >> 8) & 0xff; + p[3] = id & 0xff; + p[4 + n] = '\0';; + p[5 + n] = SLT_ENDMARKER; + p[0] = tag; + + w->wlp += 5 + n; + assert(w->wlp < w->wle); + va_end(ap); +} + +/*--------------------------------------------------------------------*/ + +void VSL_Init(void) { From phk at projects.linpro.no Sun Sep 17 20:26:36 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sun, 17 Sep 2006 22:26:36 +0200 (CEST) Subject: r1054 - in trunk/varnish-cache: bin/varnishd include Message-ID: <20060917202636.3C1293BC1D9@projects.linpro.no> Author: phk Date: 2006-09-17 22:26:35 +0200 (Sun, 17 Sep 2006) New Revision: 1054 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_fetch.c trunk/varnish-cache/bin/varnishd/cache_http.c trunk/varnish-cache/bin/varnishd/cache_pass.c trunk/varnish-cache/bin/varnishd/cache_pipe.c trunk/varnish-cache/bin/varnishd/cache_response.c trunk/varnish-cache/bin/varnishd/cache_session.c trunk/varnish-cache/bin/varnishd/cache_vcl.c trunk/varnish-cache/bin/varnishd/cache_vrt.c trunk/varnish-cache/bin/varnishd/shmlog.c trunk/varnish-cache/include/stat_field.h Log: Use workerthres log buffer much more extensively Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-17 19:57:51 UTC (rev 1053) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-17 20:26:35 UTC (rev 1054) @@ -120,6 +120,7 @@ struct acct acct; unsigned char wlog[WLOGSPACE]; unsigned char *wlp, *wle; + unsigned wlr; }; struct workreq { @@ -334,13 +335,13 @@ void http_ClrHeader(struct http *to); void http_CopyHttp(struct http *to, struct http *fm); unsigned http_Write(struct worker *w, struct http *hp, int resp); -void http_GetReq(int fd, struct http *to, struct http *fm); -void http_CopyReq(int fd, struct http *to, struct http *fm); -void http_CopyResp(int fd, struct http *to, struct http *fm); -void http_SetResp(int fd, struct http *to, const char *proto, const char *status, const char *response); -void http_FilterHeader(int fd, struct http *to, struct http *fm, unsigned how); -void http_PrintfHeader(int fd, struct http *to, const char *fmt, ...); -void http_SetHeader(int fd, struct http *to, const char *hdr); +void http_GetReq(struct worker *w, int fd, struct http *to, struct http *fm); +void http_CopyReq(struct worker *w, int fd, struct http *to, struct http *fm); +void http_CopyResp(struct worker *w, int fd, struct http *to, struct http *fm); +void http_SetResp(struct worker *w, int fd, struct http *to, const char *proto, const char *status, const char *response); +void http_FilterHeader(struct worker *w, int fd, struct http *to, struct http *fm, unsigned how); +void http_PrintfHeader(struct worker *w, int fd, struct http *to, const char *fmt, ...); +void http_SetHeader(struct worker *w, int fd, struct http *to, const char *hdr); int http_IsHdr(struct http_hdr *hh, char *hdr); void http_Setup(struct http *ht, void *space, unsigned len); int http_GetHdr(struct http *hp, const char *hdr, char **ptr); Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-17 19:57:51 UTC (rev 1053) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-17 20:26:35 UTC (rev 1054) @@ -156,6 +156,7 @@ if (sp->fd < 0) { VSL_stats->sess_closed++; sp->wrk->idle = sp->t_open.tv_sec; + sp->wrk = NULL; vca_return_session(sp); return (1); } @@ -172,6 +173,7 @@ } VSL_stats->sess_herd++; sp->wrk->idle = sp->t_open.tv_sec; + sp->wrk = NULL; vca_return_session(sp); return (1); } Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-17 19:57:51 UTC (rev 1053) +++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-17 20:26:35 UTC (rev 1054) @@ -233,8 +233,8 @@ hp = vc->http2; http_ClrHeader(hp); hp->logtag = HTTP_Obj; - http_CopyResp(sp->fd, hp, vc->http); - http_FilterHeader(sp->fd, hp, vc->http, HTTPH_A_INS); + http_CopyResp(sp->wrk, sp->fd, hp, vc->http); + http_FilterHeader(sp->wrk, sp->fd, hp, vc->http, HTTPH_A_INS); if (body) { if (http_GetHdr(vc->http, H_Content_Length, &b)) @@ -243,7 +243,7 @@ cls = fetch_chunked(sp, vc->fd, vc->http); else cls = fetch_eof(sp, vc->fd, vc->http); - http_PrintfHeader(sp->fd, hp, + http_PrintfHeader(sp->wrk, sp->fd, hp, "Content-Length: %u", sp->obj->len); } else cls = 0; @@ -294,15 +294,15 @@ if (vc == NULL) vc = VBE_GetFd(sp->backend, sp->xid); XXXAN(vc); - VSL(SLT_Backend, sp->fd, "%d %s", vc->fd, sp->backend->vcl_name); + WSL(w, SLT_Backend, sp->fd, "%d %s", vc->fd, sp->backend->vcl_name); http_ClrHeader(vc->http); vc->http->logtag = HTTP_Tx; - http_GetReq(vc->fd, vc->http, sp->http); - http_FilterHeader(vc->fd, vc->http, sp->http, HTTPH_R_FETCH); - http_PrintfHeader(vc->fd, vc->http, "X-Varnish: %u", sp->xid); + http_GetReq(w, vc->fd, vc->http, sp->http); + http_FilterHeader(w, vc->fd, vc->http, sp->http, HTTPH_R_FETCH); + http_PrintfHeader(w, vc->fd, vc->http, "X-Varnish: %u", sp->xid); if (!http_GetHdr(vc->http, H_Host, &b)) { - http_PrintfHeader(vc->fd, vc->http, "Host: %s", + http_PrintfHeader(w, vc->fd, vc->http, "Host: %s", sp->backend->hostname); } Modified: trunk/varnish-cache/bin/varnishd/cache_http.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_http.c 2006-09-17 19:57:51 UTC (rev 1053) +++ trunk/varnish-cache/bin/varnishd/cache_http.c 2006-09-17 20:26:35 UTC (rev 1054) @@ -625,7 +625,7 @@ /*--------------------------------------------------------------------*/ static void -http_seth(int fd, struct http *to, unsigned n, enum httptag tag, const char *fm) +http_seth(struct worker *w, int fd, struct http *to, unsigned n, enum httptag tag, const char *fm) { assert(n < HTTP_HDR_MAX); @@ -633,11 +633,11 @@ to->hd[n].b = (void*)(uintptr_t)fm; to->hd[n].e = (void*)(uintptr_t)strchr(fm, '\0'); to->hdf[n] = 0; - VSLH(tag, fd, to, n); + WSLH(w, tag, fd, to, n); } static void -http_copyh(int fd, struct http *to, struct http *fm, unsigned n, enum httptag tag) +http_copyh(struct worker *w, int fd, struct http *to, struct http *fm, unsigned n, enum httptag tag) { assert(n < HTTP_HDR_MAX); @@ -645,54 +645,54 @@ to->hd[n].b = fm->hd[n].b; to->hd[n].e = fm->hd[n].e; to->hdf[n] = fm->hdf[n]; - VSLH(tag, fd, to, n); + WSLH(w, tag, fd, to, n); } void -http_GetReq(int fd, struct http *to, struct http *fm) +http_GetReq(struct worker *w, int fd, struct http *to, struct http *fm) { CHECK_OBJ_NOTNULL(fm, HTTP_MAGIC); CHECK_OBJ_NOTNULL(to, HTTP_MAGIC); - http_seth(fd, to, HTTP_HDR_REQ, HTTP_T_Request, "GET"); - http_copyh(fd, to, fm, HTTP_HDR_URL, HTTP_T_URL); - http_seth(fd, to, HTTP_HDR_PROTO, HTTP_T_Protocol, "HTTP/1.1"); + http_seth(w, fd, to, HTTP_HDR_REQ, HTTP_T_Request, "GET"); + http_copyh(w, fd, to, fm, HTTP_HDR_URL, HTTP_T_URL); + http_seth(w, fd, to, HTTP_HDR_PROTO, HTTP_T_Protocol, "HTTP/1.1"); } void -http_CopyReq(int fd, struct http *to, struct http *fm) +http_CopyReq(struct worker *w, int fd, struct http *to, struct http *fm) { CHECK_OBJ_NOTNULL(fm, HTTP_MAGIC); CHECK_OBJ_NOTNULL(to, HTTP_MAGIC); - http_copyh(fd, to, fm, HTTP_HDR_REQ, HTTP_T_Request); - http_copyh(fd, to, fm, HTTP_HDR_URL, HTTP_T_URL); - http_copyh(fd, to, fm, HTTP_HDR_PROTO, HTTP_T_Protocol); + http_copyh(w, fd, to, fm, HTTP_HDR_REQ, HTTP_T_Request); + http_copyh(w, fd, to, fm, HTTP_HDR_URL, HTTP_T_URL); + http_copyh(w, fd, to, fm, HTTP_HDR_PROTO, HTTP_T_Protocol); } void -http_CopyResp(int fd, struct http *to, struct http *fm) +http_CopyResp(struct worker *w, int fd, struct http *to, struct http *fm) { CHECK_OBJ_NOTNULL(fm, HTTP_MAGIC); CHECK_OBJ_NOTNULL(to, HTTP_MAGIC); - http_copyh(fd, to, fm, HTTP_HDR_PROTO, HTTP_T_Protocol); - http_copyh(fd, to, fm, HTTP_HDR_STATUS, HTTP_T_Status); - http_copyh(fd, to, fm, HTTP_HDR_RESPONSE, HTTP_T_Response); + http_copyh(w, fd, to, fm, HTTP_HDR_PROTO, HTTP_T_Protocol); + http_copyh(w, fd, to, fm, HTTP_HDR_STATUS, HTTP_T_Status); + http_copyh(w, fd, to, fm, HTTP_HDR_RESPONSE, HTTP_T_Response); } void -http_SetResp(int fd, struct http *to, const char *proto, const char *status, const char *response) +http_SetResp(struct worker *w, int fd, struct http *to, const char *proto, const char *status, const char *response) { CHECK_OBJ_NOTNULL(to, HTTP_MAGIC); - http_seth(fd, to, HTTP_HDR_PROTO, HTTP_T_Protocol, proto); - http_seth(fd, to, HTTP_HDR_STATUS, HTTP_T_Status, status); - http_seth(fd, to, HTTP_HDR_RESPONSE, HTTP_T_Response, response); + http_seth(w, fd, to, HTTP_HDR_PROTO, HTTP_T_Protocol, proto); + http_seth(w, fd, to, HTTP_HDR_STATUS, HTTP_T_Status, status); + http_seth(w, fd, to, HTTP_HDR_RESPONSE, HTTP_T_Response, response); } static void -http_copyheader(int fd, struct http *to, struct http *fm, unsigned n) +http_copyheader(struct worker *w, int fd, struct http *to, struct http *fm, unsigned n) { CHECK_OBJ_NOTNULL(fm, HTTP_MAGIC); @@ -702,18 +702,18 @@ if (to->nhd < HTTP_HDR_MAX) { to->hd[to->nhd].b = fm->hd[n].b; to->hd[to->nhd].e = fm->hd[n].e; - VSLH(HTTP_T_Header, fd, to, to->nhd); + WSLH(w, HTTP_T_Header, fd, to, to->nhd); to->nhd++; } else { VSL_stats->losthdr++; - VSLH(HTTP_T_LostHeader, fd, fm, n); + WSLH(w, HTTP_T_LostHeader, fd, fm, n); } } /*--------------------------------------------------------------------*/ void -http_FilterHeader(int fd, struct http *to, struct http *fm, unsigned how) +http_FilterHeader(struct worker *w, int fd, struct http *to, struct http *fm, unsigned how) { unsigned u; @@ -728,7 +728,7 @@ continue; #include "http_headers.h" #undef HTTPH - http_copyheader(fd, to, fm, u); + http_copyheader(w, fd, to, fm, u); } } @@ -747,22 +747,22 @@ /*--------------------------------------------------------------------*/ void -http_SetHeader(int fd, struct http *to, const char *hdr) +http_SetHeader(struct worker *w, int fd, struct http *to, const char *hdr) { CHECK_OBJ_NOTNULL(to, HTTP_MAGIC); if (to->nhd >= HTTP_HDR_MAX) { VSL_stats->losthdr++; - VSL(T(to, HTTP_T_LostHeader), fd, "%s", hdr); + WSL(w, T(to, HTTP_T_LostHeader), fd, "%s", hdr); return; } - http_seth(fd, to, to->nhd++, HTTP_T_Header, hdr); + http_seth(w, fd, to, to->nhd++, HTTP_T_Header, hdr); } /*--------------------------------------------------------------------*/ void -http_PrintfHeader(int fd, struct http *to, const char *fmt, ...) +http_PrintfHeader(struct worker *w, int fd, struct http *to, const char *fmt, ...) { va_list ap; unsigned l, n; @@ -773,13 +773,13 @@ n = vsnprintf(to->f, l, fmt, ap); if (n + 1 > l || to->nhd >= HTTP_HDR_MAX) { VSL_stats->losthdr++; - VSL(T(to, HTTP_T_LostHeader), fd, "%s", to->f); + WSL(w, T(to, HTTP_T_LostHeader), fd, "%s", to->f); } else { assert(to->f < to->e); to->hd[to->nhd].b = to->f; to->hd[to->nhd].e = to->f + n; to->f += n + 1; - VSLH(HTTP_T_Header, fd, to, to->nhd); + WSLH(w, HTTP_T_Header, fd, to, to->nhd); to->nhd++; } va_end(ap); Modified: trunk/varnish-cache/bin/varnishd/cache_pass.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-17 19:57:51 UTC (rev 1053) +++ trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-17 20:26:35 UTC (rev 1054) @@ -157,12 +157,12 @@ clock_gettime(CLOCK_REALTIME, &sp->t_resp); http_ClrHeader(sp->http); - http_CopyResp(sp->fd, sp->http, vc->http); - http_FilterHeader(sp->fd, sp->http, vc->http, HTTPH_A_PASS); - http_PrintfHeader(sp->fd, sp->http, "X-Varnish: %u", sp->xid); + http_CopyResp(sp->wrk, sp->fd, sp->http, vc->http); + http_FilterHeader(sp->wrk, sp->fd, sp->http, vc->http, HTTPH_A_PASS); + http_PrintfHeader(sp->wrk, sp->fd, sp->http, "X-Varnish: %u", sp->xid); /* XXX */ if (http_HdrIs(vc->http, H_Transfer_Encoding, "chunked")) - http_PrintfHeader(sp->fd, sp->http, "Transfer-Encoding: chunked"); + http_PrintfHeader(sp->wrk, sp->fd, sp->http, "Transfer-Encoding: chunked"); WRK_Reset(sp->wrk, &sp->fd); sp->wrk->acct.hdrbytes += http_Write(sp->wrk, sp->http, 1); @@ -209,9 +209,9 @@ } WSL(w, SLT_Backend, sp->fd, "%d %s", vc->fd, sp->backend->vcl_name); - http_CopyReq(vc->fd, vc->http, sp->http); - http_FilterHeader(vc->fd, vc->http, sp->http, HTTPH_R_PASS); - http_PrintfHeader(vc->fd, vc->http, "X-Varnish: %u", sp->xid); + http_CopyReq(w, vc->fd, vc->http, sp->http); + http_FilterHeader(w, vc->fd, vc->http, sp->http, HTTPH_R_PASS); + http_PrintfHeader(w, vc->fd, vc->http, "X-Varnish: %u", sp->xid); WRK_Reset(w, &vc->fd); http_Write(w, vc->http, 0); i = WRK_Flush(w); Modified: trunk/varnish-cache/bin/varnishd/cache_pipe.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-09-17 19:57:51 UTC (rev 1053) +++ trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-09-17 20:26:35 UTC (rev 1054) @@ -61,9 +61,9 @@ VSL(SLT_Backend, sp->fd, "%d %s", vc->fd, sp->backend->vcl_name); vc->http->logtag = HTTP_Tx; - http_CopyReq(vc->fd, vc->http, sp->http); - http_FilterHeader(vc->fd, vc->http, sp->http, HTTPH_R_PIPE); - http_PrintfHeader(vc->fd, vc->http, "X-Varnish: %u", sp->xid); + http_CopyReq(w, vc->fd, vc->http, sp->http); + http_FilterHeader(w, vc->fd, vc->http, sp->http, HTTPH_R_PIPE); + http_PrintfHeader(w, vc->fd, vc->http, "X-Varnish: %u", sp->xid); WRK_Reset(w, &vc->fd); http_Write(w, vc->http, 0); Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-17 19:57:51 UTC (rev 1053) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-17 20:26:35 UTC (rev 1054) @@ -129,9 +129,9 @@ WRK_Reset(sp->wrk, &sp->fd); sp->wrk->acct.hdrbytes += WRK_Write(sp->wrk, vsb_data(sb), vsb_len(sb)); WRK_Flush(sp->wrk); - VSL(SLT_TxStatus, sp->id, "%d", code); - VSL(SLT_TxProtocol, sp->id, "HTTP/1.1"); - VSL(SLT_TxResponse, sp->id, msg); + WSL(sp->wrk, SLT_TxStatus, sp->id, "%d", code); + WSL(sp->wrk, SLT_TxProtocol, sp->id, "HTTP/1.1"); + WSL(sp->wrk, SLT_TxResponse, sp->id, msg); vca_close_session(sp, expl); vsb_delete(sb); } @@ -144,19 +144,19 @@ { char lm[64]; - VSL(SLT_Length, sp->fd, "%u", 0); + WSL(sp->wrk, SLT_Length, sp->fd, "%u", 0); http_ClrHeader(sp->http); sp->http->logtag = HTTP_Tx; - http_SetResp(sp->fd, sp->http, "HTTP/1.1", "304", "Not Modified"); + http_SetResp(sp->wrk, sp->fd, sp->http, "HTTP/1.1", "304", "Not Modified"); TIM_format(sp->t_req.tv_sec, lm); - http_PrintfHeader(sp->fd, sp->http, "Date: %s", lm); - http_SetHeader(sp->fd, sp->http, "Via: 1.1 varnish"); - http_PrintfHeader(sp->fd, sp->http, "X-Varnish: %u", sp->xid); + http_PrintfHeader(sp->wrk, sp->fd, sp->http, "Date: %s", lm); + http_SetHeader(sp->wrk, sp->fd, sp->http, "Via: 1.1 varnish"); + http_PrintfHeader(sp->wrk, sp->fd, sp->http, "X-Varnish: %u", sp->xid); TIM_format(sp->obj->last_modified, lm); - http_PrintfHeader(sp->fd, sp->http, "Last-Modified: %s", lm); + http_PrintfHeader(sp->wrk, sp->fd, sp->http, "Last-Modified: %s", lm); if (sp->doclose != NULL) - http_SetHeader(sp->fd, sp->http, "Connection: close"); + http_SetHeader(sp->wrk, sp->fd, sp->http, "Connection: close"); WRK_Reset(sp->wrk, &sp->fd); sp->wrk->acct.hdrbytes += http_Write(sp->wrk, sp->http, 1); if (WRK_Flush(sp->wrk)) @@ -199,22 +199,22 @@ if (sp->obj->response == 200 && sp->http->conds && res_do_conds(sp)) return; - VSL(SLT_Length, sp->fd, "%u", sp->obj->len); + WSL(sp->wrk, SLT_Length, sp->fd, "%u", sp->obj->len); http_ClrHeader(sp->http); sp->http->logtag = HTTP_Tx; - http_CopyResp(sp->fd, sp->http, &sp->obj->http); - http_FilterHeader(sp->fd, sp->http, &sp->obj->http, HTTPH_A_DELIVER); + http_CopyResp(sp->wrk, sp->fd, sp->http, &sp->obj->http); + http_FilterHeader(sp->wrk, sp->fd, sp->http, &sp->obj->http, HTTPH_A_DELIVER); if (sp->xid != sp->obj->xid) - http_PrintfHeader(sp->fd, sp->http, + http_PrintfHeader(sp->wrk, sp->fd, sp->http, "X-Varnish: %u %u", sp->xid, sp->obj->xid); else - http_PrintfHeader(sp->fd, sp->http, "X-Varnish: %u", sp->xid); - http_PrintfHeader(sp->fd, sp->http, "Age: %u", + http_PrintfHeader(sp->wrk, sp->fd, sp->http, "X-Varnish: %u", sp->xid); + http_PrintfHeader(sp->wrk, sp->fd, sp->http, "Age: %u", sp->obj->age + sp->t_req.tv_sec - sp->obj->entered); - http_SetHeader(sp->fd, sp->http, "Via: 1.1 varnish"); + http_SetHeader(sp->wrk, sp->fd, sp->http, "Via: 1.1 varnish"); if (sp->doclose != NULL) - http_SetHeader(sp->fd, sp->http, "Connection: close"); + http_SetHeader(sp->wrk, sp->fd, sp->http, "Connection: close"); WRK_Reset(sp->wrk, &sp->fd); sp->wrk->acct.hdrbytes += http_Write(sp->wrk, sp->http, 1); CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); Modified: trunk/varnish-cache/bin/varnishd/cache_session.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-17 19:57:51 UTC (rev 1053) +++ trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-17 20:26:35 UTC (rev 1054) @@ -205,7 +205,8 @@ ses_sum_acct(&sp->srcaddr->acct, a); b = sp->srcaddr->acct; UNLOCK(&sp->srcaddr->sah->mtx); - VSL(SLT_StatAddr, 0, "%s 0 %d %ju %ju %ju %ju %ju %ju %ju", + WSL(sp->wrk, SLT_StatAddr, 0, + "%s 0 %d %ju %ju %ju %ju %ju %ju %ju", sp->srcaddr->addr, sp->t_end.tv_sec - b.first, b.sess, b.req, b.pipe, b.pass, b.fetch, b.hdrbytes, b.bodybytes); Modified: trunk/varnish-cache/bin/varnishd/cache_vcl.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vcl.c 2006-09-17 19:57:51 UTC (rev 1053) +++ trunk/varnish-cache/bin/varnishd/cache_vcl.c 2006-09-17 20:26:35 UTC (rev 1054) @@ -278,9 +278,9 @@ { \ \ sp->handling = 0; \ - VSL(SLT_VCL_call, sp->fd, "%s", #func); \ + WSL(sp->wrk, SLT_VCL_call, sp->fd, "%s", #func); \ sp->vcl->func##_func(sp); \ - VSL(SLT_VCL_return, sp->fd, "%s", \ + WSL(sp->wrk, SLT_VCL_return, sp->fd, "%s", \ vcl_handlingname(sp->handling)); \ assert(sp->handling & bitmap); \ assert(!(sp->handling & ~bitmap)); \ Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt.c 2006-09-17 19:57:51 UTC (rev 1053) +++ trunk/varnish-cache/bin/varnishd/cache_vrt.c 2006-09-17 20:26:35 UTC (rev 1054) @@ -23,7 +23,7 @@ { CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); - VSL(SLT_Debug, 0, "VCL_error(%u, %s)", code, expl); + WSL(sp->wrk, SLT_Debug, 0, "VCL_error(%u, %s)", code, expl); sp->err_code = code; sp->err_expl = expl; } @@ -36,7 +36,7 @@ CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); if (params->vcl_trace) - VSL(SLT_VCL_trace, sp->fd, "%u %d.%d", u, + WSL(sp->wrk, SLT_VCL_trace, sp->fd, "%u %d.%d", u, sp->vcl->ref[u].line, sp->vcl->ref[u].pos); } @@ -150,7 +150,7 @@ CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC); /* XXX */ - VSL(SLT_TTL, sp->fd, "%u VCL %.0f %u", + WSL(sp->wrk, SLT_TTL, sp->fd, "%u VCL %.0f %u", sp->obj->xid, a, sp->t_req.tv_sec); if (a < 0) a = 0; Modified: trunk/varnish-cache/bin/varnishd/shmlog.c =================================================================== --- trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-17 19:57:51 UTC (rev 1053) +++ trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-17 20:26:35 UTC (rev 1054) @@ -74,6 +74,8 @@ /* Only hold the lock while we find our space */ LOCKSHM(&vsl_mtx); + VSL_stats->shm_writes++; + VSL_stats->shm_records++; assert(loghead->ptr < loghead->size); /* Wrap if necessary */ @@ -112,6 +114,8 @@ } LOCKSHM(&vsl_mtx); + VSL_stats->shm_writes++; + VSL_stats->shm_records++; assert(loghead->ptr < loghead->size); /* Wrap if we cannot fit a full size record */ @@ -153,6 +157,8 @@ return; l = w->wlp - w->wlog; LOCKSHM(&vsl_mtx); + VSL_stats->shm_writes++; + VSL_stats->shm_records += w->wlr; if (loghead->ptr + l + 1 >= loghead->size) vsl_wrap(); p = logstart + loghead->ptr; @@ -163,6 +169,7 @@ p[0] = w->wlog[0]; UNLOCKSHM(&vsl_mtx); w->wlp = w->wlog; + w->wlr = 0; } /*--------------------------------------------------------------------*/ @@ -200,6 +207,7 @@ memcpy(p + 4, b, l); p[4 + l] = '\0'; p[0] = tag; + w->wlr++; } /*--------------------------------------------------------------------*/ @@ -241,6 +249,7 @@ w->wlp += 5 + n; assert(w->wlp < w->wle); + w->wlr++; va_end(ap); } Modified: trunk/varnish-cache/include/stat_field.h =================================================================== --- trunk/varnish-cache/include/stat_field.h 2006-09-17 19:57:51 UTC (rev 1053) +++ trunk/varnish-cache/include/stat_field.h 2006-09-17 20:26:35 UTC (rev 1054) @@ -49,4 +49,6 @@ MAC_STAT(sess_readahead, uint64_t, "u", "Session Read Ahead") MAC_STAT(sess_herd, uint64_t, "u", "Session herd") +MAC_STAT(shm_records, uint64_t, "u", "SHM records") +MAC_STAT(shm_writes, uint64_t, "u", "SHM writes") MAC_STAT(shm_cont, uint64_t, "u", "SHM MTX contention") From phk at projects.linpro.no Sun Sep 17 21:48:04 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sun, 17 Sep 2006 23:48:04 +0200 (CEST) Subject: r1055 - trunk/varnish-cache/bin/varnishd Message-ID: <20060917214804.90CD51EC04D@projects.linpro.no> Author: phk Date: 2006-09-17 23:48:04 +0200 (Sun, 17 Sep 2006) New Revision: 1055 Modified: trunk/varnish-cache/bin/varnishd/cache_vcl.c Log: Revert these two for now. The expiry thread doesn't have a worker structure. Modified: trunk/varnish-cache/bin/varnishd/cache_vcl.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vcl.c 2006-09-17 20:26:35 UTC (rev 1054) +++ trunk/varnish-cache/bin/varnishd/cache_vcl.c 2006-09-17 21:48:04 UTC (rev 1055) @@ -278,9 +278,9 @@ { \ \ sp->handling = 0; \ - WSL(sp->wrk, SLT_VCL_call, sp->fd, "%s", #func); \ + VSL(SLT_VCL_call, sp->fd, "%s", #func); \ sp->vcl->func##_func(sp); \ - WSL(sp->wrk, SLT_VCL_return, sp->fd, "%s", \ + VSL(SLT_VCL_return, sp->fd, "%s", \ vcl_handlingname(sp->handling)); \ assert(sp->handling & bitmap); \ assert(!(sp->handling & ~bitmap)); \ From phk at projects.linpro.no Mon Sep 18 06:26:56 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 08:26:56 +0200 (CEST) Subject: r1056 - trunk/varnish-cache/bin/varnishd Message-ID: <20060918062656.C27471EC370@projects.linpro.no> Author: phk Date: 2006-09-18 08:26:56 +0200 (Mon, 18 Sep 2006) New Revision: 1056 Modified: trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_response.c Log: Minor cleanups Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-17 21:48:04 UTC (rev 1055) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-18 06:26:56 UTC (rev 1056) @@ -654,7 +654,8 @@ clock_gettime(CLOCK_REALTIME, &sp->t_req); sp->wrk->idle = sp->t_req.tv_sec; sp->xid = ++xids; - WSL(sp->wrk, SLT_ReqStart, sp->fd, "%s %s %u", sp->addr, sp->port, sp->xid); + WSL(sp->wrk, SLT_ReqStart, sp->fd, + "%s %s %u", sp->addr, sp->port, sp->xid); AZ(sp->vcl); VCL_Refresh(&sp->wrk->vcl); Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-17 21:48:04 UTC (rev 1055) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-18 06:26:56 UTC (rev 1056) @@ -17,6 +17,7 @@ static struct http_msg { unsigned nbr; const char *txt; + const char *expl; } http_msg[] = { { 101, "Switching Protocols" }, { 200, "OK" }, @@ -71,36 +72,30 @@ struct http_msg *mp; const char *msg; + assert(code >= 100 && code <= 999); CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); clock_gettime(CLOCK_REALTIME, &sp->t_resp); msg = "Unknown error"; - for (mp = http_msg; mp->nbr != 0 && mp->nbr <= code; mp++) - if (mp->nbr == code) { - msg = mp->txt; + for (mp = http_msg; mp->nbr != 0 && mp->nbr <= code; mp++) { + if (mp->nbr < code) + continue; + if (mp->nbr > code) break; - } + msg = mp->txt; + if (expl == NULL) + expl = mp->expl; + break; + } + if (expl == NULL) + expl = msg; + AN(expl); + AN(msg); sb = vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND); XXXAN(sb); - assert(code >= 100 && code <= 999); - if (msg == NULL) { - switch (code) { - case 400: msg = "Bad Request"; break; - case 500: msg = "Internal Error"; break; - default: msg = "HTTP request error"; break; - } - } - if (expl == NULL) { - switch (code) { - case 400: expl = "Your HTTP protocol request did not make sense."; break; - case 404: expl = "The document you requested was not found."; break; - default: expl = "Something unexpected happened."; break; - } - } - vsb_clear(sb); vsb_printf(sb, "HTTP/1.1 %03d %s\r\n", code, msg); TIM_format(sp->t_req.tv_sec, buf); From phk at projects.linpro.no Mon Sep 18 06:41:57 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 08:41:57 +0200 (CEST) Subject: r1057 - trunk/varnish-cache/bin/varnishd Message-ID: <20060918064157.468B31EC370@projects.linpro.no> Author: phk Date: 2006-09-18 08:41:57 +0200 (Mon, 18 Sep 2006) New Revision: 1057 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_backend.c trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_fetch.c trunk/varnish-cache/bin/varnishd/cache_pass.c trunk/varnish-cache/bin/varnishd/cache_pipe.c trunk/varnish-cache/bin/varnishd/cache_response.c Log: Unify backend error handling Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-18 06:26:56 UTC (rev 1056) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-18 06:41:57 UTC (rev 1057) @@ -297,7 +297,7 @@ /* cache_backend.c */ void VBE_Init(void); -struct vbe_conn *VBE_GetFd(struct backend *bp, unsigned xid); +struct vbe_conn *VBE_GetFd(struct sess *sp); void VBE_ClosedFd(struct vbe_conn *vc, int already); void VBE_RecycleFd(struct vbe_conn *vc); @@ -367,7 +367,7 @@ void PassBody(struct sess *sp); /* cache_pipe.c */ -void PipeSession(struct sess *sp); +int PipeSession(struct sess *sp); /* cache_pool.c */ void WRK_Init(void); Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-09-18 06:26:56 UTC (rev 1056) +++ trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-09-18 06:41:57 UTC (rev 1057) @@ -175,12 +175,15 @@ * new connection. */ -struct vbe_conn * -VBE_GetFd(struct backend *bp, unsigned xid) +static struct vbe_conn * +vbe_nextfd(struct sess *sp) { struct vbe_conn *vc, *vc2; struct pollfd pfd; + struct backend *bp; + CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); + bp = sp->backend; CHECK_OBJ_NOTNULL(bp, BACKEND_MAGIC); while (1) { /* @@ -245,12 +248,29 @@ if (vc != NULL ) { assert(vc->fd >= 0); VSL_stats->backend_conn++; - VSL(SLT_BackendXID, vc->fd, "%u", xid); + WSL(sp->wrk, SLT_BackendXID, vc->fd, "%u", sp->xid); AN(vc->backend); } return (vc); } +/*--------------------------------------------------------------------*/ + +struct vbe_conn * +VBE_GetFd(struct sess *sp) +{ + struct vbe_conn *vc; + + vc = vbe_nextfd(sp); + if (vc != NULL) { + WSL(sp->wrk, SLT_Backend, sp->fd, "%d %s", vc->fd, + sp->backend->vcl_name); + return (vc); + } + RES_Error(sp, 503, "Backend did not respond."); + return (NULL); +} + /* Close a connection ------------------------------------------------*/ void Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-18 06:26:56 UTC (rev 1056) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-18 06:41:57 UTC (rev 1057) @@ -530,7 +530,14 @@ INCOMPL(); if (sp->handling == VCL_RET_FETCH) { AZ(sp->vbc); - FetchHeaders(sp); + if (FetchHeaders(sp)) { + sp->obj->cacheable = 0; + HSH_Unbusy(sp->obj); + HSH_Deref(sp->obj); + sp->obj = NULL; + sp->step = STP_DONE; + return (0); + } sp->step = STP_FETCH; AN(sp->vbc); return (0); @@ -613,7 +620,7 @@ { sp->wrk->acct.pipe++; - PipeSession(sp); + (void)PipeSession(sp); sp->step = STP_DONE; return (0); } Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-18 06:26:56 UTC (rev 1056) +++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-18 06:41:57 UTC (rev 1057) @@ -290,11 +290,9 @@ sp->obj->xid = sp->xid; - vc = VBE_GetFd(sp->backend, sp->xid); + vc = VBE_GetFd(sp); if (vc == NULL) - vc = VBE_GetFd(sp->backend, sp->xid); - XXXAN(vc); - WSL(w, SLT_Backend, sp->fd, "%d %s", vc->fd, sp->backend->vcl_name); + return (1); http_ClrHeader(vc->http); vc->http->logtag = HTTP_Tx; Modified: trunk/varnish-cache/bin/varnishd/cache_pass.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-18 06:26:56 UTC (rev 1056) +++ trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-18 06:41:57 UTC (rev 1057) @@ -202,12 +202,9 @@ CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC); w = sp->wrk; - vc = VBE_GetFd(sp->backend, sp->xid); - if (vc == NULL) { - RES_Error(sp, 503, "Backend did not respond."); + vc = VBE_GetFd(sp); + if (vc == NULL) return (1); - } - WSL(w, SLT_Backend, sp->fd, "%d %s", vc->fd, sp->backend->vcl_name); http_CopyReq(w, vc->fd, vc->http, sp->http); http_FilterHeader(w, vc->fd, vc->http, sp->http, HTTPH_R_PASS); Modified: trunk/varnish-cache/bin/varnishd/cache_pipe.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-09-18 06:26:56 UTC (rev 1056) +++ trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-09-18 06:41:57 UTC (rev 1057) @@ -40,7 +40,7 @@ } } -void +int PipeSession(struct sess *sp) { struct vbe_conn *vc; @@ -53,12 +53,9 @@ CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC); w = sp->wrk; - vc = VBE_GetFd(sp->backend, sp->xid); - if (vc == NULL) { - RES_Error(sp, 503, "Backend did not respond."); - return; - } - VSL(SLT_Backend, sp->fd, "%d %s", vc->fd, sp->backend->vcl_name); + vc = VBE_GetFd(sp); + if (vc == NULL) + return (1); vc->http->logtag = HTTP_Tx; http_CopyReq(w, vc->fd, vc->http, sp->http); Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-18 06:26:56 UTC (rev 1056) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-18 06:41:57 UTC (rev 1057) @@ -103,7 +103,7 @@ vsb_cat(sb, "Server: Varnish\r\n" "Connection: close\r\n" - "content-Type: text/html; charset=iso-8859-1\r\n" + "Content-Type: text/html; charset=iso-8859-1\r\n" "\r\n" "\r\n" "\r\n" From phk at projects.linpro.no Mon Sep 18 07:08:32 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 09:08:32 +0200 (CEST) Subject: r1058 - trunk/varnish-cache/bin/varnishd Message-ID: <20060918070832.B72A61EC36B@projects.linpro.no> Author: phk Date: 2006-09-18 09:08:32 +0200 (Mon, 18 Sep 2006) New Revision: 1058 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_backend.c trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_expire.c trunk/varnish-cache/bin/varnishd/cache_fetch.c trunk/varnish-cache/bin/varnishd/cache_pass.c trunk/varnish-cache/bin/varnishd/cache_pipe.c trunk/varnish-cache/bin/varnishd/cache_response.c trunk/varnish-cache/bin/varnishd/cache_vcl.c trunk/varnish-cache/bin/varnishd/rfc2616.c Log: Get shmlog records into more sensible order. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-18 06:41:57 UTC (rev 1057) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-18 07:08:32 UTC (rev 1058) @@ -298,8 +298,8 @@ /* cache_backend.c */ void VBE_Init(void); struct vbe_conn *VBE_GetFd(struct sess *sp); -void VBE_ClosedFd(struct vbe_conn *vc, int already); -void VBE_RecycleFd(struct vbe_conn *vc); +void VBE_ClosedFd(struct worker *w, struct vbe_conn *vc, int already); +void VBE_RecycleFd(struct worker *w, struct vbe_conn *vc); /* cache_ban.c */ void BAN_Init(void); @@ -367,7 +367,7 @@ void PassBody(struct sess *sp); /* cache_pipe.c */ -int PipeSession(struct sess *sp); +void PipeSession(struct sess *sp); /* cache_pool.c */ void WRK_Init(void); Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-09-18 06:41:57 UTC (rev 1057) +++ trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-09-18 07:08:32 UTC (rev 1058) @@ -146,7 +146,7 @@ } static int -vbe_connect(struct backend *bp) +vbe_connect(struct sess *sp, struct backend *bp) { int s; char abuf1[TCP_ADDRBUFSIZE], abuf2[TCP_ADDRBUFSIZE]; @@ -163,7 +163,7 @@ TCP_myname(s, abuf1, sizeof abuf1, pbuf1, sizeof pbuf1); TCP_name(ai->ai_addr, ai->ai_addrlen, abuf2, sizeof abuf2, pbuf2, sizeof pbuf2); - VSL(SLT_BackendOpen, s, "%s %s %s %s %s", + WSL(sp->wrk, SLT_BackendOpen, s, "%s %s %s %s %s", bp->vcl_name, abuf1, pbuf1, abuf2, pbuf2); return (s); } @@ -214,7 +214,7 @@ pfd.revents = 0; if (!poll(&pfd, 1, 0)) break; - VBE_ClosedFd(vc, 0); + VBE_ClosedFd(sp->wrk, vc, 0); } if (vc == NULL) { @@ -230,7 +230,7 @@ /* If not connected yet, do so */ if (vc->fd < 0) { AZ(vc->backend); - vc->fd = vbe_connect(bp); + vc->fd = vbe_connect(sp, bp); LOCK(&vbemtx); if (vc->fd < 0) { vc->backend = NULL; @@ -274,13 +274,13 @@ /* Close a connection ------------------------------------------------*/ void -VBE_ClosedFd(struct vbe_conn *vc, int already) +VBE_ClosedFd(struct worker *w, struct vbe_conn *vc, int already) { CHECK_OBJ_NOTNULL(vc, VBE_CONN_MAGIC); assert(vc->fd >= 0); AN(vc->backend); - VSL(SLT_BackendClose, vc->fd, "%s", vc->backend->vcl_name); + WSL(w, SLT_BackendClose, vc->fd, "%s", vc->backend->vcl_name); if (!already) AZ(close(vc->fd)); vc->fd = -1; @@ -294,14 +294,14 @@ /* Recycle a connection ----------------------------------------------*/ void -VBE_RecycleFd(struct vbe_conn *vc) +VBE_RecycleFd(struct worker *w, struct vbe_conn *vc) { CHECK_OBJ_NOTNULL(vc, VBE_CONN_MAGIC); assert(vc->fd >= 0); AN(vc->backend); VSL_stats->backend_recycle++; - VSL(SLT_BackendReuse, vc->fd, "%s", vc->backend->vcl_name); + WSL(w, SLT_BackendReuse, vc->fd, "%s", vc->backend->vcl_name); LOCK(&vbemtx); TAILQ_INSERT_HEAD(&vc->backend->connlist, vc, list); UNLOCK(&vbemtx); Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-18 06:41:57 UTC (rev 1057) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-18 07:08:32 UTC (rev 1058) @@ -126,8 +126,6 @@ AZ(sp->obj); AZ(sp->vbc); - if (sp->fd >= 0 && sp->doclose != NULL) - vca_close_session(sp, sp->doclose); sp->backend = NULL; if (sp->vcl != NULL) { if (sp->wrk->vcl != NULL) @@ -153,6 +151,9 @@ sp->xid = 0; sp->t_open = sp->t_end; SES_Charge(sp); + WSL_Flush(sp->wrk); + if (sp->fd >= 0 && sp->doclose != NULL) + vca_close_session(sp, sp->doclose); if (sp->fd < 0) { VSL_stats->sess_closed++; sp->wrk->idle = sp->t_open.tv_sec; @@ -620,7 +621,7 @@ { sp->wrk->acct.pipe++; - (void)PipeSession(sp); + PipeSession(sp); sp->step = STP_DONE; return (0); } Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-09-18 06:41:57 UTC (rev 1057) +++ trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-09-18 07:08:32 UTC (rev 1058) @@ -103,6 +103,7 @@ static void * exp_prefetch(void *arg) { + struct worker ww; struct object *o; time_t t; struct sess *sp; @@ -112,6 +113,11 @@ sp = SES_New(NULL, 0); XXXAN(sp); + sp->wrk = &ww; + ww.magic = WORKER_MAGIC; + ww.wlp = ww.wlog; + ww.wle = ww.wlog + sizeof ww.wlog; + sleep(10); /* Takes time for VCL to arrive */ VCL_Get(&sp->vcl); t = time(NULL); @@ -122,9 +128,8 @@ CHECK_OBJ(o, OBJECT_MAGIC); if (o == NULL || o->ttl > t + expearly) { UNLOCK(&exp_mtx); - VCL_Rel(&sp->vcl); AZ(sleep(1)); - VCL_Get(&sp->vcl); + VCL_Refresh(&sp->vcl); t = time(NULL); continue; } @@ -136,7 +141,7 @@ assert(o2->ttl >= o->ttl); UNLOCK(&exp_mtx); - VSL(SLT_ExpPick, 0, "%u", o->xid); + WSL(&ww, SLT_ExpPick, 0, "%u", o->xid); sp->obj = o; VCL_timeout_method(sp); Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-18 06:41:57 UTC (rev 1057) +++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-18 07:08:32 UTC (rev 1058) @@ -265,9 +265,9 @@ cls = 1; if (cls) - VBE_ClosedFd(vc, 0); + VBE_ClosedFd(sp->wrk, vc, 0); else - VBE_RecycleFd(vc); + VBE_RecycleFd(sp->wrk, vc); return (0); } Modified: trunk/varnish-cache/bin/varnishd/cache_pass.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-18 06:41:57 UTC (rev 1057) +++ trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-18 07:08:32 UTC (rev 1058) @@ -183,9 +183,9 @@ cls = 1; if (cls) - VBE_ClosedFd(vc, 0); + VBE_ClosedFd(sp->wrk, vc, 0); else - VBE_RecycleFd(vc); + VBE_RecycleFd(sp->wrk, vc); } Modified: trunk/varnish-cache/bin/varnishd/cache_pipe.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-09-18 06:41:57 UTC (rev 1057) +++ trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-09-18 07:08:32 UTC (rev 1058) @@ -40,7 +40,7 @@ } } -int +void PipeSession(struct sess *sp) { struct vbe_conn *vc; @@ -55,7 +55,7 @@ vc = VBE_GetFd(sp); if (vc == NULL) - return (1); + return; vc->http->logtag = HTTP_Tx; http_CopyReq(w, vc->fd, vc->http, sp->http); @@ -69,7 +69,7 @@ if (WRK_Flush(w)) { vca_close_session(sp, "pipe"); - VBE_ClosedFd(vc, 0); + VBE_ClosedFd(sp->wrk, vc, 0); return; } @@ -94,5 +94,5 @@ } vca_close_session(sp, "pipe"); (void)close (vc->fd); - VBE_ClosedFd(vc, 1); + VBE_ClosedFd(sp->wrk, vc, 1); } Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-18 06:41:57 UTC (rev 1057) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-18 07:08:32 UTC (rev 1058) @@ -143,7 +143,8 @@ http_ClrHeader(sp->http); sp->http->logtag = HTTP_Tx; - http_SetResp(sp->wrk, sp->fd, sp->http, "HTTP/1.1", "304", "Not Modified"); + http_SetResp(sp->wrk, sp->fd, sp->http, + "HTTP/1.1", "304", NULL); TIM_format(sp->t_req.tv_sec, lm); http_PrintfHeader(sp->wrk, sp->fd, sp->http, "Date: %s", lm); http_SetHeader(sp->wrk, sp->fd, sp->http, "Via: 1.1 varnish"); Modified: trunk/varnish-cache/bin/varnishd/cache_vcl.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vcl.c 2006-09-18 06:41:57 UTC (rev 1057) +++ trunk/varnish-cache/bin/varnishd/cache_vcl.c 2006-09-18 07:08:32 UTC (rev 1058) @@ -278,9 +278,9 @@ { \ \ sp->handling = 0; \ - VSL(SLT_VCL_call, sp->fd, "%s", #func); \ + WSL(sp->wrk, SLT_VCL_call, sp->fd, "%s", #func); \ sp->vcl->func##_func(sp); \ - VSL(SLT_VCL_return, sp->fd, "%s", \ + WSL(sp->wrk, SLT_VCL_return, sp->fd, "%s", \ vcl_handlingname(sp->handling)); \ assert(sp->handling & bitmap); \ assert(!(sp->handling & ~bitmap)); \ Modified: trunk/varnish-cache/bin/varnishd/rfc2616.c =================================================================== --- trunk/varnish-cache/bin/varnishd/rfc2616.c 2006-09-18 06:41:57 UTC (rev 1057) +++ trunk/varnish-cache/bin/varnishd/rfc2616.c 2006-09-18 07:08:32 UTC (rev 1058) @@ -117,7 +117,7 @@ } /* calculated TTL, Our time, Date, Expires, max-age, age */ - VSL(SLT_TTL, sp->fd, "%u RFC %d %d %d %d %d %d", sp->xid, + WSL(sp->wrk, SLT_TTL, sp->fd, "%u RFC %d %d %d %d %d %d", sp->xid, (int)(ttd - obj->entered), (int)obj->entered, (int)h_date, (int)h_expires, (int)u1, (int)u2); From phk at projects.linpro.no Mon Sep 18 07:11:49 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 09:11:49 +0200 (CEST) Subject: r1059 - trunk/varnish-cache/bin/varnishd Message-ID: <20060918071149.603401EC36B@projects.linpro.no> Author: phk Date: 2006-09-18 09:11:49 +0200 (Mon, 18 Sep 2006) New Revision: 1059 Modified: trunk/varnish-cache/bin/varnishd/cache_response.c Log: braino Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-18 07:08:32 UTC (rev 1058) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-18 07:11:49 UTC (rev 1059) @@ -144,7 +144,7 @@ http_ClrHeader(sp->http); sp->http->logtag = HTTP_Tx; http_SetResp(sp->wrk, sp->fd, sp->http, - "HTTP/1.1", "304", NULL); + "HTTP/1.1", "304", "Not Modified"); TIM_format(sp->t_req.tv_sec, lm); http_PrintfHeader(sp->wrk, sp->fd, sp->http, "Date: %s", lm); http_SetHeader(sp->wrk, sp->fd, sp->http, "Via: 1.1 varnish"); From phk at projects.linpro.no Mon Sep 18 07:16:03 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 09:16:03 +0200 (CEST) Subject: r1060 - trunk/varnish-cache/bin/varnishd Message-ID: <20060918071603.C41F91EC378@projects.linpro.no> Author: phk Date: 2006-09-18 09:16:03 +0200 (Mon, 18 Sep 2006) New Revision: 1060 Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c Log: Add a simple linear retry in five steps for backend connection. Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-09-18 07:11:49 UTC (rev 1059) +++ trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-09-18 07:16:03 UTC (rev 1060) @@ -260,12 +260,16 @@ VBE_GetFd(struct sess *sp) { struct vbe_conn *vc; + unsigned n; - vc = vbe_nextfd(sp); - if (vc != NULL) { - WSL(sp->wrk, SLT_Backend, sp->fd, "%d %s", vc->fd, - sp->backend->vcl_name); - return (vc); + for (n = 1; n < 5; n++) { + vc = vbe_nextfd(sp); + if (vc != NULL) { + WSL(sp->wrk, SLT_Backend, sp->fd, "%d %s", vc->fd, + sp->backend->vcl_name); + return (vc); + } + usleep(100000 * n); } RES_Error(sp, 503, "Backend did not respond."); return (NULL); From phk at projects.linpro.no Mon Sep 18 07:36:33 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 09:36:33 +0200 (CEST) Subject: r1061 - trunk/varnish-cache/bin/varnishd Message-ID: <20060918073633.819A81EC36B@projects.linpro.no> Author: phk Date: 2006-09-18 09:36:33 +0200 (Mon, 18 Sep 2006) New Revision: 1061 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_http.c trunk/varnish-cache/bin/varnishd/cache_pool.c trunk/varnish-cache/bin/varnishd/cache_session.c trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c trunk/varnish-cache/bin/varnishd/flint.lnt trunk/varnish-cache/bin/varnishd/mgt_child.c trunk/varnish-cache/bin/varnishd/mgt_param.c trunk/varnish-cache/bin/varnishd/shmlog.c trunk/varnish-cache/bin/varnishd/varnishd.c Log: Make flexelint happier Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-18 07:16:03 UTC (rev 1060) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-18 07:36:33 UTC (rev 1061) @@ -124,8 +124,6 @@ }; struct workreq { - unsigned magic; -#define WORKREQ_MAGIC 0x5ccb4eb2 TAILQ_ENTRY(workreq) list; struct sess *sess; }; @@ -342,7 +340,6 @@ void http_FilterHeader(struct worker *w, int fd, struct http *to, struct http *fm, unsigned how); void http_PrintfHeader(struct worker *w, int fd, struct http *to, const char *fmt, ...); void http_SetHeader(struct worker *w, int fd, struct http *to, const char *hdr); -int http_IsHdr(struct http_hdr *hh, char *hdr); void http_Setup(struct http *ht, void *space, unsigned len); int http_GetHdr(struct http *hp, const char *hdr, char **ptr); int http_GetHdrField(struct http *hp, const char *hdr, const char *field, char **ptr); @@ -396,7 +393,6 @@ void WSLR(struct worker *w, enum shmlogtag tag, unsigned id, const char *b, const char *e); void WSL(struct worker *w, enum shmlogtag tag, unsigned id, const char *fmt, ...); void WSL_Flush(struct worker *w); -#define HERE() VSL(SLT_Debug, 0, "HERE: %s(%d)", __func__, __LINE__) #define INCOMPL() do { \ VSL(SLT_Debug, 0, "INCOMPLETE AT: %s(%d)", __func__, __LINE__); \ fprintf(stderr,"INCOMPLETE AT: %s(%d)\n", (const char *)__func__, __LINE__); \ Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-18 07:16:03 UTC (rev 1060) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-18 07:36:33 UTC (rev 1061) @@ -33,7 +33,7 @@ static unsigned nki; static void -vca_kq_sess(struct sess *sp, int arm) +vca_kq_sess(struct sess *sp, short arm) { CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-18 07:16:03 UTC (rev 1060) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-18 07:36:33 UTC (rev 1061) @@ -35,7 +35,6 @@ #include #include "shmlog.h" -#include "heritage.h" #include "vcl.h" #include "cache.h" Modified: trunk/varnish-cache/bin/varnishd/cache_http.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_http.c 2006-09-18 07:16:03 UTC (rev 1060) +++ trunk/varnish-cache/bin/varnishd/cache_http.c 2006-09-18 07:36:33 UTC (rev 1061) @@ -58,9 +58,6 @@ return (logmtx[hp->logtag][t]); } -#define VSLH(ax, bx, cx, dx) \ - VSLR(T((cx), (ax)), (bx), (cx)->hd[(dx)].b, (cx)->hd[(dx)].e); - #define WSLH(wx, ax, bx, cx, dx) \ WSLR(wx, T((cx), (ax)), (bx), (cx)->hd[(dx)].b, (cx)->hd[(dx)].e); @@ -85,7 +82,7 @@ /*--------------------------------------------------------------------*/ -int +static int http_IsHdr(struct http_hdr *hh, char *hdr) { unsigned l; Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 07:16:03 UTC (rev 1060) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 07:36:33 UTC (rev 1061) @@ -240,7 +240,7 @@ struct worker *w; pthread_t tp; struct wq *qp; - static unsigned nq; + static unsigned nq = 0; unsigned onq; onq = nq + 1; Modified: trunk/varnish-cache/bin/varnishd/cache_session.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-18 07:16:03 UTC (rev 1060) +++ trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-18 07:36:33 UTC (rev 1061) @@ -76,7 +76,7 @@ MTX mtx; } *srchash; -unsigned nsrchash; +static unsigned nsrchash; static MTX stat_mtx; /*-------------------------------------------------------------------- Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c 2006-09-18 07:16:03 UTC (rev 1060) +++ trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c 2006-09-18 07:36:33 UTC (rev 1061) @@ -21,9 +21,9 @@ #include -static unsigned ipv4mask[] = { +static uint32_t ipv4mask[] = { [0] = 0xffffffff, -#define M(n) [n] = (0xffffffff << (32 - n)) +#define M(n) [n] = (uint32_t)((uint64_t)0xffffffff << (32 - n)) M( 1), M( 2), M( 3), M( 4), M( 5), M( 6), M( 7), M( 8), M( 9), M(10), M(11), M(12), M(13), M(14), M(15), M(16), M(17), M(18), M(19), M(20), M(21), M(22), M(23), M(24), M(25), M(26), M(27), M(28), M(29), M(30), Modified: trunk/varnish-cache/bin/varnishd/flint.lnt =================================================================== --- trunk/varnish-cache/bin/varnishd/flint.lnt 2006-09-18 07:16:03 UTC (rev 1060) +++ trunk/varnish-cache/bin/varnishd/flint.lnt 2006-09-18 07:36:33 UTC (rev 1061) @@ -1,6 +1,7 @@ -passes=3 +libh mgt_event.h ++libh ../../config.h -header(../../config.h) @@ -20,7 +21,9 @@ -e786 // String concatenation within initializer -emacro(740, TAILQ_PREV) // Unusual pointer cast (incompatible indirect types) +-emacro(740, TAILQ_LAST) // Unusual pointer cast (incompatible indirect types) -emacro((826), TAILQ_PREV) // Suspicious pointer-to-pointer conversion (area too small) +-emacro((826), TAILQ_LAST) // Suspicious pointer-to-pointer conversion (area too small) -esym(534, printf) // Ignoring return value of function Modified: trunk/varnish-cache/bin/varnishd/mgt_child.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-09-18 07:16:03 UTC (rev 1060) +++ trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-09-18 07:36:33 UTC (rev 1061) @@ -97,6 +97,7 @@ start_child(void) { int i; + unsigned u; char *p; struct ev *e; @@ -170,7 +171,7 @@ AZ(close(heritage.fds[2])); heritage.fds[2] = -1; child_pid = i; - if (mgt_push_vcls_and_start(&i, &p)) { + if (mgt_push_vcls_and_start(&u, &p)) { fprintf(stderr, "Pushing vcls failed:\n%s\n", p); free(p); /* Pick up any stuff lingering on stdout/stderr */ Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-18 07:16:03 UTC (rev 1060) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-18 07:36:33 UTC (rev 1061) @@ -14,7 +14,6 @@ #include "mgt.h" #include "mgt_cli.h" -#include "vsb.h" #include "heritage.h" struct parspec; @@ -308,10 +307,6 @@ #define DELAYED_EFFECT \ "\nNB: This parameter will take some time to take effect.\n" -#define SHOULD_RESTART \ - "\nNB: This parameter will not take full effect until the " \ - "child process has been restarted.\n" - #define MUST_RESTART \ "\nNB: This parameter will not take any effect until the " \ "child process has been restarted.\n" Modified: trunk/varnish-cache/bin/varnishd/shmlog.c =================================================================== --- trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-18 07:16:03 UTC (rev 1060) +++ trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-18 07:36:33 UTC (rev 1061) @@ -107,8 +107,7 @@ va_start(ap, fmt); - p = strchr(fmt, '%'); - if (p == NULL) { + if (strchr(fmt, '%') == NULL) { VSLR(tag, id, fmt, NULL); return; } @@ -221,8 +220,7 @@ va_start(ap, fmt); - p = strchr(fmt, '%'); - if (p == NULL) { + if (strchr(fmt, '%') == NULL) { WSLR(w, tag, id, fmt, NULL); return; } Modified: trunk/varnish-cache/bin/varnishd/varnishd.c =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-18 07:16:03 UTC (rev 1060) +++ trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-18 07:36:33 UTC (rev 1061) @@ -347,9 +347,9 @@ setbuf(stderr, NULL); memset(cli, 0, sizeof cli); - cli->sb = vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND); - XXXAN(cli->sb); - cli->result = CLIS_OK; + cli[0].sb = vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND); + XXXAN(cli[0].sb); + cli[0].result = CLIS_OK; heritage.socket = -1; memset(¶m, 0, sizeof param); From des at projects.linpro.no Mon Sep 18 08:55:00 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Mon, 18 Sep 2006 10:55:00 +0200 (CEST) Subject: r1062 - trunk/varnish-cache/bin/varnishstat Message-ID: <20060918085500.2B1D81EC367@projects.linpro.no> Author: des Date: 2006-09-18 10:55:00 +0200 (Mon, 18 Sep 2006) New Revision: 1062 Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.c Log: Widen fields sufficiently to accomodate gigabit rates. Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.c =================================================================== --- trunk/varnish-cache/bin/varnishstat/varnishstat.c 2006-09-18 07:36:33 UTC (rev 1061) +++ trunk/varnish-cache/bin/varnishstat/varnishstat.c 2006-09-18 08:55:00 UTC (rev 1062) @@ -85,7 +85,7 @@ #define MAC_STAT(n,t,f,d) \ ju = VSL_stats->n; \ - printw("%12ju %10.2f %10.2f " d "\n", \ + printw("%12ju %12.2f %12.2f " d "\n", \ ju, (ju - (intmax_t)copy.n)/lt, ju / up); \ copy.n = ju; #include "stat_field.h" From des at projects.linpro.no Mon Sep 18 08:55:34 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Mon, 18 Sep 2006 10:55:34 +0200 (CEST) Subject: r1063 - trunk/varnish-cache/bin/varnishstat Message-ID: <20060918085534.705BA1EC373@projects.linpro.no> Author: des Date: 2006-09-18 10:55:34 +0200 (Mon, 18 Sep 2006) New Revision: 1063 Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.1 Log: Add an explanation of the columns in the main display. Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.1 =================================================================== --- trunk/varnish-cache/bin/varnishstat/varnishstat.1 2006-09-18 08:55:00 UTC (rev 1062) +++ trunk/varnish-cache/bin/varnishstat/varnishstat.1 2006-09-18 08:55:34 UTC (rev 1063) @@ -26,6 +26,18 @@ .It Fl V Display the version number and exit. .El +.Pp +The columns in the main display are, from left to right: +.Bl -enum +.It +Total since startup +.It +Delta since last update (normally the last second) +.It +Average over process lifetime +.It +Descriptive text +.El .Sh SEE ALSO .Xr varnishd 1 , .Xr varnishhist 1 , From phk at projects.linpro.no Mon Sep 18 09:00:36 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 11:00:36 +0200 (CEST) Subject: r1064 - trunk/varnish-cache/bin/varnishd Message-ID: <20060918090036.E71A51EC373@projects.linpro.no> Author: phk Date: 2006-09-18 11:00:36 +0200 (Mon, 18 Sep 2006) New Revision: 1064 Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c Log: Make sure all threads don't end up in the same work queue Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 08:55:34 UTC (rev 1063) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 09:00:36 UTC (rev 1064) @@ -38,6 +38,7 @@ struct workerhead idle; TAILQ_HEAD(, workreq) req; unsigned overflow; + unsigned nwrk; }; static MTX tmtx; @@ -187,9 +188,11 @@ AZ(pipe(w->pipe)); VSL(SLT_WorkThread, 0, "%p start", w); + LOCK(&tmtx); + VSL_stats->n_wrk_busy++; + VSL_stats->n_wrk_create++; + UNLOCK(&tmtx); LOCK(&qp->mtx); - VSL_stats->n_wrk_create++; - VSL_stats->n_wrk_busy++; while (1) { CHECK_OBJ_NOTNULL(w, WORKER_MAGIC); @@ -207,8 +210,10 @@ TAILQ_INSERT_HEAD(&qp->idle, w, list); assert(w->idle != 0); + UNLOCK(&qp->mtx); + LOCK(&tmtx); VSL_stats->n_wrk_busy--; - UNLOCK(&qp->mtx); + UNLOCK(&tmtx); assert(1 == read(w->pipe[0], &c, 1)); if (w->idle == 0) break; @@ -217,6 +222,7 @@ } LOCK(&tmtx); VSL_stats->n_wrk--; + qp->nwrk--; UNLOCK(&tmtx); VSL(SLT_WorkThread, 0, "%p end", w); if (w->vcl != NULL) @@ -256,10 +262,12 @@ w = TAILQ_FIRST(&qp->idle); if (w != NULL) { TAILQ_REMOVE(&qp->idle, w, list); - VSL_stats->n_wrk_busy++; UNLOCK(&qp->mtx); w->wrq = &sp->workreq; assert(1 == write(w->pipe[1], w, 1)); + LOCK(&tmtx); + VSL_stats->n_wrk_busy++; + UNLOCK(&tmtx); return; } @@ -270,7 +278,8 @@ LOCK(&tmtx); VSL_stats->n_wrk_queue++; /* Can we create more threads ? */ - if (VSL_stats->n_wrk >= params->wthread_max) { + if (VSL_stats->n_wrk >= params->wthread_max || + qp->nwrk * nwq >= params->wthread_max) { VSL_stats->n_wrk_max++; UNLOCK(&tmtx); return; @@ -278,6 +287,7 @@ /* Try to create a thread */ VSL_stats->n_wrk++; + qp->nwrk++; UNLOCK(&tmtx); if (!pthread_create(&tp, NULL, wrk_thread, qp)) { @@ -290,6 +300,7 @@ LOCK(&tmtx); /* Register overflow */ + qp->nwrk--; VSL_stats->n_wrk--; VSL_stats->n_wrk_failed++; UNLOCK(&tmtx); From des at projects.linpro.no Mon Sep 18 09:22:56 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Mon, 18 Sep 2006 11:22:56 +0200 (CEST) Subject: r1065 - trunk/varnish-cache/bin/varnishstat Message-ID: <20060918092256.667D21EC373@projects.linpro.no> Author: des Date: 2006-09-18 11:22:56 +0200 (Mon, 18 Sep 2006) New Revision: 1065 Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.1 trunk/varnish-cache/bin/varnishstat/varnishstat.c Log: Add a -w option to set the delay between updates. Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.1 =================================================================== --- trunk/varnish-cache/bin/varnishstat/varnishstat.1 2006-09-18 09:00:36 UTC (rev 1064) +++ trunk/varnish-cache/bin/varnishstat/varnishstat.1 2006-09-18 09:22:56 UTC (rev 1065) @@ -11,6 +11,7 @@ .Nm .Op Fl 1 .Op Fl V +.Op Fl w Ar delay .Sh DESCRIPTION The .Nm @@ -25,6 +26,11 @@ statistics once and exit. .It Fl V Display the version number and exit. +.It Fl w Ar delay +Wait +.Ar delay +seconds between updates. +The default is 1. .El .Pp The columns in the main display are, from left to right: @@ -32,7 +38,7 @@ .It Total since startup .It -Delta since last update (normally the last second) +Delta since last update .It Average over process lifetime .It Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.c =================================================================== --- trunk/varnish-cache/bin/varnishstat/varnishstat.c 2006-09-18 09:00:36 UTC (rev 1064) +++ trunk/varnish-cache/bin/varnishstat/varnishstat.c 2006-09-18 09:22:56 UTC (rev 1065) @@ -26,7 +26,7 @@ } static void -do_curses(struct varnish_stats *VSL_stats) +do_curses(struct varnish_stats *VSL_stats, int delay) { struct varnish_stats copy; intmax_t ju; @@ -92,14 +92,14 @@ #undef MAC_STAT lt = tt; refresh(); - sleep(1); + sleep(delay); } } static void usage(void) { - fprintf(stderr, "usage: varnishstat [-1V]\n"); + fprintf(stderr, "usage: varnishstat [-1V] [-w delay]\n"); exit(1); } @@ -108,11 +108,11 @@ { int c; struct varnish_stats *VSL_stats; - int once = 0; + int delay = 1, once = 0; VSL_stats = VSL_OpenStats(); - while ((c = getopt(argc, argv, "1V")) != -1) { + while ((c = getopt(argc, argv, "1Vw:")) != -1) { switch (c) { case '1': once = 1; @@ -120,13 +120,16 @@ case 'V': varnish_version("varnishstat"); exit(0); + case 'w': + delay = atoi(optarg); + break; default: usage(); } } if (!once) { - do_curses(VSL_stats); + do_curses(VSL_stats, delay); } else { #define MAC_STAT(n,t,f,d) \ From des at projects.linpro.no Mon Sep 18 09:25:58 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Mon, 18 Sep 2006 11:25:58 +0200 (CEST) Subject: r1066 - trunk/varnish-cache/bin/varnishstat Message-ID: <20060918092558.0F2741EC373@projects.linpro.no> Author: des Date: 2006-09-18 11:25:57 +0200 (Mon, 18 Sep 2006) New Revision: 1066 Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.1 Log: Correct the description of the second and third fields. Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.1 =================================================================== --- trunk/varnish-cache/bin/varnishstat/varnishstat.1 2006-09-18 09:22:56 UTC (rev 1065) +++ trunk/varnish-cache/bin/varnishstat/varnishstat.1 2006-09-18 09:25:57 UTC (rev 1066) @@ -38,9 +38,9 @@ .It Total since startup .It -Delta since last update +Per-second average in the period since last update .It -Average over process lifetime +Per-second average over process lifetime .It Descriptive text .El From phk at projects.linpro.no Mon Sep 18 09:33:10 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 11:33:10 +0200 (CEST) Subject: r1067 - trunk/varnish-cache/bin/varnishd Message-ID: <20060918093310.48E531EC373@projects.linpro.no> Author: phk Date: 2006-09-18 11:33:10 +0200 (Mon, 18 Sep 2006) New Revision: 1067 Modified: trunk/varnish-cache/bin/varnishd/mgt_child.c trunk/varnish-cache/bin/varnishd/mgt_cli.c Log: Increase CLI respone timeout to 5 seconds and tell that a ping has failed before we kill the child. Modified: trunk/varnish-cache/bin/varnishd/mgt_child.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-09-18 09:25:57 UTC (rev 1066) +++ trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-09-18 09:33:10 UTC (rev 1067) @@ -86,8 +86,10 @@ (void)what; if (child_state != CH_RUNNING) return (1); - if (child_pid > 0 && mgt_cli_askchild(NULL, NULL, "ping\n")) + if (child_pid > 0 && mgt_cli_askchild(NULL, NULL, "ping\n")) { + fprintf(stderr, "Child not responding to ping\n"); kill(child_pid, SIGKILL); + } return (0); } Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_cli.c 2006-09-18 09:25:57 UTC (rev 1066) +++ trunk/varnish-cache/bin/varnishd/mgt_cli.c 2006-09-18 09:33:10 UTC (rev 1067) @@ -212,7 +212,7 @@ return (CLIS_COMMS); } - i = cli_readres(cli_i, &u, resp, 3.0); + i = cli_readres(cli_i, &u, resp, 5.0); if (status != NULL) *status = u; return (u == CLIS_OK ? 0 : u); From phk at projects.linpro.no Mon Sep 18 09:57:25 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 11:57:25 +0200 (CEST) Subject: r1068 - trunk/varnish-cache/bin/varnishd Message-ID: <20060918095725.B2C991EC373@projects.linpro.no> Author: phk Date: 2006-09-18 11:57:25 +0200 (Mon, 18 Sep 2006) New Revision: 1068 Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c Log: eliminate redundant counter. Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 09:33:10 UTC (rev 1067) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 09:57:25 UTC (rev 1068) @@ -37,7 +37,6 @@ MTX mtx; struct workerhead idle; TAILQ_HEAD(, workreq) req; - unsigned overflow; unsigned nwrk; }; @@ -197,15 +196,15 @@ CHECK_OBJ_NOTNULL(w, WORKER_MAGIC); /* Process overflow requests, if any */ - if (qp->overflow > 0) { - qp->overflow--; + for(;;) { w->wrq = TAILQ_FIRST(&qp->req); + if (w->wrq == NULL) + break; AN(w->wrq); TAILQ_REMOVE(&qp->req, w->wrq, list); UNLOCK(&qp->mtx); wrk_do_one(w); LOCK(&qp->mtx); - continue; } TAILQ_INSERT_HEAD(&qp->idle, w, list); @@ -272,7 +271,6 @@ } TAILQ_INSERT_TAIL(&qp->req, &sp->workreq, list); - qp->overflow++; UNLOCK(&qp->mtx); LOCK(&tmtx); From phk at projects.linpro.no Mon Sep 18 10:10:22 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 12:10:22 +0200 (CEST) Subject: r1069 - trunk/varnish-cache/bin/varnishd Message-ID: <20060918101022.226411EC36F@projects.linpro.no> Author: phk Date: 2006-09-18 12:10:22 +0200 (Mon, 18 Sep 2006) New Revision: 1069 Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c Log: Make a global overflow queue so we don't risk parking requests on workpools with no available threads. Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 09:57:25 UTC (rev 1068) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 10:10:22 UTC (rev 1069) @@ -36,11 +36,11 @@ struct wq { MTX mtx; struct workerhead idle; - TAILQ_HEAD(, workreq) req; unsigned nwrk; }; static MTX tmtx; +static TAILQ_HEAD(, workreq) overflow = TAILQ_HEAD_INITIALIZER(overflow); static struct wq **wq; static unsigned nwq; @@ -191,22 +191,25 @@ VSL_stats->n_wrk_busy++; VSL_stats->n_wrk_create++; UNLOCK(&tmtx); - LOCK(&qp->mtx); while (1) { CHECK_OBJ_NOTNULL(w, WORKER_MAGIC); /* Process overflow requests, if any */ - for(;;) { - w->wrq = TAILQ_FIRST(&qp->req); - if (w->wrq == NULL) - break; - AN(w->wrq); - TAILQ_REMOVE(&qp->req, w->wrq, list); - UNLOCK(&qp->mtx); - wrk_do_one(w); - LOCK(&qp->mtx); + w->wrq = TAILQ_FIRST(&overflow); + if (w != NULL) { + LOCK(&tmtx); + w->wrq = TAILQ_FIRST(&overflow); + if (w->wrq != NULL) { + VSL_stats->n_wrk_queue--; + TAILQ_REMOVE(&overflow, w->wrq, list); + UNLOCK(&tmtx); + wrk_do_one(w); + continue; + } + UNLOCK(&tmtx); } + LOCK(&qp->mtx); TAILQ_INSERT_HEAD(&qp->idle, w, list); assert(w->idle != 0); UNLOCK(&qp->mtx); @@ -217,7 +220,6 @@ if (w->idle == 0) break; wrk_do_one(w); - LOCK(&qp->mtx); } LOCK(&tmtx); VSL_stats->n_wrk--; @@ -270,10 +272,11 @@ return; } - TAILQ_INSERT_TAIL(&qp->req, &sp->workreq, list); UNLOCK(&qp->mtx); LOCK(&tmtx); + TAILQ_INSERT_TAIL(&overflow, &sp->workreq, list); + VSL_stats->n_wrk_overflow++; VSL_stats->n_wrk_queue++; /* Can we create more threads ? */ if (VSL_stats->n_wrk >= params->wthread_max || @@ -327,7 +330,6 @@ XXXAN(wq[u]); MTX_INIT(&wq[u]->mtx); TAILQ_INIT(&wq[u]->idle); - TAILQ_INIT(&wq[u]->req); } free(owq); nwq = t; From phk at projects.linpro.no Mon Sep 18 10:10:57 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 12:10:57 +0200 (CEST) Subject: r1070 - trunk/varnish-cache/include Message-ID: <20060918101057.79DA11EC369@projects.linpro.no> Author: phk Date: 2006-09-18 12:10:57 +0200 (Mon, 18 Sep 2006) New Revision: 1070 Modified: trunk/varnish-cache/include/stat_field.h Log: Add stat field missing in last commit Modified: trunk/varnish-cache/include/stat_field.h =================================================================== --- trunk/varnish-cache/include/stat_field.h 2006-09-18 10:10:22 UTC (rev 1069) +++ trunk/varnish-cache/include/stat_field.h 2006-09-18 10:10:57 UTC (rev 1070) @@ -27,6 +27,7 @@ MAC_STAT(n_wrk_max, uint64_t, "u", "N worker threads limited") MAC_STAT(n_wrk_busy, uint64_t, "u", "N busy worker threads") MAC_STAT(n_wrk_queue, uint64_t, "u", "N queued work requests") +MAC_STAT(n_wrk_overflow, uint64_t, "u", "N overflowed work requests") MAC_STAT(n_expired, uint64_t, "u", "N expired objects") MAC_STAT(n_deathrow, uint64_t, "u", "N objects on deathrow") From phk at projects.linpro.no Mon Sep 18 10:21:49 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 12:21:49 +0200 (CEST) Subject: r1071 - trunk/varnish-cache/bin/varnishd Message-ID: <20060918102149.B37401EC369@projects.linpro.no> Author: phk Date: 2006-09-18 12:21:49 +0200 (Mon, 18 Sep 2006) New Revision: 1071 Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c Log: typo Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 10:10:57 UTC (rev 1070) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 10:21:49 UTC (rev 1071) @@ -196,7 +196,7 @@ /* Process overflow requests, if any */ w->wrq = TAILQ_FIRST(&overflow); - if (w != NULL) { + if (w->wrq != NULL) { LOCK(&tmtx); w->wrq = TAILQ_FIRST(&overflow); if (w->wrq != NULL) { From phk at projects.linpro.no Mon Sep 18 10:38:13 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 12:38:13 +0200 (CEST) Subject: r1072 - trunk/varnish-cache/bin/varnishd Message-ID: <20060918103813.CDADE1EC369@projects.linpro.no> Author: phk Date: 2006-09-18 12:38:13 +0200 (Mon, 18 Sep 2006) New Revision: 1072 Modified: trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_pool.c Log: Add a couple of XXX comments Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-18 10:21:49 UTC (rev 1071) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-18 10:38:13 UTC (rev 1072) @@ -303,6 +303,13 @@ { int i; + /* + * XXX: If we don't have acceptfilters we are somewhat subject + * XXX: to DoS'ing here. One remedy would be to set a shorter + * XXX: SO_RCVTIMEO and once we have received something here + * XXX: increase it to the normal value. + */ + assert(sp->xid == 0); VCA_Prep(sp); sp->wrk->idle = sp->t_open.tv_sec; Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 10:21:49 UTC (rev 1071) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 10:38:13 UTC (rev 1072) @@ -275,6 +275,12 @@ UNLOCK(&qp->mtx); LOCK(&tmtx); + /* + * XXX: If there are too many requests in the overflow queue + * XXX: we should kill the request right here. + * XXX: Not sure how though. Simply closing may be the better + * XXX: compromise. + */ TAILQ_INSERT_TAIL(&overflow, &sp->workreq, list); VSL_stats->n_wrk_overflow++; VSL_stats->n_wrk_queue++; From phk at projects.linpro.no Mon Sep 18 10:41:20 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 12:41:20 +0200 (CEST) Subject: r1073 - in trunk/varnish-cache: bin/varnishd include Message-ID: <20060918104120.A33A61EC369@projects.linpro.no> Author: phk Date: 2006-09-18 12:41:20 +0200 (Mon, 18 Sep 2006) New Revision: 1073 Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c trunk/varnish-cache/include/stat_field.h Log: Drop the n_wrk_busy statistics, it is too expensive to maintain due to locking. Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 10:38:13 UTC (rev 1072) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 10:41:20 UTC (rev 1073) @@ -188,7 +188,6 @@ VSL(SLT_WorkThread, 0, "%p start", w); LOCK(&tmtx); - VSL_stats->n_wrk_busy++; VSL_stats->n_wrk_create++; UNLOCK(&tmtx); while (1) { @@ -213,9 +212,6 @@ TAILQ_INSERT_HEAD(&qp->idle, w, list); assert(w->idle != 0); UNLOCK(&qp->mtx); - LOCK(&tmtx); - VSL_stats->n_wrk_busy--; - UNLOCK(&tmtx); assert(1 == read(w->pipe[0], &c, 1)); if (w->idle == 0) break; @@ -266,9 +262,6 @@ UNLOCK(&qp->mtx); w->wrq = &sp->workreq; assert(1 == write(w->pipe[1], w, 1)); - LOCK(&tmtx); - VSL_stats->n_wrk_busy++; - UNLOCK(&tmtx); return; } Modified: trunk/varnish-cache/include/stat_field.h =================================================================== --- trunk/varnish-cache/include/stat_field.h 2006-09-18 10:38:13 UTC (rev 1072) +++ trunk/varnish-cache/include/stat_field.h 2006-09-18 10:41:20 UTC (rev 1073) @@ -25,7 +25,6 @@ MAC_STAT(n_wrk_create, uint64_t, "u", "N worker threads created") MAC_STAT(n_wrk_failed, uint64_t, "u", "N worker threads not created") MAC_STAT(n_wrk_max, uint64_t, "u", "N worker threads limited") -MAC_STAT(n_wrk_busy, uint64_t, "u", "N busy worker threads") MAC_STAT(n_wrk_queue, uint64_t, "u", "N queued work requests") MAC_STAT(n_wrk_overflow, uint64_t, "u", "N overflowed work requests") From phk at projects.linpro.no Mon Sep 18 14:29:37 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 16:29:37 +0200 (CEST) Subject: r1074 - trunk/varnish-cache/bin/varnishd Message-ID: <20060918142937.0D7FA1EC377@projects.linpro.no> Author: phk Date: 2006-09-18 16:29:36 +0200 (Mon, 18 Sep 2006) New Revision: 1074 Modified: trunk/varnish-cache/bin/varnishd/cache_center.c Log: Set worker idle timestamp to request end. Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-18 10:41:20 UTC (rev 1073) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-18 14:29:36 UTC (rev 1074) @@ -134,6 +134,7 @@ } clock_gettime(CLOCK_REALTIME, &sp->t_end); + sp->wrk->idle = sp->t_end.tv_sec; if (sp->xid == 0) { sp->t_req = sp->t_end; sp->t_resp = sp->t_end; @@ -155,7 +156,6 @@ vca_close_session(sp, sp->doclose); if (sp->fd < 0) { VSL_stats->sess_closed++; - sp->wrk->idle = sp->t_open.tv_sec; sp->wrk = NULL; vca_return_session(sp); return (1); @@ -172,7 +172,6 @@ return (0); } VSL_stats->sess_herd++; - sp->wrk->idle = sp->t_open.tv_sec; sp->wrk = NULL; vca_return_session(sp); return (1); From phk at projects.linpro.no Mon Sep 18 14:54:21 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 16:54:21 +0200 (CEST) Subject: r1075 - trunk/varnish-cache/bin/varnishd Message-ID: <20060918145421.05B7D1EC377@projects.linpro.no> Author: phk Date: 2006-09-18 16:54:20 +0200 (Mon, 18 Sep 2006) New Revision: 1075 Modified: trunk/varnish-cache/bin/varnishd/shmlog.c Log: Off by one. Modified: trunk/varnish-cache/bin/varnishd/shmlog.c =================================================================== --- trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-18 14:29:36 UTC (rev 1074) +++ trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-18 14:54:20 UTC (rev 1075) @@ -79,7 +79,7 @@ assert(loghead->ptr < loghead->size); /* Wrap if necessary */ - if (loghead->ptr + 5 + l + 1 > loghead->size) + if (loghead->ptr + 5 + l + 1 >= loghead->size) vsl_wrap(); p = logstart + loghead->ptr; loghead->ptr += 5 + l; From des at projects.linpro.no Mon Sep 18 15:24:11 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Mon, 18 Sep 2006 17:24:11 +0200 (CEST) Subject: r1076 - trunk/varnish-cache/bin/varnishtop Message-ID: <20060918152411.375261EC377@projects.linpro.no> Author: des Date: 2006-09-18 17:24:11 +0200 (Mon, 18 Sep 2006) New Revision: 1076 Added: trunk/varnish-cache/bin/varnishtop/varnishtop.1 Modified: trunk/varnish-cache/bin/varnishtop/Makefile.am Log: Add man page. Modified: trunk/varnish-cache/bin/varnishtop/Makefile.am =================================================================== --- trunk/varnish-cache/bin/varnishtop/Makefile.am 2006-09-18 14:54:20 UTC (rev 1075) +++ trunk/varnish-cache/bin/varnishtop/Makefile.am 2006-09-18 15:24:11 UTC (rev 1076) @@ -4,7 +4,7 @@ bin_PROGRAMS = varnishtop -# dist_man_MANS = varnishtop.1 +dist_man_MANS = varnishtop.1 varnishtop_SOURCES = varnishtop.c Added: trunk/varnish-cache/bin/varnishtop/varnishtop.1 =================================================================== --- trunk/varnish-cache/bin/varnishtop/varnishtop.1 2006-09-18 14:54:20 UTC (rev 1075) +++ trunk/varnish-cache/bin/varnishtop/varnishtop.1 2006-09-18 15:24:11 UTC (rev 1076) @@ -0,0 +1,123 @@ +.\" +.\" $Id$ +.\" +.Dd September 16, 2006 +.Dt VARNISHHIST 1 +.Os +.Sh NAME +.Nm varnishhist +.Nd Varnish request histogram +.Sh SYNOPSIS +.Nm +.Op Fl 1 +.Op Fl b +.Op Fl C +.Op Fl c +.Op Fl d +.Op Fl f +.Op Fl I Ar regex +.Op Fl i Ar tag +.Op Fl r Ar file +.Op Fl V +.Op Fl X Ar regex +.Op Fl x Ar tag +.Sh DESCRIPTION +The +.Nm +utility reads +.Xr varnishd 1 +shared memory logs and presents a continuously updated list of the +most commonly occurring log entries. +With suitable filtering using the +.Fl I , +.Fl i , +.Fl X +and +.Fl x +options, it can be used to display a ranking of requested documents, +clients, user agents, or any other information which is recorded in +the log. +.Pp +The following options are available: +.Bl -tag -width Fl +.It Fl 1 +Instead of presenting of a continuously updated display, print the +statistics once and exit. +.It Fl b +Include log entries which result from communication with a backend +server. +If neither +.Fl b +nor +.Fl c +is specified, +.Nm +acts as if they both were. +.It Fl C +Ignore case when matching regular expressions. +.It Fl c +Include log entries which result from communication with a client. +If neither +.Fl b +nor +.Fl c +is specified, +.Nm +acts as if they both were. +.It Fl d +Process old log entries on startup. +Normally, +.Nm +will only process entries which are written to the log after it +starts. +.Op Fl f +Sort and group only on the first field of each log entry. +This is useful when displaying e.g. +.Dv stataddr +entries, where the first field is the client IP address. +.It Fl I Ar regex +Include log entries which match the specified regular expression. +If neither +.Fl I +nor +.Fl i +is specified, all log entries are included. +.It Fl i Ar tag +Include log entries with the specified tag. +If neither +.Fl I +nor +.Fl i +is specified, all log entries are included. +.It Fl r Ar file +Read log entries from +.Ar file +instead of shared memory. +.It Fl V +Display the version number and exit. +.Ar file +instead of displaying them. +The file will be overwritten unless the +.Fl a +option was specified. +.It Fl X Ar regex +Exclude log entries which match the specified regular expression. +.It Fl x Ar tag +Exclude log entries with the specified tag. +.El +.Sh SEE ALSO +.Xr varnishd 1 , +.Xr varnishhist 1 , +.Xr varnishlog 1 , +.Xr varnishncsa 1 , +.Xr varnishstat 1 +.Sh HISTORY +The +.Nm +utility was developed by +.An Poul-Henning Kamp Aq phk at freebsd.dk +in cooperation with Verdens Gang AS and Linpro AS. +.Sh BUGS +The +.Fl 1 +option currently does not work very well. Property changes on: trunk/varnish-cache/bin/varnishtop/varnishtop.1 ___________________________________________________________________ Name: svn:keywords + Id From phk at projects.linpro.no Mon Sep 18 17:18:58 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 19:18:58 +0200 (CEST) Subject: r1077 - trunk/varnish-cache/include Message-ID: <20060918171858.080031EC36B@projects.linpro.no> Author: phk Date: 2006-09-18 19:18:57 +0200 (Mon, 18 Sep 2006) New Revision: 1077 Modified: trunk/varnish-cache/include/http_headers.h Log: Don't copy the Age: header into the object. Modified: trunk/varnish-cache/include/http_headers.h =================================================================== --- trunk/varnish-cache/include/http_headers.h 2006-09-18 15:24:11 UTC (rev 1076) +++ trunk/varnish-cache/include/http_headers.h 2006-09-18 17:18:57 UTC (rev 1077) @@ -31,7 +31,7 @@ HTTPH("Accept-Encoding", H_Accept_Encoding, 1, 0, 0, 0, 0) /* RFC2616 14.3 */ HTTPH("Accept-Language", H_Accept_Language, 1, 0, 0, 0, 0) /* RFC2616 14.4 */ HTTPH("Accept-Ranges", H_Accept_Ranges, 2, 3, HTTPH_R_PASS|HTTPH_A_PASS|HTTPH_R_FETCH|HTTPH_A_INS, 0, 0) /* RFC2616 14.5 */ -HTTPH("Age", H_Age, 2, 0, 0, 0, 0) /* RFC2616 14.6 */ +HTTPH("Age", H_Age, 2, 0, HTTPH_A_INS, 0, 0) /* RFC2616 14.6 */ HTTPH("Allow", H_Allow, 2, 0, 0, 0, 0) /* RFC2616 14.7 */ HTTPH("Authorization", H_Authorization, 1, 0, 0, 0, 0) /* RFC2616 14.8 */ HTTPH("Cache-Control", H_Cache_Control, 3, 3, HTTPH_R_PASS|HTTPH_R_FETCH, 0, 0) /* RFC2616 14.9 */ From phk at projects.linpro.no Mon Sep 18 18:49:47 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 20:49:47 +0200 (CEST) Subject: r1078 - in trunk/varnish-cache: bin/varnishd include Message-ID: <20060918184947.13EFD1EC36B@projects.linpro.no> Author: phk Date: 2006-09-18 20:49:46 +0200 (Mon, 18 Sep 2006) New Revision: 1078 Modified: trunk/varnish-cache/bin/varnishd/cache_http.c trunk/varnish-cache/bin/varnishd/cache_pool.c trunk/varnish-cache/bin/varnishd/heritage.h trunk/varnish-cache/bin/varnishd/mgt_param.c trunk/varnish-cache/include/stat_field.h Log: Introduce three new params, to limit overflow queue length and to force HTTP/1.1 protocol version. Modified: trunk/varnish-cache/bin/varnishd/cache_http.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_http.c 2006-09-18 17:18:57 UTC (rev 1077) +++ trunk/varnish-cache/bin/varnishd/cache_http.c 2006-09-18 18:49:46 UTC (rev 1078) @@ -12,6 +12,7 @@ #include #include +#include "heritage.h" #include "shmlog.h" #include "cache.h" @@ -664,7 +665,10 @@ CHECK_OBJ_NOTNULL(to, HTTP_MAGIC); http_copyh(w, fd, to, fm, HTTP_HDR_REQ, HTTP_T_Request); http_copyh(w, fd, to, fm, HTTP_HDR_URL, HTTP_T_URL); - http_copyh(w, fd, to, fm, HTTP_HDR_PROTO, HTTP_T_Protocol); + if (params->backend_http11) + http_seth(w, fd, to, HTTP_HDR_PROTO, HTTP_T_Protocol, "HTTP/1.1"); + else + http_copyh(w, fd, to, fm, HTTP_HDR_PROTO, HTTP_T_Protocol); } @@ -674,7 +678,10 @@ CHECK_OBJ_NOTNULL(fm, HTTP_MAGIC); CHECK_OBJ_NOTNULL(to, HTTP_MAGIC); - http_copyh(w, fd, to, fm, HTTP_HDR_PROTO, HTTP_T_Protocol); + if (params->client_http11) + http_seth(w, fd, to, HTTP_HDR_PROTO, HTTP_T_Protocol, "HTTP/1.1"); + else + http_copyh(w, fd, to, fm, HTTP_HDR_PROTO, HTTP_T_Protocol); http_copyh(w, fd, to, fm, HTTP_HDR_STATUS, HTTP_T_Status); http_copyh(w, fd, to, fm, HTTP_HDR_RESPONSE, HTTP_T_Response); } Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 17:18:57 UTC (rev 1077) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 18:49:46 UTC (rev 1078) @@ -268,6 +268,14 @@ UNLOCK(&qp->mtx); LOCK(&tmtx); + if ((VSL_stats->n_wrk_overflow > + (params->wthread_max * params->overflow_max) / 100)) { + VSL_stats->n_wrk_drop++; + UNLOCK(&tmtx); + vca_close_session(sp, "dropped"); + vca_return_session(sp); + return; + } /* * XXX: If there are too many requests in the overflow queue * XXX: we should kill the request right here. Modified: trunk/varnish-cache/bin/varnishd/heritage.h =================================================================== --- trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-18 17:18:57 UTC (rev 1077) +++ trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-18 18:49:46 UTC (rev 1078) @@ -38,6 +38,8 @@ unsigned wthread_timeout; unsigned wthread_pools; + unsigned overflow_max; + /* Memory allocation hints */ unsigned mem_workspace; @@ -69,6 +71,10 @@ /* Srcaddr hash */ unsigned srcaddr_hash; unsigned srcaddr_ttl; + + /* HTTP proto behaviour */ + unsigned backend_http11; + unsigned client_http11; }; extern struct params *params; Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-18 17:18:57 UTC (rev 1077) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-18 18:49:46 UTC (rev 1078) @@ -161,6 +161,16 @@ /*--------------------------------------------------------------------*/ static void +tweak_overflow_max(struct cli *cli, struct parspec *par, const char *arg) +{ + + (void)par; + tweak_generic_uint(cli, ¶ms->overflow_max, arg, 0, UINT_MAX); +} + +/*--------------------------------------------------------------------*/ + +static void tweak_http_workspace(struct cli *cli, struct parspec *par, const char *arg) { @@ -299,6 +309,24 @@ /*--------------------------------------------------------------------*/ +static void +tweak_backend_http11(struct cli *cli, struct parspec *par, const char *arg) +{ + (void)par; + tweak_generic_bool(cli, ¶ms->backend_http11, arg); +} + +/*--------------------------------------------------------------------*/ + +static void +tweak_client_http11(struct cli *cli, struct parspec *par, const char *arg) +{ + (void)par; + tweak_generic_bool(cli, ¶ms->client_http11, arg); +} + +/*--------------------------------------------------------------------*/ + /* * Make sure to end all lines with either a space or newline of the * formatting will go haywire. @@ -355,6 +383,11 @@ EXPERIMENTAL DELAYED_EFFECT, "120", "seconds" }, + { "overflow_max", tweak_overflow_max, + "Limit on overflow queue length in percent of " + "thread_pool_max parameter.\n" + EXPERIMENTAL, + "100", "%" }, { "http_workspace", tweak_http_workspace, "Bytes of HTTP protocol workspace allocated. " "This space must be big enough for the entire HTTP protocol " @@ -439,6 +472,18 @@ "Zero will disable srcaddr accounting entirely.\n" EXPERIMENTAL, "30", "seconds" }, + { "backend_http11", tweak_backend_http11, + "Force all backend requests to be HTTP/1.1.\n" + "By default we copy the protocol version from the " + "incoming client request." + EXPERIMENTAL, + "off", "bool" }, + { "client_http11", tweak_client_http11, + "Force all client responses to be HTTP/1.1.\n" + "By default we copy the protocol version from the " + "backend response." + EXPERIMENTAL, + "off", "bool" }, { NULL, NULL, NULL } }; Modified: trunk/varnish-cache/include/stat_field.h =================================================================== --- trunk/varnish-cache/include/stat_field.h 2006-09-18 17:18:57 UTC (rev 1077) +++ trunk/varnish-cache/include/stat_field.h 2006-09-18 18:49:46 UTC (rev 1078) @@ -27,6 +27,7 @@ MAC_STAT(n_wrk_max, uint64_t, "u", "N worker threads limited") MAC_STAT(n_wrk_queue, uint64_t, "u", "N queued work requests") MAC_STAT(n_wrk_overflow, uint64_t, "u", "N overflowed work requests") +MAC_STAT(n_wrk_drop, uint64_t, "u", "N dropped work requests") MAC_STAT(n_expired, uint64_t, "u", "N expired objects") MAC_STAT(n_deathrow, uint64_t, "u", "N objects on deathrow") From phk at projects.linpro.no Mon Sep 18 19:38:35 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 21:38:35 +0200 (CEST) Subject: r1079 - trunk/varnish-cache/bin/varnishd Message-ID: <20060918193835.916871EC36F@projects.linpro.no> Author: phk Date: 2006-09-18 21:38:35 +0200 (Mon, 18 Sep 2006) New Revision: 1079 Modified: trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_fetch.c Log: Deal with backend connection errors while fetching the body. Eventually, VCL should get a say in this. Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-18 18:49:46 UTC (rev 1078) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-18 19:38:35 UTC (rev 1079) @@ -280,8 +280,16 @@ return (0); } if (sp->handling == VCL_RET_INSERT) { + if (FetchBody(sp)) { + sp->obj->cacheable = 0; + HSH_Unbusy(sp->obj); + HSH_Deref(sp->obj); + sp->obj = NULL; + RES_Error(sp, 503, NULL); + sp->step = STP_DONE; + return (0); + } sp->obj->cacheable = 1; - FetchBody(sp); AZ(sp->vbc); HSH_Ref(sp->obj); /* get another, STP_DELIVER will deref */ HSH_Unbusy(sp->obj); Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-18 18:49:46 UTC (rev 1078) +++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-18 19:38:35 UTC (rev 1079) @@ -45,7 +45,8 @@ while (cl > 0) { i = http_Read(hp, fd, p, cl); - xxxassert(i > 0); /* XXX seen */ + if (i <= 0) + return (-1); p += i; cl -= i; } @@ -86,7 +87,8 @@ if (q == NULL || q == buf || *q != '\n') { xxxassert(be > bp); i = http_Read(hp, fd, bp, be - bp); - xxxassert(i >= 0); + if (i <= 0) + return (-1); bp += i; continue; } @@ -135,6 +137,8 @@ /* Pick up the rest of this chunk */ while (v > 0) { i = http_Read(hp, fd, st->ptr + st->len, v); + if (i <= 0) + return (-1); st->len += i; sp->obj->len += i; u -= i; @@ -190,9 +194,10 @@ AN(p); AN(st); i = http_Read(hp, fd, p, v); - xxxassert(i >= 0); + if (i < 0) + return (-1); if (i == 0) - break; + break; p += i; v -= i; st->len += i; @@ -218,6 +223,7 @@ char *b; int body = 1; /* XXX */ struct http *hp; + struct storage *st; CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC); @@ -248,9 +254,19 @@ } else cls = 0; + if (cls < 0) { + while (!TAILQ_EMPTY(&sp->obj->store)) { + st = TAILQ_FIRST(&sp->obj->store); + TAILQ_REMOVE(&sp->obj->store, st, list); + stevedore->free(st); + } + close(vc->fd); + VBE_ClosedFd(sp->wrk, vc, 1); + return (-1); + } + { /* Sanity check fetch methods accounting */ - struct storage *st; unsigned uu; uu = 0; From phk at projects.linpro.no Mon Sep 18 19:47:30 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 21:47:30 +0200 (CEST) Subject: r1080 - trunk/varnish-cache/bin/varnishd Message-ID: <20060918194730.43ED21EC36B@projects.linpro.no> Author: phk Date: 2006-09-18 21:47:30 +0200 (Mon, 18 Sep 2006) New Revision: 1080 Modified: trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_fetch.c trunk/varnish-cache/bin/varnishd/cache_http.c Log: More backend error conditions changed from assert to 503 Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-18 19:38:35 UTC (rev 1079) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-18 19:47:30 UTC (rev 1080) @@ -550,6 +550,7 @@ HSH_Deref(sp->obj); sp->obj = NULL; sp->step = STP_DONE; + RES_Error(sp, 503, NULL); return (0); } sp->step = STP_FETCH; Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-18 19:38:35 UTC (rev 1079) +++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-18 19:47:30 UTC (rev 1080) @@ -322,16 +322,23 @@ WRK_Reset(w, &vc->fd); http_Write(w, vc->http, 0); - i = WRK_Flush(w); - xxxassert(i == 0); + if (WRK_Flush(w)) { + /* XXX: cleanup */ + return (1); + } CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC); CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC); - i = http_RecvHead(vc->http, vc->fd); - xxxassert(i == 0); - xxxassert(http_DissectResponse(sp->wrk, vc->http, vc->fd) == 0); + if (http_RecvHead(vc->http, vc->fd)) { + /* XXX: cleanup */ + return (1); + } + if (http_DissectResponse(sp->wrk, vc->http, vc->fd)) { + /* XXX: cleanup */ + return (1); + } CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC); CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC); Modified: trunk/varnish-cache/bin/varnishd/cache_http.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_http.c 2006-09-18 19:38:35 UTC (rev 1079) +++ trunk/varnish-cache/bin/varnishd/cache_http.c 2006-09-18 19:47:30 UTC (rev 1080) @@ -421,6 +421,10 @@ for (p = hp->s ; isspace(*p); p++) continue; + if (memcmp(p, "HTTP/1.", 7)) { + WSLR(w, SLT_HttpGarbage, fd, hp->s, hp->v); + return (400); + } /* First, protocol */ hp->hd[HTTP_HDR_PROTO].b = p; while (!isspace(*p)) From des at projects.linpro.no Mon Sep 18 20:26:20 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Mon, 18 Sep 2006 22:26:20 +0200 (CEST) Subject: r1081 - in trunk/varnish-tools: . licensify Message-ID: <20060918202620.1857C1EC378@projects.linpro.no> Author: des Date: 2006-09-18 22:26:19 +0200 (Mon, 18 Sep 2006) New Revision: 1081 Added: trunk/varnish-tools/licensify/ trunk/varnish-tools/licensify/licensify.pl Log: A tool to add the BSD license to the top of a source file or script. Added: trunk/varnish-tools/licensify/licensify.pl =================================================================== --- trunk/varnish-tools/licensify/licensify.pl 2006-09-18 19:47:30 UTC (rev 1080) +++ trunk/varnish-tools/licensify/licensify.pl 2006-09-18 20:26:19 UTC (rev 1081) @@ -0,0 +1,108 @@ +#!/usr/bin/perl -w +#- +# Copyright (c) 2006 Verdens Gang AS +# Copyright (c) 2006 Linpro AS +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $Id$ +# + +use strict; +use vars qw($FIRSTYEAR $LICENSE); + +$FIRSTYEAR = 2006; + +$LICENSE = +"Copyright (c) YYYY Verdens Gang AS +Copyright (c) YYYY Linpro AS +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +"; + +sub licensify($) { + my $fn = shift; + + local *FILE; + local $/; + my $contents; + my $first; + my $prefix; + my $license; + + open(FILE, "<", $fn) + or die("$fn: $!\n"); + $contents = ; + close(FILE); + + return unless $contents =~ m/^(\.\\\"|\/\*|\#!\/[^\n]+\n\#)(-?)\n/s; + return if $2; + $first = $1; + if ($first =~ /^\#/) { + $prefix = "#"; + } elsif ($first =~ /\/\*/) { + $prefix = " *"; + } else { + $prefix = $first; + } + ($license = $LICENSE) =~ s/^/$prefix /gm; + $license =~ s/[\t ]+$//gm; + $contents =~ s/^(\Q$first\E)\n/$1-\n$license/s; + + open(FILE, ">", $fn) + or die("$fn: $!\n"); + print(FILE $contents); + close(FILE); +} + +MAIN:{ + my @tm = localtime(time()); + my $year = 1900 + $tm[5]; + $year = "$FIRSTYEAR-$year" + unless ($year == $FIRSTYEAR); + $LICENSE =~ s/YYYY/$year/g; + foreach (@ARGV) { + licensify($_); + } +} Property changes on: trunk/varnish-tools/licensify/licensify.pl ___________________________________________________________________ Name: svn:executable + * Name: svn:keywords + Id From des at projects.linpro.no Mon Sep 18 20:27:02 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Mon, 18 Sep 2006 22:27:02 +0200 (CEST) Subject: r1082 - in trunk/varnish-cache: bin/varnishd bin/varnishhist bin/varnishlog bin/varnishncsa bin/varnishstat bin/varnishtop include include/compat include/varnish lib/libcompat lib/libvarnish lib/libvarnishapi lib/libvcl Message-ID: <20060918202702.DA4A81EC378@projects.linpro.no> Author: des Date: 2006-09-18 22:27:00 +0200 (Mon, 18 Sep 2006) New Revision: 1082 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_acceptor.c trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c trunk/varnish-cache/bin/varnishd/cache_backend.c trunk/varnish-cache/bin/varnishd/cache_ban.c trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_cli.c trunk/varnish-cache/bin/varnishd/cache_expire.c trunk/varnish-cache/bin/varnishd/cache_fetch.c trunk/varnish-cache/bin/varnishd/cache_hash.c trunk/varnish-cache/bin/varnishd/cache_http.c trunk/varnish-cache/bin/varnishd/cache_main.c trunk/varnish-cache/bin/varnishd/cache_pass.c trunk/varnish-cache/bin/varnishd/cache_pipe.c trunk/varnish-cache/bin/varnishd/cache_pool.c trunk/varnish-cache/bin/varnishd/cache_response.c trunk/varnish-cache/bin/varnishd/cache_session.c trunk/varnish-cache/bin/varnishd/cache_vcl.c trunk/varnish-cache/bin/varnishd/cache_vrt.c trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c trunk/varnish-cache/bin/varnishd/cache_vrt_re.c trunk/varnish-cache/bin/varnishd/common.h trunk/varnish-cache/bin/varnishd/hash_classic.c trunk/varnish-cache/bin/varnishd/hash_simple_list.c trunk/varnish-cache/bin/varnishd/hash_slinger.h trunk/varnish-cache/bin/varnishd/heritage.h trunk/varnish-cache/bin/varnishd/mgt.h trunk/varnish-cache/bin/varnishd/mgt_child.c trunk/varnish-cache/bin/varnishd/mgt_cli.c trunk/varnish-cache/bin/varnishd/mgt_cli.h trunk/varnish-cache/bin/varnishd/mgt_event.c trunk/varnish-cache/bin/varnishd/mgt_param.c trunk/varnish-cache/bin/varnishd/mgt_vcc.c trunk/varnish-cache/bin/varnishd/rfc2616.c trunk/varnish-cache/bin/varnishd/shmlog.c trunk/varnish-cache/bin/varnishd/stevedore.h trunk/varnish-cache/bin/varnishd/storage_file.c trunk/varnish-cache/bin/varnishd/storage_malloc.c trunk/varnish-cache/bin/varnishd/tcp.c trunk/varnish-cache/bin/varnishd/varnishd.c trunk/varnish-cache/bin/varnishhist/varnishhist.c trunk/varnish-cache/bin/varnishlog/varnishlog.c trunk/varnish-cache/bin/varnishncsa/varnishncsa.c trunk/varnish-cache/bin/varnishstat/varnishstat.c trunk/varnish-cache/bin/varnishtop/varnishtop.c trunk/varnish-cache/include/binary_heap.h trunk/varnish-cache/include/cli.h trunk/varnish-cache/include/cli_common.h trunk/varnish-cache/include/cli_priv.h trunk/varnish-cache/include/compat/asprintf.h trunk/varnish-cache/include/compat/setproctitle.h trunk/varnish-cache/include/compat/srandomdev.h trunk/varnish-cache/include/compat/strlcat.h trunk/varnish-cache/include/compat/strlcpy.h trunk/varnish-cache/include/compat/strndup.h trunk/varnish-cache/include/compat/vasprintf.h trunk/varnish-cache/include/http_headers.h trunk/varnish-cache/include/libvarnish.h trunk/varnish-cache/include/libvcl.h trunk/varnish-cache/include/shmlog.h trunk/varnish-cache/include/shmlog_tags.h trunk/varnish-cache/include/varnish/assert.h trunk/varnish-cache/include/varnishapi.h trunk/varnish-cache/include/vcl.h trunk/varnish-cache/include/vcl_returns.h trunk/varnish-cache/include/vrt.h trunk/varnish-cache/include/vrt_obj.h trunk/varnish-cache/lib/libcompat/asprintf.c trunk/varnish-cache/lib/libcompat/setproctitle.c trunk/varnish-cache/lib/libcompat/srandomdev.c trunk/varnish-cache/lib/libcompat/strndup.c trunk/varnish-cache/lib/libcompat/vasprintf.c trunk/varnish-cache/lib/libvarnish/argv.c trunk/varnish-cache/lib/libvarnish/assert.c trunk/varnish-cache/lib/libvarnish/binary_heap.c trunk/varnish-cache/lib/libvarnish/cli.c trunk/varnish-cache/lib/libvarnish/cli_common.c trunk/varnish-cache/lib/libvarnish/crc32.c trunk/varnish-cache/lib/libvarnish/time.c trunk/varnish-cache/lib/libvarnish/version.c trunk/varnish-cache/lib/libvarnishapi/shmlog.c trunk/varnish-cache/lib/libvcl/vcc_acl.c trunk/varnish-cache/lib/libvcl/vcc_compile.c trunk/varnish-cache/lib/libvcl/vcc_compile.h trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl trunk/varnish-cache/lib/libvcl/vcc_obj.c trunk/varnish-cache/lib/libvcl/vcc_priv.h trunk/varnish-cache/lib/libvcl/vcc_token.c trunk/varnish-cache/lib/libvcl/vcc_token_defs.h Log: Licensify. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * XXX: We need to pass sessions back into the event engine when they are Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * XXX: We need to pass sessions back into the event engine when they are Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * XXX: We need to pass sessions back into the event engine when they are Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * XXX: We need to pass sessions back into the event engine when they are Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Manage backend connections. Modified: trunk/varnish-cache/bin/varnishd/cache_ban.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_ban.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache_ban.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Ban processing Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * This file contains the central state machine for pushing requests. Modified: trunk/varnish-cache/bin/varnishd/cache_cli.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_cli.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache_cli.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Expiry of cached objects and execution of prefetcher Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_hash.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache_hash.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * This is the central hash-table code, it relies on a chosen hash Modified: trunk/varnish-cache/bin/varnishd/cache_http.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_http.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache_http.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * HTTP request storage and manipulation Modified: trunk/varnish-cache/bin/varnishd/cache_main.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_main.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache_main.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/cache_pass.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * XXX: charge bytes to srcaddr Modified: trunk/varnish-cache/bin/varnishd/cache_pipe.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * XXX: charge bytes to srcaddr Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * XXX: automatic thread-pool size adaptation. Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/cache_session.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Session and Client management. Modified: trunk/varnish-cache/bin/varnishd/cache_vcl.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vcl.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache_vcl.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Interface *to* compiled VCL code: Loading, unloading, calling into etc. Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache_vrt.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Runtime support for compiled VCL programs Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Runtime support for compiled VCL programs, ACLs Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_re.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt_re.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/cache_vrt_re.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Runtime support for compiled VCL programs, regexps Modified: trunk/varnish-cache/bin/varnishd/common.h =================================================================== --- trunk/varnish-cache/bin/varnishd/common.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/common.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/hash_classic.c =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_classic.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/hash_classic.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * A classic bucketed hash Modified: trunk/varnish-cache/bin/varnishd/hash_simple_list.c =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_simple_list.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/hash_simple_list.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * This is the reference hash(/lookup) implementation Modified: trunk/varnish-cache/bin/varnishd/hash_slinger.h =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_slinger.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/hash_slinger.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/heritage.h =================================================================== --- trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * This file contains the heritage passed when mgt forks cache Modified: trunk/varnish-cache/bin/varnishd/mgt.h =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/mgt.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/mgt_child.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * The mechanics of handling the child process Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_cli.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/mgt_cli.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * The management process' CLI handling Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.h =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_cli.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/mgt_cli.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/mgt_event.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_event.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/mgt_event.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * VCL compiler stuff Modified: trunk/varnish-cache/bin/varnishd/rfc2616.c =================================================================== --- trunk/varnish-cache/bin/varnishd/rfc2616.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/rfc2616.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/shmlog.c =================================================================== --- trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/stevedore.h =================================================================== --- trunk/varnish-cache/bin/varnishd/stevedore.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/stevedore.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Storage method based on mmap'ed file Modified: trunk/varnish-cache/bin/varnishd/storage_malloc.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_malloc.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/storage_malloc.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Storage method based on malloc(3) Modified: trunk/varnish-cache/bin/varnishd/tcp.c =================================================================== --- trunk/varnish-cache/bin/varnishd/tcp.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/tcp.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/varnishd.c =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * The management process and CLI handling Modified: trunk/varnish-cache/bin/varnishhist/varnishhist.c =================================================================== --- trunk/varnish-cache/bin/varnishhist/varnishhist.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishhist/varnishhist.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Log tailer for Varnish Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.c =================================================================== --- trunk/varnish-cache/bin/varnishlog/varnishlog.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishlog/varnishlog.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Log tailer for Varnish Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Program that will get data from the shared memory log. When it has the data Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.c =================================================================== --- trunk/varnish-cache/bin/varnishstat/varnishstat.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishstat/varnishstat.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Log tailer for Varnish Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.c =================================================================== --- trunk/varnish-cache/bin/varnishtop/varnishtop.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/bin/varnishtop/varnishtop.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Log tailer for Varnish Modified: trunk/varnish-cache/include/binary_heap.h =================================================================== --- trunk/varnish-cache/include/binary_heap.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/include/binary_heap.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Binary Heap API (see: http://en.wikipedia.org/wiki/Binary_heap) Modified: trunk/varnish-cache/include/cli.h =================================================================== --- trunk/varnish-cache/include/cli.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/include/cli.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Public definition of the CLI protocol, part of the published Varnish-API. Modified: trunk/varnish-cache/include/cli_common.h =================================================================== --- trunk/varnish-cache/include/cli_common.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/include/cli_common.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/include/cli_priv.h =================================================================== --- trunk/varnish-cache/include/cli_priv.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/include/cli_priv.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Varnish process internal CLI stuff. Modified: trunk/varnish-cache/include/compat/asprintf.h =================================================================== --- trunk/varnish-cache/include/compat/asprintf.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/include/compat/asprintf.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/include/compat/setproctitle.h =================================================================== --- trunk/varnish-cache/include/compat/setproctitle.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/include/compat/setproctitle.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/include/compat/srandomdev.h =================================================================== --- trunk/varnish-cache/include/compat/srandomdev.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/include/compat/srandomdev.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/include/compat/strlcat.h =================================================================== --- trunk/varnish-cache/include/compat/strlcat.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/include/compat/strlcat.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/include/compat/strlcpy.h =================================================================== --- trunk/varnish-cache/include/compat/strlcpy.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/include/compat/strlcpy.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/include/compat/strndup.h =================================================================== --- trunk/varnish-cache/include/compat/strndup.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/include/compat/strndup.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/include/compat/vasprintf.h =================================================================== --- trunk/varnish-cache/include/compat/vasprintf.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/include/compat/vasprintf.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/include/http_headers.h =================================================================== --- trunk/varnish-cache/include/http_headers.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/include/http_headers.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * a Http header name Modified: trunk/varnish-cache/include/libvarnish.h =================================================================== --- trunk/varnish-cache/include/libvarnish.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/include/libvarnish.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/include/libvcl.h =================================================================== --- trunk/varnish-cache/include/libvcl.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/include/libvcl.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/include/shmlog.h =================================================================== --- trunk/varnish-cache/include/shmlog.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/include/shmlog.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Define the layout of the shared memory log segment. Modified: trunk/varnish-cache/include/shmlog_tags.h =================================================================== --- trunk/varnish-cache/include/shmlog_tags.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/include/shmlog_tags.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Define the tags in the shared memory in a reusable format. Modified: trunk/varnish-cache/include/varnish/assert.h =================================================================== --- trunk/varnish-cache/include/varnish/assert.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/include/varnish/assert.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/include/varnishapi.h =================================================================== --- trunk/varnish-cache/include/varnishapi.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/include/varnishapi.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/include/vcl.h =================================================================== --- trunk/varnish-cache/include/vcl.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/include/vcl.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * NB: This file is machine generated, DO NOT EDIT! Modified: trunk/varnish-cache/include/vcl_returns.h =================================================================== --- trunk/varnish-cache/include/vcl_returns.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/include/vcl_returns.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * NB: This file is machine generated, DO NOT EDIT! Modified: trunk/varnish-cache/include/vrt.h =================================================================== --- trunk/varnish-cache/include/vrt.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/include/vrt.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Runtime support for compiled VCL programs. Modified: trunk/varnish-cache/include/vrt_obj.h =================================================================== --- trunk/varnish-cache/include/vrt_obj.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/include/vrt_obj.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * NB: This file is machine generated, DO NOT EDIT! Modified: trunk/varnish-cache/lib/libcompat/asprintf.c =================================================================== --- trunk/varnish-cache/lib/libcompat/asprintf.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libcompat/asprintf.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * */ Modified: trunk/varnish-cache/lib/libcompat/setproctitle.c =================================================================== --- trunk/varnish-cache/lib/libcompat/setproctitle.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libcompat/setproctitle.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/lib/libcompat/srandomdev.c =================================================================== --- trunk/varnish-cache/lib/libcompat/srandomdev.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libcompat/srandomdev.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/lib/libcompat/strndup.c =================================================================== --- trunk/varnish-cache/lib/libcompat/strndup.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libcompat/strndup.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * */ Modified: trunk/varnish-cache/lib/libcompat/vasprintf.c =================================================================== --- trunk/varnish-cache/lib/libcompat/vasprintf.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libcompat/vasprintf.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * */ Modified: trunk/varnish-cache/lib/libvarnish/argv.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/argv.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libvarnish/argv.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * const char **ParseArgv(const char *s, int comment) Modified: trunk/varnish-cache/lib/libvarnish/assert.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/assert.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libvarnish/assert.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/lib/libvarnish/binary_heap.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/binary_heap.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libvarnish/binary_heap.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Implementation of a binary heap API Modified: trunk/varnish-cache/lib/libvarnish/cli.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/cli.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libvarnish/cli.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Stuff for handling the CLI protocol Modified: trunk/varnish-cache/lib/libvarnish/cli_common.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/cli_common.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libvarnish/cli_common.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/lib/libvarnish/crc32.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/crc32.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libvarnish/crc32.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * This CRC32 implementation is in the public domain. Modified: trunk/varnish-cache/lib/libvarnish/time.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/time.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libvarnish/time.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Semi-trivial functions to handle HTTP header timestamps according to Modified: trunk/varnish-cache/lib/libvarnish/version.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/version.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libvarnish/version.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * Display a standardized version message. Modified: trunk/varnish-cache/lib/libvarnishapi/shmlog.c =================================================================== --- trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/lib/libvcl/vcc_acl.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_acl.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libvcl/vcc_acl.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_compile.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libvcl/vcc_compile.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.h =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_compile.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libvcl/vcc_compile.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * NB: This file is machine generated, DO NOT EDIT! Modified: trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,5 +1,30 @@ #!/usr/local/bin/tclsh8.4 +#- +# Copyright (c) 2006 Verdens Gang AS +# Copyright (c) 2006 Linpro AS +# All rights reserved. # +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# # Generate various .c and .h files for the VCL compiler and the interfaces # for it. Modified: trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,5 +1,30 @@ #!/usr/local/bin/tclsh8.4 +#- +# Copyright (c) 2006 Verdens Gang AS +# Copyright (c) 2006 Linpro AS +# All rights reserved. # +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# # Generate various .c and .h files for the VCL compiler and the interfaces # for it. Modified: trunk/varnish-cache/lib/libvcl/vcc_obj.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_obj.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libvcl/vcc_obj.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * NB: This file is machine generated, DO NOT EDIT! Modified: trunk/varnish-cache/lib/libvcl/vcc_priv.h =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_priv.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libvcl/vcc_priv.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * Stuff shared between main.c and fixed_token.c */ Modified: trunk/varnish-cache/lib/libvcl/vcc_token.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_token.c 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libvcl/vcc_token.c 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ */ Modified: trunk/varnish-cache/lib/libvcl/vcc_token_defs.h =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_token_defs.h 2006-09-18 20:26:19 UTC (rev 1081) +++ trunk/varnish-cache/lib/libvcl/vcc_token_defs.h 2006-09-18 20:27:00 UTC (rev 1082) @@ -1,4 +1,29 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * NB: This file is machine generated, DO NOT EDIT! From des at projects.linpro.no Mon Sep 18 21:08:40 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Mon, 18 Sep 2006 23:08:40 +0200 (CEST) Subject: r1083 - in trunk/varnish-cache/bin: varnishd varnishhist varnishlog varnishncsa varnishstat varnishtop Message-ID: <20060918210840.46FFB1EC36B@projects.linpro.no> Author: des Date: 2006-09-18 23:08:39 +0200 (Mon, 18 Sep 2006) New Revision: 1083 Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 trunk/varnish-cache/bin/varnishhist/varnishhist.1 trunk/varnish-cache/bin/varnishlog/varnishlog.1 trunk/varnish-cache/bin/varnishncsa/varnishncsa.1 trunk/varnish-cache/bin/varnishstat/varnishstat.1 trunk/varnish-cache/bin/varnishtop/varnishtop.1 Log: Licensify man pages as well. Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.1 2006-09-18 20:27:00 UTC (rev 1082) +++ trunk/varnish-cache/bin/varnishd/varnishd.1 2006-09-18 21:08:39 UTC (rev 1083) @@ -1,4 +1,29 @@ +.\"- +.\" Copyright (c) 2006 Verdens Gang AS +.\" Copyright (c) 2006 Linpro AS +.\" All rights reserved. .\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" .\" $Id$ .\" .Dd July 6, 2006 Modified: trunk/varnish-cache/bin/varnishhist/varnishhist.1 =================================================================== --- trunk/varnish-cache/bin/varnishhist/varnishhist.1 2006-09-18 20:27:00 UTC (rev 1082) +++ trunk/varnish-cache/bin/varnishhist/varnishhist.1 2006-09-18 21:08:39 UTC (rev 1083) @@ -1,4 +1,29 @@ +.\"- +.\" Copyright (c) 2006 Verdens Gang AS +.\" Copyright (c) 2006 Linpro AS +.\" All rights reserved. .\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" .\" $Id$ .\" .Dd September 16, 2006 Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.1 =================================================================== --- trunk/varnish-cache/bin/varnishlog/varnishlog.1 2006-09-18 20:27:00 UTC (rev 1082) +++ trunk/varnish-cache/bin/varnishlog/varnishlog.1 2006-09-18 21:08:39 UTC (rev 1083) @@ -1,4 +1,29 @@ +.\"- +.\" Copyright (c) 2006 Verdens Gang AS +.\" Copyright (c) 2006 Linpro AS +.\" All rights reserved. .\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" .\" $Id$ .\" .Dd September 16, 2006 Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.1 =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.1 2006-09-18 20:27:00 UTC (rev 1082) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.1 2006-09-18 21:08:39 UTC (rev 1083) @@ -1,4 +1,29 @@ +.\"- +.\" Copyright (c) 2006 Verdens Gang AS +.\" Copyright (c) 2006 Linpro AS +.\" All rights reserved. .\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" .\" $Id$ .\" .Dd September 16, 2006 Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.1 =================================================================== --- trunk/varnish-cache/bin/varnishstat/varnishstat.1 2006-09-18 20:27:00 UTC (rev 1082) +++ trunk/varnish-cache/bin/varnishstat/varnishstat.1 2006-09-18 21:08:39 UTC (rev 1083) @@ -1,4 +1,29 @@ +.\"- +.\" Copyright (c) 2006 Verdens Gang AS +.\" Copyright (c) 2006 Linpro AS +.\" All rights reserved. .\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" .\" $Id$ .\" .Dd September 16, 2006 Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.1 =================================================================== --- trunk/varnish-cache/bin/varnishtop/varnishtop.1 2006-09-18 20:27:00 UTC (rev 1082) +++ trunk/varnish-cache/bin/varnishtop/varnishtop.1 2006-09-18 21:08:39 UTC (rev 1083) @@ -1,4 +1,29 @@ +.\"- +.\" Copyright (c) 2006 Verdens Gang AS +.\" Copyright (c) 2006 Linpro AS +.\" All rights reserved. .\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" .\" $Id$ .\" .Dd September 16, 2006 From phk at projects.linpro.no Mon Sep 18 21:30:53 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 23:30:53 +0200 (CEST) Subject: r1084 - trunk/varnish-cache/include Message-ID: <20060918213053.B73271EC36F@projects.linpro.no> Author: phk Date: 2006-09-18 23:30:53 +0200 (Mon, 18 Sep 2006) New Revision: 1084 Removed: trunk/varnish-cache/include/hash.h Modified: trunk/varnish-cache/include/Makefile.am Log: Remove unused file Modified: trunk/varnish-cache/include/Makefile.am =================================================================== --- trunk/varnish-cache/include/Makefile.am 2006-09-18 21:08:39 UTC (rev 1083) +++ trunk/varnish-cache/include/Makefile.am 2006-09-18 21:30:53 UTC (rev 1084) @@ -13,7 +13,6 @@ compat/strndup.h \ compat/vasprintf.h \ compat/vis.h \ - hash.h \ http_headers.h \ libvarnish.h \ libvcl.h \ Deleted: trunk/varnish-cache/include/hash.h =================================================================== --- trunk/varnish-cache/include/hash.h 2006-09-18 21:08:39 UTC (rev 1083) +++ trunk/varnish-cache/include/hash.h 2006-09-18 21:30:53 UTC (rev 1084) @@ -1,111 +0,0 @@ -/* $Id$ */ -/* $NetBSD: hash.h,v 1.5 2006/02/16 20:17:20 perry Exp $ */ - -/*- - * Copyright (c) 2001 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Luke Mewburn. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _SYS_HASH_H_ -#define _SYS_HASH_H_ - -#include -#ifdef __HAVE_MACHINE_HASH_H -#include -#endif - - -#ifndef __HAVE_HASH32_BUF /* not overridden by MD hash */ - -#define HASH32_BUF_INIT 5381 - -/* - * uint32_t - * hash32_buf(const void *bf, size_t len, uint32_t hash) - * return a 32 bit hash of the binary buffer buf (size len), - * seeded with an initial hash value of hash (usually HASH32_BUF_INIT). - */ -static __inline uint32_t -hash32_buf(const void *bf, size_t len, uint32_t hash) -{ - const uint8_t *s = bf; - - while (len-- != 0) /* "nemesi": k=257, r=r*257 */ - hash = hash * 257 + *s++; - return (hash * 257); -} -#endif /* __HAVE_HASH32_BUF */ - - -#ifndef __HAVE_HASH32_STR /* not overridden by MD hash */ - -#define HASH32_STR_INIT 5381 -/* - * uint32_t - * hash32_str(const void *bf, uint32_t hash) - * return a 32 bit hash of NUL terminated ASCII string buf, - * seeded with an initial hash value of hash (usually HASH32_STR_INIT). - */ -static __inline uint32_t -hash32_str(const void *bf, uint32_t hash) -{ - const uint8_t *s = bf; - uint8_t c; - - while ((c = *s++) != 0) - hash = hash * 33 + c; /* "perl": k=33, r=r+r/32 */ - return (hash + (hash >> 5)); -} - -/* - * uint32_t - * hash32_strn(const void *bf, size_t len, uint32_t hash) - * return a 32 bit hash of NUL terminated ASCII string buf up to - * a maximum of len bytes, - * seeded with an initial hash value of hash (usually HASH32_STR_INIT). - */ -static __inline uint32_t -hash32_strn(const void *bf, size_t len, uint32_t hash) -{ - const uint8_t *s = bf; - uint8_t c; - - while ((c = *s++) != 0 && len-- != 0) - hash = hash * 33 + c; /* "perl": k=33, r=r+r/32 */ - return (hash + (hash >> 5)); -} -#endif /* __HAVE_HASH32_STR */ - - -#endif /* !_SYS_HASH_H_ */ From phk at projects.linpro.no Mon Sep 18 21:32:28 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 23:32:28 +0200 (CEST) Subject: r1085 - in trunk/varnish-cache/include: . varnish Message-ID: <20060918213228.4E2591EC378@projects.linpro.no> Author: phk Date: 2006-09-18 23:32:28 +0200 (Mon, 18 Sep 2006) New Revision: 1085 Removed: trunk/varnish-cache/include/varnish/assert.h Modified: trunk/varnish-cache/include/Makefile.am Log: Remove unused file Modified: trunk/varnish-cache/include/Makefile.am =================================================================== --- trunk/varnish-cache/include/Makefile.am 2006-09-18 21:30:53 UTC (rev 1084) +++ trunk/varnish-cache/include/Makefile.am 2006-09-18 21:32:28 UTC (rev 1085) @@ -23,7 +23,6 @@ shmlog_tags.h \ stat_field.h \ stats.h \ - varnish/assert.h \ varnishapi.h \ vcl.h \ vcl_returns.h \ Deleted: trunk/varnish-cache/include/varnish/assert.h =================================================================== --- trunk/varnish-cache/include/varnish/assert.h 2006-09-18 21:30:53 UTC (rev 1084) +++ trunk/varnish-cache/include/varnish/assert.h 2006-09-18 21:32:28 UTC (rev 1085) @@ -1,45 +0,0 @@ -/*- - * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006 Linpro AS - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $Id$ - */ - -#ifndef VARNISH_ASSERT_H_INCLUDED -#define VARNISH_ASSERT_H_INCLUDED - -#ifdef NDEBUG -#define V_ASSERT(test) \ - do { /* nothing */ } while (0) -#else -#define V_ASSERT(test) \ - do { \ - if (!(test)) \ - vdb_panic("assertion failed in %s line %d: %s", \ - #test, __FILE__, __LINE__); \ - } while (0) -#endif - -#endif From phk at projects.linpro.no Mon Sep 18 21:33:17 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 23:33:17 +0200 (CEST) Subject: r1086 - trunk/varnish-cache/include Message-ID: <20060918213317.0C6E81EC378@projects.linpro.no> Author: phk Date: 2006-09-18 23:33:16 +0200 (Mon, 18 Sep 2006) New Revision: 1086 Removed: trunk/varnish-cache/include/varnish/ Log: Remove unused directory From des at projects.linpro.no Mon Sep 18 21:48:01 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Mon, 18 Sep 2006 23:48:01 +0200 (CEST) Subject: r1087 - in trunk/varnish-cache: bin/varnishd bin/varnishhist bin/varnishlog bin/varnishncsa bin/varnishstat bin/varnishtester bin/varnishtop include include/compat lib/libcompat lib/libvarnish lib/libvarnishapi lib/libvcl Message-ID: <20060918214801.9581E1EC36F@projects.linpro.no> Author: des Date: 2006-09-18 23:48:00 +0200 (Mon, 18 Sep 2006) New Revision: 1087 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_acceptor.c trunk/varnish-cache/bin/varnishd/cache_acceptor.h trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c trunk/varnish-cache/bin/varnishd/cache_backend.c trunk/varnish-cache/bin/varnishd/cache_ban.c trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_cli.c trunk/varnish-cache/bin/varnishd/cache_expire.c trunk/varnish-cache/bin/varnishd/cache_fetch.c trunk/varnish-cache/bin/varnishd/cache_hash.c trunk/varnish-cache/bin/varnishd/cache_http.c trunk/varnish-cache/bin/varnishd/cache_main.c trunk/varnish-cache/bin/varnishd/cache_pass.c trunk/varnish-cache/bin/varnishd/cache_pipe.c trunk/varnish-cache/bin/varnishd/cache_pool.c trunk/varnish-cache/bin/varnishd/cache_response.c trunk/varnish-cache/bin/varnishd/cache_session.c trunk/varnish-cache/bin/varnishd/cache_vcl.c trunk/varnish-cache/bin/varnishd/cache_vrt.c trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c trunk/varnish-cache/bin/varnishd/cache_vrt_re.c trunk/varnish-cache/bin/varnishd/common.h trunk/varnish-cache/bin/varnishd/hash_classic.c trunk/varnish-cache/bin/varnishd/hash_simple_list.c trunk/varnish-cache/bin/varnishd/hash_slinger.h trunk/varnish-cache/bin/varnishd/heritage.h trunk/varnish-cache/bin/varnishd/mgt.h trunk/varnish-cache/bin/varnishd/mgt_child.c trunk/varnish-cache/bin/varnishd/mgt_cli.c trunk/varnish-cache/bin/varnishd/mgt_cli.h trunk/varnish-cache/bin/varnishd/mgt_event.c trunk/varnish-cache/bin/varnishd/mgt_event.h trunk/varnish-cache/bin/varnishd/mgt_param.c trunk/varnish-cache/bin/varnishd/mgt_vcc.c trunk/varnish-cache/bin/varnishd/rfc2616.c trunk/varnish-cache/bin/varnishd/shmlog.c trunk/varnish-cache/bin/varnishd/steps.h trunk/varnish-cache/bin/varnishd/stevedore.h trunk/varnish-cache/bin/varnishd/storage_file.c trunk/varnish-cache/bin/varnishd/storage_malloc.c trunk/varnish-cache/bin/varnishd/tcp.c trunk/varnish-cache/bin/varnishd/varnishd.1 trunk/varnish-cache/bin/varnishd/varnishd.c trunk/varnish-cache/bin/varnishhist/varnishhist.1 trunk/varnish-cache/bin/varnishhist/varnishhist.c trunk/varnish-cache/bin/varnishlog/varnishlog.1 trunk/varnish-cache/bin/varnishlog/varnishlog.c trunk/varnish-cache/bin/varnishncsa/varnishncsa.1 trunk/varnish-cache/bin/varnishncsa/varnishncsa.c trunk/varnish-cache/bin/varnishstat/varnishstat.1 trunk/varnish-cache/bin/varnishstat/varnishstat.c trunk/varnish-cache/bin/varnishtester/varnishtester.c trunk/varnish-cache/bin/varnishtop/varnishtop.1 trunk/varnish-cache/bin/varnishtop/varnishtop.c trunk/varnish-cache/include/binary_heap.h trunk/varnish-cache/include/cli.h trunk/varnish-cache/include/cli_common.h trunk/varnish-cache/include/cli_priv.h trunk/varnish-cache/include/compat/asprintf.h trunk/varnish-cache/include/compat/setproctitle.h trunk/varnish-cache/include/compat/srandomdev.h trunk/varnish-cache/include/compat/strlcat.h trunk/varnish-cache/include/compat/strlcpy.h trunk/varnish-cache/include/compat/strndup.h trunk/varnish-cache/include/compat/vasprintf.h trunk/varnish-cache/include/http_headers.h trunk/varnish-cache/include/libvarnish.h trunk/varnish-cache/include/libvcl.h trunk/varnish-cache/include/miniobj.h trunk/varnish-cache/include/shmlog.h trunk/varnish-cache/include/shmlog_tags.h trunk/varnish-cache/include/stat_field.h trunk/varnish-cache/include/stats.h trunk/varnish-cache/include/varnishapi.h trunk/varnish-cache/include/vcl.h trunk/varnish-cache/include/vcl_returns.h trunk/varnish-cache/include/vrt.h trunk/varnish-cache/include/vrt_obj.h trunk/varnish-cache/include/vsb.h trunk/varnish-cache/lib/libcompat/asprintf.c trunk/varnish-cache/lib/libcompat/setproctitle.c trunk/varnish-cache/lib/libcompat/srandomdev.c trunk/varnish-cache/lib/libcompat/strndup.c trunk/varnish-cache/lib/libcompat/vasprintf.c trunk/varnish-cache/lib/libvarnish/argv.c trunk/varnish-cache/lib/libvarnish/assert.c trunk/varnish-cache/lib/libvarnish/binary_heap.c trunk/varnish-cache/lib/libvarnish/cli.c trunk/varnish-cache/lib/libvarnish/cli_common.c trunk/varnish-cache/lib/libvarnish/crc32.c trunk/varnish-cache/lib/libvarnish/time.c trunk/varnish-cache/lib/libvarnish/version.c trunk/varnish-cache/lib/libvarnishapi/base64.c trunk/varnish-cache/lib/libvarnishapi/shmlog.c trunk/varnish-cache/lib/libvcl/vcc_acl.c trunk/varnish-cache/lib/libvcl/vcc_compile.c trunk/varnish-cache/lib/libvcl/vcc_compile.h trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c trunk/varnish-cache/lib/libvcl/vcc_obj.c trunk/varnish-cache/lib/libvcl/vcc_priv.h trunk/varnish-cache/lib/libvcl/vcc_token.c trunk/varnish-cache/lib/libvcl/vcc_token_defs.h Log: Rendons ?\195?\160 C?\195?\169sar ce qui lui appartient. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * XXX: We need to pass sessions back into the event engine when they are Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -1,5 +1,7 @@ -/* - * $Id$ +/* + * Initial implementation by Poul-Henning Kamp + * + * $Id$ */ struct sess; Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * XXX: We need to pass sessions back into the event engine when they are Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * XXX: We need to pass sessions back into the event engine when they are Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * XXX: We need to pass sessions back into the event engine when they are Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Manage backend connections. Modified: trunk/varnish-cache/bin/varnishd/cache_ban.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_ban.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_ban.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Ban processing Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * This file contains the central state machine for pushing requests. Modified: trunk/varnish-cache/bin/varnishd/cache_cli.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_cli.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_cli.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Expiry of cached objects and execution of prefetcher Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_hash.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_hash.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,10 +24,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * - * This is the central hash-table code, it relies on a chosen hash - * implmentation only for the actual hashing, all the housekeeping + * This is the central hash-table code, it relies on a chosen hash + * implementation only for the actual hashing, all the housekeeping * happens here. * * We have two kinds of structures, objecthead and object. An objecthead @@ -37,7 +39,7 @@ * * Each objecthead has a mutex which locks both its own fields, the * list of objects and fields in the objects. - * + * * The hash implementation must supply a reference count facility on * the objecthead, and return with a reference held after a lookup. * Modified: trunk/varnish-cache/bin/varnishd/cache_http.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_http.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_http.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * HTTP request storage and manipulation Modified: trunk/varnish-cache/bin/varnishd/cache_main.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_main.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_main.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/cache_pass.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * XXX: charge bytes to srcaddr Modified: trunk/varnish-cache/bin/varnishd/cache_pipe.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * XXX: charge bytes to srcaddr Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * XXX: automatic thread-pool size adaptation. Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/cache_session.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Session and Client management. Modified: trunk/varnish-cache/bin/varnishd/cache_vcl.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vcl.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_vcl.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Interface *to* compiled VCL code: Loading, unloading, calling into etc. Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_vrt.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Runtime support for compiled VCL programs Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Runtime support for compiled VCL programs, ACLs Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_re.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt_re.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/cache_vrt_re.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Runtime support for compiled VCL programs, regexps Modified: trunk/varnish-cache/bin/varnishd/common.h =================================================================== --- trunk/varnish-cache/bin/varnishd/common.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/common.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/hash_classic.c =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_classic.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/hash_classic.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * A classic bucketed hash Modified: trunk/varnish-cache/bin/varnishd/hash_simple_list.c =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_simple_list.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/hash_simple_list.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * This is the reference hash(/lookup) implementation Modified: trunk/varnish-cache/bin/varnishd/hash_slinger.h =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_slinger.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/hash_slinger.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/heritage.h =================================================================== --- trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * This file contains the heritage passed when mgt forks cache Modified: trunk/varnish-cache/bin/varnishd/mgt.h =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/mgt.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/mgt_child.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * The mechanics of handling the child process Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_cli.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/mgt_cli.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * The management process' CLI handling Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.h =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_cli.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/mgt_cli.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/mgt_event.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_event.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/mgt_event.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/mgt_event.h =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_event.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/mgt_event.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -1,3 +1,8 @@ +/* + * Initial implementation by Poul-Henning Kamp + * + * $Id$ + */ #include #include "queue.h" Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * VCL compiler stuff Modified: trunk/varnish-cache/bin/varnishd/rfc2616.c =================================================================== --- trunk/varnish-cache/bin/varnishd/rfc2616.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/rfc2616.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/shmlog.c =================================================================== --- trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/steps.h =================================================================== --- trunk/varnish-cache/bin/varnishd/steps.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/steps.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -1,4 +1,8 @@ -/* $Id$ */ +/* + * Initial implementation by Poul-Henning Kamp + * + * $Id$ + */ STEP(again, AGAIN) STEP(first, FIRST) Modified: trunk/varnish-cache/bin/varnishd/stevedore.h =================================================================== --- trunk/varnish-cache/bin/varnishd/stevedore.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/stevedore.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Storage method based on mmap'ed file Modified: trunk/varnish-cache/bin/varnishd/storage_malloc.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_malloc.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/storage_malloc.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Storage method based on malloc(3) Modified: trunk/varnish-cache/bin/varnishd/tcp.c =================================================================== --- trunk/varnish-cache/bin/varnishd/tcp.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/tcp.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.1 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/varnishd.1 2006-09-18 21:48:00 UTC (rev 1087) @@ -267,5 +267,5 @@ The .Nm daemon was developed by -.An Poul-Henning Kamp Aq phk at freebsd.dk +.An Poul-Henning Kamp Aq phk at phk.freebsd.dk in cooperation with Verdens Gang AS and Linpro AS. Modified: trunk/varnish-cache/bin/varnishd/varnishd.c =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * The management process and CLI handling Modified: trunk/varnish-cache/bin/varnishhist/varnishhist.1 =================================================================== --- trunk/varnish-cache/bin/varnishhist/varnishhist.1 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishhist/varnishhist.1 2006-09-18 21:48:00 UTC (rev 1087) @@ -129,5 +129,5 @@ The .Nm utility was developed by -.An Poul-Henning Kamp Aq phk at freebsd.dk +.An Poul-Henning Kamp Aq phk at phk.freebsd.dk in cooperation with Verdens Gang AS and Linpro AS. Modified: trunk/varnish-cache/bin/varnishhist/varnishhist.c =================================================================== --- trunk/varnish-cache/bin/varnishhist/varnishhist.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishhist/varnishhist.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Log tailer for Varnish Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.1 =================================================================== --- trunk/varnish-cache/bin/varnishlog/varnishlog.1 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishlog/varnishlog.1 2006-09-18 21:48:00 UTC (rev 1087) @@ -185,5 +185,5 @@ The .Nm utility was developed by -.An Poul-Henning Kamp Aq phk at freebsd.dk +.An Poul-Henning Kamp Aq phk at phk.freebsd.dk in cooperation with Verdens Gang AS and Linpro AS. Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.c =================================================================== --- trunk/varnish-cache/bin/varnishlog/varnishlog.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishlog/varnishlog.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Log tailer for Varnish Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.1 =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.1 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.1 2006-09-18 21:48:00 UTC (rev 1087) @@ -127,5 +127,5 @@ The .Nm utility was developed by -.An Poul-Henning Kamp Aq phk at freebsd.dk +.An Poul-Henning Kamp Aq phk at phk.freebsd.dk in cooperation with Verdens Gang AS and Linpro AS. Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,9 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Anders Berg and + * Poul-Henning Kamp + * * $Id$ * * Program that will get data from the shared memory log. When it has the data Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.1 =================================================================== --- trunk/varnish-cache/bin/varnishstat/varnishstat.1 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishstat/varnishstat.1 2006-09-18 21:48:00 UTC (rev 1087) @@ -80,5 +80,5 @@ The .Nm utility was developed by -.An Poul-Henning Kamp Aq phk at freebsd.dk +.An Poul-Henning Kamp Aq phk at phk.freebsd.dk in cooperation with Verdens Gang AS and Linpro AS. Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.c =================================================================== --- trunk/varnish-cache/bin/varnishstat/varnishstat.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishstat/varnishstat.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Log tailer for Varnish Modified: trunk/varnish-cache/bin/varnishtester/varnishtester.c =================================================================== --- trunk/varnish-cache/bin/varnishtester/varnishtester.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishtester/varnishtester.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -1,3 +1,8 @@ +/* + * Initial implementation by Poul-Henning Kamp + * + * $Id$ + */ #include #include Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.1 =================================================================== --- trunk/varnish-cache/bin/varnishtop/varnishtop.1 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishtop/varnishtop.1 2006-09-18 21:48:00 UTC (rev 1087) @@ -140,7 +140,7 @@ The .Nm utility was developed by -.An Poul-Henning Kamp Aq phk at freebsd.dk +.An Poul-Henning Kamp Aq phk at phk.freebsd.dk in cooperation with Verdens Gang AS and Linpro AS. .Sh BUGS The Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.c =================================================================== --- trunk/varnish-cache/bin/varnishtop/varnishtop.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/bin/varnishtop/varnishtop.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Log tailer for Varnish Modified: trunk/varnish-cache/include/binary_heap.h =================================================================== --- trunk/varnish-cache/include/binary_heap.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/binary_heap.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Binary Heap API (see: http://en.wikipedia.org/wiki/Binary_heap) Modified: trunk/varnish-cache/include/cli.h =================================================================== --- trunk/varnish-cache/include/cli.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/cli.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Public definition of the CLI protocol, part of the published Varnish-API. Modified: trunk/varnish-cache/include/cli_common.h =================================================================== --- trunk/varnish-cache/include/cli_common.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/cli_common.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/include/cli_priv.h =================================================================== --- trunk/varnish-cache/include/cli_priv.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/cli_priv.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Varnish process internal CLI stuff. Modified: trunk/varnish-cache/include/compat/asprintf.h =================================================================== --- trunk/varnish-cache/include/compat/asprintf.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/compat/asprintf.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/include/compat/setproctitle.h =================================================================== --- trunk/varnish-cache/include/compat/setproctitle.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/compat/setproctitle.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/include/compat/srandomdev.h =================================================================== --- trunk/varnish-cache/include/compat/srandomdev.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/compat/srandomdev.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/include/compat/strlcat.h =================================================================== --- trunk/varnish-cache/include/compat/strlcat.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/compat/strlcat.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/include/compat/strlcpy.h =================================================================== --- trunk/varnish-cache/include/compat/strlcpy.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/compat/strlcpy.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/include/compat/strndup.h =================================================================== --- trunk/varnish-cache/include/compat/strndup.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/compat/strndup.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/include/compat/vasprintf.h =================================================================== --- trunk/varnish-cache/include/compat/vasprintf.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/compat/vasprintf.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/include/http_headers.h =================================================================== --- trunk/varnish-cache/include/http_headers.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/http_headers.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * a Http header name Modified: trunk/varnish-cache/include/libvarnish.h =================================================================== --- trunk/varnish-cache/include/libvarnish.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/libvarnish.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/include/libvcl.h =================================================================== --- trunk/varnish-cache/include/libvcl.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/libvcl.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/include/miniobj.h =================================================================== --- trunk/varnish-cache/include/miniobj.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/miniobj.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -1,4 +1,8 @@ -/* $Id$ */ +/* + * Initial implementation by Poul-Henning Kamp + * + * $Id$ + */ #define FREE_OBJ(to) \ do { \ Modified: trunk/varnish-cache/include/shmlog.h =================================================================== --- trunk/varnish-cache/include/shmlog.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/shmlog.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Define the layout of the shared memory log segment. Modified: trunk/varnish-cache/include/shmlog_tags.h =================================================================== --- trunk/varnish-cache/include/shmlog_tags.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/shmlog_tags.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Define the tags in the shared memory in a reusable format. Modified: trunk/varnish-cache/include/stat_field.h =================================================================== --- trunk/varnish-cache/include/stat_field.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/stat_field.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -1,4 +1,8 @@ -/* $Id$ */ +/* + * Initial implementation by Poul-Henning Kamp + * + * $Id$ + */ MAC_STAT(client_conn, uint64_t, "u", "Client connections accepted") MAC_STAT(client_req, uint64_t, "u", "Client requests received") Modified: trunk/varnish-cache/include/stats.h =================================================================== --- trunk/varnish-cache/include/stats.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/stats.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -1,4 +1,8 @@ -/* $Id$ */ +/* + * Initial implementation by Poul-Henning Kamp + * + * $Id$ + */ #include Modified: trunk/varnish-cache/include/varnishapi.h =================================================================== --- trunk/varnish-cache/include/varnishapi.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/varnishapi.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/include/vcl.h =================================================================== --- trunk/varnish-cache/include/vcl.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/vcl.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * NB: This file is machine generated, DO NOT EDIT! Modified: trunk/varnish-cache/include/vcl_returns.h =================================================================== --- trunk/varnish-cache/include/vcl_returns.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/vcl_returns.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * NB: This file is machine generated, DO NOT EDIT! Modified: trunk/varnish-cache/include/vrt.h =================================================================== --- trunk/varnish-cache/include/vrt.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/vrt.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,8 +24,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * Initial implementation by Poul-Henning Kamp * + * $Id$ + * * Runtime support for compiled VCL programs. * * XXX: When this file is changed, lib/libvcl/vcc_gen_fixed_token.tcl Modified: trunk/varnish-cache/include/vrt_obj.h =================================================================== --- trunk/varnish-cache/include/vrt_obj.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/vrt_obj.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * NB: This file is machine generated, DO NOT EDIT! Modified: trunk/varnish-cache/include/vsb.h =================================================================== --- trunk/varnish-cache/include/vsb.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/include/vsb.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -25,6 +25,8 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * $FreeBSD: src/sys/sys/vsb.h,v 1.14 2004/07/09 11:35:30 des Exp $ */ Modified: trunk/varnish-cache/lib/libcompat/asprintf.c =================================================================== --- trunk/varnish-cache/lib/libcompat/asprintf.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libcompat/asprintf.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Dag-Erling Sm?rgrav + * * $Id$ * */ Modified: trunk/varnish-cache/lib/libcompat/setproctitle.c =================================================================== --- trunk/varnish-cache/lib/libcompat/setproctitle.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libcompat/setproctitle.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Dag-Erling Sm?rgrav + * * $Id$ */ Modified: trunk/varnish-cache/lib/libcompat/srandomdev.c =================================================================== --- trunk/varnish-cache/lib/libcompat/srandomdev.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libcompat/srandomdev.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Dag-Erling Sm?rgrav + * * $Id$ */ Modified: trunk/varnish-cache/lib/libcompat/strndup.c =================================================================== --- trunk/varnish-cache/lib/libcompat/strndup.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libcompat/strndup.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * */ Modified: trunk/varnish-cache/lib/libcompat/vasprintf.c =================================================================== --- trunk/varnish-cache/lib/libcompat/vasprintf.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libcompat/vasprintf.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Dag-Erling Sm?rgrav + * * $Id$ * */ Modified: trunk/varnish-cache/lib/libvarnish/argv.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/argv.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libvarnish/argv.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * const char **ParseArgv(const char *s, int comment) Modified: trunk/varnish-cache/lib/libvarnish/assert.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/assert.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libvarnish/assert.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/lib/libvarnish/binary_heap.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/binary_heap.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libvarnish/binary_heap.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Implementation of a binary heap API Modified: trunk/varnish-cache/lib/libvarnish/cli.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/cli.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libvarnish/cli.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Stuff for handling the CLI protocol Modified: trunk/varnish-cache/lib/libvarnish/cli_common.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/cli_common.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libvarnish/cli_common.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/lib/libvarnish/crc32.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/crc32.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libvarnish/crc32.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * This CRC32 implementation is in the public domain. Modified: trunk/varnish-cache/lib/libvarnish/time.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/time.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libvarnish/time.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Semi-trivial functions to handle HTTP header timestamps according to Modified: trunk/varnish-cache/lib/libvarnish/version.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/version.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libvarnish/version.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * Display a standardized version message. Modified: trunk/varnish-cache/lib/libvarnishapi/base64.c =================================================================== --- trunk/varnish-cache/lib/libvarnishapi/base64.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libvarnishapi/base64.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -1,4 +1,8 @@ -/* $Id$ */ +/* + * Initial implementation by Poul-Henning Kamp + * + * $Id$ + */ static const char *b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; Modified: trunk/varnish-cache/lib/libvarnishapi/shmlog.c =================================================================== --- trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/lib/libvcl/vcc_acl.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_acl.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libvcl/vcc_acl.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_compile.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libvcl/vcc_compile.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.h =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_compile.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libvcl/vcc_compile.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * NB: This file is machine generated, DO NOT EDIT! Modified: trunk/varnish-cache/lib/libvcl/vcc_obj.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_obj.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libvcl/vcc_obj.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * NB: This file is machine generated, DO NOT EDIT! Modified: trunk/varnish-cache/lib/libvcl/vcc_priv.h =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_priv.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libvcl/vcc_priv.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,10 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * + * $Id$ + * * Stuff shared between main.c and fixed_token.c */ Modified: trunk/varnish-cache/lib/libvcl/vcc_token.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_token.c 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libvcl/vcc_token.c 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ */ Modified: trunk/varnish-cache/lib/libvcl/vcc_token_defs.h =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_token_defs.h 2006-09-18 21:33:16 UTC (rev 1086) +++ trunk/varnish-cache/lib/libvcl/vcc_token_defs.h 2006-09-18 21:48:00 UTC (rev 1087) @@ -24,6 +24,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * Initial implementation by Poul-Henning Kamp + * * $Id$ * * NB: This file is machine generated, DO NOT EDIT! From des at projects.linpro.no Mon Sep 18 21:48:28 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Mon, 18 Sep 2006 23:48:28 +0200 (CEST) Subject: r1088 - in trunk/varnish-cache: bin/varnishd bin/varnishtester lib/libvcl Message-ID: <20060918214828.3D9BA1EC36F@projects.linpro.no> Author: des Date: 2006-09-18 23:48:28 +0200 (Mon, 18 Sep 2006) New Revision: 1088 Modified: trunk/varnish-cache/bin/varnishd/mgt_event.h trunk/varnish-cache/bin/varnishtester/varnishtester.c trunk/varnish-cache/lib/libvcl/vcc_priv.h Log: Expand tags. From des at projects.linpro.no Mon Sep 18 21:50:48 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Mon, 18 Sep 2006 23:50:48 +0200 (CEST) Subject: r1089 - trunk/varnish-cache/lib/libvcl Message-ID: <20060918215048.0EAEE1EC37D@projects.linpro.no> Author: des Date: 2006-09-18 23:50:47 +0200 (Mon, 18 Sep 2006) New Revision: 1089 Modified: trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c trunk/varnish-cache/lib/libvcl/vcc_obj.c trunk/varnish-cache/lib/libvcl/vcc_token_defs.h Log: Regenerate to revert over-eager mechanical edits. Modified: trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2006-09-18 21:48:28 UTC (rev 1088) +++ trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2006-09-18 21:50:47 UTC (rev 1089) @@ -1,31 +1,4 @@ -/*- - * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006 Linpro AS - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * Initial implementation by Poul-Henning Kamp - * +/* * $Id$ * * NB: This file is machine generated, DO NOT EDIT! @@ -493,9 +466,36 @@ fputs(" vcl_func_f *fetch_func;\n", f); fputs(" vcl_func_f *timeout_func;\n", f); fputs("};\n", f); - fputs("/*\n", f); - fputs(" * $Id$ \n", f); + fputs("/*-\n", f); + fputs(" * Copyright (c) 2006 Verdens Gang AS\n", f); + fputs(" * Copyright (c) 2006 Linpro AS\n", f); + fputs(" * All rights reserved.\n", f); fputs(" *\n", f); + fputs(" * Redistribution and use in source and binary forms, with or without\n", f); + fputs(" * modification, are permitted provided that the following conditions\n", f); + fputs(" * are met:\n", f); + fputs(" * 1. Redistributions of source code must retain the above copyright\n", f); + fputs(" * notice, this list of conditions and the following disclaimer.\n", f); + fputs(" * 2. Redistributions in binary form must reproduce the above copyright\n", f); + fputs(" * notice, this list of conditions and the following disclaimer in the\n", f); + fputs(" * documentation and/or other materials provided with the distribution.\n", f); + fputs(" *\n", f); + fputs(" * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n", f); + fputs(" * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n", f); + fputs(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n", f); + fputs(" * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE\n", f); + fputs(" * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n", f); + fputs(" * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n", f); + fputs(" * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n", f); + fputs(" * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n", f); + fputs(" * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n", f); + fputs(" * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n", f); + fputs(" * SUCH DAMAGE.\n", f); + fputs(" *\n", f); + fputs(" * Initial implementation by Poul-Henning Kamp \n", f); + fputs(" *\n", f); + fputs(" * $Id$\n", f); + fputs(" *\n", f); fputs(" * Runtime support for compiled VCL programs.\n", f); fputs(" *\n", f); fputs(" * XXX: When this file is changed, lib/libvcl/vcc_gen_fixed_token.tcl\n", f); Modified: trunk/varnish-cache/lib/libvcl/vcc_obj.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_obj.c 2006-09-18 21:48:28 UTC (rev 1088) +++ trunk/varnish-cache/lib/libvcl/vcc_obj.c 2006-09-18 21:50:47 UTC (rev 1089) @@ -1,31 +1,4 @@ -/*- - * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006 Linpro AS - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * Initial implementation by Poul-Henning Kamp - * +/* * $Id$ * * NB: This file is machine generated, DO NOT EDIT! Modified: trunk/varnish-cache/lib/libvcl/vcc_token_defs.h =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_token_defs.h 2006-09-18 21:48:28 UTC (rev 1088) +++ trunk/varnish-cache/lib/libvcl/vcc_token_defs.h 2006-09-18 21:50:47 UTC (rev 1089) @@ -1,31 +1,4 @@ -/*- - * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006 Linpro AS - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * Initial implementation by Poul-Henning Kamp - * +/* * $Id$ * * NB: This file is machine generated, DO NOT EDIT! From phk at projects.linpro.no Mon Sep 18 21:51:59 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Mon, 18 Sep 2006 23:51:59 +0200 (CEST) Subject: r1090 - trunk/varnish-cache/bin Message-ID: <20060918215159.5AD501EC37A@projects.linpro.no> Author: phk Date: 2006-09-18 23:51:59 +0200 (Mon, 18 Sep 2006) New Revision: 1090 Removed: trunk/varnish-cache/bin/varnishtester/ Log: Remove this not-quite-a-prototype From phk at projects.linpro.no Mon Sep 18 22:00:33 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Tue, 19 Sep 2006 00:00:33 +0200 (CEST) Subject: r1091 - in trunk/varnish-cache: bin/varnishd bin/varnishhist bin/varnishlog bin/varnishstat bin/varnishtop include lib/libvarnish lib/libvarnishapi lib/libvcl Message-ID: <20060918220033.151BF1EC36B@projects.linpro.no> Author: phk Date: 2006-09-19 00:00:31 +0200 (Tue, 19 Sep 2006) New Revision: 1091 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_acceptor.c trunk/varnish-cache/bin/varnishd/cache_acceptor.h trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c trunk/varnish-cache/bin/varnishd/cache_backend.c trunk/varnish-cache/bin/varnishd/cache_ban.c trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_cli.c trunk/varnish-cache/bin/varnishd/cache_expire.c trunk/varnish-cache/bin/varnishd/cache_fetch.c trunk/varnish-cache/bin/varnishd/cache_hash.c trunk/varnish-cache/bin/varnishd/cache_http.c trunk/varnish-cache/bin/varnishd/cache_main.c trunk/varnish-cache/bin/varnishd/cache_pass.c trunk/varnish-cache/bin/varnishd/cache_pipe.c trunk/varnish-cache/bin/varnishd/cache_pool.c trunk/varnish-cache/bin/varnishd/cache_response.c trunk/varnish-cache/bin/varnishd/cache_session.c trunk/varnish-cache/bin/varnishd/cache_vcl.c trunk/varnish-cache/bin/varnishd/cache_vrt.c trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c trunk/varnish-cache/bin/varnishd/cache_vrt_re.c trunk/varnish-cache/bin/varnishd/common.h trunk/varnish-cache/bin/varnishd/hash_classic.c trunk/varnish-cache/bin/varnishd/hash_simple_list.c trunk/varnish-cache/bin/varnishd/hash_slinger.h trunk/varnish-cache/bin/varnishd/heritage.h trunk/varnish-cache/bin/varnishd/mgt.h trunk/varnish-cache/bin/varnishd/mgt_child.c trunk/varnish-cache/bin/varnishd/mgt_cli.c trunk/varnish-cache/bin/varnishd/mgt_cli.h trunk/varnish-cache/bin/varnishd/mgt_event.c trunk/varnish-cache/bin/varnishd/mgt_event.h trunk/varnish-cache/bin/varnishd/mgt_param.c trunk/varnish-cache/bin/varnishd/mgt_vcc.c trunk/varnish-cache/bin/varnishd/rfc2616.c trunk/varnish-cache/bin/varnishd/shmlog.c trunk/varnish-cache/bin/varnishd/steps.h trunk/varnish-cache/bin/varnishd/stevedore.h trunk/varnish-cache/bin/varnishd/storage_file.c trunk/varnish-cache/bin/varnishd/storage_malloc.c trunk/varnish-cache/bin/varnishd/tcp.c trunk/varnish-cache/bin/varnishd/varnishd.c trunk/varnish-cache/bin/varnishhist/varnishhist.c trunk/varnish-cache/bin/varnishlog/varnishlog.c trunk/varnish-cache/bin/varnishstat/varnishstat.c trunk/varnish-cache/bin/varnishtop/varnishtop.c trunk/varnish-cache/include/binary_heap.h trunk/varnish-cache/include/cli.h trunk/varnish-cache/include/cli_common.h trunk/varnish-cache/include/cli_priv.h trunk/varnish-cache/include/http_headers.h trunk/varnish-cache/include/libvarnish.h trunk/varnish-cache/include/libvcl.h trunk/varnish-cache/include/miniobj.h trunk/varnish-cache/include/shmlog_tags.h trunk/varnish-cache/include/stat_field.h trunk/varnish-cache/include/stats.h trunk/varnish-cache/include/varnishapi.h trunk/varnish-cache/include/vcl.h trunk/varnish-cache/include/vcl_returns.h trunk/varnish-cache/include/vrt.h trunk/varnish-cache/include/vrt_obj.h trunk/varnish-cache/lib/libvarnish/argv.c trunk/varnish-cache/lib/libvarnish/assert.c trunk/varnish-cache/lib/libvarnish/binary_heap.c trunk/varnish-cache/lib/libvarnish/cli.c trunk/varnish-cache/lib/libvarnish/cli_common.c trunk/varnish-cache/lib/libvarnish/crc32.c trunk/varnish-cache/lib/libvarnish/time.c trunk/varnish-cache/lib/libvarnishapi/base64.c trunk/varnish-cache/lib/libvarnishapi/shmlog.c trunk/varnish-cache/lib/libvcl/vcc_acl.c trunk/varnish-cache/lib/libvcl/vcc_compile.c trunk/varnish-cache/lib/libvcl/vcc_compile.h trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl trunk/varnish-cache/lib/libvcl/vcc_obj.c trunk/varnish-cache/lib/libvcl/vcc_priv.h trunk/varnish-cache/lib/libvcl/vcc_token.c trunk/varnish-cache/lib/libvcl/vcc_token_defs.h Log: Assert my right to be identified as the author of this work. A couple of files were written by me previous to this project and in the public domain. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -1,7 +1,33 @@ -/* - * Initial implementation by Poul-Henning Kamp +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. * - * $Id$ + * Author: Poul-Henning Kamp + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $Id$ + * */ struct sess; Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/cache_ban.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_ban.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache_ban.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/cache_cli.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_cli.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache_cli.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_hash.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache_hash.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/cache_http.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_http.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache_http.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/cache_main.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_main.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache_main.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/cache_pass.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/cache_pipe.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/cache_session.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/cache_vcl.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vcl.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache_vcl.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache_vrt.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_re.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt_re.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/cache_vrt_re.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/common.h =================================================================== --- trunk/varnish-cache/bin/varnishd/common.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/common.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/hash_classic.c =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_classic.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/hash_classic.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/hash_simple_list.c =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_simple_list.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/hash_simple_list.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/hash_slinger.h =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_slinger.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/hash_slinger.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/heritage.h =================================================================== --- trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/mgt.h =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/mgt.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/mgt_child.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_cli.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/mgt_cli.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.h =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_cli.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/mgt_cli.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/mgt_event.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_event.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/mgt_event.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/mgt_event.h =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_event.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/mgt_event.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -1,7 +1,33 @@ -/* - * Initial implementation by Poul-Henning Kamp +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. * + * Author: Poul-Henning Kamp + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ + * */ #include Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/rfc2616.c =================================================================== --- trunk/varnish-cache/bin/varnishd/rfc2616.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/rfc2616.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/shmlog.c =================================================================== --- trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/steps.h =================================================================== --- trunk/varnish-cache/bin/varnishd/steps.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/steps.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -1,7 +1,33 @@ -/* - * Initial implementation by Poul-Henning Kamp +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. * + * Author: Poul-Henning Kamp + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ + * */ STEP(again, AGAIN) Modified: trunk/varnish-cache/bin/varnishd/stevedore.h =================================================================== --- trunk/varnish-cache/bin/varnishd/stevedore.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/stevedore.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/storage_malloc.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_malloc.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/storage_malloc.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/tcp.c =================================================================== --- trunk/varnish-cache/bin/varnishd/tcp.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/tcp.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishd/varnishd.c =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishhist/varnishhist.c =================================================================== --- trunk/varnish-cache/bin/varnishhist/varnishhist.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishhist/varnishhist.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.c =================================================================== --- trunk/varnish-cache/bin/varnishlog/varnishlog.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishlog/varnishlog.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.c =================================================================== --- trunk/varnish-cache/bin/varnishstat/varnishstat.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishstat/varnishstat.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.c =================================================================== --- trunk/varnish-cache/bin/varnishtop/varnishtop.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/bin/varnishtop/varnishtop.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/include/binary_heap.h =================================================================== --- trunk/varnish-cache/include/binary_heap.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/include/binary_heap.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/include/cli.h =================================================================== --- trunk/varnish-cache/include/cli.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/include/cli.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/include/cli_common.h =================================================================== --- trunk/varnish-cache/include/cli_common.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/include/cli_common.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/include/cli_priv.h =================================================================== --- trunk/varnish-cache/include/cli_priv.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/include/cli_priv.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/include/http_headers.h =================================================================== --- trunk/varnish-cache/include/http_headers.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/include/http_headers.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/include/libvarnish.h =================================================================== --- trunk/varnish-cache/include/libvarnish.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/include/libvarnish.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/include/libvcl.h =================================================================== --- trunk/varnish-cache/include/libvcl.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/include/libvcl.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/include/miniobj.h =================================================================== --- trunk/varnish-cache/include/miniobj.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/include/miniobj.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -1,6 +1,8 @@ /* - * Initial implementation by Poul-Henning Kamp + * Written by Poul-Henning Kamp * + * This file is in the public domain. + * * $Id$ */ Modified: trunk/varnish-cache/include/shmlog_tags.h =================================================================== --- trunk/varnish-cache/include/shmlog_tags.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/include/shmlog_tags.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/include/stat_field.h =================================================================== --- trunk/varnish-cache/include/stat_field.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/include/stat_field.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -1,7 +1,33 @@ -/* - * Initial implementation by Poul-Henning Kamp +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. * + * Author: Poul-Henning Kamp + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ + * */ MAC_STAT(client_conn, uint64_t, "u", "Client connections accepted") Modified: trunk/varnish-cache/include/stats.h =================================================================== --- trunk/varnish-cache/include/stats.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/include/stats.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -1,7 +1,33 @@ -/* - * Initial implementation by Poul-Henning Kamp +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. * + * Author: Poul-Henning Kamp + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ + * */ #include Modified: trunk/varnish-cache/include/varnishapi.h =================================================================== --- trunk/varnish-cache/include/varnishapi.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/include/varnishapi.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/include/vcl.h =================================================================== --- trunk/varnish-cache/include/vcl.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/include/vcl.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/include/vcl_returns.h =================================================================== --- trunk/varnish-cache/include/vcl_returns.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/include/vcl_returns.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/include/vrt.h =================================================================== --- trunk/varnish-cache/include/vrt.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/include/vrt.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/include/vrt_obj.h =================================================================== --- trunk/varnish-cache/include/vrt_obj.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/include/vrt_obj.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/lib/libvarnish/argv.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/argv.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/lib/libvarnish/argv.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/lib/libvarnish/assert.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/assert.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/lib/libvarnish/assert.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/lib/libvarnish/binary_heap.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/binary_heap.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/lib/libvarnish/binary_heap.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/lib/libvarnish/cli.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/cli.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/lib/libvarnish/cli.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/lib/libvarnish/cli_common.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/cli_common.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/lib/libvarnish/cli_common.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/lib/libvarnish/crc32.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/crc32.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/lib/libvarnish/crc32.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/lib/libvarnish/time.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/time.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/lib/libvarnish/time.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/lib/libvarnishapi/base64.c =================================================================== --- trunk/varnish-cache/lib/libvarnishapi/base64.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/lib/libvarnishapi/base64.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -1,6 +1,8 @@ /* - * Initial implementation by Poul-Henning Kamp + * Written by Poul-Henning Kamp * + * This file is in the public domain. + * * $Id$ */ Modified: trunk/varnish-cache/lib/libvarnishapi/shmlog.c =================================================================== --- trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/lib/libvcl/vcc_acl.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_acl.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/lib/libvcl/vcc_acl.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_compile.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/lib/libvcl/vcc_compile.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.h =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_compile.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/lib/libvcl/vcc_compile.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -1,3 +1,31 @@ +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Author: Poul-Henning Kamp + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * /* * $Id$ * Modified: trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl 2006-09-18 22:00:31 UTC (rev 1091) @@ -4,6 +4,8 @@ # Copyright (c) 2006 Linpro AS # All rights reserved. # +# Author: Poul-Henning Kamp +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: Modified: trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl 2006-09-18 22:00:31 UTC (rev 1091) @@ -4,6 +4,8 @@ # Copyright (c) 2006 Linpro AS # All rights reserved. # +# Author: Poul-Henning Kamp +# # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: Modified: trunk/varnish-cache/lib/libvcl/vcc_obj.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_obj.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/lib/libvcl/vcc_obj.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -1,4 +1,31 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Author: Poul-Henning Kamp + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * NB: This file is machine generated, DO NOT EDIT! Modified: trunk/varnish-cache/lib/libvcl/vcc_priv.h =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_priv.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/lib/libvcl/vcc_priv.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/lib/libvcl/vcc_token.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_token.c 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/lib/libvcl/vcc_token.c 2006-09-18 22:00:31 UTC (rev 1091) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: Modified: trunk/varnish-cache/lib/libvcl/vcc_token_defs.h =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_token_defs.h 2006-09-18 21:51:59 UTC (rev 1090) +++ trunk/varnish-cache/lib/libvcl/vcc_token_defs.h 2006-09-18 22:00:31 UTC (rev 1091) @@ -1,4 +1,31 @@ -/* +/*- + * Copyright (c) 2006 Verdens Gang AS + * Copyright (c) 2006 Linpro AS + * All rights reserved. + * + * Author: Poul-Henning Kamp + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $Id$ * * NB: This file is machine generated, DO NOT EDIT! From phk at projects.linpro.no Mon Sep 18 22:03:55 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Tue, 19 Sep 2006 00:03:55 +0200 (CEST) Subject: r1092 - trunk/varnish-cache/lib/libvarnishapi Message-ID: <20060918220355.06BEE1EC36B@projects.linpro.no> Author: phk Date: 2006-09-19 00:03:54 +0200 (Tue, 19 Sep 2006) New Revision: 1092 Modified: trunk/varnish-cache/lib/libvarnishapi/base64.c Log: Quench warnings. Modified: trunk/varnish-cache/lib/libvarnishapi/base64.c =================================================================== --- trunk/varnish-cache/lib/libvarnishapi/base64.c 2006-09-18 22:00:31 UTC (rev 1091) +++ trunk/varnish-cache/lib/libvarnishapi/base64.c 2006-09-18 22:03:54 UTC (rev 1092) @@ -6,6 +6,10 @@ * $Id$ */ +#include +#include +#include "varnishapi.h" + static const char *b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; @@ -20,7 +24,7 @@ for (i = 0; i < 256; i++) i64[i] = -1; for (p = b64, i = 0; *p; p++, i++) - i64[*p] = i; + i64[(int)*p] = i; i64['='] = 0; } @@ -30,12 +34,13 @@ unsigned u, v, l; int i; + u = 0; l = 0; while (*s) { for (v = 0; v < 4; v++) { if (!*s) break; - i = i64[*s++]; + i = i64[(int)*s++]; if (i < 0) return (-1); u <<= 6; @@ -50,7 +55,6 @@ d++; } } - printf("\n"); *d = '\0'; return (0); } From phk at projects.linpro.no Mon Sep 18 22:04:52 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Tue, 19 Sep 2006 00:04:52 +0200 (CEST) Subject: r1093 - in trunk/varnish-cache: bin/varnishd lib/libvcl Message-ID: <20060918220452.D1C121EC378@projects.linpro.no> Author: phk Date: 2006-09-19 00:04:52 +0200 (Tue, 19 Sep 2006) New Revision: 1093 Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c Log: Typo Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-18 22:03:54 UTC (rev 1092) +++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-18 22:04:52 UTC (rev 1093) @@ -322,7 +322,6 @@ int FetchHeaders(struct sess *sp) { - int i; struct vbe_conn *vc; struct worker *w; char *b; Modified: trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2006-09-18 22:03:54 UTC (rev 1092) +++ trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2006-09-18 22:04:52 UTC (rev 1093) @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * -/* + * * $Id$ * * NB: This file is machine generated, DO NOT EDIT! From des at projects.linpro.no Mon Sep 18 22:39:33 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 19 Sep 2006 00:39:33 +0200 (CEST) Subject: r1094 - in trunk/varnish-cache: include lib/libvcl Message-ID: <20060918223933.726431EC36F@projects.linpro.no> Author: des Date: 2006-09-19 00:39:33 +0200 (Tue, 19 Sep 2006) New Revision: 1094 Modified: trunk/varnish-cache/include/vcl.h trunk/varnish-cache/include/vcl_returns.h trunk/varnish-cache/include/vrt_obj.h trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c trunk/varnish-cache/lib/libvcl/vcc_obj.c trunk/varnish-cache/lib/libvcl/vcc_token_defs.h Log: Re-regenerate. Modified: trunk/varnish-cache/include/vcl.h =================================================================== --- trunk/varnish-cache/include/vcl.h 2006-09-18 22:04:52 UTC (rev 1093) +++ trunk/varnish-cache/include/vcl.h 2006-09-18 22:39:33 UTC (rev 1094) @@ -1,33 +1,4 @@ -/*- - * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006 Linpro AS - * All rights reserved. - * - * Author: Poul-Henning Kamp - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * Initial implementation by Poul-Henning Kamp - * +/* * $Id$ * * NB: This file is machine generated, DO NOT EDIT! Modified: trunk/varnish-cache/include/vcl_returns.h =================================================================== --- trunk/varnish-cache/include/vcl_returns.h 2006-09-18 22:04:52 UTC (rev 1093) +++ trunk/varnish-cache/include/vcl_returns.h 2006-09-18 22:39:33 UTC (rev 1094) @@ -1,33 +1,4 @@ -/*- - * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006 Linpro AS - * All rights reserved. - * - * Author: Poul-Henning Kamp - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * Initial implementation by Poul-Henning Kamp - * +/* * $Id$ * * NB: This file is machine generated, DO NOT EDIT! Modified: trunk/varnish-cache/include/vrt_obj.h =================================================================== --- trunk/varnish-cache/include/vrt_obj.h 2006-09-18 22:04:52 UTC (rev 1093) +++ trunk/varnish-cache/include/vrt_obj.h 2006-09-18 22:39:33 UTC (rev 1094) @@ -1,33 +1,4 @@ -/*- - * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006 Linpro AS - * All rights reserved. - * - * Author: Poul-Henning Kamp - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * Initial implementation by Poul-Henning Kamp - * +/* * $Id$ * * NB: This file is machine generated, DO NOT EDIT! Modified: trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2006-09-18 22:04:52 UTC (rev 1093) +++ trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2006-09-18 22:39:33 UTC (rev 1094) @@ -1,32 +1,4 @@ -/*- - * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006 Linpro AS - * All rights reserved. - * - * Author: Poul-Henning Kamp - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * +/* * $Id$ * * NB: This file is machine generated, DO NOT EDIT! @@ -499,6 +471,8 @@ fputs(" * Copyright (c) 2006 Linpro AS\n", f); fputs(" * All rights reserved.\n", f); fputs(" *\n", f); + fputs(" * Author: Poul-Henning Kamp \n", f); + fputs(" *\n", f); fputs(" * Redistribution and use in source and binary forms, with or without\n", f); fputs(" * modification, are permitted provided that the following conditions\n", f); fputs(" * are met:\n", f); Modified: trunk/varnish-cache/lib/libvcl/vcc_obj.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_obj.c 2006-09-18 22:04:52 UTC (rev 1093) +++ trunk/varnish-cache/lib/libvcl/vcc_obj.c 2006-09-18 22:39:33 UTC (rev 1094) @@ -1,31 +1,4 @@ -/*- - * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006 Linpro AS - * All rights reserved. - * - * Author: Poul-Henning Kamp - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * +/* * $Id$ * * NB: This file is machine generated, DO NOT EDIT! Modified: trunk/varnish-cache/lib/libvcl/vcc_token_defs.h =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_token_defs.h 2006-09-18 22:04:52 UTC (rev 1093) +++ trunk/varnish-cache/lib/libvcl/vcc_token_defs.h 2006-09-18 22:39:33 UTC (rev 1094) @@ -1,31 +1,4 @@ -/*- - * Copyright (c) 2006 Verdens Gang AS - * Copyright (c) 2006 Linpro AS - * All rights reserved. - * - * Author: Poul-Henning Kamp - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * +/* * $Id$ * * NB: This file is machine generated, DO NOT EDIT! From phk at projects.linpro.no Tue Sep 19 05:39:44 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Tue, 19 Sep 2006 07:39:44 +0200 (CEST) Subject: r1095 - in trunk/varnish-cache: bin/varnishd bin/varnishhist bin/varnishlog bin/varnishstat bin/varnishtop include include/compat lib/libcompat lib/libvarnish lib/libvarnishapi lib/libvcl Message-ID: <20060919053944.55A401EC37E@projects.linpro.no> Author: phk Date: 2006-09-19 07:39:43 +0200 (Tue, 19 Sep 2006) New Revision: 1095 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_acceptor.c trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c trunk/varnish-cache/bin/varnishd/cache_backend.c trunk/varnish-cache/bin/varnishd/cache_ban.c trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_cli.c trunk/varnish-cache/bin/varnishd/cache_expire.c trunk/varnish-cache/bin/varnishd/cache_fetch.c trunk/varnish-cache/bin/varnishd/cache_hash.c trunk/varnish-cache/bin/varnishd/cache_http.c trunk/varnish-cache/bin/varnishd/cache_main.c trunk/varnish-cache/bin/varnishd/cache_pass.c trunk/varnish-cache/bin/varnishd/cache_pipe.c trunk/varnish-cache/bin/varnishd/cache_pool.c trunk/varnish-cache/bin/varnishd/cache_response.c trunk/varnish-cache/bin/varnishd/cache_session.c trunk/varnish-cache/bin/varnishd/cache_vcl.c trunk/varnish-cache/bin/varnishd/cache_vrt.c trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c trunk/varnish-cache/bin/varnishd/cache_vrt_re.c trunk/varnish-cache/bin/varnishd/common.h trunk/varnish-cache/bin/varnishd/hash_classic.c trunk/varnish-cache/bin/varnishd/hash_simple_list.c trunk/varnish-cache/bin/varnishd/hash_slinger.h trunk/varnish-cache/bin/varnishd/heritage.h trunk/varnish-cache/bin/varnishd/mgt.h trunk/varnish-cache/bin/varnishd/mgt_child.c trunk/varnish-cache/bin/varnishd/mgt_cli.c trunk/varnish-cache/bin/varnishd/mgt_cli.h trunk/varnish-cache/bin/varnishd/mgt_event.c trunk/varnish-cache/bin/varnishd/mgt_param.c trunk/varnish-cache/bin/varnishd/mgt_vcc.c trunk/varnish-cache/bin/varnishd/rfc2616.c trunk/varnish-cache/bin/varnishd/shmlog.c trunk/varnish-cache/bin/varnishd/stevedore.h trunk/varnish-cache/bin/varnishd/storage_file.c trunk/varnish-cache/bin/varnishd/storage_malloc.c trunk/varnish-cache/bin/varnishd/tcp.c trunk/varnish-cache/bin/varnishd/varnishd.c trunk/varnish-cache/bin/varnishhist/varnishhist.c trunk/varnish-cache/bin/varnishlog/varnishlog.c trunk/varnish-cache/bin/varnishstat/varnishstat.c trunk/varnish-cache/bin/varnishtop/varnishtop.c trunk/varnish-cache/include/binary_heap.h trunk/varnish-cache/include/cli.h trunk/varnish-cache/include/cli_common.h trunk/varnish-cache/include/cli_priv.h trunk/varnish-cache/include/compat/asprintf.h trunk/varnish-cache/include/compat/setproctitle.h trunk/varnish-cache/include/compat/srandomdev.h trunk/varnish-cache/include/compat/strlcat.h trunk/varnish-cache/include/compat/strlcpy.h trunk/varnish-cache/include/compat/strndup.h trunk/varnish-cache/include/compat/vasprintf.h trunk/varnish-cache/include/http_headers.h trunk/varnish-cache/include/libvarnish.h trunk/varnish-cache/include/libvcl.h trunk/varnish-cache/include/shmlog.h trunk/varnish-cache/include/shmlog_tags.h trunk/varnish-cache/include/varnishapi.h trunk/varnish-cache/include/vrt.h trunk/varnish-cache/include/vsb.h trunk/varnish-cache/lib/libcompat/strndup.c trunk/varnish-cache/lib/libvarnish/argv.c trunk/varnish-cache/lib/libvarnish/assert.c trunk/varnish-cache/lib/libvarnish/binary_heap.c trunk/varnish-cache/lib/libvarnish/cli.c trunk/varnish-cache/lib/libvarnish/cli_common.c trunk/varnish-cache/lib/libvarnish/crc32.c trunk/varnish-cache/lib/libvarnish/time.c trunk/varnish-cache/lib/libvarnish/version.c trunk/varnish-cache/lib/libvarnishapi/shmlog.c trunk/varnish-cache/lib/libvcl/vcc_acl.c trunk/varnish-cache/lib/libvcl/vcc_compile.c trunk/varnish-cache/lib/libvcl/vcc_compile.h trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c trunk/varnish-cache/lib/libvcl/vcc_priv.h trunk/varnish-cache/lib/libvcl/vcc_token.c Log: Remove doubled author information. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -24,7 +24,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/cache_ban.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_ban.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache_ban.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/cache_cli.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_cli.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache_cli.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_hash.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache_hash.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/cache_http.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_http.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache_http.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/cache_main.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_main.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache_main.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/cache_pass.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/cache_pipe.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/cache_session.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/cache_vcl.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vcl.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache_vcl.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache_vrt.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_re.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt_re.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/cache_vrt_re.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/common.h =================================================================== --- trunk/varnish-cache/bin/varnishd/common.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/common.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/hash_classic.c =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_classic.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/hash_classic.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/hash_simple_list.c =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_simple_list.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/hash_simple_list.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/hash_slinger.h =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_slinger.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/hash_slinger.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/heritage.h =================================================================== --- trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/mgt.h =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/mgt.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/mgt_child.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_cli.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/mgt_cli.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.h =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_cli.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/mgt_cli.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/mgt_event.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_event.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/mgt_event.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/rfc2616.c =================================================================== --- trunk/varnish-cache/bin/varnishd/rfc2616.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/rfc2616.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/shmlog.c =================================================================== --- trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/stevedore.h =================================================================== --- trunk/varnish-cache/bin/varnishd/stevedore.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/stevedore.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/storage_malloc.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_malloc.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/storage_malloc.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishd/tcp.c =================================================================== --- trunk/varnish-cache/bin/varnishd/tcp.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/tcp.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/varnishd.c =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishhist/varnishhist.c =================================================================== --- trunk/varnish-cache/bin/varnishhist/varnishhist.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishhist/varnishhist.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.c =================================================================== --- trunk/varnish-cache/bin/varnishlog/varnishlog.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishlog/varnishlog.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.c =================================================================== --- trunk/varnish-cache/bin/varnishstat/varnishstat.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishstat/varnishstat.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.c =================================================================== --- trunk/varnish-cache/bin/varnishtop/varnishtop.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/bin/varnishtop/varnishtop.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/include/binary_heap.h =================================================================== --- trunk/varnish-cache/include/binary_heap.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/include/binary_heap.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/include/cli.h =================================================================== --- trunk/varnish-cache/include/cli.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/include/cli.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/include/cli_common.h =================================================================== --- trunk/varnish-cache/include/cli_common.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/include/cli_common.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/include/cli_priv.h =================================================================== --- trunk/varnish-cache/include/cli_priv.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/include/cli_priv.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/include/compat/asprintf.h =================================================================== --- trunk/varnish-cache/include/compat/asprintf.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/include/compat/asprintf.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -24,7 +24,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/include/compat/setproctitle.h =================================================================== --- trunk/varnish-cache/include/compat/setproctitle.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/include/compat/setproctitle.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -24,7 +24,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/include/compat/srandomdev.h =================================================================== --- trunk/varnish-cache/include/compat/srandomdev.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/include/compat/srandomdev.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -24,7 +24,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/include/compat/strlcat.h =================================================================== --- trunk/varnish-cache/include/compat/strlcat.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/include/compat/strlcat.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -24,7 +24,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/include/compat/strlcpy.h =================================================================== --- trunk/varnish-cache/include/compat/strlcpy.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/include/compat/strlcpy.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -24,7 +24,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/include/compat/strndup.h =================================================================== --- trunk/varnish-cache/include/compat/strndup.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/include/compat/strndup.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -24,7 +24,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/include/compat/vasprintf.h =================================================================== --- trunk/varnish-cache/include/compat/vasprintf.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/include/compat/vasprintf.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -24,7 +24,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/include/http_headers.h =================================================================== --- trunk/varnish-cache/include/http_headers.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/include/http_headers.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/include/libvarnish.h =================================================================== --- trunk/varnish-cache/include/libvarnish.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/include/libvarnish.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/include/libvcl.h =================================================================== --- trunk/varnish-cache/include/libvcl.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/include/libvcl.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/include/shmlog.h =================================================================== --- trunk/varnish-cache/include/shmlog.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/include/shmlog.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -24,7 +24,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/include/shmlog_tags.h =================================================================== --- trunk/varnish-cache/include/shmlog_tags.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/include/shmlog_tags.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/include/varnishapi.h =================================================================== --- trunk/varnish-cache/include/varnishapi.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/include/varnishapi.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/include/vrt.h =================================================================== --- trunk/varnish-cache/include/vrt.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/include/vrt.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/include/vsb.h =================================================================== --- trunk/varnish-cache/include/vsb.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/include/vsb.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -25,7 +25,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * $FreeBSD: src/sys/sys/vsb.h,v 1.14 2004/07/09 11:35:30 des Exp $ Modified: trunk/varnish-cache/lib/libcompat/strndup.c =================================================================== --- trunk/varnish-cache/lib/libcompat/strndup.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/lib/libcompat/strndup.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -24,7 +24,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/lib/libvarnish/argv.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/argv.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/lib/libvarnish/argv.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/lib/libvarnish/assert.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/assert.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/lib/libvarnish/assert.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/lib/libvarnish/binary_heap.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/binary_heap.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/lib/libvarnish/binary_heap.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/lib/libvarnish/cli.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/cli.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/lib/libvarnish/cli.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/lib/libvarnish/cli_common.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/cli_common.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/lib/libvarnish/cli_common.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/lib/libvarnish/crc32.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/crc32.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/lib/libvarnish/crc32.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/lib/libvarnish/time.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/time.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/lib/libvarnish/time.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/lib/libvarnish/version.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/version.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/lib/libvarnish/version.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -24,7 +24,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/lib/libvarnishapi/shmlog.c =================================================================== --- trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/lib/libvcl/vcc_acl.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_acl.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/lib/libvcl/vcc_acl.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_compile.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/lib/libvcl/vcc_compile.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.h =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_compile.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/lib/libvcl/vcc_compile.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ Modified: trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -494,7 +494,6 @@ fputs(" * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n", f); fputs(" * SUCH DAMAGE.\n", f); fputs(" *\n", f); - fputs(" * Initial implementation by Poul-Henning Kamp \n", f); fputs(" *\n", f); fputs(" * $Id$\n", f); fputs(" *\n", f); Modified: trunk/varnish-cache/lib/libvcl/vcc_priv.h =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_priv.h 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/lib/libvcl/vcc_priv.h 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ * Modified: trunk/varnish-cache/lib/libvcl/vcc_token.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_token.c 2006-09-18 22:39:33 UTC (rev 1094) +++ trunk/varnish-cache/lib/libvcl/vcc_token.c 2006-09-19 05:39:43 UTC (rev 1095) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Poul-Henning Kamp * * $Id$ */ From des at projects.linpro.no Wed Sep 20 07:50:29 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 20 Sep 2006 09:50:29 +0200 (CEST) Subject: r1096 - in trunk/varnish-cache: bin/varnishd bin/varnishhist bin/varnishlog bin/varnishncsa bin/varnishstat bin/varnishtop include include/compat lib/libcompat lib/libvarnish lib/libvarnishapi lib/libvcl Message-ID: <20060920075029.4BA2C1EC29C@projects.linpro.no> Author: des Date: 2006-09-20 09:50:27 +0200 (Wed, 20 Sep 2006) New Revision: 1096 Modified: trunk/varnish-cache/bin/varnishd/cache.h trunk/varnish-cache/bin/varnishd/cache_acceptor.c trunk/varnish-cache/bin/varnishd/cache_acceptor.h trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c trunk/varnish-cache/bin/varnishd/cache_backend.c trunk/varnish-cache/bin/varnishd/cache_ban.c trunk/varnish-cache/bin/varnishd/cache_center.c trunk/varnish-cache/bin/varnishd/cache_cli.c trunk/varnish-cache/bin/varnishd/cache_expire.c trunk/varnish-cache/bin/varnishd/cache_fetch.c trunk/varnish-cache/bin/varnishd/cache_hash.c trunk/varnish-cache/bin/varnishd/cache_http.c trunk/varnish-cache/bin/varnishd/cache_main.c trunk/varnish-cache/bin/varnishd/cache_pass.c trunk/varnish-cache/bin/varnishd/cache_pipe.c trunk/varnish-cache/bin/varnishd/cache_pool.c trunk/varnish-cache/bin/varnishd/cache_response.c trunk/varnish-cache/bin/varnishd/cache_session.c trunk/varnish-cache/bin/varnishd/cache_vcl.c trunk/varnish-cache/bin/varnishd/cache_vrt.c trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c trunk/varnish-cache/bin/varnishd/cache_vrt_re.c trunk/varnish-cache/bin/varnishd/common.h trunk/varnish-cache/bin/varnishd/hash_classic.c trunk/varnish-cache/bin/varnishd/hash_simple_list.c trunk/varnish-cache/bin/varnishd/hash_slinger.h trunk/varnish-cache/bin/varnishd/heritage.h trunk/varnish-cache/bin/varnishd/mgt.h trunk/varnish-cache/bin/varnishd/mgt_child.c trunk/varnish-cache/bin/varnishd/mgt_cli.c trunk/varnish-cache/bin/varnishd/mgt_cli.h trunk/varnish-cache/bin/varnishd/mgt_event.c trunk/varnish-cache/bin/varnishd/mgt_event.h trunk/varnish-cache/bin/varnishd/mgt_param.c trunk/varnish-cache/bin/varnishd/mgt_vcc.c trunk/varnish-cache/bin/varnishd/rfc2616.c trunk/varnish-cache/bin/varnishd/shmlog.c trunk/varnish-cache/bin/varnishd/steps.h trunk/varnish-cache/bin/varnishd/stevedore.h trunk/varnish-cache/bin/varnishd/storage_file.c trunk/varnish-cache/bin/varnishd/storage_malloc.c trunk/varnish-cache/bin/varnishd/tcp.c trunk/varnish-cache/bin/varnishd/varnishd.c trunk/varnish-cache/bin/varnishhist/varnishhist.c trunk/varnish-cache/bin/varnishlog/varnishlog.c trunk/varnish-cache/bin/varnishncsa/varnishncsa.c trunk/varnish-cache/bin/varnishstat/varnishstat.c trunk/varnish-cache/bin/varnishtop/varnishtop.c trunk/varnish-cache/include/binary_heap.h trunk/varnish-cache/include/cli.h trunk/varnish-cache/include/cli_common.h trunk/varnish-cache/include/cli_priv.h trunk/varnish-cache/include/compat/asprintf.h trunk/varnish-cache/include/compat/setproctitle.h trunk/varnish-cache/include/compat/srandomdev.h trunk/varnish-cache/include/compat/strlcat.h trunk/varnish-cache/include/compat/strlcpy.h trunk/varnish-cache/include/compat/strndup.h trunk/varnish-cache/include/compat/vasprintf.h trunk/varnish-cache/include/http_headers.h trunk/varnish-cache/include/libvarnish.h trunk/varnish-cache/include/libvcl.h trunk/varnish-cache/include/shmlog.h trunk/varnish-cache/include/shmlog_tags.h trunk/varnish-cache/include/stat_field.h trunk/varnish-cache/include/stats.h trunk/varnish-cache/include/varnishapi.h trunk/varnish-cache/include/vcl.h trunk/varnish-cache/include/vrt.h trunk/varnish-cache/include/vsb.h trunk/varnish-cache/lib/libcompat/asprintf.c trunk/varnish-cache/lib/libcompat/setproctitle.c trunk/varnish-cache/lib/libcompat/srandomdev.c trunk/varnish-cache/lib/libcompat/strndup.c trunk/varnish-cache/lib/libcompat/vasprintf.c trunk/varnish-cache/lib/libvarnish/argv.c trunk/varnish-cache/lib/libvarnish/assert.c trunk/varnish-cache/lib/libvarnish/binary_heap.c trunk/varnish-cache/lib/libvarnish/cli.c trunk/varnish-cache/lib/libvarnish/cli_common.c trunk/varnish-cache/lib/libvarnish/crc32.c trunk/varnish-cache/lib/libvarnish/time.c trunk/varnish-cache/lib/libvarnish/version.c trunk/varnish-cache/lib/libvarnishapi/shmlog.c trunk/varnish-cache/lib/libvcl/vcc_acl.c trunk/varnish-cache/lib/libvcl/vcc_compile.c trunk/varnish-cache/lib/libvcl/vcc_compile.h trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c trunk/varnish-cache/lib/libvcl/vcc_obj.c trunk/varnish-cache/lib/libvcl/vcc_priv.h trunk/varnish-cache/lib/libvcl/vcc_token.c Log: Whitespace, comment and attribution fixes. Modified: trunk/varnish-cache/bin/varnishd/cache.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ @@ -199,7 +198,7 @@ /* -------------------------------------------------------------------*/ -struct object { +struct object { unsigned magic; #define OBJECT_MAGIC 0x32851d42 unsigned refcnt; Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * XXX: We need to pass sessions back into the event engine when they are Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.h =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -25,9 +25,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $Id$ * + * $Id$ */ struct sess; Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -24,7 +24,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * XXX: We need to pass sessions back into the event engine when they are Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * XXX: We need to pass sessions back into the event engine when they are @@ -150,7 +149,7 @@ continue; if (kp->filter == EVFILT_TIMER) { dotimer = 1; - continue; + continue; } assert(kp->filter == EVFILT_READ); vca_kev(kp); @@ -163,7 +162,7 @@ sp = TAILQ_FIRST(&sesshead); if (sp == NULL) break; - if (sp->t_open.tv_sec > ts.tv_sec) + if (sp->t_open.tv_sec > ts.tv_sec) break; if (sp->t_open.tv_sec == ts.tv_sec && sp->t_open.tv_nsec > ts.tv_nsec) @@ -196,7 +195,7 @@ i = fcntl(pipes[0], F_GETFL); i |= O_NONBLOCK; i = fcntl(pipes[0], F_SETFL, i); - + AZ(pthread_create(&vca_kqueue_thread, NULL, vca_kqueue_main, NULL)); } Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * XXX: We need to pass sessions back into the event engine when they are @@ -74,7 +73,7 @@ p = realloc(pollfd, u * sizeof *p); XXXAN(p); /* close offending fd */ memset(p + npoll, 0, (u - npoll) * sizeof *p); - for (v = npoll ; v <= u; v++) + for (v = npoll ; v <= u; v++) p->fd = -1; pollfd = p; npoll = u; @@ -129,7 +128,7 @@ break; CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); fd = sp->fd; - if (pollfd[fd].revents) { + if (pollfd[fd].revents) { v--; i = vca_pollsession(sp); if (i < 0) Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_backend.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Manage backend connections. @@ -120,12 +119,12 @@ int s; s = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); - if (s < 0) + if (s < 0) return (s); else if (connect(s, ai->ai_addr, ai->ai_addrlen)) { AZ(close(s)); s = -1; - } + } return (s); } @@ -185,7 +184,7 @@ AN(bp->hostname); s = vbe_conn_try(bp, &ai); - if (s < 0) + if (s < 0) return (s); TCP_myname(s, abuf1, sizeof abuf1, pbuf1, sizeof pbuf1); Modified: trunk/varnish-cache/bin/varnishd/cache_ban.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_ban.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_ban.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Ban processing @@ -63,7 +62,7 @@ i = regcomp(&b->regexp, regexp, REG_EXTENDED | REG_NOSUB); if (i) { char buf[512]; - + (void)regerror(i, &b->regexp, buf, sizeof buf); VSL(SLT_Debug, 0, "REGEX: <%s>", buf); } @@ -93,7 +92,7 @@ i = regexec(&b->regexp, url, 0, NULL, 0); if (!i) return (1); - } + } o->ban_seq = b0->gen; return (0); } Modified: trunk/varnish-cache/bin/varnishd/cache_center.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_center.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * This file contains the central state machine for pushing requests. @@ -41,7 +40,6 @@ * extract the DOT lines and run though dot(1), for instance with the * command: * sed -n '/^DOT/s///p' cache_center.c | dot -Tps > /tmp/_.ps - * */ /* @@ -78,7 +76,7 @@ assert(sp->xid == 0); - do + do i = http_RecvSome(sp->fd, sp->http); while (i == -1); if (i == 0) { @@ -273,8 +271,8 @@ DOT vcl_fetch -> fetch_error [label="error"] DOT } DOT fetch_lookup -> LOOKUP [style=dotted, weight=0] -DOT fetch_pass -> PASSBODY -DOT fetch_ipass -> PASSBODY +DOT fetch_pass -> PASSBODY +DOT fetch_ipass -> PASSBODY DOT fetch_insert -> DELIVER [style=bold] DOT fetch_error -> ERROR */ @@ -350,7 +348,7 @@ sp->wrk->idle = sp->t_open.tv_sec; sp->wrk->acct.sess++; SES_RefSrcAddr(sp); - do + do i = http_RecvSome(sp->fd, sp->http); while (i == -1); if (i == 0) { @@ -476,7 +474,7 @@ /* * We don't assign to sp->obj directly because it is used - * to cache state when we encounter a busy object. + * to cache state when we encounter a busy object. */ o = HSH_Lookup(sp); @@ -611,7 +609,7 @@ if (!PassSession(sp)) { AN(sp->vbc); sp->step = STP_PASSBODY; - } else + } else sp->step = STP_DONE; return (0); } @@ -757,7 +755,7 @@ /*-------------------------------------------------------------------- * Central state engine dispatcher. - * + * * We grab a VCL reference, and keeps kicking the session around until * it has had enough. * Modified: trunk/varnish-cache/bin/varnishd/cache_cli.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_cli.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_cli.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ @@ -91,7 +90,7 @@ cli = &clis; memset(cli, 0, sizeof *cli); - + cli->sb = vsb_new(NULL, NULL, 0, VSB_AUTOEXTEND); XXXAN(cli->sb); lbuf = 4096; @@ -133,7 +132,7 @@ } VSL(SLT_CLI, 0, "Wr %d %d %s", i, cli->result, vsb_data(cli->sb)); - i = ++p - buf; + i = ++p - buf; assert(i <= nbuf); if (i < nbuf) memcpy(buf, p, nbuf - i); Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_expire.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Expiry of cached objects and execution of prefetcher @@ -87,7 +86,7 @@ (void)arg; - t = time(NULL); + t = time(NULL); while (1) { LOCK(&exp_mtx); TAILQ_FOREACH(o, &exp_deathrow, deathrow) { @@ -107,7 +106,7 @@ if (o == NULL) { UNLOCK(&exp_mtx); AZ(sleep(1)); - t = time(NULL); + t = time(NULL); continue; } TAILQ_REMOVE(&exp_deathrow, o, deathrow); Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ @@ -133,7 +132,7 @@ /* Get some storage if we don't have any */ if (st == NULL || st->len == st->space) { v = u; - if (u < params->fetch_chunksize * 1024 && + if (u < params->fetch_chunksize * 1024 && stevedore->trim != NULL) v = params->fetch_chunksize * 1024; st = stevedore->alloc(stevedore, v); @@ -269,13 +268,13 @@ hp->logtag = HTTP_Obj; http_CopyResp(sp->wrk, sp->fd, hp, vc->http); http_FilterHeader(sp->wrk, sp->fd, hp, vc->http, HTTPH_A_INS); - + if (body) { if (http_GetHdr(vc->http, H_Content_Length, &b)) cls = fetch_straight(sp, vc->fd, vc->http, b); else if (http_HdrIs(vc->http, H_Transfer_Encoding, "chunked")) cls = fetch_chunked(sp, vc->fd, vc->http); - else + else cls = fetch_eof(sp, vc->fd, vc->http); http_PrintfHeader(sp->wrk, sp->fd, hp, "Content-Length: %u", sp->obj->len); Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_hash.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_hash.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * This is the central hash-table code, it relies on a chosen hash @@ -51,7 +50,6 @@ * * New objects are always marked busy, and they can go from busy to * not busy only once. - * */ #include @@ -141,7 +139,7 @@ o->ttl = 0; VSL(SLT_ExpBan, 0, "%u was banned", o->xid); EXP_TTLchange(o); - } else + } else break; o->refcnt--; } Modified: trunk/varnish-cache/bin/varnishd/cache_http.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_http.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_http.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * HTTP request storage and manipulation @@ -268,7 +267,7 @@ if (hp->t + len > hp->v) len = hp->v - hp->t; - if (len == 0) + if (len == 0) return (0); *b = hp->t; *e = hp->t + len; @@ -347,7 +346,7 @@ if ((p[0] == 'i' || p[0] == 'I') && (p[1] == 'f' || p[1] == 'F') && - p[2] == '-') + p[2] == '-') hp->conds = 1; if (hp->nhd < HTTP_HDR_MAX) { @@ -583,7 +582,7 @@ if (http_header_complete(hp)) return(0); return (-1); - } + } if (hp->v != hp->s) { VSL(SLT_HttpError, fd, @@ -608,7 +607,7 @@ CHECK_OBJ_NOTNULL(hp, HTTP_MAGIC); http_RecvPrep(hp); - do + do i = http_RecvSome(fd, hp); while (i == -1); return (i); Modified: trunk/varnish-cache/bin/varnishd/cache_main.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_main.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_main.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/cache_pass.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * XXX: charge bytes to srcaddr Modified: trunk/varnish-cache/bin/varnishd/cache_pipe.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * XXX: charge bytes to srcaddr Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * XXX: automatic thread-pool size adaptation. @@ -111,7 +110,7 @@ WRK_WriteH(struct worker *w, struct http_hdr *hh, const char *suf) { unsigned u; - + CHECK_OBJ_NOTNULL(w, WORKER_MAGIC); AN(w); AN(hh); @@ -235,7 +234,7 @@ } UNLOCK(&tmtx); } - + LOCK(&qp->mtx); TAILQ_INSERT_HEAD(&qp->idle, w, list); assert(w->idle != 0); @@ -292,7 +291,7 @@ assert(1 == write(w->pipe[1], w, 1)); return; } - + UNLOCK(&qp->mtx); LOCK(&tmtx); @@ -306,7 +305,7 @@ } /* * XXX: If there are too many requests in the overflow queue - * XXX: we should kill the request right here. + * XXX: we should kill the request right here. * XXX: Not sure how though. Simply closing may be the better * XXX: compromise. */ @@ -371,7 +370,7 @@ } /*--------------------------------------------------------------------*/ - + static void * wrk_reaperthread(void *priv) { @@ -385,7 +384,7 @@ wrk_addpools(params->wthread_pools); sleep(1); if (VSL_stats->n_wrk <= params->wthread_min) - continue; + continue; now = time(NULL); for (u = 0; u < nwq; u++) { qp = wq[u]; @@ -395,7 +394,7 @@ (w->idle + params->wthread_timeout < now || VSL_stats->n_wrk > params->wthread_max)) TAILQ_REMOVE(&qp->idle, w, list); - else + else w = NULL; UNLOCK(&qp->mtx); if (w == NULL) Modified: trunk/varnish-cache/bin/varnishd/cache_response.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_response.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ @@ -116,7 +115,7 @@ expl = mp->expl; break; } - if (expl == NULL) + if (expl == NULL) expl = msg; AN(expl); AN(msg); @@ -216,13 +215,13 @@ { struct storage *st; unsigned u = 0; - + CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); clock_gettime(CLOCK_REALTIME, &sp->t_resp); if (sp->obj->response == 200 && sp->http->conds && res_do_conds(sp)) return; - + WSL(sp->wrk, SLT_Length, sp->fd, "%u", sp->obj->len); http_ClrHeader(sp->http); @@ -242,7 +241,7 @@ WRK_Reset(sp->wrk, &sp->fd); sp->wrk->acct.hdrbytes += http_Write(sp->wrk, sp->http, 1); CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); - + if (sp->wantbody) { TAILQ_FOREACH(st, &sp->obj->store, list) { CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); Modified: trunk/varnish-cache/bin/varnishd/cache_session.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_session.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Session and Client management. @@ -42,8 +41,8 @@ * XXX: The two-list session management is actually not a good idea * XXX: come to think of it, because we want the sessions reused in * XXX: Most Recently Used order. - * XXX: Another and maybe more interesting option would be to cache - * XXX: free sessions in the worker threads and postpone session + * XXX: Another and maybe more interesting option would be to cache + * XXX: free sessions in the worker threads and postpone session * XXX: allocation until then. This does not quite implment MRU order * XXX: but it does save some locking, although not that much because * XXX: we still have to do the source-addr lookup. @@ -103,7 +102,7 @@ TAILQ_HEAD(,srcaddr) head; MTX mtx; } *srchash; - + static unsigned nsrchash; static MTX stat_mtx; @@ -320,7 +319,7 @@ CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); sm = sp->mem; CHECK_OBJ_NOTNULL(sm, SESSMEM_MAGIC); - + AZ(sp->obj); AZ(sp->vcl); VSL_stats->n_sess--; @@ -329,7 +328,7 @@ sp->addr, sp->port, sp->t_end.tv_sec - b->first, b->sess, b->req, b->pipe, b->pass, b->fetch, b->hdrbytes, b->bodybytes); - if (sm->workspace != params->mem_workspace) { + if (sm->workspace != params->mem_workspace) { VSL_stats->n_sess_mem--; free(sm); } else { Modified: trunk/varnish-cache/bin/varnishd/cache_vcl.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vcl.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_vcl.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,13 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Interface *to* compiled VCL code: Loading, unloading, calling into etc. * * The interface *from* the compiled VCL code is in cache_vrt.c. - * */ #include @@ -140,7 +138,7 @@ if (vcl != NULL) { if (cli == NULL) fprintf(stderr, "Config '%s' already loaded", name); - else + else cli_out(cli, "Config '%s' already loaded", name); return (1); } @@ -162,7 +160,7 @@ if (vcl->conf == NULL) { if (cli == NULL) fprintf(stderr, "No VCL_conf symbol\n"); - else + else cli_out(cli, "No VCL_conf symbol\n"); (void)dlclose(vcl->dlh); free(vcl); @@ -170,7 +168,7 @@ } if (vcl->conf->magic != VCL_CONF_MAGIC) { - if (cli == NULL) + if (cli == NULL) fprintf(stderr, "Wrong VCL_CONF_MAGIC\n"); else cli_out(cli, "Wrong VCL_CONF_MAGIC\n"); @@ -188,7 +186,7 @@ UNLOCK(&vcl_mtx); if (cli == NULL) fprintf(stderr, "Loaded \"%s\" as \"%s\"\n", fn , name); - else + else cli_out(cli, "Loaded \"%s\" as \"%s\"\n", fn , name); vcl->conf->init_func(); return (0); Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_vrt.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Runtime support for compiled VCL programs @@ -48,7 +47,7 @@ void VRT_error(struct sess *sp, unsigned code, const char *expl) -{ +{ CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); WSL(sp->wrk, SLT_Debug, 0, "VCL_error(%u, %s)", code, expl); @@ -61,7 +60,7 @@ void VRT_count(struct sess *sp, unsigned u) { - + CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); if (params->vcl_trace) WSL(sp->wrk, SLT_VCL_trace, sp->fd, "%u %d.%d", u, Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Runtime support for compiled VCL programs, ACLs @@ -52,10 +51,10 @@ static uint32_t ipv4mask[] = { [0] = 0xffffffff, #define M(n) [n] = (uint32_t)((uint64_t)0xffffffff << (32 - n)) - M( 1), M( 2), M( 3), M( 4), M( 5), M( 6), M( 7), M( 8), M( 9), M(10), - M(11), M(12), M(13), M(14), M(15), M(16), M(17), M(18), M(19), M(20), - M(21), M(22), M(23), M(24), M(25), M(26), M(27), M(28), M(29), M(30), - M(31), M(32) + M( 1), M( 2), M( 3), M( 4), M( 5), M( 6), M( 7), M( 8), M( 9), M(10), + M(11), M(12), M(13), M(14), M(15), M(16), M(17), M(18), M(19), M(20), + M(21), M(22), M(23), M(24), M(25), M(26), M(27), M(28), M(29), M(30), + M(31), M(32) }; static int @@ -73,7 +72,7 @@ VSL(SLT_VCL_acl, sp->fd, "FAIL %s %s", acl, ap->desc); return (r); } - + VSL(SLT_VCL_acl, sp->fd, "%s %s %s", r ? "MATCH" : "NEG_MATCH", acl, ap->desc); return (r); @@ -91,7 +90,7 @@ } else { sin1 = NULL; } - + for ( ; ap->name != NULL; ap++) { if (ap->priv == NULL && ap->paren) continue; @@ -142,7 +141,7 @@ if (i != 0) { fprintf(stderr, "getaddrinfo(%s) = %s\n", ap->name, gai_strerror(i)); - if (a1 != NULL) + if (a1 != NULL) freeaddrinfo(a1); a1 = NULL; } Modified: trunk/varnish-cache/bin/varnishd/cache_vrt_re.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_vrt_re.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/cache_vrt_re.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,11 +26,9 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Runtime support for compiled VCL programs, regexps - * */ #include @@ -85,7 +83,7 @@ VRT_re_test(struct vsb *sb, const char *re) { int i; - regex_t t; + regex_t t; char buf[BUFSIZ]; memset(&t, 0, sizeof t); Modified: trunk/varnish-cache/bin/varnishd/common.h =================================================================== --- trunk/varnish-cache/bin/varnishd/common.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/common.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/hash_classic.c =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_classic.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/hash_classic.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * A classic bucketed hash @@ -93,7 +92,7 @@ } /*-------------------------------------------------------------------- - * The ->start method is called during cache process start and allows + * The ->start method is called during cache process start and allows * initialization to happen before the first lookup. */ Modified: trunk/varnish-cache/bin/varnishd/hash_simple_list.c =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_simple_list.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/hash_simple_list.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * This is the reference hash(/lookup) implementation @@ -53,7 +52,7 @@ static MTX hsl_mutex; /*-------------------------------------------------------------------- - * The ->init method is called during process start and allows + * The ->init method is called during process start and allows * initialization to happen before the first lookup. */ @@ -82,12 +81,12 @@ i = strcmp(key1, he->key1); if (i < 0) continue; - if (i > 0) + if (i > 0) break; i = strcmp(key2, he->key2); if (i < 0) continue; - if (i > 0) + if (i > 0) break; he->refcnt++; nobj = he->obj; Modified: trunk/varnish-cache/bin/varnishd/hash_slinger.h =================================================================== --- trunk/varnish-cache/bin/varnishd/hash_slinger.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/hash_slinger.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/heritage.h =================================================================== --- trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/heritage.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * This file contains the heritage passed when mgt forks cache Modified: trunk/varnish-cache/bin/varnishd/mgt.h =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/mgt.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/mgt_child.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/mgt_child.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * The mechanics of handling the child process @@ -147,7 +146,7 @@ AZ(pipe(&heritage.fds[2])); AZ(pipe(child_fds)); i = fork(); - if (i < 0) + if (i < 0) errx(1, "Could not fork child"); if (i == 0) { /* Redirect stdin/out/err */ Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_cli.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/mgt_cli.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * The management process' CLI handling Modified: trunk/varnish-cache/bin/varnishd/mgt_cli.h =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_cli.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/mgt_cli.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/mgt_event.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_event.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/mgt_event.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ @@ -117,7 +116,7 @@ unsigned u; void *p; - if (evb->lpfd < evb->npfd) + if (evb->lpfd < evb->npfd) return (0); if (evb->npfd > 256) @@ -141,7 +140,7 @@ { struct evsig *os; - if (sig < ev_nsig) + if (sig < ev_nsig) return (0); os = calloc(sizeof *os, (sig + 1)); @@ -337,7 +336,7 @@ int i; CHECK_OBJ_NOTNULL(evb, EVBASE_MAGIC); - do + do i = ev_schedule_one(evb); while (i == 1); return (i); @@ -360,7 +359,7 @@ for(; ep != NULL; ep = TAILQ_NEXT(ep, __list)) { if (ep->fd >= 0 && ep->__poll_idx > u) break; - } + } if (ep == NULL) break; *p = evb->pfd[ep->__poll_idx]; Modified: trunk/varnish-cache/bin/varnishd/mgt_event.h =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_event.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/mgt_event.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -27,7 +27,6 @@ * SUCH DAMAGE. * * $Id$ - * */ #include Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ @@ -116,12 +115,12 @@ u = strtoul(arg, NULL, 0); if (u < min) { cli_out(cli, "Must be at least %u", min); - cli_result(cli, CLIS_PARAM); + cli_result(cli, CLIS_PARAM); return; } if (u > max) { cli_out(cli, "Must be no more than %u", max); - cli_result(cli, CLIS_PARAM); + cli_result(cli, CLIS_PARAM); return; } *dest = u; @@ -304,7 +303,7 @@ AN(params->listen_address); params->listen_host = a; params->listen_port = p; - } else + } else cli_out(cli, "%s", params->listen_address); } @@ -431,7 +430,7 @@ { "pipe_timeout", tweak_pipe_timeout, "Idle timeout for PIPE sessions. " "If nothing have been received in either direction for " - "this many seconds, the session is closed.\n", + "this many seconds, the session is closed.\n", "60", "seconds" }, { "send_timeout", tweak_send_timeout, "Send timeout for client connections. " @@ -535,7 +534,7 @@ cli_out(cli, "%-20s ", pp->name); if (pp->func == NULL) { cli_out(cli, "Not implemented.\n"); - if (av[2] != NULL && !lfmt) + if (av[2] != NULL && !lfmt) return; else continue; Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * VCL compiler stuff @@ -171,7 +170,7 @@ fprintf(stderr, "invalid backend address\n"); return (1); } - + buf = NULL; asprintf(&buf, "backend default {\n" Modified: trunk/varnish-cache/bin/varnishd/rfc2616.c =================================================================== --- trunk/varnish-cache/bin/varnishd/rfc2616.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/rfc2616.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ @@ -66,35 +65,35 @@ */ #if PSEUDO_CODE - /* Marker for no retirement age determined */ - retirement_age = INT_MAX + /* Marker for no retirement age determined */ + retirement_age = INT_MAX - /* If we have a max-age directive, respect it */ - if (max-age) - retirement_age = max(0,min(retirement_age, max-age - Age:)) - - /* If Date: is not in future and Expires: looks sensible, use it */ - if ((!date || date < our_clock) && expires > our_clock) { - ttd = min(our_clock + retirement_age, Expires:) - - /* Otherwise we have clock-skew */ - } else { - /* If we have both date and expires, infer max-age */ - if (date && expires) - retirement_age = - max(0, min(retirement_age, Expires: - Date:) - - /* Apply default_ttl if nothing better found */ - if (retirement_age == INT_MAX) - retirement_age = default_ttl - - /* Apply the max-age we can up with */ - ttd = our_clock + retirement_age - } - - /* Apply hard limits */ - ttd = max(ttd, our_clock + hard_lower_ttl) - ttd = min(ttd, our_clock + hard_upper_ttl) + /* If we have a max-age directive, respect it */ + if (max-age) + retirement_age = max(0,min(retirement_age, max-age - Age:)) + + /* If Date: is not in future and Expires: looks sensible, use it */ + if ((!date || date < our_clock) && expires > our_clock) { + ttd = min(our_clock + retirement_age, Expires:) + + /* Otherwise we have clock-skew */ + } else { + /* If we have both date and expires, infer max-age */ + if (date && expires) + retirement_age = + max(0, min(retirement_age, Expires: - Date:) + + /* Apply default_ttl if nothing better found */ + if (retirement_age == INT_MAX) + retirement_age = default_ttl + + /* Apply the max-age we can up with */ + ttd = our_clock + retirement_age + } + + /* Apply hard limits */ + ttd = max(ttd, our_clock + hard_lower_ttl) + ttd = min(ttd, our_clock + hard_upper_ttl) #endif static time_t @@ -104,7 +103,7 @@ unsigned u1, u2; time_t h_date, h_expires, ttd; char *p; - + retirement_age = INT_MAX; u1 = u2 = 0; Modified: trunk/varnish-cache/bin/varnishd/shmlog.c =================================================================== --- trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/shmlog.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ @@ -51,7 +50,7 @@ VSL_stats->shm_cont++; \ } \ } while (0); - + #define UNLOCKSHM(foo) AZ(pthread_mutex_unlock(foo)) #ifndef MAP_HASSEMAPHORE @@ -82,7 +81,7 @@ } /*--------------------------------------------------------------------*/ - + void VSLR(enum shmlogtag tag, unsigned id, const char *b, const char *e) { @@ -102,8 +101,8 @@ /* Only hold the lock while we find our space */ LOCKSHM(&vsl_mtx); - VSL_stats->shm_writes++; - VSL_stats->shm_records++; + VSL_stats->shm_writes++; + VSL_stats->shm_records++; assert(loghead->ptr < loghead->size); /* Wrap if necessary */ @@ -141,12 +140,12 @@ } LOCKSHM(&vsl_mtx); - VSL_stats->shm_writes++; - VSL_stats->shm_records++; + VSL_stats->shm_writes++; + VSL_stats->shm_records++; assert(loghead->ptr < loghead->size); /* Wrap if we cannot fit a full size record */ - if (loghead->ptr + 5 + 255 + 1 >= loghead->size) + if (loghead->ptr + 5 + 255 + 1 >= loghead->size) vsl_wrap(); p = logstart + loghead->ptr; @@ -165,7 +164,7 @@ loghead->ptr += 5 + n; assert(loghead->ptr < loghead->size); - + UNLOCKSHM(&vsl_mtx); va_end(ap); @@ -184,7 +183,7 @@ return; l = w->wlp - w->wlog; LOCKSHM(&vsl_mtx); - VSL_stats->shm_writes++; + VSL_stats->shm_writes++; VSL_stats->shm_records += w->wlr; if (loghead->ptr + l + 1 >= loghead->size) vsl_wrap(); @@ -200,7 +199,7 @@ } /*--------------------------------------------------------------------*/ - + void WSLR(struct worker *w, enum shmlogtag tag, unsigned id, const char *b, const char *e) { Modified: trunk/varnish-cache/bin/varnishd/steps.h =================================================================== --- trunk/varnish-cache/bin/varnishd/steps.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/steps.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -27,7 +27,6 @@ * SUCH DAMAGE. * * $Id$ - * */ STEP(again, AGAIN) Modified: trunk/varnish-cache/bin/varnishd/stevedore.h =================================================================== --- trunk/varnish-cache/bin/varnishd/stevedore.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/stevedore.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/storage_file.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/storage_file.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Storage method based on mmap'ed file @@ -69,7 +68,7 @@ /* * Number of buckets on free-list. - * + * * Last bucket is "larger than" so choose number so that the second * to last bucket matches the 128k CHUNKSIZE in cache_fetch.c when * using the a 4K minimal page size @@ -150,7 +149,7 @@ l = st.st_size; /* We must have at least one block */ - if (l < bs) { + if (l < bs) { if (i == -1) { fprintf(stderr, "Info: (-sfile) default to 80%% size\n"); @@ -436,7 +435,7 @@ } /*-------------------------------------------------------------------- - * Free a range. Attemt merge forward and backward, then sort into + * Free a range. Attemt merge forward and backward, then sort into * free list according to age. */ @@ -551,7 +550,7 @@ /* * XXX: This may be too aggressive and soak up too much address room. - * XXX: On the other hand, the user, directly or implicitly asked us to + * XXX: On the other hand, the user, directly or implicitly asked us to * XXX: use this much storage, so we should make a decent effort. * XXX: worst case (I think), malloc will fail. */ Modified: trunk/varnish-cache/bin/varnishd/storage_malloc.c =================================================================== --- trunk/varnish-cache/bin/varnishd/storage_malloc.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/storage_malloc.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Storage method based on malloc(3) Modified: trunk/varnish-cache/bin/varnishd/tcp.c =================================================================== --- trunk/varnish-cache/bin/varnishd/tcp.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/tcp.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ Modified: trunk/varnish-cache/bin/varnishd/varnishd.c =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishd/varnishd.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * The management process and CLI handling @@ -382,7 +381,7 @@ heritage.socket = -1; memset(¶m, 0, sizeof param); params = ¶m; - mgt_vcc_init(); + mgt_vcc_init(); MCF_ParamInit(cli); cli_check(cli); Modified: trunk/varnish-cache/bin/varnishhist/varnishhist.c =================================================================== --- trunk/varnish-cache/bin/varnishhist/varnishhist.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishhist/varnishhist.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Log tailer for Varnish @@ -112,12 +111,12 @@ alarm(delay); } -static int +static int h_hist(void *priv, unsigned tag, unsigned fd, unsigned len, unsigned spec, const char *ptr) { double b; int i, j; - + (void)priv; (void)fd; (void)len; @@ -184,7 +183,7 @@ struct VSL_data *vd; vd = VSL_New(); - + while ((c = getopt(argc, argv, VSL_ARGS "Vw:")) != -1) { switch (c) { case 'V': @@ -225,7 +224,7 @@ i = VSL_Dispatch(vd, h_hist, NULL); if (i < 0) break; - } + } return (0); } Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.c =================================================================== --- trunk/varnish-cache/bin/varnishlog/varnishlog.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishlog/varnishlog.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Log tailer for Varnish @@ -94,7 +93,7 @@ } } -static int +static int h_order(void *priv, unsigned tag, unsigned fd, unsigned len, unsigned spec, const char *ptr) { @@ -195,7 +194,7 @@ } else if (i < 0) break; - } + } clean_order(); } @@ -250,7 +249,7 @@ struct VSL_data *vd; vd = VSL_New(); - + while ((c = getopt(argc, argv, VSL_ARGS "aoVw:")) != -1) { switch (c) { case 'a': @@ -288,7 +287,7 @@ if (VSL_OpenLog(vd)) exit (1); - if (w_opt != NULL) + if (w_opt != NULL) do_write(vd, w_opt, a_flag); if (o_flag) @@ -300,7 +299,7 @@ fflush(stdout); else if (i < 0) break; - } + } return (0); } Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -3,6 +3,9 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Anders Berg + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,9 +27,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Anders Berg and - * Poul-Henning Kamp - * * $Id$ * * Program that will get data from the shared memory log. When it has the data @@ -35,7 +35,7 @@ * in NCSA extended/combined access log format. * * "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" - * + * * TODO: - Log in any format one wants * - Maybe rotate/compress log */ @@ -124,7 +124,7 @@ lp->bogus_req = 1; } break; - + case SLT_RxURL: vsb_cat(lp->sb, " "); vsb_bcat(lp->sb, ptr, len); @@ -141,9 +141,9 @@ case SLT_RxHeader: if (ispfx(ptr, len, "user-agent:")) - lp->df_U = strdup(ptr + 12); - else if (ispfx(ptr, len, "referer:")) - lp->df_R = strdup(ptr + 9); + lp->df_U = strdup(ptr + 12); + else if (ispfx(ptr, len, "referer:")) + lp->df_R = strdup(ptr + 9); break; case SLT_Length: @@ -202,7 +202,7 @@ int append = 0; vd = VSL_New(); - + while ((c = getopt(argc, argv, VSL_ARGS "aVw:")) != -1) { i = VSL_Arg(vd, c, optarg); if (i < 0) Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.c =================================================================== --- trunk/varnish-cache/bin/varnishstat/varnishstat.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishstat/varnishstat.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Log tailer for Varnish Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.c =================================================================== --- trunk/varnish-cache/bin/varnishtop/varnishtop.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/bin/varnishtop/varnishtop.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Log tailer for Varnish @@ -118,7 +117,7 @@ vd = VSL_New(); - + while ((c = getopt(argc, argv, VSL_ARGS "1fV")) != -1) { i = VSL_Arg(vd, c, optarg); if (i < 0) @@ -185,7 +184,7 @@ tp->count = 1.0; tp->clen = q - p; TAILQ_INSERT_TAIL(&top_head, tp, list); - } + } memcpy(tp->rec, p, 4 + p[1]); while (1) { tp2 = TAILQ_PREV(tp, tophead, list); Modified: trunk/varnish-cache/include/binary_heap.h =================================================================== --- trunk/varnish-cache/include/binary_heap.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/include/binary_heap.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Binary Heap API (see: http://en.wikipedia.org/wiki/Binary_heap) @@ -41,7 +40,7 @@ typedef int binheap_cmp_t(void *priv, void *a, void *b); /* * Comparison function. - * Should return true if item 'a' should be closer to the root + * Should return true if item 'a' should be closer to the root * than item 'b' */ @@ -57,7 +56,7 @@ /* * Create Binary tree * 'priv' is passed to cmp and update functions. - */ + */ void binheap_insert(struct binheap *, void *); /* Modified: trunk/varnish-cache/include/cli.h =================================================================== --- trunk/varnish-cache/include/cli.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/include/cli.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,17 +26,15 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Public definition of the CLI protocol, part of the published Varnish-API. * - * The overall structure of the protocol is a command-line like + * The overall structure of the protocol is a command-line like * "command+arguments" request and a IETF style "number + string" response. * * Arguments can contain arbitrary sequences of bytes which are encoded * in back-slash notation in double-quoted, if necessary. - * */ /* @@ -115,13 +113,13 @@ "param.set", \ "param.set ", \ "\tSet parameter value.", \ - 2,2 + 2,2 #define CLI_SERVER_FREEZE \ "server.freeze", \ "server.freeze", \ "\tStop the clock, freeze object store.", \ - 0, 0 + 0, 0 #define CLI_SERVER_THAW \ "thaw", \ Modified: trunk/varnish-cache/include/cli_common.h =================================================================== --- trunk/varnish-cache/include/cli_common.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/include/cli_common.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ Modified: trunk/varnish-cache/include/cli_priv.h =================================================================== --- trunk/varnish-cache/include/cli_priv.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/include/cli_priv.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,13 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Varnish process internal CLI stuff. * * XXX: at a latter date we may want to move some to cli.h/libvarnishapi - * */ #define CLI_PRIV_H Modified: trunk/varnish-cache/include/compat/asprintf.h =================================================================== --- trunk/varnish-cache/include/compat/asprintf.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/include/compat/asprintf.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Dag-Erling Sm?rgrav + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ Modified: trunk/varnish-cache/include/compat/setproctitle.h =================================================================== --- trunk/varnish-cache/include/compat/setproctitle.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/include/compat/setproctitle.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Dag-Erling Sm?rgrav + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ Modified: trunk/varnish-cache/include/compat/srandomdev.h =================================================================== --- trunk/varnish-cache/include/compat/srandomdev.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/include/compat/srandomdev.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Dag-Erling Sm?rgrav + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ Modified: trunk/varnish-cache/include/compat/strlcat.h =================================================================== --- trunk/varnish-cache/include/compat/strlcat.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/include/compat/strlcat.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Dag-Erling Sm?rgrav + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ Modified: trunk/varnish-cache/include/compat/strlcpy.h =================================================================== --- trunk/varnish-cache/include/compat/strlcpy.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/include/compat/strlcpy.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Dag-Erling Sm?rgrav + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ Modified: trunk/varnish-cache/include/compat/strndup.h =================================================================== --- trunk/varnish-cache/include/compat/strndup.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/include/compat/strndup.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Dag-Erling Sm?rgrav + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ Modified: trunk/varnish-cache/include/compat/vasprintf.h =================================================================== --- trunk/varnish-cache/include/compat/vasprintf.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/include/compat/vasprintf.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Dag-Erling Sm?rgrav + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ Modified: trunk/varnish-cache/include/http_headers.h =================================================================== --- trunk/varnish-cache/include/http_headers.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/include/http_headers.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * a Http header name @@ -39,7 +38,7 @@ * * see [RFC2616 13.5.1 End-to-end and Hop-by-hop Headers] * - * a b c d e f g + * a b c d e f g *-------------------------------------------------------------------- */ Modified: trunk/varnish-cache/include/libvarnish.h =================================================================== --- trunk/varnish-cache/include/libvarnish.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/include/libvarnish.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ Modified: trunk/varnish-cache/include/libvcl.h =================================================================== --- trunk/varnish-cache/include/libvcl.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/include/libvcl.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ Modified: trunk/varnish-cache/include/shmlog.h =================================================================== --- trunk/varnish-cache/include/shmlog.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/include/shmlog.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Poul-Henning Kamp + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,13 +26,11 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Define the layout of the shared memory log segment. * * NB: THIS IS NOT A PUBLIC API TO VARNISH! - * */ #define SHMLOG_FILENAME "/tmp/_.vsl" @@ -49,7 +49,7 @@ /* * Byte offset into the file where the fifolog starts - * This allows the header to expand later. + * This allows the header to expand later. */ unsigned start; Modified: trunk/varnish-cache/include/shmlog_tags.h =================================================================== --- trunk/varnish-cache/include/shmlog_tags.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/include/shmlog_tags.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Define the tags in the shared memory in a reusable format. Modified: trunk/varnish-cache/include/stat_field.h =================================================================== --- trunk/varnish-cache/include/stat_field.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/include/stat_field.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -27,7 +27,6 @@ * SUCH DAMAGE. * * $Id$ - * */ MAC_STAT(client_conn, uint64_t, "u", "Client connections accepted") Modified: trunk/varnish-cache/include/stats.h =================================================================== --- trunk/varnish-cache/include/stats.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/include/stats.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -27,7 +27,6 @@ * SUCH DAMAGE. * * $Id$ - * */ #include Modified: trunk/varnish-cache/include/varnishapi.h =================================================================== --- trunk/varnish-cache/include/varnishapi.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/include/varnishapi.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ Modified: trunk/varnish-cache/include/vcl.h =================================================================== --- trunk/varnish-cache/include/vcl.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/include/vcl.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -16,16 +16,16 @@ unsigned magic; #define VCL_CONF_MAGIC 0x7406c509 /* from /dev/random */ - struct backend **backend; - unsigned nbackend; - struct vrt_ref *ref; - unsigned nref; - unsigned busy; + struct backend **backend; + unsigned nbackend; + struct vrt_ref *ref; + unsigned nref; + unsigned busy; - void *priv; + void *priv; - vcl_init_f *init_func; - vcl_fini_f *fini_func; + vcl_init_f *init_func; + vcl_fini_f *fini_func; vcl_func_f *recv_func; vcl_func_f *miss_func; Modified: trunk/varnish-cache/include/vrt.h =================================================================== --- trunk/varnish-cache/include/vrt.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/include/vrt.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Runtime support for compiled VCL programs. Modified: trunk/varnish-cache/include/vsb.h =================================================================== --- trunk/varnish-cache/include/vsb.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/include/vsb.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -25,7 +25,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * * $Id$ * $FreeBSD: src/sys/sys/vsb.h,v 1.14 2004/07/09 11:35:30 des Exp $ */ Modified: trunk/varnish-cache/lib/libcompat/asprintf.c =================================================================== --- trunk/varnish-cache/lib/libcompat/asprintf.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/lib/libcompat/asprintf.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Dag-Erling Sm?rgrav + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,8 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Dag-Erling Sm?rgrav - * * $Id$ * */ Modified: trunk/varnish-cache/lib/libcompat/setproctitle.c =================================================================== --- trunk/varnish-cache/lib/libcompat/setproctitle.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/lib/libcompat/setproctitle.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Dag-Erling Sm?rgrav + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,8 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Dag-Erling Sm?rgrav - * * $Id$ */ Modified: trunk/varnish-cache/lib/libcompat/srandomdev.c =================================================================== --- trunk/varnish-cache/lib/libcompat/srandomdev.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/lib/libcompat/srandomdev.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Dag-Erling Sm?rgrav + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,8 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Dag-Erling Sm?rgrav - * * $Id$ */ Modified: trunk/varnish-cache/lib/libcompat/strndup.c =================================================================== --- trunk/varnish-cache/lib/libcompat/strndup.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/lib/libcompat/strndup.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Dag-Erling Sm?rgrav + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * */ Modified: trunk/varnish-cache/lib/libcompat/vasprintf.c =================================================================== --- trunk/varnish-cache/lib/libcompat/vasprintf.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/lib/libcompat/vasprintf.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Dag-Erling Sm?rgrav + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,8 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * Initial implementation by Dag-Erling Sm?rgrav - * * $Id$ * */ Modified: trunk/varnish-cache/lib/libvarnish/argv.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/argv.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/lib/libvarnish/argv.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * const char **ParseArgv(const char *s, int comment) @@ -194,7 +193,7 @@ FreeArgv(char **argv) { int i; - + for (i = 1; argv[i] != NULL; i++) free(argv[i]); free(argv); @@ -234,7 +233,7 @@ (void)argc; (void)argv; - register_printf_render_std("V"); + register_printf_render_std("V"); while (fgets(buf, sizeof buf, stdin)) Test(buf); Modified: trunk/varnish-cache/lib/libvarnish/assert.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/assert.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/lib/libvarnish/assert.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ Modified: trunk/varnish-cache/lib/libvarnish/binary_heap.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/binary_heap.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/lib/libvarnish/binary_heap.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Implementation of a binary heap API @@ -208,7 +207,7 @@ assert(idx > 0); assert(bh->array[idx] != NULL); bh->update(bh->priv, bh->array[idx], 0); - if (idx == --bh->next) { + if (idx == --bh->next) { bh->array[bh->next] = NULL; return; } Modified: trunk/varnish-cache/lib/libvarnish/cli.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/cli.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/lib/libvarnish/cli.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Stuff for handling the CLI protocol Modified: trunk/varnish-cache/lib/libvarnish/cli_common.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/cli_common.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/lib/libvarnish/cli_common.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ Modified: trunk/varnish-cache/lib/libvarnish/crc32.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/crc32.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/lib/libvarnish/crc32.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * This CRC32 implementation is in the public domain. Modified: trunk/varnish-cache/lib/libvarnish/time.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/time.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/lib/libvarnish/time.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Semi-trivial functions to handle HTTP header timestamps according to Modified: trunk/varnish-cache/lib/libvarnish/version.c =================================================================== --- trunk/varnish-cache/lib/libvarnish/version.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/lib/libvarnish/version.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -3,6 +3,8 @@ * Copyright (c) 2006 Linpro AS * All rights reserved. * + * Author: Dag-Erling Sm?rgrav + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -24,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Display a standardized version message. Modified: trunk/varnish-cache/lib/libvarnishapi/shmlog.c =================================================================== --- trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/lib/libvarnishapi/shmlog.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ @@ -276,7 +275,7 @@ *pp = p; return (1); } - if (vd->map[p[0]] & M_SUPPRESS) + if (vd->map[p[0]] & M_SUPPRESS) continue; if (vd->b_opt && !(vd->map[u] & M_BACKEND)) continue; Modified: trunk/varnish-cache/lib/libvcl/vcc_acl.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_acl.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/lib/libvcl/vcc_acl.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ @@ -104,12 +103,12 @@ if (tl->t->tok == '(') { para = 1; vcc_NextToken(tl); - } + } if (tl->t->tok == '!') { not = 1; vcc_NextToken(tl); - } + } ExpectErr(tl, CSTR); /* XXX: try to look it up, warn if failure */ @@ -119,7 +118,7 @@ vcc_NextToken(tl); ExpectErr(tl, CNUM); mask = UintVal(tl); - } + } Fc(tl, 1, "{ %u, %u, %u, ", not, mask, para); EncString(tl->fc, t); Fc(tl, 0, ", \""); Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_compile.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/lib/libvcl/vcc_compile.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ @@ -36,7 +35,7 @@ * * XXX: * Better error messages, throughout. - * >It also accured to me that we could link the errors to the error + * >It also accured to me that we could link the errors to the error * >documentation. * > * >Unreferenced function 'request_policy', first mention is @@ -53,7 +52,7 @@ * > ------------#############------------ * >Read more about this type of error: * >http://varnish/doc/error.html#Unknown%20variable - * + * * XXX: * Create proper tmp filenames for .h, .c and .o * @@ -115,7 +114,7 @@ Fc(tl, 1, "VRT_count(sp, %u)%s\n", ++tl->cnt, sep); \ tl->t->cnt = tl->cnt; \ } while (0) - + /*-------------------------------------------------------------------- * Printf output to the two vsbs, possibly indented */ @@ -383,7 +382,7 @@ d += *p - '0'; } vcc_NextToken(tl); - if (tl->t->tok != '.') + if (tl->t->tok != '.') return (d); vcc_NextToken(tl); if (tl->t->tok != CNUM) @@ -630,7 +629,7 @@ case STRING: L(tl, Cond_String(vp, tl)); break; case TIME: L(tl, Cond_Int(vp, tl)); break; case BACKEND: L(tl, Cond_Backend(vp, tl)); break; - default: + default: vsb_printf(tl->sb, "Variable '%s'" " has no conditions that can be checked\n", @@ -806,7 +805,7 @@ case RATE: case TIME: case FLOAT: - if (tl->t->tok != '=') + if (tl->t->tok != '=') Fc(tl, 0, "%s %c ", vp->rname, *tl->t->b); a = tl->t->tok; vcc_NextToken(tl); @@ -818,7 +817,7 @@ SizeVal(tl); else if (vp->fmt == RATE) RateVal(tl); - else + else Fc(tl, 0, "%g", DoubleVal(tl)); Fc(tl, 0, ");\n"); break; @@ -923,7 +922,7 @@ hint.ai_family = PF_UNSPEC; hint.ai_socktype = SOCK_STREAM; error = getaddrinfo(host, port, &hint, &res); - if (error) + if (error) return (gai_strerror(error)); freeaddrinfo(res); return (NULL); @@ -1016,7 +1015,7 @@ return; } } - + vcc_NextToken(tl); Fc(tl, 1, "}\n"); Fc(tl, 0, "\n"); @@ -1100,7 +1099,7 @@ struct proc *p; TAILQ_FOREACH(p, &tl->procs, list) { - if (!vcc_Teq(p->name, t)) + if (!vcc_Teq(p->name, t)) continue; if (def) p->name = t; @@ -1154,7 +1153,7 @@ if (u & VCL_RET_##b) { \ vsb_printf(tl->sb, "Illegal return for method\n"); \ vcc_ErrWhere(tl, p->returnt[d]); \ - } + } #include "vcl_returns.h" #undef VCL_RET_MAC vsb_printf(tl->sb, "In function\n"); @@ -1189,7 +1188,7 @@ if (vcc_IdIs(p->name, m->name)) break; } - if (m->name == NULL) + if (m->name == NULL) continue; if (Consist_Decend(tl, p, m->returns)) { vsb_printf(tl->sb, @@ -1251,7 +1250,7 @@ type, PF(r->name)); vcc_ErrWhere(tl, r->name); continue; - } + } vsb_printf(tl->sb, "Unused %s %.*s, defined:\n", type, PF(r->name)); @@ -1268,7 +1267,7 @@ struct token *t; unsigned fil, lin, pos; const char *p; - + Fh(tl, 0, "#define VGC_NREFS %u\n", tl->cnt + 1); Fh(tl, 0, "static struct vrt_ref VGC_ref[VGC_NREFS];\n"); Fc(tl, 0, "static struct vrt_ref VGC_ref[VGC_NREFS] = {\n"); @@ -1294,7 +1293,7 @@ pos += 8; } else pos++; - + } Fc(tl, 0, " [%3u] = { %d, %4u, %3u, 0, \"%.*s\" },\n", t->cnt, fil, lin, pos + 1, PF(t)); @@ -1422,7 +1421,7 @@ assert(of != NULL); mktemp(of); - sprintf(buf, + sprintf(buf, "tee /tmp/_.c |" "cc -fpic -shared -Wl,-x -o %s -x c - ", of); @@ -1484,7 +1483,7 @@ assert(0 == fstat(fd, &st)); f = malloc(st.st_size + 1); assert(f != NULL); - i = read(fd, f, st.st_size); + i = read(fd, f, st.st_size); assert(i == st.st_size); f[i] = '\0'; r = VCC_Compile(sb, f, NULL); @@ -1502,7 +1501,7 @@ vcc_default_vcl_b = default_vcl; vcc_default_vcl_e = strchr(default_vcl, '\0'); assert(vcc_default_vcl_e != NULL); - + vcl_init_tnames(); for (v = vcc_vars; v->name != NULL; v++) v->len = strlen(v->name); Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.h =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_compile.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/lib/libvcl/vcc_compile.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ Modified: trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -165,78 +165,78 @@ } return (0); case 'b': - if (p[0] == 'b' && p[1] == 'a' && p[2] == 'c' && - p[3] == 'k' && p[4] == 'e' && p[5] == 'n' && + if (p[0] == 'b' && p[1] == 'a' && p[2] == 'c' && + p[3] == 'k' && p[4] == 'e' && p[5] == 'n' && p[6] == 'd' && !isvar(p[7])) { *q = p + 7; return (T_BACKEND); } return (0); case 'c': - if (p[0] == 'c' && p[1] == 'a' && p[2] == 'l' && + if (p[0] == 'c' && p[1] == 'a' && p[2] == 'l' && p[3] == 'l' && !isvar(p[4])) { *q = p + 4; return (T_CALL); } return (0); case 'd': - if (p[0] == 'd' && p[1] == 'i' && p[2] == 's' && - p[3] == 'c' && p[4] == 'a' && p[5] == 'r' && + if (p[0] == 'd' && p[1] == 'i' && p[2] == 's' && + p[3] == 'c' && p[4] == 'a' && p[5] == 'r' && p[6] == 'd' && !isvar(p[7])) { *q = p + 7; return (T_DISCARD); } - if (p[0] == 'd' && p[1] == 'e' && p[2] == 'l' && - p[3] == 'i' && p[4] == 'v' && p[5] == 'e' && + if (p[0] == 'd' && p[1] == 'e' && p[2] == 'l' && + p[3] == 'i' && p[4] == 'v' && p[5] == 'e' && p[6] == 'r' && !isvar(p[7])) { *q = p + 7; return (T_DELIVER); } return (0); case 'e': - if (p[0] == 'e' && p[1] == 'r' && p[2] == 'r' && + if (p[0] == 'e' && p[1] == 'r' && p[2] == 'r' && p[3] == 'o' && p[4] == 'r' && !isvar(p[5])) { *q = p + 5; return (T_ERROR); } - if (p[0] == 'e' && p[1] == 'l' && p[2] == 's' && + if (p[0] == 'e' && p[1] == 'l' && p[2] == 's' && p[3] == 'i' && p[4] == 'f' && !isvar(p[5])) { *q = p + 5; return (T_ELSIF); } - if (p[0] == 'e' && p[1] == 'l' && p[2] == 's' && + if (p[0] == 'e' && p[1] == 'l' && p[2] == 's' && p[3] == 'e' && p[4] == 'i' && p[5] == 'f' && !isvar(p[6])) { *q = p + 6; return (T_ELSEIF); } - if (p[0] == 'e' && p[1] == 'l' && p[2] == 's' && + if (p[0] == 'e' && p[1] == 'l' && p[2] == 's' && p[3] == 'e' && !isvar(p[4])) { *q = p + 4; return (T_ELSE); } return (0); case 'f': - if (p[0] == 'f' && p[1] == 'u' && p[2] == 'n' && + if (p[0] == 'f' && p[1] == 'u' && p[2] == 'n' && p[3] == 'c' && !isvar(p[4])) { *q = p + 4; return (T_FUNC); } - if (p[0] == 'f' && p[1] == 'e' && p[2] == 't' && + if (p[0] == 'f' && p[1] == 'e' && p[2] == 't' && p[3] == 'c' && p[4] == 'h' && !isvar(p[5])) { *q = p + 5; return (T_FETCH); } return (0); case 'i': - if (p[0] == 'i' && p[1] == 'n' && p[2] == 's' && - p[3] == 'e' && p[4] == 'r' && p[5] == 't' && - p[6] == '_' && p[7] == 'p' && p[8] == 'a' && + if (p[0] == 'i' && p[1] == 'n' && p[2] == 's' && + p[3] == 'e' && p[4] == 'r' && p[5] == 't' && + p[6] == '_' && p[7] == 'p' && p[8] == 'a' && p[9] == 's' && p[10] == 's' && !isvar(p[11])) { *q = p + 11; return (T_INSERT_PASS); } - if (p[0] == 'i' && p[1] == 'n' && p[2] == 's' && + if (p[0] == 'i' && p[1] == 'n' && p[2] == 's' && p[3] == 'e' && p[4] == 'r' && p[5] == 't' && !isvar(p[6])) { *q = p + 6; @@ -248,7 +248,7 @@ } return (0); case 'l': - if (p[0] == 'l' && p[1] == 'o' && p[2] == 'o' && + if (p[0] == 'l' && p[1] == 'o' && p[2] == 'o' && p[3] == 'k' && p[4] == 'u' && p[5] == 'p' && !isvar(p[6])) { *q = p + 6; @@ -256,51 +256,51 @@ } return (0); case 'n': - if (p[0] == 'n' && p[1] == 'o' && p[2] == '_' && - p[3] == 'n' && p[4] == 'e' && p[5] == 'w' && - p[6] == '_' && p[7] == 'c' && p[8] == 'a' && + if (p[0] == 'n' && p[1] == 'o' && p[2] == '_' && + p[3] == 'n' && p[4] == 'e' && p[5] == 'w' && + p[6] == '_' && p[7] == 'c' && p[8] == 'a' && p[9] == 'c' && p[10] == 'h' && p[11] == 'e' && !isvar(p[12])) { *q = p + 12; return (T_NO_NEW_CACHE); } - if (p[0] == 'n' && p[1] == 'o' && p[2] == '_' && - p[3] == 'c' && p[4] == 'a' && p[5] == 'c' && + if (p[0] == 'n' && p[1] == 'o' && p[2] == '_' && + p[3] == 'c' && p[4] == 'a' && p[5] == 'c' && p[6] == 'h' && p[7] == 'e' && !isvar(p[8])) { *q = p + 8; return (T_NO_CACHE); } return (0); case 'p': - if (p[0] == 'p' && p[1] == 'r' && p[2] == 'o' && + if (p[0] == 'p' && p[1] == 'r' && p[2] == 'o' && p[3] == 'c' && !isvar(p[4])) { *q = p + 4; return (T_PROC); } - if (p[0] == 'p' && p[1] == 'i' && p[2] == 'p' && + if (p[0] == 'p' && p[1] == 'i' && p[2] == 'p' && p[3] == 'e' && !isvar(p[4])) { *q = p + 4; return (T_PIPE); } - if (p[0] == 'p' && p[1] == 'a' && p[2] == 's' && + if (p[0] == 'p' && p[1] == 'a' && p[2] == 's' && p[3] == 's' && !isvar(p[4])) { *q = p + 4; return (T_PASS); } return (0); case 'r': - if (p[0] == 'r' && p[1] == 'e' && p[2] == 'w' && - p[3] == 'r' && p[4] == 'i' && p[5] == 't' && + if (p[0] == 'r' && p[1] == 'e' && p[2] == 'w' && + p[3] == 'r' && p[4] == 'i' && p[5] == 't' && p[6] == 'e' && !isvar(p[7])) { *q = p + 7; return (T_REWRITE); } return (0); case 's': - if (p[0] == 's' && p[1] == 'w' && p[2] == 'i' && - p[3] == 't' && p[4] == 'c' && p[5] == 'h' && - p[6] == '_' && p[7] == 'c' && p[8] == 'o' && - p[9] == 'n' && p[10] == 'f' && p[11] == 'i' && + if (p[0] == 's' && p[1] == 'w' && p[2] == 'i' && + p[3] == 't' && p[4] == 'c' && p[5] == 'h' && + p[6] == '_' && p[7] == 'c' && p[8] == 'o' && + p[9] == 'n' && p[10] == 'f' && p[11] == 'i' && p[12] == 'g' && !isvar(p[13])) { *q = p + 13; return (T_SWITCH_CONFIG); Modified: trunk/varnish-cache/lib/libvcl/vcc_obj.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_obj.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/lib/libvcl/vcc_obj.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -69,7 +69,7 @@ { NULL } }; -const char *vrt_obj_h = +const char *vrt_obj_h = "/*\n" " * $Id$\n" " *\n" Modified: trunk/varnish-cache/lib/libvcl/vcc_priv.h =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_priv.h 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/lib/libvcl/vcc_priv.h 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ * * Stuff shared between main.c and fixed_token.c Modified: trunk/varnish-cache/lib/libvcl/vcc_token.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_token.c 2006-09-19 05:39:43 UTC (rev 1095) +++ trunk/varnish-cache/lib/libvcl/vcc_token.c 2006-09-20 07:50:27 UTC (rev 1096) @@ -26,7 +26,6 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * * $Id$ */ @@ -71,7 +70,7 @@ { unsigned lin, pos, x, y; const char *p, *l, *f, *b, *e; - + lin = 1; pos = 0; if (t->tok == METHOD) From des at projects.linpro.no Wed Sep 20 07:51:05 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 20 Sep 2006 09:51:05 +0200 (CEST) Subject: r1097 - in trunk/varnish-cache: include lib/libvcl Message-ID: <20060920075105.1348D1EC29C@projects.linpro.no> Author: des Date: 2006-09-20 09:51:04 +0200 (Wed, 20 Sep 2006) New Revision: 1097 Modified: trunk/varnish-cache/include/vcl.h trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c trunk/varnish-cache/lib/libvcl/vcc_obj.c Log: Regenerate. Modified: trunk/varnish-cache/include/vcl.h =================================================================== --- trunk/varnish-cache/include/vcl.h 2006-09-20 07:50:27 UTC (rev 1096) +++ trunk/varnish-cache/include/vcl.h 2006-09-20 07:51:04 UTC (rev 1097) @@ -16,16 +16,16 @@ unsigned magic; #define VCL_CONF_MAGIC 0x7406c509 /* from /dev/random */ - struct backend **backend; - unsigned nbackend; - struct vrt_ref *ref; - unsigned nref; - unsigned busy; + struct backend **backend; + unsigned nbackend; + struct vrt_ref *ref; + unsigned nref; + unsigned busy; - void *priv; + void *priv; - vcl_init_f *init_func; - vcl_fini_f *fini_func; + vcl_init_f *init_func; + vcl_fini_f *fini_func; vcl_func_f *recv_func; vcl_func_f *miss_func; Modified: trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2006-09-20 07:50:27 UTC (rev 1096) +++ trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c 2006-09-20 07:51:04 UTC (rev 1097) @@ -165,78 +165,78 @@ } return (0); case 'b': - if (p[0] == 'b' && p[1] == 'a' && p[2] == 'c' && - p[3] == 'k' && p[4] == 'e' && p[5] == 'n' && + if (p[0] == 'b' && p[1] == 'a' && p[2] == 'c' && + p[3] == 'k' && p[4] == 'e' && p[5] == 'n' && p[6] == 'd' && !isvar(p[7])) { *q = p + 7; return (T_BACKEND); } return (0); case 'c': - if (p[0] == 'c' && p[1] == 'a' && p[2] == 'l' && + if (p[0] == 'c' && p[1] == 'a' && p[2] == 'l' && p[3] == 'l' && !isvar(p[4])) { *q = p + 4; return (T_CALL); } return (0); case 'd': - if (p[0] == 'd' && p[1] == 'i' && p[2] == 's' && - p[3] == 'c' && p[4] == 'a' && p[5] == 'r' && + if (p[0] == 'd' && p[1] == 'i' && p[2] == 's' && + p[3] == 'c' && p[4] == 'a' && p[5] == 'r' && p[6] == 'd' && !isvar(p[7])) { *q = p + 7; return (T_DISCARD); } - if (p[0] == 'd' && p[1] == 'e' && p[2] == 'l' && - p[3] == 'i' && p[4] == 'v' && p[5] == 'e' && + if (p[0] == 'd' && p[1] == 'e' && p[2] == 'l' && + p[3] == 'i' && p[4] == 'v' && p[5] == 'e' && p[6] == 'r' && !isvar(p[7])) { *q = p + 7; return (T_DELIVER); } return (0); case 'e': - if (p[0] == 'e' && p[1] == 'r' && p[2] == 'r' && + if (p[0] == 'e' && p[1] == 'r' && p[2] == 'r' && p[3] == 'o' && p[4] == 'r' && !isvar(p[5])) { *q = p + 5; return (T_ERROR); } - if (p[0] == 'e' && p[1] == 'l' && p[2] == 's' && + if (p[0] == 'e' && p[1] == 'l' && p[2] == 's' && p[3] == 'i' && p[4] == 'f' && !isvar(p[5])) { *q = p + 5; return (T_ELSIF); } - if (p[0] == 'e' && p[1] == 'l' && p[2] == 's' && + if (p[0] == 'e' && p[1] == 'l' && p[2] == 's' && p[3] == 'e' && p[4] == 'i' && p[5] == 'f' && !isvar(p[6])) { *q = p + 6; return (T_ELSEIF); } - if (p[0] == 'e' && p[1] == 'l' && p[2] == 's' && + if (p[0] == 'e' && p[1] == 'l' && p[2] == 's' && p[3] == 'e' && !isvar(p[4])) { *q = p + 4; return (T_ELSE); } return (0); case 'f': - if (p[0] == 'f' && p[1] == 'u' && p[2] == 'n' && + if (p[0] == 'f' && p[1] == 'u' && p[2] == 'n' && p[3] == 'c' && !isvar(p[4])) { *q = p + 4; return (T_FUNC); } - if (p[0] == 'f' && p[1] == 'e' && p[2] == 't' && + if (p[0] == 'f' && p[1] == 'e' && p[2] == 't' && p[3] == 'c' && p[4] == 'h' && !isvar(p[5])) { *q = p + 5; return (T_FETCH); } return (0); case 'i': - if (p[0] == 'i' && p[1] == 'n' && p[2] == 's' && - p[3] == 'e' && p[4] == 'r' && p[5] == 't' && - p[6] == '_' && p[7] == 'p' && p[8] == 'a' && + if (p[0] == 'i' && p[1] == 'n' && p[2] == 's' && + p[3] == 'e' && p[4] == 'r' && p[5] == 't' && + p[6] == '_' && p[7] == 'p' && p[8] == 'a' && p[9] == 's' && p[10] == 's' && !isvar(p[11])) { *q = p + 11; return (T_INSERT_PASS); } - if (p[0] == 'i' && p[1] == 'n' && p[2] == 's' && + if (p[0] == 'i' && p[1] == 'n' && p[2] == 's' && p[3] == 'e' && p[4] == 'r' && p[5] == 't' && !isvar(p[6])) { *q = p + 6; @@ -248,7 +248,7 @@ } return (0); case 'l': - if (p[0] == 'l' && p[1] == 'o' && p[2] == 'o' && + if (p[0] == 'l' && p[1] == 'o' && p[2] == 'o' && p[3] == 'k' && p[4] == 'u' && p[5] == 'p' && !isvar(p[6])) { *q = p + 6; @@ -256,51 +256,51 @@ } return (0); case 'n': - if (p[0] == 'n' && p[1] == 'o' && p[2] == '_' && - p[3] == 'n' && p[4] == 'e' && p[5] == 'w' && - p[6] == '_' && p[7] == 'c' && p[8] == 'a' && + if (p[0] == 'n' && p[1] == 'o' && p[2] == '_' && + p[3] == 'n' && p[4] == 'e' && p[5] == 'w' && + p[6] == '_' && p[7] == 'c' && p[8] == 'a' && p[9] == 'c' && p[10] == 'h' && p[11] == 'e' && !isvar(p[12])) { *q = p + 12; return (T_NO_NEW_CACHE); } - if (p[0] == 'n' && p[1] == 'o' && p[2] == '_' && - p[3] == 'c' && p[4] == 'a' && p[5] == 'c' && + if (p[0] == 'n' && p[1] == 'o' && p[2] == '_' && + p[3] == 'c' && p[4] == 'a' && p[5] == 'c' && p[6] == 'h' && p[7] == 'e' && !isvar(p[8])) { *q = p + 8; return (T_NO_CACHE); } return (0); case 'p': - if (p[0] == 'p' && p[1] == 'r' && p[2] == 'o' && + if (p[0] == 'p' && p[1] == 'r' && p[2] == 'o' && p[3] == 'c' && !isvar(p[4])) { *q = p + 4; return (T_PROC); } - if (p[0] == 'p' && p[1] == 'i' && p[2] == 'p' && + if (p[0] == 'p' && p[1] == 'i' && p[2] == 'p' && p[3] == 'e' && !isvar(p[4])) { *q = p + 4; return (T_PIPE); } - if (p[0] == 'p' && p[1] == 'a' && p[2] == 's' && + if (p[0] == 'p' && p[1] == 'a' && p[2] == 's' && p[3] == 's' && !isvar(p[4])) { *q = p + 4; return (T_PASS); } return (0); case 'r': - if (p[0] == 'r' && p[1] == 'e' && p[2] == 'w' && - p[3] == 'r' && p[4] == 'i' && p[5] == 't' && + if (p[0] == 'r' && p[1] == 'e' && p[2] == 'w' && + p[3] == 'r' && p[4] == 'i' && p[5] == 't' && p[6] == 'e' && !isvar(p[7])) { *q = p + 7; return (T_REWRITE); } return (0); case 's': - if (p[0] == 's' && p[1] == 'w' && p[2] == 'i' && - p[3] == 't' && p[4] == 'c' && p[5] == 'h' && - p[6] == '_' && p[7] == 'c' && p[8] == 'o' && - p[9] == 'n' && p[10] == 'f' && p[11] == 'i' && + if (p[0] == 's' && p[1] == 'w' && p[2] == 'i' && + p[3] == 't' && p[4] == 'c' && p[5] == 'h' && + p[6] == '_' && p[7] == 'c' && p[8] == 'o' && + p[9] == 'n' && p[10] == 'f' && p[11] == 'i' && p[12] == 'g' && !isvar(p[13])) { *q = p + 13; return (T_SWITCH_CONFIG); @@ -494,7 +494,6 @@ fputs(" * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n", f); fputs(" * SUCH DAMAGE.\n", f); fputs(" *\n", f); - fputs(" *\n", f); fputs(" * $Id$\n", f); fputs(" *\n", f); fputs(" * Runtime support for compiled VCL programs.\n", f); Modified: trunk/varnish-cache/lib/libvcl/vcc_obj.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_obj.c 2006-09-20 07:50:27 UTC (rev 1096) +++ trunk/varnish-cache/lib/libvcl/vcc_obj.c 2006-09-20 07:51:04 UTC (rev 1097) @@ -69,7 +69,7 @@ { NULL } }; -const char *vrt_obj_h = +const char *vrt_obj_h = "/*\n" " * $Id$\n" " *\n" From des at projects.linpro.no Wed Sep 20 08:37:35 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 20 Sep 2006 10:37:35 +0200 (CEST) Subject: r1098 - in trunk/varnish-cache: . bin/varnishd bin/varnishncsa bin/varnishstat Message-ID: <20060920083735.4EB641EC29A@projects.linpro.no> Author: des Date: 2006-09-20 10:37:35 +0200 (Wed, 20 Sep 2006) New Revision: 1098 Modified: trunk/varnish-cache/bin/varnishd/Makefile.am trunk/varnish-cache/bin/varnishncsa/Makefile.am trunk/varnish-cache/bin/varnishstat/Makefile.am trunk/varnish-cache/configure.ac Log: Trust autoconf to dtrt wrt libraries. Prefer libthr to libpthread if it's available (i.e. on FreeBSD 6 and newer) Modified: trunk/varnish-cache/bin/varnishd/Makefile.am =================================================================== --- trunk/varnish-cache/bin/varnishd/Makefile.am 2006-09-20 07:51:04 UTC (rev 1097) +++ trunk/varnish-cache/bin/varnishd/Makefile.am 2006-09-20 08:37:35 UTC (rev 1098) @@ -62,17 +62,4 @@ varnishd_LDADD = \ $(top_builddir)/lib/libcompat/libcompat.a \ $(top_builddir)/lib/libvarnish/libvarnish.la \ - $(top_builddir)/lib/libvcl/libvcl.la \ - -lpthread - -if NEED_LIBDL -varnishd_LDADD += -ldl -endif - -if NEED_LIBMD -varnishd_LDADD += -lmd -endif - -if NEED_LIBRT -varnishd_LDADD += -lrt -endif + $(top_builddir)/lib/libvcl/libvcl.la Modified: trunk/varnish-cache/bin/varnishncsa/Makefile.am =================================================================== --- trunk/varnish-cache/bin/varnishncsa/Makefile.am 2006-09-20 07:51:04 UTC (rev 1097) +++ trunk/varnish-cache/bin/varnishncsa/Makefile.am 2006-09-20 08:37:35 UTC (rev 1098) @@ -14,7 +14,3 @@ $(top_builddir)/lib/libcompat/libcompat.a \ $(top_builddir)/lib/libvarnish/libvarnish.la \ $(top_builddir)/lib/libvarnishapi/libvarnishapi.la - -if NEED_LIBRT -varnishncsa_LDADD += -lrt -endif Modified: trunk/varnish-cache/bin/varnishstat/Makefile.am =================================================================== --- trunk/varnish-cache/bin/varnishstat/Makefile.am 2006-09-20 07:51:04 UTC (rev 1097) +++ trunk/varnish-cache/bin/varnishstat/Makefile.am 2006-09-20 08:37:35 UTC (rev 1098) @@ -13,9 +13,5 @@ varnishstat_LDADD = \ $(top_builddir)/lib/libcompat/libcompat.a \ $(top_builddir)/lib/libvarnish/libvarnish.la \ - $(top_builddir)/lib/libvarnishapi/libvarnishapi.la \ + $(top_builddir)/lib/libvarnishapi/libvarnishapi.la \ -lcurses - -if NEED_LIBRT -varnishstat_LDADD += -lrt -endif Modified: trunk/varnish-cache/configure.ac =================================================================== --- trunk/varnish-cache/configure.ac 2006-09-20 07:51:04 UTC (rev 1097) +++ trunk/varnish-cache/configure.ac 2006-09-20 08:37:35 UTC (rev 1098) @@ -35,6 +35,10 @@ AC_PROG_MAKE_SET # Checks for libraries. +AC_CHECK_LIB(rt, clock_gettime) +AC_CHECK_LIB(dl, dlopen) +#AC_SEARCH_LIBS(initscr, [curses ncurses]) +AC_SEARCH_LIBS(pthread_create, [thr pthread c_r]) # Checks for header files. AC_HEADER_STDC @@ -75,21 +79,6 @@ AC_CHECK_FUNCS([strndup]) AC_CHECK_FUNCS([vis strvis strvisx]) -# On some systems, clock_gettime is in librt rather than libc -AC_CHECK_LIB(rt, clock_gettime, need_librt=yes) -AM_CONDITIONAL(NEED_LIBRT, test x$need_librt = xyes) - -# Check if dlopen() requires libdl -AC_CHECK_LIB(dl, dlopen, need_libdl=yes) -AM_CONDITIONAL(NEED_LIBDL, test x$need_libdl = xyes) - -# Check for the presence of RSA's MD5 implementation (libmd on *BSD) -AC_CHECK_HEADERS([md5.h]) -if test x$ac_cv_header_md5_h = xyes ; then - AC_CHECK_LIB(md, MD5Init, need_libmd=yes) -fi -AM_CONDITIONAL(NEED_LIBMD, test x$need_libmd = xyes) - # Check which mechanism to use for the acceptor AC_CHECK_FUNCS([kqueue]) AC_CHECK_FUNCS([epoll_ctl]) From des at projects.linpro.no Wed Sep 20 08:44:27 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 20 Sep 2006 10:44:27 +0200 (CEST) Subject: r1099 - in branches: . 1.0 Message-ID: <20060920084427.536ED1EC2A0@projects.linpro.no> Author: des Date: 2006-09-20 10:44:27 +0200 (Wed, 20 Sep 2006) New Revision: 1099 Added: branches/1.0/ Modified: branches/1.0/configure.ac Log: Branch 1.0 and set version number. Copied: branches/1.0 (from rev 1098, trunk/varnish-cache) Modified: branches/1.0/configure.ac =================================================================== --- trunk/varnish-cache/configure.ac 2006-09-20 08:37:35 UTC (rev 1098) +++ branches/1.0/configure.ac 2006-09-20 08:44:27 UTC (rev 1099) @@ -3,7 +3,7 @@ AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (c) 2006 Linpro AS / Verdens Gang AS]) AC_REVISION([$Id$]) -AC_INIT([Varnish], [trunk], [varnish-dev at projects.linpro.no]) +AC_INIT([Varnish], [1.0], [varnish-dev at projects.linpro.no]) AC_CONFIG_SRCDIR(include/varnishapi.h) AM_CONFIG_HEADER(config.h) From phk at projects.linpro.no Wed Sep 20 09:00:20 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 20 Sep 2006 11:00:20 +0200 (CEST) Subject: r1100 - trunk/varnish-cache/bin/varnishd Message-ID: <20060920090020.33A011EC2A1@projects.linpro.no> Author: phk Date: 2006-09-20 11:00:20 +0200 (Wed, 20 Sep 2006) New Revision: 1100 Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c Log: When ditching sessions due to overflow, only ditch new sessions. Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-20 08:44:27 UTC (rev 1099) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-20 09:00:20 UTC (rev 1100) @@ -295,7 +295,15 @@ UNLOCK(&qp->mtx); LOCK(&tmtx); - if ((VSL_stats->n_wrk_overflow > + /* + * If we have too much in the overflow, and this is a new session + * just drop it. We do not drop sessions which were waiting for + * a busy object, they will be cheap to serve from here and the + * cleanup would be more complex to carry out than delivering + * the result will be + */ + if (sp->obj == NULL && + (VSL_stats->n_wrk_overflow > (params->wthread_max * params->overflow_max) / 100)) { VSL_stats->n_wrk_drop++; UNLOCK(&tmtx); From des at projects.linpro.no Wed Sep 20 09:43:39 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 20 Sep 2006 11:43:39 +0200 (CEST) Subject: r1101 - trunk/varnish-cache Message-ID: <20060920094339.A75C51EC2A0@projects.linpro.no> Author: des Date: 2006-09-20 11:43:39 +0200 (Wed, 20 Sep 2006) New Revision: 1101 Modified: trunk/varnish-cache/README Log: Update. Modified: trunk/varnish-cache/README =================================================================== --- trunk/varnish-cache/README 2006-09-20 09:00:20 UTC (rev 1100) +++ trunk/varnish-cache/README 2006-09-20 09:43:39 UTC (rev 1101) @@ -1,13 +1,14 @@ -This is an alpha release of the Varnish high-performance HTTP -accelerator. +This is the Varnish high-performance HTTP accelerator. -Please read the following web page before trying out Varnish: +Documentation and additional information about Varnish is available on +the following web sites: - http://varnish.projects.linpro.no/wiki/AlphaReadme + http://www.varnish-cache.org/ Official web site + http://varnish.projects.linpro.no/ Developer site and wiki + Technical questions about Varnish and this release should be addressed to . -For more information about the project, see: - - http://varnish.projects.linpro.no/wiki +Questions about commercial support and services related to Varnish +should be addressed to . From des at projects.linpro.no Wed Sep 20 09:44:40 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 20 Sep 2006 11:44:40 +0200 (CEST) Subject: r1102 - in branches/1.0: . bin/varnishd Message-ID: <20060920094440.816FF1EC2A0@projects.linpro.no> Author: des Date: 2006-09-20 11:44:40 +0200 (Wed, 20 Sep 2006) New Revision: 1102 Modified: branches/1.0/ branches/1.0/bin/varnishd/cache_pool.c Log: r31731 at cat (orig r1100): phk | 2006-09-20 11:00:20 +0200 When ditching sessions due to overflow, only ditch new sessions. Property changes on: branches/1.0 ___________________________________________________________________ Name: svk:merge + d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1100 Modified: branches/1.0/bin/varnishd/cache_pool.c =================================================================== --- branches/1.0/bin/varnishd/cache_pool.c 2006-09-20 09:43:39 UTC (rev 1101) +++ branches/1.0/bin/varnishd/cache_pool.c 2006-09-20 09:44:40 UTC (rev 1102) @@ -295,7 +295,15 @@ UNLOCK(&qp->mtx); LOCK(&tmtx); - if ((VSL_stats->n_wrk_overflow > + /* + * If we have too much in the overflow, and this is a new session + * just drop it. We do not drop sessions which were waiting for + * a busy object, they will be cheap to serve from here and the + * cleanup would be more complex to carry out than delivering + * the result will be + */ + if (sp->obj == NULL && + (VSL_stats->n_wrk_overflow > (params->wthread_max * params->overflow_max) / 100)) { VSL_stats->n_wrk_drop++; UNLOCK(&tmtx); From des at projects.linpro.no Wed Sep 20 09:44:41 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 20 Sep 2006 11:44:41 +0200 (CEST) Subject: r1103 - branches/1.0 Message-ID: <20060920094441.B3F241EC2A2@projects.linpro.no> Author: des Date: 2006-09-20 11:44:41 +0200 (Wed, 20 Sep 2006) New Revision: 1103 Modified: branches/1.0/ branches/1.0/README Log: r31732 at cat (orig r1101): des | 2006-09-20 11:43:39 +0200 Update. Property changes on: branches/1.0 ___________________________________________________________________ Name: svk:merge - d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1100 + d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1101 Modified: branches/1.0/README =================================================================== --- branches/1.0/README 2006-09-20 09:44:40 UTC (rev 1102) +++ branches/1.0/README 2006-09-20 09:44:41 UTC (rev 1103) @@ -1,13 +1,14 @@ -This is an alpha release of the Varnish high-performance HTTP -accelerator. +This is the Varnish high-performance HTTP accelerator. -Please read the following web page before trying out Varnish: +Documentation and additional information about Varnish is available on +the following web sites: - http://varnish.projects.linpro.no/wiki/AlphaReadme + http://www.varnish-cache.org/ Official web site + http://varnish.projects.linpro.no/ Developer site and wiki + Technical questions about Varnish and this release should be addressed to . -For more information about the project, see: - - http://varnish.projects.linpro.no/wiki +Questions about commercial support and services related to Varnish +should be addressed to . From des at projects.linpro.no Wed Sep 20 09:49:18 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 20 Sep 2006 11:49:18 +0200 (CEST) Subject: r1104 - branches/1.0 Message-ID: <20060920094918.25E411EC2A4@projects.linpro.no> Author: des Date: 2006-09-20 11:49:17 +0200 (Wed, 20 Sep 2006) New Revision: 1104 Modified: branches/1.0/ChangeLog Log: Regenerate. Modified: branches/1.0/ChangeLog =================================================================== --- branches/1.0/ChangeLog 2006-09-20 09:44:41 UTC (rev 1103) +++ branches/1.0/ChangeLog 2006-09-20 09:49:17 UTC (rev 1104) @@ -1,3 +1,2966 @@ +2006-09-20 09:44 des + + * branches/1.0, branches/1.0/README: + + r31732 at cat (orig r1101): des | 2006-09-20 11:43:39 +0200 + Update. + +2006-09-20 09:44 des + + * branches/1.0, branches/1.0/bin/varnishd/cache_pool.c: + + r31731 at cat (orig r1100): phk | 2006-09-20 11:00:20 +0200 + When ditching sessions due to overflow, only ditch new sessions. + + + +2006-09-20 08:44 des + + * branches/1.0, branches/1.0/configure.ac: + + Branch 1.0 and set version number. + +2006-09-20 08:37 des + + * trunk/varnish-cache/bin/varnishd/Makefile.am, + trunk/varnish-cache/bin/varnishncsa/Makefile.am, + trunk/varnish-cache/bin/varnishstat/Makefile.am, + trunk/varnish-cache/configure.ac: + + Trust autoconf to dtrt wrt libraries. + Prefer libthr to libpthread if it's available (i.e. on FreeBSD 6 and newer) + +2006-09-20 07:51 des + + * trunk/varnish-cache/include/vcl.h, + trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, + trunk/varnish-cache/lib/libvcl/vcc_obj.c: + + Regenerate. + +2006-09-20 07:50 des + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_acceptor.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor.h, + trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c, + trunk/varnish-cache/bin/varnishd/cache_backend.c, + trunk/varnish-cache/bin/varnishd/cache_ban.c, + trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_cli.c, + trunk/varnish-cache/bin/varnishd/cache_expire.c, + trunk/varnish-cache/bin/varnishd/cache_fetch.c, + trunk/varnish-cache/bin/varnishd/cache_hash.c, + trunk/varnish-cache/bin/varnishd/cache_http.c, + trunk/varnish-cache/bin/varnishd/cache_main.c, + trunk/varnish-cache/bin/varnishd/cache_pass.c, + trunk/varnish-cache/bin/varnishd/cache_pipe.c, + trunk/varnish-cache/bin/varnishd/cache_pool.c, + trunk/varnish-cache/bin/varnishd/cache_response.c, + trunk/varnish-cache/bin/varnishd/cache_session.c, + trunk/varnish-cache/bin/varnishd/cache_vcl.c, + trunk/varnish-cache/bin/varnishd/cache_vrt.c, + trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c, + trunk/varnish-cache/bin/varnishd/cache_vrt_re.c, + trunk/varnish-cache/bin/varnishd/common.h, + trunk/varnish-cache/bin/varnishd/hash_classic.c, + trunk/varnish-cache/bin/varnishd/hash_simple_list.c, + trunk/varnish-cache/bin/varnishd/hash_slinger.h, + trunk/varnish-cache/bin/varnishd/heritage.h, + trunk/varnish-cache/bin/varnishd/mgt.h, + trunk/varnish-cache/bin/varnishd/mgt_child.c, + trunk/varnish-cache/bin/varnishd/mgt_cli.c, + trunk/varnish-cache/bin/varnishd/mgt_cli.h, + trunk/varnish-cache/bin/varnishd/mgt_event.c, + trunk/varnish-cache/bin/varnishd/mgt_event.h, + trunk/varnish-cache/bin/varnishd/mgt_param.c, + trunk/varnish-cache/bin/varnishd/mgt_vcc.c, + trunk/varnish-cache/bin/varnishd/rfc2616.c, + trunk/varnish-cache/bin/varnishd/shmlog.c, + trunk/varnish-cache/bin/varnishd/steps.h, + trunk/varnish-cache/bin/varnishd/stevedore.h, + trunk/varnish-cache/bin/varnishd/storage_file.c, + trunk/varnish-cache/bin/varnishd/storage_malloc.c, + trunk/varnish-cache/bin/varnishd/tcp.c, + trunk/varnish-cache/bin/varnishd/varnishd.c, + trunk/varnish-cache/bin/varnishhist/varnishhist.c, + trunk/varnish-cache/bin/varnishlog/varnishlog.c, + trunk/varnish-cache/bin/varnishncsa/varnishncsa.c, + trunk/varnish-cache/bin/varnishstat/varnishstat.c, + trunk/varnish-cache/bin/varnishtop/varnishtop.c, + trunk/varnish-cache/include/binary_heap.h, + trunk/varnish-cache/include/cli.h, + trunk/varnish-cache/include/cli_common.h, + trunk/varnish-cache/include/cli_priv.h, + trunk/varnish-cache/include/compat/asprintf.h, + trunk/varnish-cache/include/compat/setproctitle.h, + trunk/varnish-cache/include/compat/srandomdev.h, + trunk/varnish-cache/include/compat/strlcat.h, + trunk/varnish-cache/include/compat/strlcpy.h, + trunk/varnish-cache/include/compat/strndup.h, + trunk/varnish-cache/include/compat/vasprintf.h, + trunk/varnish-cache/include/http_headers.h, + trunk/varnish-cache/include/libvarnish.h, + trunk/varnish-cache/include/libvcl.h, + trunk/varnish-cache/include/shmlog.h, + trunk/varnish-cache/include/shmlog_tags.h, + trunk/varnish-cache/include/stat_field.h, + trunk/varnish-cache/include/stats.h, + trunk/varnish-cache/include/varnishapi.h, + trunk/varnish-cache/include/vcl.h, trunk/varnish-cache/include/vrt.h, + trunk/varnish-cache/include/vsb.h, + trunk/varnish-cache/lib/libcompat/asprintf.c, + trunk/varnish-cache/lib/libcompat/setproctitle.c, + trunk/varnish-cache/lib/libcompat/srandomdev.c, + trunk/varnish-cache/lib/libcompat/strndup.c, + trunk/varnish-cache/lib/libcompat/vasprintf.c, + trunk/varnish-cache/lib/libvarnish/argv.c, + trunk/varnish-cache/lib/libvarnish/assert.c, + trunk/varnish-cache/lib/libvarnish/binary_heap.c, + trunk/varnish-cache/lib/libvarnish/cli.c, + trunk/varnish-cache/lib/libvarnish/cli_common.c, + trunk/varnish-cache/lib/libvarnish/crc32.c, + trunk/varnish-cache/lib/libvarnish/time.c, + trunk/varnish-cache/lib/libvarnish/version.c, + trunk/varnish-cache/lib/libvarnishapi/shmlog.c, + trunk/varnish-cache/lib/libvcl/vcc_acl.c, + trunk/varnish-cache/lib/libvcl/vcc_compile.c, + trunk/varnish-cache/lib/libvcl/vcc_compile.h, + trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, + trunk/varnish-cache/lib/libvcl/vcc_obj.c, + trunk/varnish-cache/lib/libvcl/vcc_priv.h, + trunk/varnish-cache/lib/libvcl/vcc_token.c: + + Whitespace, comment and attribution fixes. + +2006-09-19 05:39 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_acceptor.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c, + trunk/varnish-cache/bin/varnishd/cache_backend.c, + trunk/varnish-cache/bin/varnishd/cache_ban.c, + trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_cli.c, + trunk/varnish-cache/bin/varnishd/cache_expire.c, + trunk/varnish-cache/bin/varnishd/cache_fetch.c, + trunk/varnish-cache/bin/varnishd/cache_hash.c, + trunk/varnish-cache/bin/varnishd/cache_http.c, + trunk/varnish-cache/bin/varnishd/cache_main.c, + trunk/varnish-cache/bin/varnishd/cache_pass.c, + trunk/varnish-cache/bin/varnishd/cache_pipe.c, + trunk/varnish-cache/bin/varnishd/cache_pool.c, + trunk/varnish-cache/bin/varnishd/cache_response.c, + trunk/varnish-cache/bin/varnishd/cache_session.c, + trunk/varnish-cache/bin/varnishd/cache_vcl.c, + trunk/varnish-cache/bin/varnishd/cache_vrt.c, + trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c, + trunk/varnish-cache/bin/varnishd/cache_vrt_re.c, + trunk/varnish-cache/bin/varnishd/common.h, + trunk/varnish-cache/bin/varnishd/hash_classic.c, + trunk/varnish-cache/bin/varnishd/hash_simple_list.c, + trunk/varnish-cache/bin/varnishd/hash_slinger.h, + trunk/varnish-cache/bin/varnishd/heritage.h, + trunk/varnish-cache/bin/varnishd/mgt.h, + trunk/varnish-cache/bin/varnishd/mgt_child.c, + trunk/varnish-cache/bin/varnishd/mgt_cli.c, + trunk/varnish-cache/bin/varnishd/mgt_cli.h, + trunk/varnish-cache/bin/varnishd/mgt_event.c, + trunk/varnish-cache/bin/varnishd/mgt_param.c, + trunk/varnish-cache/bin/varnishd/mgt_vcc.c, + trunk/varnish-cache/bin/varnishd/rfc2616.c, + trunk/varnish-cache/bin/varnishd/shmlog.c, + trunk/varnish-cache/bin/varnishd/stevedore.h, + trunk/varnish-cache/bin/varnishd/storage_file.c, + trunk/varnish-cache/bin/varnishd/storage_malloc.c, + trunk/varnish-cache/bin/varnishd/tcp.c, + trunk/varnish-cache/bin/varnishd/varnishd.c, + trunk/varnish-cache/bin/varnishhist/varnishhist.c, + trunk/varnish-cache/bin/varnishlog/varnishlog.c, + trunk/varnish-cache/bin/varnishstat/varnishstat.c, + trunk/varnish-cache/bin/varnishtop/varnishtop.c, + trunk/varnish-cache/include/binary_heap.h, + trunk/varnish-cache/include/cli.h, + trunk/varnish-cache/include/cli_common.h, + trunk/varnish-cache/include/cli_priv.h, + trunk/varnish-cache/include/compat/asprintf.h, + trunk/varnish-cache/include/compat/setproctitle.h, + trunk/varnish-cache/include/compat/srandomdev.h, + trunk/varnish-cache/include/compat/strlcat.h, + trunk/varnish-cache/include/compat/strlcpy.h, + trunk/varnish-cache/include/compat/strndup.h, + trunk/varnish-cache/include/compat/vasprintf.h, + trunk/varnish-cache/include/http_headers.h, + trunk/varnish-cache/include/libvarnish.h, + trunk/varnish-cache/include/libvcl.h, + trunk/varnish-cache/include/shmlog.h, + trunk/varnish-cache/include/shmlog_tags.h, + trunk/varnish-cache/include/varnishapi.h, + trunk/varnish-cache/include/vrt.h, trunk/varnish-cache/include/vsb.h, + trunk/varnish-cache/lib/libcompat/strndup.c, + trunk/varnish-cache/lib/libvarnish/argv.c, + trunk/varnish-cache/lib/libvarnish/assert.c, + trunk/varnish-cache/lib/libvarnish/binary_heap.c, + trunk/varnish-cache/lib/libvarnish/cli.c, + trunk/varnish-cache/lib/libvarnish/cli_common.c, + trunk/varnish-cache/lib/libvarnish/crc32.c, + trunk/varnish-cache/lib/libvarnish/time.c, + trunk/varnish-cache/lib/libvarnish/version.c, + trunk/varnish-cache/lib/libvarnishapi/shmlog.c, + trunk/varnish-cache/lib/libvcl/vcc_acl.c, + trunk/varnish-cache/lib/libvcl/vcc_compile.c, + trunk/varnish-cache/lib/libvcl/vcc_compile.h, + trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, + trunk/varnish-cache/lib/libvcl/vcc_priv.h, + trunk/varnish-cache/lib/libvcl/vcc_token.c: + + Remove doubled author information. + +2006-09-18 22:39 des + + * trunk/varnish-cache/include/vcl.h, + trunk/varnish-cache/include/vcl_returns.h, + trunk/varnish-cache/include/vrt_obj.h, + trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, + trunk/varnish-cache/lib/libvcl/vcc_obj.c, + trunk/varnish-cache/lib/libvcl/vcc_token_defs.h: + + Re-regenerate. + +2006-09-18 22:04 phk + + * trunk/varnish-cache/bin/varnishd/cache_fetch.c, + trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c: + + Typo + +2006-09-18 22:03 phk + + * trunk/varnish-cache/lib/libvarnishapi/base64.c: + + Quench warnings. + +2006-09-18 22:00 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_acceptor.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor.h, + trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c, + trunk/varnish-cache/bin/varnishd/cache_backend.c, + trunk/varnish-cache/bin/varnishd/cache_ban.c, + trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_cli.c, + trunk/varnish-cache/bin/varnishd/cache_expire.c, + trunk/varnish-cache/bin/varnishd/cache_fetch.c, + trunk/varnish-cache/bin/varnishd/cache_hash.c, + trunk/varnish-cache/bin/varnishd/cache_http.c, + trunk/varnish-cache/bin/varnishd/cache_main.c, + trunk/varnish-cache/bin/varnishd/cache_pass.c, + trunk/varnish-cache/bin/varnishd/cache_pipe.c, + trunk/varnish-cache/bin/varnishd/cache_pool.c, + trunk/varnish-cache/bin/varnishd/cache_response.c, + trunk/varnish-cache/bin/varnishd/cache_session.c, + trunk/varnish-cache/bin/varnishd/cache_vcl.c, + trunk/varnish-cache/bin/varnishd/cache_vrt.c, + trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c, + trunk/varnish-cache/bin/varnishd/cache_vrt_re.c, + trunk/varnish-cache/bin/varnishd/common.h, + trunk/varnish-cache/bin/varnishd/hash_classic.c, + trunk/varnish-cache/bin/varnishd/hash_simple_list.c, + trunk/varnish-cache/bin/varnishd/hash_slinger.h, + trunk/varnish-cache/bin/varnishd/heritage.h, + trunk/varnish-cache/bin/varnishd/mgt.h, + trunk/varnish-cache/bin/varnishd/mgt_child.c, + trunk/varnish-cache/bin/varnishd/mgt_cli.c, + trunk/varnish-cache/bin/varnishd/mgt_cli.h, + trunk/varnish-cache/bin/varnishd/mgt_event.c, + trunk/varnish-cache/bin/varnishd/mgt_event.h, + trunk/varnish-cache/bin/varnishd/mgt_param.c, + trunk/varnish-cache/bin/varnishd/mgt_vcc.c, + trunk/varnish-cache/bin/varnishd/rfc2616.c, + trunk/varnish-cache/bin/varnishd/shmlog.c, + trunk/varnish-cache/bin/varnishd/steps.h, + trunk/varnish-cache/bin/varnishd/stevedore.h, + trunk/varnish-cache/bin/varnishd/storage_file.c, + trunk/varnish-cache/bin/varnishd/storage_malloc.c, + trunk/varnish-cache/bin/varnishd/tcp.c, + trunk/varnish-cache/bin/varnishd/varnishd.c, + trunk/varnish-cache/bin/varnishhist/varnishhist.c, + trunk/varnish-cache/bin/varnishlog/varnishlog.c, + trunk/varnish-cache/bin/varnishstat/varnishstat.c, + trunk/varnish-cache/bin/varnishtop/varnishtop.c, + trunk/varnish-cache/include/binary_heap.h, + trunk/varnish-cache/include/cli.h, + trunk/varnish-cache/include/cli_common.h, + trunk/varnish-cache/include/cli_priv.h, + trunk/varnish-cache/include/http_headers.h, + trunk/varnish-cache/include/libvarnish.h, + trunk/varnish-cache/include/libvcl.h, + trunk/varnish-cache/include/miniobj.h, + trunk/varnish-cache/include/shmlog_tags.h, + trunk/varnish-cache/include/stat_field.h, + trunk/varnish-cache/include/stats.h, + trunk/varnish-cache/include/varnishapi.h, + trunk/varnish-cache/include/vcl.h, + trunk/varnish-cache/include/vcl_returns.h, + trunk/varnish-cache/include/vrt.h, + trunk/varnish-cache/include/vrt_obj.h, + trunk/varnish-cache/lib/libvarnish/argv.c, + trunk/varnish-cache/lib/libvarnish/assert.c, + trunk/varnish-cache/lib/libvarnish/binary_heap.c, + trunk/varnish-cache/lib/libvarnish/cli.c, + trunk/varnish-cache/lib/libvarnish/cli_common.c, + trunk/varnish-cache/lib/libvarnish/crc32.c, + trunk/varnish-cache/lib/libvarnish/time.c, + trunk/varnish-cache/lib/libvarnishapi/base64.c, + trunk/varnish-cache/lib/libvarnishapi/shmlog.c, + trunk/varnish-cache/lib/libvcl/vcc_acl.c, + trunk/varnish-cache/lib/libvcl/vcc_compile.c, + trunk/varnish-cache/lib/libvcl/vcc_compile.h, + trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, + trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl, + trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl, + trunk/varnish-cache/lib/libvcl/vcc_obj.c, + trunk/varnish-cache/lib/libvcl/vcc_priv.h, + trunk/varnish-cache/lib/libvcl/vcc_token.c, + trunk/varnish-cache/lib/libvcl/vcc_token_defs.h: + + Assert my right to be identified as the author of this work. + + A couple of files were written by me previous to this project and + in the public domain. + +2006-09-18 21:51 phk + + * trunk/varnish-cache/bin/varnishtester: + + Remove this not-quite-a-prototype + +2006-09-18 21:50 des + + * trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, + trunk/varnish-cache/lib/libvcl/vcc_obj.c, + trunk/varnish-cache/lib/libvcl/vcc_token_defs.h: + + Regenerate to revert over-eager mechanical edits. + +2006-09-18 21:48 des + + * trunk/varnish-cache/bin/varnishd/mgt_event.h, + trunk/varnish-cache/bin/varnishtester/varnishtester.c, + trunk/varnish-cache/lib/libvcl/vcc_priv.h: + + Expand tags. + +2006-09-18 21:48 des + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_acceptor.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor.h, + trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c, + trunk/varnish-cache/bin/varnishd/cache_backend.c, + trunk/varnish-cache/bin/varnishd/cache_ban.c, + trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_cli.c, + trunk/varnish-cache/bin/varnishd/cache_expire.c, + trunk/varnish-cache/bin/varnishd/cache_fetch.c, + trunk/varnish-cache/bin/varnishd/cache_hash.c, + trunk/varnish-cache/bin/varnishd/cache_http.c, + trunk/varnish-cache/bin/varnishd/cache_main.c, + trunk/varnish-cache/bin/varnishd/cache_pass.c, + trunk/varnish-cache/bin/varnishd/cache_pipe.c, + trunk/varnish-cache/bin/varnishd/cache_pool.c, + trunk/varnish-cache/bin/varnishd/cache_response.c, + trunk/varnish-cache/bin/varnishd/cache_session.c, + trunk/varnish-cache/bin/varnishd/cache_vcl.c, + trunk/varnish-cache/bin/varnishd/cache_vrt.c, + trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c, + trunk/varnish-cache/bin/varnishd/cache_vrt_re.c, + trunk/varnish-cache/bin/varnishd/common.h, + trunk/varnish-cache/bin/varnishd/hash_classic.c, + trunk/varnish-cache/bin/varnishd/hash_simple_list.c, + trunk/varnish-cache/bin/varnishd/hash_slinger.h, + trunk/varnish-cache/bin/varnishd/heritage.h, + trunk/varnish-cache/bin/varnishd/mgt.h, + trunk/varnish-cache/bin/varnishd/mgt_child.c, + trunk/varnish-cache/bin/varnishd/mgt_cli.c, + trunk/varnish-cache/bin/varnishd/mgt_cli.h, + trunk/varnish-cache/bin/varnishd/mgt_event.c, + trunk/varnish-cache/bin/varnishd/mgt_event.h, + trunk/varnish-cache/bin/varnishd/mgt_param.c, + trunk/varnish-cache/bin/varnishd/mgt_vcc.c, + trunk/varnish-cache/bin/varnishd/rfc2616.c, + trunk/varnish-cache/bin/varnishd/shmlog.c, + trunk/varnish-cache/bin/varnishd/steps.h, + trunk/varnish-cache/bin/varnishd/stevedore.h, + trunk/varnish-cache/bin/varnishd/storage_file.c, + trunk/varnish-cache/bin/varnishd/storage_malloc.c, + trunk/varnish-cache/bin/varnishd/tcp.c, + trunk/varnish-cache/bin/varnishd/varnishd.1, + trunk/varnish-cache/bin/varnishd/varnishd.c, + trunk/varnish-cache/bin/varnishhist/varnishhist.1, + trunk/varnish-cache/bin/varnishhist/varnishhist.c, + trunk/varnish-cache/bin/varnishlog/varnishlog.1, + trunk/varnish-cache/bin/varnishlog/varnishlog.c, + trunk/varnish-cache/bin/varnishncsa/varnishncsa.1, + trunk/varnish-cache/bin/varnishncsa/varnishncsa.c, + trunk/varnish-cache/bin/varnishstat/varnishstat.1, + trunk/varnish-cache/bin/varnishstat/varnishstat.c, + trunk/varnish-cache/bin/varnishtester/varnishtester.c, + trunk/varnish-cache/bin/varnishtop/varnishtop.1, + trunk/varnish-cache/bin/varnishtop/varnishtop.c, + trunk/varnish-cache/include/binary_heap.h, + trunk/varnish-cache/include/cli.h, + trunk/varnish-cache/include/cli_common.h, + trunk/varnish-cache/include/cli_priv.h, + trunk/varnish-cache/include/compat/asprintf.h, + trunk/varnish-cache/include/compat/setproctitle.h, + trunk/varnish-cache/include/compat/srandomdev.h, + trunk/varnish-cache/include/compat/strlcat.h, + trunk/varnish-cache/include/compat/strlcpy.h, + trunk/varnish-cache/include/compat/strndup.h, + trunk/varnish-cache/include/compat/vasprintf.h, + trunk/varnish-cache/include/http_headers.h, + trunk/varnish-cache/include/libvarnish.h, + trunk/varnish-cache/include/libvcl.h, + trunk/varnish-cache/include/miniobj.h, + trunk/varnish-cache/include/shmlog.h, + trunk/varnish-cache/include/shmlog_tags.h, + trunk/varnish-cache/include/stat_field.h, + trunk/varnish-cache/include/stats.h, + trunk/varnish-cache/include/varnishapi.h, + trunk/varnish-cache/include/vcl.h, + trunk/varnish-cache/include/vcl_returns.h, + trunk/varnish-cache/include/vrt.h, + trunk/varnish-cache/include/vrt_obj.h, + trunk/varnish-cache/include/vsb.h, + trunk/varnish-cache/lib/libcompat/asprintf.c, + trunk/varnish-cache/lib/libcompat/setproctitle.c, + trunk/varnish-cache/lib/libcompat/srandomdev.c, + trunk/varnish-cache/lib/libcompat/strndup.c, + trunk/varnish-cache/lib/libcompat/vasprintf.c, + trunk/varnish-cache/lib/libvarnish/argv.c, + trunk/varnish-cache/lib/libvarnish/assert.c, + trunk/varnish-cache/lib/libvarnish/binary_heap.c, + trunk/varnish-cache/lib/libvarnish/cli.c, + trunk/varnish-cache/lib/libvarnish/cli_common.c, + trunk/varnish-cache/lib/libvarnish/crc32.c, + trunk/varnish-cache/lib/libvarnish/time.c, + trunk/varnish-cache/lib/libvarnish/version.c, + trunk/varnish-cache/lib/libvarnishapi/base64.c, + trunk/varnish-cache/lib/libvarnishapi/shmlog.c, + trunk/varnish-cache/lib/libvcl/vcc_acl.c, + trunk/varnish-cache/lib/libvcl/vcc_compile.c, + trunk/varnish-cache/lib/libvcl/vcc_compile.h, + trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, + trunk/varnish-cache/lib/libvcl/vcc_obj.c, + trunk/varnish-cache/lib/libvcl/vcc_priv.h, + trunk/varnish-cache/lib/libvcl/vcc_token.c, + trunk/varnish-cache/lib/libvcl/vcc_token_defs.h: + + Rendons ? C?sar ce qui lui appartient. + +2006-09-18 21:33 phk + + * trunk/varnish-cache/include/varnish: + + Remove unused directory + +2006-09-18 21:32 phk + + * trunk/varnish-cache/include/Makefile.am, + trunk/varnish-cache/include/varnish/assert.h: + + Remove unused file + +2006-09-18 21:30 phk + + * trunk/varnish-cache/include/Makefile.am, + trunk/varnish-cache/include/hash.h: + + Remove unused file + +2006-09-18 21:08 des + + * trunk/varnish-cache/bin/varnishd/varnishd.1, + trunk/varnish-cache/bin/varnishhist/varnishhist.1, + trunk/varnish-cache/bin/varnishlog/varnishlog.1, + trunk/varnish-cache/bin/varnishncsa/varnishncsa.1, + trunk/varnish-cache/bin/varnishstat/varnishstat.1, + trunk/varnish-cache/bin/varnishtop/varnishtop.1: + + Licensify man pages as well. + +2006-09-18 20:27 des + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_acceptor.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c, + trunk/varnish-cache/bin/varnishd/cache_backend.c, + trunk/varnish-cache/bin/varnishd/cache_ban.c, + trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_cli.c, + trunk/varnish-cache/bin/varnishd/cache_expire.c, + trunk/varnish-cache/bin/varnishd/cache_fetch.c, + trunk/varnish-cache/bin/varnishd/cache_hash.c, + trunk/varnish-cache/bin/varnishd/cache_http.c, + trunk/varnish-cache/bin/varnishd/cache_main.c, + trunk/varnish-cache/bin/varnishd/cache_pass.c, + trunk/varnish-cache/bin/varnishd/cache_pipe.c, + trunk/varnish-cache/bin/varnishd/cache_pool.c, + trunk/varnish-cache/bin/varnishd/cache_response.c, + trunk/varnish-cache/bin/varnishd/cache_session.c, + trunk/varnish-cache/bin/varnishd/cache_vcl.c, + trunk/varnish-cache/bin/varnishd/cache_vrt.c, + trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c, + trunk/varnish-cache/bin/varnishd/cache_vrt_re.c, + trunk/varnish-cache/bin/varnishd/common.h, + trunk/varnish-cache/bin/varnishd/hash_classic.c, + trunk/varnish-cache/bin/varnishd/hash_simple_list.c, + trunk/varnish-cache/bin/varnishd/hash_slinger.h, + trunk/varnish-cache/bin/varnishd/heritage.h, + trunk/varnish-cache/bin/varnishd/mgt.h, + trunk/varnish-cache/bin/varnishd/mgt_child.c, + trunk/varnish-cache/bin/varnishd/mgt_cli.c, + trunk/varnish-cache/bin/varnishd/mgt_cli.h, + trunk/varnish-cache/bin/varnishd/mgt_event.c, + trunk/varnish-cache/bin/varnishd/mgt_param.c, + trunk/varnish-cache/bin/varnishd/mgt_vcc.c, + trunk/varnish-cache/bin/varnishd/rfc2616.c, + trunk/varnish-cache/bin/varnishd/shmlog.c, + trunk/varnish-cache/bin/varnishd/stevedore.h, + trunk/varnish-cache/bin/varnishd/storage_file.c, + trunk/varnish-cache/bin/varnishd/storage_malloc.c, + trunk/varnish-cache/bin/varnishd/tcp.c, + trunk/varnish-cache/bin/varnishd/varnishd.c, + trunk/varnish-cache/bin/varnishhist/varnishhist.c, + trunk/varnish-cache/bin/varnishlog/varnishlog.c, + trunk/varnish-cache/bin/varnishncsa/varnishncsa.c, + trunk/varnish-cache/bin/varnishstat/varnishstat.c, + trunk/varnish-cache/bin/varnishtop/varnishtop.c, + trunk/varnish-cache/include/binary_heap.h, + trunk/varnish-cache/include/cli.h, + trunk/varnish-cache/include/cli_common.h, + trunk/varnish-cache/include/cli_priv.h, + trunk/varnish-cache/include/compat/asprintf.h, + trunk/varnish-cache/include/compat/setproctitle.h, + trunk/varnish-cache/include/compat/srandomdev.h, + trunk/varnish-cache/include/compat/strlcat.h, + trunk/varnish-cache/include/compat/strlcpy.h, + trunk/varnish-cache/include/compat/strndup.h, + trunk/varnish-cache/include/compat/vasprintf.h, + trunk/varnish-cache/include/http_headers.h, + trunk/varnish-cache/include/libvarnish.h, + trunk/varnish-cache/include/libvcl.h, + trunk/varnish-cache/include/shmlog.h, + trunk/varnish-cache/include/shmlog_tags.h, + trunk/varnish-cache/include/varnish/assert.h, + trunk/varnish-cache/include/varnishapi.h, + trunk/varnish-cache/include/vcl.h, + trunk/varnish-cache/include/vcl_returns.h, + trunk/varnish-cache/include/vrt.h, + trunk/varnish-cache/include/vrt_obj.h, + trunk/varnish-cache/lib/libcompat/asprintf.c, + trunk/varnish-cache/lib/libcompat/setproctitle.c, + trunk/varnish-cache/lib/libcompat/srandomdev.c, + trunk/varnish-cache/lib/libcompat/strndup.c, + trunk/varnish-cache/lib/libcompat/vasprintf.c, + trunk/varnish-cache/lib/libvarnish/argv.c, + trunk/varnish-cache/lib/libvarnish/assert.c, + trunk/varnish-cache/lib/libvarnish/binary_heap.c, + trunk/varnish-cache/lib/libvarnish/cli.c, + trunk/varnish-cache/lib/libvarnish/cli_common.c, + trunk/varnish-cache/lib/libvarnish/crc32.c, + trunk/varnish-cache/lib/libvarnish/time.c, + trunk/varnish-cache/lib/libvarnish/version.c, + trunk/varnish-cache/lib/libvarnishapi/shmlog.c, + trunk/varnish-cache/lib/libvcl/vcc_acl.c, + trunk/varnish-cache/lib/libvcl/vcc_compile.c, + trunk/varnish-cache/lib/libvcl/vcc_compile.h, + trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, + trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl, + trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl, + trunk/varnish-cache/lib/libvcl/vcc_obj.c, + trunk/varnish-cache/lib/libvcl/vcc_priv.h, + trunk/varnish-cache/lib/libvcl/vcc_token.c, + trunk/varnish-cache/lib/libvcl/vcc_token_defs.h: + + Licensify. + +2006-09-18 19:47 phk + + * trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_fetch.c, + trunk/varnish-cache/bin/varnishd/cache_http.c: + + More backend error conditions changed from assert to 503 + +2006-09-18 19:38 phk + + * trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_fetch.c: + + Deal with backend connection errors while fetching the body. + + Eventually, VCL should get a say in this. + +2006-09-18 18:49 phk + + * trunk/varnish-cache/bin/varnishd/cache_http.c, + trunk/varnish-cache/bin/varnishd/cache_pool.c, + trunk/varnish-cache/bin/varnishd/heritage.h, + trunk/varnish-cache/bin/varnishd/mgt_param.c, + trunk/varnish-cache/include/stat_field.h: + + Introduce three new params, to limit overflow queue length + and to force HTTP/1.1 protocol version. + +2006-09-18 17:18 phk + + * trunk/varnish-cache/include/http_headers.h: + + Don't copy the Age: header into the object. + +2006-09-18 15:24 des + + * trunk/varnish-cache/bin/varnishtop/Makefile.am, + trunk/varnish-cache/bin/varnishtop/varnishtop.1: + + Add man page. + +2006-09-18 14:54 phk + + * trunk/varnish-cache/bin/varnishd/shmlog.c: + + Off by one. + +2006-09-18 14:29 phk + + * trunk/varnish-cache/bin/varnishd/cache_center.c: + + Set worker idle timestamp to request end. + +2006-09-18 10:41 phk + + * trunk/varnish-cache/bin/varnishd/cache_pool.c, + trunk/varnish-cache/include/stat_field.h: + + Drop the n_wrk_busy statistics, it is too expensive to maintain + due to locking. + +2006-09-18 10:38 phk + + * trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_pool.c: + + Add a couple of XXX comments + +2006-09-18 10:21 phk + + * trunk/varnish-cache/bin/varnishd/cache_pool.c: + + typo + +2006-09-18 10:10 phk + + * trunk/varnish-cache/include/stat_field.h: + + Add stat field missing in last commit + +2006-09-18 10:10 phk + + * trunk/varnish-cache/bin/varnishd/cache_pool.c: + + Make a global overflow queue so we don't risk parking requests + on workpools with no available threads. + +2006-09-18 09:57 phk + + * trunk/varnish-cache/bin/varnishd/cache_pool.c: + + eliminate redundant counter. + +2006-09-18 09:33 phk + + * trunk/varnish-cache/bin/varnishd/mgt_child.c, + trunk/varnish-cache/bin/varnishd/mgt_cli.c: + + Increase CLI respone timeout to 5 seconds and tell that + a ping has failed before we kill the child. + +2006-09-18 09:25 des + + * trunk/varnish-cache/bin/varnishstat/varnishstat.1: + + Correct the description of the second and third fields. + +2006-09-18 09:22 des + + * trunk/varnish-cache/bin/varnishstat/varnishstat.1, + trunk/varnish-cache/bin/varnishstat/varnishstat.c: + + Add a -w option to set the delay between updates. + +2006-09-18 09:00 phk + + * trunk/varnish-cache/bin/varnishd/cache_pool.c: + + Make sure all threads don't end up in the same work queue + +2006-09-18 08:55 des + + * trunk/varnish-cache/bin/varnishstat/varnishstat.1: + + Add an explanation of the columns in the main display. + +2006-09-18 08:55 des + + * trunk/varnish-cache/bin/varnishstat/varnishstat.c: + + Widen fields sufficiently to accomodate gigabit rates. + +2006-09-18 07:36 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c, + trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_http.c, + trunk/varnish-cache/bin/varnishd/cache_pool.c, + trunk/varnish-cache/bin/varnishd/cache_session.c, + trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c, + trunk/varnish-cache/bin/varnishd/flint.lnt, + trunk/varnish-cache/bin/varnishd/mgt_child.c, + trunk/varnish-cache/bin/varnishd/mgt_param.c, + trunk/varnish-cache/bin/varnishd/shmlog.c, + trunk/varnish-cache/bin/varnishd/varnishd.c: + + Make flexelint happier + +2006-09-18 07:16 phk + + * trunk/varnish-cache/bin/varnishd/cache_backend.c: + + Add a simple linear retry in five steps for backend connection. + +2006-09-18 07:11 phk + + * trunk/varnish-cache/bin/varnishd/cache_response.c: + + braino + +2006-09-18 07:08 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_backend.c, + trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_expire.c, + trunk/varnish-cache/bin/varnishd/cache_fetch.c, + trunk/varnish-cache/bin/varnishd/cache_pass.c, + trunk/varnish-cache/bin/varnishd/cache_pipe.c, + trunk/varnish-cache/bin/varnishd/cache_response.c, + trunk/varnish-cache/bin/varnishd/cache_vcl.c, + trunk/varnish-cache/bin/varnishd/rfc2616.c: + + Get shmlog records into more sensible order. + +2006-09-18 06:41 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_backend.c, + trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_fetch.c, + trunk/varnish-cache/bin/varnishd/cache_pass.c, + trunk/varnish-cache/bin/varnishd/cache_pipe.c, + trunk/varnish-cache/bin/varnishd/cache_response.c: + + Unify backend error handling + +2006-09-18 06:26 phk + + * trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_response.c: + + Minor cleanups + +2006-09-17 21:48 phk + + * trunk/varnish-cache/bin/varnishd/cache_vcl.c: + + Revert these two for now. The expiry thread doesn't have + a worker structure. + +2006-09-17 20:26 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_fetch.c, + trunk/varnish-cache/bin/varnishd/cache_http.c, + trunk/varnish-cache/bin/varnishd/cache_pass.c, + trunk/varnish-cache/bin/varnishd/cache_pipe.c, + trunk/varnish-cache/bin/varnishd/cache_response.c, + trunk/varnish-cache/bin/varnishd/cache_session.c, + trunk/varnish-cache/bin/varnishd/cache_vcl.c, + trunk/varnish-cache/bin/varnishd/cache_vrt.c, + trunk/varnish-cache/bin/varnishd/shmlog.c, + trunk/varnish-cache/include/stat_field.h: + + Use workerthres log buffer much more extensively + +2006-09-17 19:57 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_fetch.c, + trunk/varnish-cache/bin/varnishd/cache_http.c, + trunk/varnish-cache/bin/varnishd/cache_pass.c, + trunk/varnish-cache/bin/varnishd/cache_pool.c, + trunk/varnish-cache/bin/varnishd/shmlog.c: + + Decontest the shared memory mutex: + + Add a log buffer to the worker threads, log a lot of stuff to that + and flush it into the "real" shmbuffer every so often. + +2006-09-17 19:31 phk + + * trunk/varnish-cache/include/tree.h: + + Part of this commit leaked into the previous commit: + + We don't use splay trees. + +2006-09-17 19:30 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/shmlog.c, + trunk/varnish-cache/include/Makefile.am, + trunk/varnish-cache/include/stat_field.h: + + Keep track of shmlog mutex contests + +2006-09-17 18:31 phk + + * trunk/varnish-cache/bin/varnishd/cache_pool.c: + + Oops, off by one. + +2006-09-17 18:30 phk + + * trunk/varnish-cache/bin/varnishd/cache_pool.c: + + Use the worker pools in round-robin fashion. + +2006-09-17 09:26 phk + + * trunk/varnish-cache/bin/varnishd/cache_pool.c: + + Fix logic bug so we don't reap worker threads all the time. + +2006-09-17 09:06 phk + + * trunk/varnish-cache/bin/varnishd/cache_main.c: + + Whitespace + +2006-09-17 09:06 phk + + * trunk/varnish-cache/bin/varnishd/mgt_child.c: + + Make sure we get the error messages from a dying child. + +2006-09-17 08:44 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: + + Set sockopts on the listen socket and probe the accepted socket (once) + to see which we do not need to set there because they are inherited. + + This could potentially save three syscalls per session. + +2006-09-17 08:39 des + + * trunk/varnish-cache/bin/varnishd/mgt_param.c, + trunk/varnish-cache/bin/varnishd/varnishd.1: + + Update the parameter list in the man page, and add reminders to keep the + lists in synch. + +2006-09-17 06:45 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c: + + Possibly better logic. + +2006-09-16 22:32 phk + + * trunk/varnish-cache/bin/varnishd/mgt_param.c: + + Embellish the parameter descriptions somewhat. + +2006-09-16 22:00 phk + + * trunk/varnish-cache/bin/varnishd/cache_pool.c: + + Change statistics from gauge to counter + +2006-09-16 21:45 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_pass.c, + trunk/varnish-cache/bin/varnishd/cache_response.c, + trunk/varnish-cache/bin/varnishd/cache_session.c: + + Duh! We need to count stats in per workerthread and summarize into + session, otherwise we cannot correctly summarize into srcaddr and global. + +2006-09-16 21:35 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_pool.c, + trunk/varnish-cache/bin/varnishd/cache_session.c: + + Preallocate a srcaddr per workerthread to speed up locked section. + + Remember to free preallocated storage in workerthread. + +2006-09-16 21:20 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_pass.c, + trunk/varnish-cache/bin/varnishd/cache_response.c, + trunk/varnish-cache/bin/varnishd/cache_session.c: + + Account directly into the session. + +2006-09-16 21:14 phk + + * trunk/varnish-cache/bin/varnishd/cache_session.c: + + use miniobj on srcaddr's + +2006-09-16 21:14 phk + + * trunk/varnish-cache/bin/varnishd/varnishd.c: + + make flexelint marginally happier + +2006-09-16 21:05 phk + + * trunk/varnish-cache/bin/varnishd/mgt_param.c: + + twiddle explanations and defaults. + +2006-09-16 20:59 phk + + * trunk/varnish-cache/bin/varnishd/cache_session.c: + + Use srcaddr mutex for srcaddr stats update to reduce contention on stat_mtx + +2006-09-16 20:52 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_session.c, + trunk/varnish-cache/bin/varnishd/heritage.h, + trunk/varnish-cache/bin/varnishd/mgt_param.c: + + Give the srcaddr stats an overhaul. + + Make the number of buckets a parameter (needs restart though). + + Make the ttl a parameter and have zero disable srcaddr accounting. + + Give each hash bucket its own mutex. + +2006-09-16 20:17 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_expire.c, + trunk/varnish-cache/bin/varnishd/cache_pool.c, + trunk/varnish-cache/bin/varnishd/cache_vcl.c: + + VCL configs change relatively seldom so we can cache the requests + VCL reference in the worker thread when the request is done and + with a cheap check reuse it for the next request handled by this + thread. + + This should reduce mutex contention. + +2006-09-16 19:54 phk + + * trunk/varnish-cache/bin/varnishd/cache_pool.c, + trunk/varnish-cache/bin/varnishd/heritage.h, + trunk/varnish-cache/bin/varnishd/mgt_param.c: + + Make it possible to have multiple worker pools. + + The acceptor selects the pool based on filedescriptor modulus + number of pools. + + This is an attempt to reduce lock contention. + +2006-09-16 16:00 phk + + * trunk/varnish-cache/bin/varnishd/cache.h: + + fix debug locks + +2006-09-16 15:54 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_backend.c, + trunk/varnish-cache/bin/varnishd/cache_cli.c, + trunk/varnish-cache/bin/varnishd/cache_expire.c, + trunk/varnish-cache/bin/varnishd/cache_hash.c, + trunk/varnish-cache/bin/varnishd/cache_pool.c, + trunk/varnish-cache/bin/varnishd/cache_session.c, + trunk/varnish-cache/bin/varnishd/cache_vcl.c, + trunk/varnish-cache/bin/varnishd/hash_classic.c, + trunk/varnish-cache/bin/varnishd/hash_simple_list.c, + trunk/varnish-cache/bin/varnishd/shmlog.c, + trunk/varnish-cache/bin/varnishd/storage_file.c: + + Wrap mutex more completely so that experimentation becomes easier. + +2006-09-16 15:52 phk + + * trunk/varnish-cache/bin/varnishd/mgt_child.c: + + wrap line + +2006-09-16 15:51 phk + + * trunk/varnish-cache/bin/varnishd/storage_file.c: + + correctly round INT32_MAX down to page boundary + +2006-09-16 14:53 des + + * trunk/varnish-cache/bin/varnishtop/varnishtop.c: + + Rename -1 to -f, and add a -1 option meaning "once". It currently does not + work very well; it should use a non-curses method to display the ranking. + +2006-09-16 14:50 des + + * trunk/varnish-cache/include/varnishapi.h, + trunk/varnish-cache/lib/libvarnishapi/shmlog.c: + + Add a non-blocking mode to the log reader. + +2006-09-16 14:21 des + + * trunk/varnish-cache/bin/varnishhist/Makefile.am, + trunk/varnish-cache/bin/varnishhist/varnishhist.1: + + Add a man page. + +2006-09-16 14:06 des + + * trunk/varnish-cache/bin/varnishstat/varnishstat.1: + + Umm, what have I been smoking? varnishstat is not a logger and does not + support VSL_ARGS. + +2006-09-16 13:08 des + + * trunk/varnish-cache/bin/varnishncsa/varnishncsa.1: + + Bring up-to-date. + +2006-09-16 13:06 des + + * trunk/varnish-cache/bin/varnishstat/varnishstat.1: + + Remove stray -a description. + +2006-09-16 13:02 des + + * trunk/varnish-cache/bin/varnishstat/varnishstat.1: + + Bring up-to-date. + +2006-09-16 13:02 des + + * trunk/varnish-cache/bin/varnishlog/varnishlog.1: + + Bump date and add cross-references to all log programs. + +2006-09-16 12:59 des + + * trunk/varnish-cache/bin/varnishstat/varnishstat.c: + + -c collides with one of the standard VSL options, so replace it with -1, + which has the opposite meaning (IMHO, the continuous display is the most + useful) + +2006-09-16 12:45 des + + * trunk/varnish-cache/include/varnishapi.h: + + Sort options correctly. + +2006-09-16 12:43 des + + * trunk/varnish-cache/bin/varnishlog/varnishlog.1: + + Bring up-to-date, and sort options correctly. + +2006-09-16 12:43 des + + * trunk/varnish-cache/bin/varnishd/varnishd.1, + trunk/varnish-cache/bin/varnishd/varnishd.c: + + Sort options correctly. + +2006-09-16 12:29 des + + * trunk/varnish-cache/bin/varnishtop/varnishtop.c: + + Fix usage string. + +2006-09-16 12:28 des + + * trunk/varnish-cache/bin/varnishhist/varnishhist.c: + + Add -V option, fix usage string. + +2006-09-16 12:28 des + + * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: + + Add the ability to write to a file (it was previously documented but not + implemented). + Fix the usage string. + +2006-09-16 12:26 des + + * trunk/varnish-cache/bin/varnishlog/varnishlog.c: + + Add a -a option to control append / overwrite when writing to a file. + Fix the usage string. + +2006-09-16 12:25 des + + * trunk/varnish-cache/include/varnishapi.h: + + Add a usage string for the standard VSL options. + +2006-09-16 12:23 des + + * trunk/varnish-cache/bin/varnishd/storage_file.c: + + Tweak storage file size calculations. Avoid overflow when calculating 80% + of available storage on 32-bit Linux (most fields in struct statfs are long + instead of int64_t as in BSD) + +2006-09-16 11:34 phk + + * trunk/varnish-cache/bin/varnishd/cache_backend.c: + + Just in case. + +2006-09-16 11:28 des + + * trunk/varnish-cache/lib/libvarnish/crc32.c, + trunk/varnish-cache/lib/libvarnishapi/base64.c: + + Expand keywords. + +2006-09-16 11:01 des + + * trunk/varnish-cache/bin/varnishd/varnishd.1: + + Bring up-to-date. Still lacks descriptions for management commands and + run-time parameters. + +2006-09-16 11:00 phk + + * trunk/varnish-cache/bin/varnishd/mgt_vcc.c: + + Forgot about embedded CLI commands here. + +2006-09-16 10:36 des + + * trunk/varnish-cache/bin/varnishd/varnishd.c: + + The buckets_per_mutex parameter was removed in r813. + +2006-09-16 09:49 phk + + * trunk/varnish-cache/bin/varnishd/varnishd.c: + + Use generic param setting stuff + +2006-09-16 09:38 phk + + * trunk/varnish-cache/bin/varnishd/cache_fetch.c, + trunk/varnish-cache/bin/varnishd/heritage.h, + trunk/varnish-cache/bin/varnishd/mgt_param.c, + trunk/varnish-cache/bin/varnishd/tcp.c: + + Make the listen depth a paramter. + + Clean up the paramter stuff even more. + +2006-09-16 09:06 phk + + * trunk/varnish-cache/bin/varnishd/varnishd.c: + + Add -p param=value command line argument. + +2006-09-16 09:01 phk + + * trunk/varnish-cache/bin/varnishd/common.h, + trunk/varnish-cache/bin/varnishd/mgt.h, + trunk/varnish-cache/bin/varnishd/mgt_param.c, + trunk/varnish-cache/bin/varnishd/tcp.c, + trunk/varnish-cache/bin/varnishd/varnishd.c: + + Generalize parameter setting at start up. + + Give the managers main a struct cli and use that to call into + the paramter stuff for setting listen address. More params to follow. + + When setting the listen address, check that getaddrinfo() doesn't + hate it. + +2006-09-16 08:20 phk + + * trunk/varnish-cache/bin/varnishd/heritage.h, + trunk/varnish-cache/bin/varnishd/mgt_child.c, + trunk/varnish-cache/bin/varnishd/mgt_param.c, + trunk/varnish-cache/bin/varnishd/mgt_vcc.c, + trunk/varnish-cache/bin/varnishd/varnishd.c: + + Open and close the listen socket when we start and stop the child. + + Make the listen address a parameter. + +2006-09-16 07:49 phk + + * trunk/varnish-cache/bin/varnishd/cache_cli.c, + trunk/varnish-cache/bin/varnishd/mgt_cli.c, + trunk/varnish-cache/include/cli.h: + + Rename the config.* CLI command family to vcl.*. It is more intuitive + that way and we may eventually want a config file for varnishd to + control obscure parameters. + +2006-09-16 07:44 phk + + * trunk/varnish-cache/bin/varnishd/cache_vrt.c, + trunk/varnish-cache/bin/varnishd/heritage.h, + trunk/varnish-cache/bin/varnishd/mgt_param.c: + + Make the shmlog'ing of vcl execution a parameter. + + VCL tracing is responsible for a very large fraction of the shmlog + records and will generally only be used for debugging of VCL code. + +2006-09-15 19:25 phk + + * trunk/varnish-cache/include/varnishapi.h, + trunk/varnish-cache/lib/libvarnishapi/Makefile.am, + trunk/varnish-cache/lib/libvarnishapi/base64.c: + + Add a base64 decoder. + +2006-09-15 16:18 phk + + * trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/mgt_param.c, + trunk/varnish-cache/include/stat_field.h: + + Eliminate the session_grace thing, the inter-request interval is to + large in general (think RTT) for this to make sense, it costs a syscall + and if a delay is used, at least two context switches. + + We still capture sessions that do pipe-line avoiding the context switch + in that case, without incurring the syscall overhead. + +2006-09-15 16:10 phk + + * trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishncsa/varnishncsa.c, + trunk/varnish-cache/include/shmlog_tags.h: + + Remove the SessionReuse shmem tag, we have little or no benefit from + knowing this at the end of a request. + + Instead put the address + port in the ReqStart shmtag where it does + a lot of good. + +2006-09-15 10:30 phk + + * trunk/varnish-cache/bin/varnishd/mgt_param.c: + + Disable session_grace for now. + + It is not clear if this is a benefit or not. There seems to be a + significant + (100msec ?) inter-request gap and seeting the grace period that long + means tying up worker threads doing basically nothing. + + Setting a short timeout (10msec) results in an extra system call which + practically never does anything good. + + Unless benefit is shown, this stuff should be removed again. + +2006-09-15 10:24 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: + + fix more stats + +2006-09-15 10:23 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, + trunk/varnish-cache/bin/varnishd/cache_center.c: + + Fix stats. + +2006-09-15 10:03 phk + + * trunk/varnish-cache/bin/varnishd/cache_center.c: + + Add missing SessionReuse log entries + +2006-09-15 10:01 phk + + * trunk/varnish-cache/lib/libvarnishapi/shmlog.c: + + Improve portability: Since all log strings are NUL terminated we do not + need to use REG_STARTEND any more. + +2006-09-15 09:54 phk + + * trunk/varnish-cache/bin/varnishd/mgt_param.c: + + Allow session_grace to be set to zero + +2006-09-15 09:43 phk + + * trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/heritage.h, + trunk/varnish-cache/bin/varnishd/mgt_param.c, + trunk/varnish-cache/include/stat_field.h: + + Try to avoid sending EOF'ed or ready sessions to the herder. + +2006-09-15 08:48 phk + + * trunk/varnish-cache/bin/varnishd/cache_session.c: + + Add XXX comment + +2006-09-15 08:43 phk + + * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: + + Print '-' if we don't have an IP# on startup. + + Also skip IP# from SessionReuse records. + +2006-09-15 08:14 des + + * trunk/varnish-cache/bin/varnishd/cache_pool.c, + trunk/varnish-cache/bin/varnishd/cache_response.c: + + Fix sendfile() on Linux: + + - use the correct headers + - don't duplicate WRK_Flush() + - pass the offset correctly + +2006-09-15 08:08 phk + + * trunk/varnish-cache/bin/varnishd/cache_center.c: + + Avoid parking a worker thread on trailing space + +2006-09-15 07:37 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, + trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/steps.h: + + If after handling a request we find anything in our input buffer, + don't waste time putting the session on the herder, but go right + back and take the next request in the current worker thread. + +2006-09-15 07:14 phk + + * trunk/varnish-cache/bin/varnishncsa/flint.lnt, + trunk/varnish-cache/bin/varnishncsa/flint.sh, + trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: + + Overhaul NCSA logging. + + Reduce memory footprint by only allocating space for a fd first time + we see it. Few if any servers will ever see 64k fd's in use. + + Move the sbuf into the logline structure for simplicity. + + Access the logline structure through a pointer instead of indexing + the array all the time. + + Reduce amount of malloc/free traffic for performance. + + Use the "cooked" SHMlog api where the length, fd, etc are broken out + as arguments for us. Pass the FILE* where we want the stuff to + go as private data (stdout for now). + + Add FlexeLint files. + + Now over to Anders again... + +2006-09-13 21:26 andersb + + * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: + + Fixed timestamp so thats it's correct. PHK added a new variable to + ReqEnd that contains a correct endtime. + +2006-09-13 20:43 phk + + * trunk/varnish-cache/bin/varnishd/cache_center.c: + + Add the end time as timestamp to the ReqEnd SHM record. + + Vector failures of the the FIRST case via DONE as well to + avoid code duplication. + +2006-09-13 19:07 phk + + * trunk/varnish-cache/bin/varnishd/cache_response.c: + + Dike out Linux senfile, it doesn't work. + + Isolated by: Xing Li + +2006-09-12 21:21 phk + + * trunk/varnish-cache/bin/varnishd/mgt_param.c: + + Double the default workspace for the benefit of Blackberris and other + low-bandwidth devices which for some reason include their entire + lifehistory in the HTTP requests. + +2006-09-12 21:02 andersb + + * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: + + Made the code more robust but fixing a bug that caused coredumps. + Haven't seen dumps after fix. + + Cleared some unused variables. + +2006-09-12 20:50 phk + + * trunk/varnish-cache/bin/varnishd/cache_center.c: + + Distinguish the explanation for the first request from the one used + on subsequent requests. + +2006-09-12 20:17 phk + + * trunk/varnish-cache/bin/varnishd/cache_center.c: + + Fix timestamps in shm tag StatSess for sessions with no requests. + +2006-09-12 20:06 phk + + * trunk/varnish-cache/bin/varnishd/mgt_param.c: + + chunksize is in kilobytes + +2006-09-12 19:41 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c: + + There may be error returns from kevent, don't assert there are none. + +2006-09-12 10:12 des + + * trunk/varnish-cache/bin/varnishd/cache_pool.c: + + Implement sendfile() support for Linux. + +2006-09-12 09:38 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_pool.c: + + fix typo + +2006-09-11 23:30 andersb + + * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: + + Getting somewhere. I now have a "full" logline. Apart from writing + usernames caught by the auth header, the logline is complete. + I have now cleared up my obvious memoryleaks also. + + The code looks like it has been through a shredder, and needs massive + cleaning before alpha. + +2006-09-11 17:18 phk + + * trunk/varnish-cache/bin/varnishd/cache_pool.c: + + If we have more threads than the max, kill one if we can. + +2006-09-11 15:12 phk + + * trunk/varnish-cache/bin/varnishd/cache_pool.c: + + remember to close pipes + +2006-09-11 14:50 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_pool.c: + + Use a pipe for synchronization instead. + +2006-09-11 14:34 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_pool.c: + + Redo the worker thread pool locking a bit, all the while cursing + pthreads deficient API design for it's shortcomings. + +2006-09-11 12:00 phk + + * trunk/varnish-cache/bin/varnishd/cache.h: + + Embellish the mutex debugging a bit + +2006-09-11 11:55 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/include/libvarnish.h: + + Move LOCK/UNLOCK macros to cache.h where they belong. + +2006-09-11 10:35 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c: + + Ignore kevent error return entries + +2006-09-11 10:16 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c: + + Only expire when the timer fires + +2006-09-11 10:14 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c: + + Piggy-back kevent changes on kevent wait call + +2006-09-11 10:14 phk + + * trunk/varnish-cache/bin/varnishd/cache_expire.c: + + Avoid a startup-race + +2006-09-11 09:35 andersb + + * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: + + Cleaned up User-Agent and Referer. Both should now work correct. As + far as I can see, I only have the timestamp left for a sane loggline. + +2006-09-11 09:16 des + + * trunk/varnish-cache/configure.ac: + + Check for sendfile(). + +2006-09-11 09:14 phk + + * trunk/varnish-cache/bin/varnishd/cache_expire.c: + + Reduce syscall footprint of expiry and hangman + +2006-09-11 09:05 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: + + Avoid a clock_gettime() call + +2006-09-11 09:00 phk + + * trunk/varnish-cache/bin/varnishd/cache_center.c: + + braino in last commit. + +2006-09-11 08:58 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_session.c: + + Save more time() calls + +2006-09-11 08:53 phk + + * trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_pool.c: + + A avoid a time(NULL) call + +2006-09-11 08:42 phk + + * trunk/varnish-cache/bin/varnishd/cache_response.c, + trunk/varnish-cache/bin/varnishd/heritage.h, + trunk/varnish-cache/bin/varnishd/mgt_param.c, + trunk/varnish-cache/include/stat_field.h: + + Do stats on sendfile/write split. + + Add param for minimum size of object before we will sendfile it. + +2006-09-10 22:23 andersb + + * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: + + Started to fix output of User-Agent. It was all over the place. Found + what I was doing wrong and fixed it. + + Should work with correct User-Agent now. + +2006-09-08 06:47 phk + + * trunk/varnish-cache/bin/varnishd/cache_fetch.c, + trunk/varnish-cache/bin/varnishd/heritage.h, + trunk/varnish-cache/bin/varnishd/mgt_param.c: + + Make the fetchers chunksize a parameter, but keep the default at 128k + +2006-09-08 05:58 phk + + * trunk/varnish-cache/bin/varnishd/storage_file.c: + + Add an extra bucket and make it clear how the number was chosen. + + Remove extra sanitychecking. + +2006-09-07 10:14 phk + + * trunk/varnish-cache/bin/varnishd/storage_file.c: + + Missing commit message from previous commit: + + Fix a logic bug which allowed storage objects to be trampled on: + the last bucket may contain object smaller than we want. + +2006-09-07 10:12 phk + + * trunk/varnish-cache/bin/varnishd/cache_fetch.c, + trunk/varnish-cache/bin/varnishd/storage_file.c: + + Handle zero length storage objects correctly: Don't let them exist. + +2006-09-07 08:25 phk + + * trunk/varnish-cache/bin/varnishd/storage_file.c: + + Insert a bunch of asserts to try to catch anything going wrong + +2006-09-07 08:01 phk + + * trunk/varnish-cache/include/libvarnish.h: + + Pick up uint32_t from instead of + +2006-09-07 07:50 phk + + * trunk/varnish-cache/bin/varnishd/cache_response.c: + + Logging for status & response was swapped for generated errors. + +2006-09-07 07:33 phk + + * trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_http.c, + trunk/varnish-cache/bin/varnishd/cache_response.c: + + Remove debugging messages. + +2006-09-07 07:27 phk + + * trunk/varnish-cache/bin/varnishd/storage_file.c, + trunk/varnish-cache/include/stat_field.h: + + Add stats counters for large and small free fragments. + + Remove debugging + +2006-09-07 07:17 phk + + * trunk/varnish-cache/bin/varnishd/storage_file.c: + + remove "age", it was effectively unused. Revisit the idea later. + +2006-09-07 07:12 phk + + * trunk/varnish-cache/bin/varnishd/storage_file.c: + + Don't clear alloc, it will be done in due time. + +2006-09-07 07:09 phk + + * trunk/varnish-cache/bin/varnishd/storage_file.c: + + Split the freelist by size. + + Use 32 buckets for now, with a 4k pagesize that takes us to 128k + which matches the fetchers default chunksize. + +2006-09-07 05:41 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c: + + Remove debug entry + +2006-09-07 05:40 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c: + + Read more than one session pointer at a time from the pipe and + handle them all with one kevent call. + +2006-09-06 22:09 phk + + * trunk/varnish-cache/bin/varnishd/cache_session.c: + + Don't use binary address anyway, we only want the IP number part + and splitting that out of the binary part is not worth the + trouble. + +2006-09-06 22:02 phk + + * trunk/varnish-cache/bin/varnishd/cache_response.c: + + Account for header bytes in error and 304 responses. + + Remove unhelpful debug entry. + +2006-09-06 21:52 phk + + * trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_pool.c: + + Move some setup code to first state now that we have it. + +2006-09-06 21:41 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_acceptor.c, + trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_main.c: + + Move a bunch of work from the acceptor thread to the worker thread + for better scaling. + +2006-09-06 21:15 phk + + * trunk/varnish-cache/bin/varnishd/cache_session.c, + trunk/varnish-cache/bin/varnishd/hash_classic.c, + trunk/varnish-cache/bin/varnishd/hash_simple_list.c, + trunk/varnish-cache/bin/varnishd/shmlog.c, + trunk/varnish-cache/include/libvarnish.h, + trunk/varnish-cache/lib/libvarnish/Makefile.am, + trunk/varnish-cache/lib/libvarnish/crc32.c: + + Move CRC32 into libvarnish + + Use it for hashing srcaddr as well. Hash the sockaddr instead + of the ascii representation. + + Add a primitive mutex tracking facility which writes debug + records to the shmlog if enabled. + +2006-09-06 20:45 phk + + * trunk/varnish-cache/bin/varnishd/cache_session.c: + + Give the stats summation its own mutex + +2006-09-06 19:35 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_pool.c: + + Reduce traffic on the wrk_mtx, saving some syscalls along the way: + + Make a thread-reaper-thread which examines the tail end of the queue + and kicks threads which are too old so the wake up and die. + + This allows us to assume that a thread on the free queue is always + waiting on its condvar, so we don't need to hold the mutex when we + signal the condvar. + + As a result, the woken thread stands a chance to grab the mutex + and a little song and dance between the two threads is avoided. + +2006-09-06 19:08 phk + + * trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_pool.c: + + Grab the r_recv timestamp at the right time. + +2006-09-06 18:47 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: + + Don't bother with SO_NOSIGPIPE, it doesn't always work and we + have ignored the signal anyway. + +2006-09-06 18:46 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_center.c: + + Remove unused timestamp "t0" and save a syscall per request. + +2006-09-06 18:37 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, + trunk/varnish-cache/bin/varnishd/cache_session.c: + + Save a systemcall by using the same timestamp twice. + +2006-09-06 18:32 phk + + * trunk/varnish-cache/bin/varnishd/mgt_param.c: + + Give pool threads 120 second timeout, 10 was close to silly. + +2006-09-06 18:23 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c: + + Fix the poll acceptor, we need to cache the fd as sp->fd might + change to -1 under us. + +2006-09-06 11:21 phk + + * trunk/varnish-cache/lib/libvarnishapi/shmlog.c: + + Fix buglet in -i/-x name matching + +2006-09-06 10:45 phk + + * trunk/varnish-cache/lib/libvcl/vcc_priv.h: + + Allow '-' in identifiers. + + For further study: should we accept RFC2616's definition of "token" ? + +2006-09-06 09:58 phk + + * trunk/varnish-cache/bin/varnishd/mgt_vcc.c: + + Mark responses with Set-Cookie as "pass" + +2006-09-06 09:54 phk + + * trunk/varnish-cache/bin/varnishd/cache_vrt.c, + trunk/varnish-cache/include/vrt.h, + trunk/varnish-cache/include/vrt_obj.h, + trunk/varnish-cache/lib/libvcl/vcc_compile.c, + trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c, + trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl, + trunk/varnish-cache/lib/libvcl/vcc_obj.c: + + Add support for inspecting response headers. + +2006-09-06 09:18 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c: + + Fix the same issue as in the kqueue acceptor: By the time we get + here the filedescriptor may already be closed, so accept EBADF. + + Reported by: Xing Li + +2006-09-06 07:37 phk + + * trunk/varnish-cache/bin/varnishd/cache_fetch.c: + + Fix a bug in chunked fetching: + + With very short chunks, in this case 3 characters, our buffer may + contain not only the chunk length and the chunk data, but also the + next chunk length. + + If the short chunk is the last chunk before the zero length chunk + at the end, unconditionally trying to fill the buffer before parsing + the length may hang because we already have everything there is to + have in the buffer. + + The fix is to always try to parse the buffer before adding to it. + + While here, tighten up and improve error checks of the code. + + Reported by: Xing Li + +2006-09-06 06:39 phk + + * trunk/varnish-cache/lib/libvarnishapi/shmlog.c: + + escape control characters in SLT_Debug as %XX + +2006-09-05 22:11 andersb + + * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: + + Added more outputdata, fixed memory leaks (I think). + + Code still not Alpha ready, but I think most concepts work now. + +2006-08-24 07:57 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c, + trunk/varnish-cache/bin/varnishd/cache_backend.c, + trunk/varnish-cache/bin/varnishd/cache_ban.c, + trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_cli.c, + trunk/varnish-cache/bin/varnishd/cache_expire.c, + trunk/varnish-cache/bin/varnishd/cache_fetch.c, + trunk/varnish-cache/bin/varnishd/cache_hash.c, + trunk/varnish-cache/bin/varnishd/cache_http.c, + trunk/varnish-cache/bin/varnishd/cache_pass.c, + trunk/varnish-cache/bin/varnishd/cache_pipe.c, + trunk/varnish-cache/bin/varnishd/cache_pool.c, + trunk/varnish-cache/bin/varnishd/cache_response.c, + trunk/varnish-cache/bin/varnishd/cache_session.c, + trunk/varnish-cache/bin/varnishd/cache_vcl.c, + trunk/varnish-cache/bin/varnishd/cache_vrt.c, + trunk/varnish-cache/bin/varnishd/cache_vrt_acl.c, + trunk/varnish-cache/bin/varnishd/cache_vrt_re.c, + trunk/varnish-cache/bin/varnishd/flint.lnt, + trunk/varnish-cache/bin/varnishd/hash_classic.c, + trunk/varnish-cache/bin/varnishd/hash_simple_list.c, + trunk/varnish-cache/bin/varnishd/mgt_child.c, + trunk/varnish-cache/bin/varnishd/mgt_cli.c, + trunk/varnish-cache/bin/varnishd/mgt_param.c, + trunk/varnish-cache/bin/varnishd/mgt_vcc.c, + trunk/varnish-cache/bin/varnishd/shmlog.c, + trunk/varnish-cache/bin/varnishd/storage_file.c, + trunk/varnish-cache/bin/varnishd/storage_malloc.c, + trunk/varnish-cache/bin/varnishd/varnishd.c: + + Go through all asserts and mark those which indicate missing code with + xxx or XXX. + +2006-08-24 07:17 phk + + * trunk/varnish-cache/bin/varnishd/cache_backend.c, + trunk/varnish-cache/bin/varnishd/cache_expire.c, + trunk/varnish-cache/bin/varnishd/cache_hash.c, + trunk/varnish-cache/bin/varnishd/cache_pool.c, + trunk/varnish-cache/bin/varnishd/cache_session.c, + trunk/varnish-cache/bin/varnishd/cache_vcl.c, + trunk/varnish-cache/bin/varnishd/hash_classic.c, + trunk/varnish-cache/bin/varnishd/hash_simple_list.c, + trunk/varnish-cache/bin/varnishd/shmlog.c, + trunk/varnish-cache/bin/varnishd/storage_file.c, + trunk/varnish-cache/include/libvarnish.h: + + Introduce LOCK() and UNLOCK() macros which does the right thing + with pthread_mutex_{lock,unlock}() + +2006-08-24 07:10 phk + + * trunk/varnish-cache/include/libvarnish.h, + trunk/varnish-cache/lib/libvarnish/assert.c: + + Give xxxasserts their own backend with a different message. + +2006-08-24 06:58 phk + + * trunk/varnish-cache/include/libvarnish.h: + + Split assert into "static check" and "missing code" variants. + + The "missing code" variants have xxx prefix + + Introduce AN() (assert non-null) variant as well. + +2006-08-24 06:15 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: + + This is a workaround for what is probably a race in FreeBSD RELENG_6 + socket dismantling. + + There is no way that close(2) should ever be able to return EINVAL, + but we've seen it. + + Specifically assert on EBADF which is the check we're really after. + +2006-08-23 14:30 phk + + * trunk/varnish-cache/bin/varnishd/cache_pass.c: + + Handle backend failure in pass mode + +2006-08-23 13:11 phk + + * trunk/varnish-cache/lib/libvarnishapi/varnish_debug.c, + trunk/varnish-cache/lib/libvarnishapi/varnish_log.c, + trunk/varnish-cache/lib/libvarnishapi/varnish_util.c: + + These are not used. + +2006-08-23 12:10 phk + + * trunk/varnish-cache/bin/varnishd/cache_hash.c: + + don't service cached objects the last second of their lifetime. + +2006-08-23 11:42 phk + + * trunk/varnish-cache/bin/varnishd/cache_response.c: + + Set response timestamp when we emit an error. + +2006-08-23 11:27 phk + + * trunk/varnish-cache/bin/varnishd/cache_center.c: + + Implement error in miss also + +2006-08-23 07:32 phk + + * trunk/varnish-cache/lib/libvcl/vcc_compile.c: + + unused variable. + +2006-08-23 07:30 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_pass.c: + + Handle backend connection error in pass mode with a 503 + +2006-08-23 07:29 phk + + * trunk/varnish-cache/bin/varnishd/cache_response.c: + + Fill shmem log with the reply + +2006-08-23 07:22 phk + + * trunk/varnish-cache/bin/varnishd/cache_pipe.c: + + grammar police. + +2006-08-23 07:16 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_pipe.c, + trunk/varnish-cache/bin/varnishd/cache_response.c, + trunk/varnish-cache/bin/varnishd/cache_vrt.c, + trunk/varnish-cache/include/vrt.h, + trunk/varnish-cache/lib/libvcl/vcc_compile.c, + trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c: + + Teach RES_Error() about the canonical response code texts from + RFC2616. + + Add the XID as "guru meditation" in the error HTML. + +2006-08-23 06:55 phk + + * trunk/varnish-cache/bin/varnishd/cache_pipe.c, + trunk/varnish-cache/bin/varnishd/heritage.h, + trunk/varnish-cache/bin/varnishd/mgt.h, + trunk/varnish-cache/bin/varnishd/mgt_param.c, + trunk/varnish-cache/bin/varnishd/varnishd.c: + + Move defaults from varnishd.c to mgt_param.c and use regular functions + for setting them. + + Collapse all the 'timeout' functions. + + Add pipe_timeout parameter. + +2006-08-23 06:53 phk + + * trunk/varnish-cache/lib/libvarnish/cli_common.c: + + If CLI is NULL, use stdout. + +2006-08-22 19:14 phk + + * trunk/varnish-cache/bin/varnishd/cache_center.c: + + Implement "error" in vcl_hit() + +2006-08-22 10:56 phk + + * trunk/varnish-cache/bin/varnishhist/varnishhist.c: + + Redraw must be checked when we update, we cannot trust + that we will actually have a timeout. + +2006-08-22 10:46 phk + + * trunk/varnish-cache/bin/varnishd/shmlog.c: + + Optimize shmlog writing: + + If we know the record length, only hold the mutex while we reserve + the space. Until we change the first byte, nothing bad can happen. + + XXX: a memory barrier is strictly speaking necessary before we assign + the first byte. + + If there are no '%' in the format string, treat as fixed length for + speed. + +2006-08-22 10:40 phk + + * trunk/varnish-cache/bin/varnishd/shmlog.c: + + Consistent naming of mutex + +2006-08-22 10:14 des + + * trunk/varnish-cache/bin/varnishhist/varnishhist.c: + + Allow the delay between screen updates to be specified with -w. + +2006-08-22 09:37 des + + * trunk/varnish-cache/bin/varnishlog/varnishlog.c: + + Correct the error check for write(). + +2006-08-22 09:31 des + + * trunk/varnish-cache/lib/libcompat/strndup.c: + + Slight optimization: use strlcpy() to avoid calloc(). + +2006-08-22 09:30 phk + + * trunk/varnish-cache/bin/varnishhist/varnishhist.c: + + Swap the '|' and '#' symbols so '#' means "miss", that's much more + graphically useful. + +2006-08-22 09:16 phk + + * trunk/varnish-cache/bin/varnishhist/varnishhist.c: + + Use different marks for hit & miss + + Autoscale vertical axis. + +2006-08-22 08:55 phk + + * trunk/varnish-cache/bin/varnishd/hash_classic.c: + + Eliminate the MD5 optional code. There is no sufficiently strong + statistical basis for using MD5 that will outweigh the performance + penalty or "IT USES THE BR0K3N MD5 ALGORITM" cries on slashdot. + + The only known artifact in CRC32 is that hashing it with a power + of two is slightly inefficient (a few percent in bucket length + standard deviation) if you have URLs with fixed width fields of + a limited charset (such as numeric) fields in them. + + Avoid this by checking the hash width specified for power of two, + and reduce it by one telling the user why. + + Using a hash width that is a prime number does provable advantage + over just not using power-of-two width. I have heard a mathematician + say that this is inherent in the design of the polynomia chosen + for CRC algorithms error (optimized for bit error detection) but + the actual math is way beyond me. + + Increase default hash width to 16383, which is probably still + smaller than it should be. + +2006-08-22 08:18 des + + * trunk/varnish-cache/bin/varnishd/cache_acceptor.h, + trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c, + trunk/varnish-cache/bin/varnishd/mgt_event.h, + trunk/varnish-cache/bin/varnishd/mgt_param.c, + trunk/varnish-cache/bin/varnishstat/varnishstat.c, + trunk/varnish-cache/bin/varnishtester/varnishtester.c, + trunk/varnish-cache/bin/varnishtop/varnishtop.c, + trunk/varnish-cache/include/vcl_returns.h, + trunk/varnish-cache/include/vrt_obj.h, + trunk/varnish-cache/lib/libvarnish/assert.c, + trunk/varnish-cache/lib/libvarnish/cli_common.c, + trunk/varnish-cache/lib/libvarnishapi/shmlog.c: + + Expand keywords. + +2006-08-22 08:17 des + + * trunk/varnish-cache/bin/varnishd/mgt_vcc.c, + trunk/varnish-cache/bin/varnishd/tcp.c: + + Allow an empty address if a port is specified; thus ":80" is a valid + listening address ("port 80 on all interfaces") + +2006-08-22 08:06 phk + + * trunk/varnish-cache/bin/varnishd/hash_classic.c: + + Additional marginal improvement: + + Sort on length of key, then on digest. + +2006-08-22 07:52 phk + + * trunk/varnish-cache/bin/varnishd/hash_classic.c: + + Rework the classic hasher to reduce lock contention and CPU usage. + + Make nbuckets=nhash mandatory. + + Order hash lists by the length of key instead of the key contents, + comparing the length is much faster. + + Also compare disgest before we take the expensive content compare. + + Use memcmp() for content compare instead of strcmp(). + + Use a two-pass algorithm for inserts to lower mutex contention. + +2006-08-22 07:24 des + + * trunk/varnish-cache/bin/varnishd/Makefile.am: + + Add cache_acceptor.h to noinst_HEADERS. + +2006-08-22 07:11 des + + * trunk/varnish-cache/bin/varnishd/tcp.c, + trunk/varnish-cache/configure.ac, + trunk/varnish-cache/include/Makefile.am, + trunk/varnish-cache/include/compat/strndup.h, + trunk/varnish-cache/lib/libcompat/Makefile.am, + trunk/varnish-cache/lib/libcompat/strndup.c: + + Add strndup() to libcompat. + +2006-08-21 20:42 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor.h, + trunk/varnish-cache/bin/varnishd/mgt_child.c, + trunk/varnish-cache/bin/varnishd/mgt_vcc.c: + + Flexelint inpired cleanups + +2006-08-21 20:30 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_backend.c, + trunk/varnish-cache/bin/varnishd/cache_fetch.c, + trunk/varnish-cache/bin/varnishd/cache_pass.c, + trunk/varnish-cache/bin/varnishd/cache_pipe.c: + + Give VBE_ClosedFd() an argument to tell if the fd has already + been closed. + + Pipe does this and would panic otherwise. + +2006-08-21 20:25 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c: + + Fix these two up to current standard. + + Poll is tested, epoll isn't. + + While the three implementations share a lot of identical code + right now, I will wait a bit before unifying more of them, at + least until performance proves that this is the right way for + kqueue. + + XXX: they're really not acceptors any more, they're herders. + +2006-08-21 20:23 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: + + Make it easier to experiement with acceptors by having a single + pointer to the one in use. + +2006-08-21 20:23 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c: + + Remove unused #includes + +2006-08-21 19:05 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: + + Add asserts. + + Return if we pass on directly. + +2006-08-21 18:55 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_acceptor.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor.h, + trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c: + + Overhaul kqueue acceptor in light of todays learnings. + + Use the pipe trick to inject sessions into the system, as far as I + can tell it is cheaper because of the low rate it happens and the + high rate of mutex operations avoided. + + Ignore the timer event, but purge the list every time we wake up + to reduce lumpyness of timeout'ing. + + Centralize the polling of a session so we don't have the same two + messages spread out all over the place. + + Centralize the acceptor thread and send things directly to the worker + thread, leaving only the session-herder in the split out files. + + poll & epoll not yet updated accordingly. + +2006-08-21 17:49 phk + + * trunk/varnish-cache/bin/varnishd/tcp.c: + + Bandaid until Dag Erling does what's necessary + +2006-08-21 17:32 phk + + * trunk/varnish-cache/bin/varnishd/cache_session.c: + + Retire sessions if the workspace size changes, properly cache the + workspace size so we do not get caught unaware when it changes. + + Implement flip-flop free queue where SES_New() can read from + one of them without a lock, which frees happen to the other one + under lock. If the lock-less queue is empty, SES_New() flips + the two queues under lock and tries again. If that queue is + also empty call malloc(3). + +2006-08-21 17:26 des + + * trunk/varnish-cache/bin/varnishd/common.h, + trunk/varnish-cache/bin/varnishd/mgt.h, + trunk/varnish-cache/bin/varnishd/mgt_child.c, + trunk/varnish-cache/bin/varnishd/mgt_cli.c, + trunk/varnish-cache/bin/varnishd/mgt_vcc.c, + trunk/varnish-cache/bin/varnishd/tcp.c, + trunk/varnish-cache/bin/varnishd/varnishd.c: + + Rename open_tcp() to TCP_open() and modify it to open only one socket of + the appropriate type for the address that was passed in. + + Introduce TCP_parse(), which extracts an address and port from a string of + the form "hostname:port", "i.p.v.4:port" or "[i:p:v:6]:port" (where "port" + can be either a decimal number or a service name). + + Use TCP_parse() to parse the argument to -a (listen address), -b (backend + address) and -T (telnet address). Eliminate -p (listen port). + + While there, rename a bunch of "fooflag" variables which aren't flags to + "foo_arg". + +2006-08-21 13:15 phk + + * trunk/varnish-cache/include/stat_field.h: + + Add n_sess_mem + +2006-08-21 13:15 phk + + * trunk/varnish-cache/bin/varnishd/cache_session.c: + + Increase client hash to 1k + + Cache used sessmem chunks on a private list and recycle from there, + no point in bothering malloc all the time. + +2006-08-21 12:57 des + + * trunk/varnish-cache/bin/varnishlog/varnishlog.c: + + When writing to a file, open it with O_APPEND rather than O_TRUNC. + +2006-08-21 12:55 des + + * trunk/varnish-cache/bin/varnishhist/Makefile.am, + trunk/varnish-cache/bin/varnishhist/varnishhist.c: + + Set properties. + +2006-08-21 12:54 des + + * trunk/varnish-cache/bin/varnishhist: + + Set properties. + +2006-08-21 12:12 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor.h, + trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/steps.h: + + Create the possiblity for the the acceptor to send the session directly + to the workerpool instead of taking the detour around the session-herder. + + This saves a context switch and is presumabley a good idea because the + majority of sessions will have requst already in the pipeline. + + For accept filters it makes even more sense because we know this to + be the case. + +2006-08-21 11:18 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c: + + Split the accepting and session-herding functionality into two threads, + this is totally free from a locking point of view, but will cost + in context switches. + +2006-08-21 11:11 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor.h: + + Add file + +2006-08-21 11:05 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c: + + various cleanups. + +2006-08-21 10:59 phk + + * trunk/varnish-cache/bin/varnishd/Makefile.am, + trunk/varnish-cache/bin/varnishd/cache_acceptor.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor_epoll.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor_kqueue.c, + trunk/varnish-cache/bin/varnishd/cache_acceptor_poll.c: + + Break the acceptors out into their own files. + + The intent here is to compile in all acceptors supported on the + operating system and allow the user to select one at startup time. + +2006-08-21 09:51 phk + + * trunk/varnish-cache/bin/varnishhist/varnishhist.c: + + Adjusments to scale. + + Refresh 1/sec max + + Put more in the rolling buffer. + +2006-08-21 09:49 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: + + Don't hose TIMER kevent with READ kevent + +2006-08-21 09:49 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: + + This assert is not warranted, a connection might disappear before + we get to it. + +2006-08-20 19:55 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: + + Close another tiny race. + +2006-08-20 18:33 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: + + Give the kevent acceptor another overhaul. + + On a number of fine points the kevent API behaves different from + what I would have expected. + + For instance EV_DISABLE/EV_ENABLE on a timer does not reset the + timer. + + This is a very defensive version and if that works, it can be optimized + some more. + +2006-08-20 16:35 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_acceptor.c: + + Heavy-duty work on kqueue acceptor. + +2006-08-20 16:35 phk + + * trunk/varnish-cache/bin/varnishd/cache_pipe.c: + + Add some debugging + +2006-08-20 16:34 phk + + * trunk/varnish-cache/bin/varnishd/cache_center.c: + + Remove unused variable. + +2006-08-20 15:12 phk + + * trunk/varnish-cache/bin/varnishd/cache_pipe.c: + + Use TxHeader for pipe backend. + +2006-08-20 15:12 phk + + * trunk/varnish-cache/bin/varnishd/mgt_vcc.c: + + Don't chat up non-running childs. + +2006-08-20 15:11 phk + + * trunk/varnish-cache/bin/varnishd/mgt_cli.c: + + Make sure the returns have some value. + +2006-08-20 15:11 phk + + * trunk/varnish-cache/lib/libvarnish/cli_common.c: + + Assert that the cli status is valid + +2006-08-20 14:53 phk + + * trunk/varnish-cache/bin/varnishd/mgt_child.c: + + pid -1 is not our child + +2006-08-20 14:53 phk + + * trunk/varnish-cache/bin/varnishd/mgt_vcc.c: + + Fix malloc bug. + +2006-08-20 13:39 phk + + * trunk/varnish-cache/bin/varnishd/varnishd.c: + + New defaults: + 5 sec session timeout + 60 sec thread pool timeout + +2006-08-20 13:38 phk + + * trunk/varnish-cache/bin/varnishd/heritage.h, + trunk/varnish-cache/bin/varnishd/mgt_child.c, + trunk/varnish-cache/bin/varnishd/mgt_param.c, + trunk/varnish-cache/bin/varnishd/varnishd.c: + + Make autostart a tweakable parameter, this is useful for debugging + +2006-08-20 12:15 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor.c: + + Pull out up to 20 kevents at time instead of just one. + +2006-08-20 11:19 phk + + * trunk/varnish-cache/bin/varnishd/cache_pool.c: + + Respect lower pool limit dynamically + +2006-08-20 07:32 phk + + * trunk/varnish-cache/bin/varnishhist/varnishhist.c: + + Remember to open the shmlog + +2006-08-20 07:27 phk + + * trunk/varnish-cache/bin/Makefile.am, + trunk/varnish-cache/bin/varnishhist, + trunk/varnish-cache/bin/varnishhist/Makefile.am, + trunk/varnish-cache/bin/varnishhist/varnishhist.c, + trunk/varnish-cache/configure.ac: + + Add varnishhist(1) a program that shows the responsetime as a curses + histogram. + +2006-08-20 07:27 phk + + * trunk/varnish-cache/bin/varnishd/mgt_param.c: + + Add note that send_timeout has DELAYED effect + +2006-08-20 07:26 phk + + * trunk/varnish-cache/bin/varnishlog/varnishlog.c: + + Make sure we have predictable column numbers by printing '-' if it + is neither classified as client or backend. + +2006-08-19 21:48 phk + + * trunk/varnish-cache/bin/varnishd/cache_acceptor.c, + trunk/varnish-cache/bin/varnishd/heritage.h, + trunk/varnish-cache/bin/varnishd/mgt_param.c, + trunk/varnish-cache/bin/varnishd/varnishd.c: + + Make the session timeout and send timeout tweakables. + +2006-08-19 21:32 phk + + * trunk/varnish-cache/bin/varnishd/mgt_param.c, + trunk/varnish-cache/include/cli.h: + + Implement the first load of tweable parameters + +2006-08-19 20:28 phk + + * trunk/varnish-cache/bin/varnishd/Makefile.am, + trunk/varnish-cache/bin/varnishd/mgt_cli.c, + trunk/varnish-cache/bin/varnishd/mgt_cli.h, + trunk/varnish-cache/bin/varnishd/mgt_param.c, + trunk/varnish-cache/include/cli.h: + + Add two new CLI commands: param.set and param.show. + + Eliminate requirement that "help" be first, I was just lazy I guess. + +2006-08-19 20:16 phk + + * trunk/varnish-cache/bin/varnishd/mgt_cli.c: + + cleanup + +2006-08-19 20:15 phk + + * trunk/varnish-cache/bin/varnishd/cache_backend.c, + trunk/varnish-cache/bin/varnishd/cache_pool.c, + trunk/varnish-cache/bin/varnishd/cache_session.c, + trunk/varnish-cache/bin/varnishd/heritage.h, + trunk/varnish-cache/bin/varnishd/rfc2616.c, + trunk/varnish-cache/bin/varnishd/shmlog.c, + trunk/varnish-cache/bin/varnishd/varnishd.c: + + We have a number of adjustable parameters, things like "default TTL" which + should be adjustable at runtime. + + We need to make adjustments in such a way that a restart of the child also + uses the new paramters. + + We can either do this by parsing the CLI in both mgt+child and have both + update their private copy, or we can parse it only in one of them and + update a shared copy. + + We opt for the latter method. + + Add a "struct params" which holds the adjustable parameters and put on + in the shmlog segment, between struct shmloghead and the round-robin + buffer. + + Move parameters from heritage to params. + + We put it there without exposing it in struct shmloghead which is + the public view of the shared memory because we do not want to make + it a public API or even to tempt people to think that it is one. + + Now I just need to add the CLI functions to actually twiddle the + parameters. + +2006-08-19 19:46 phk + + * trunk/varnish-cache/bin/varnishd/shmlog.c: + + Don't re-mmap the shmlog in the child, we already did it in the management + process and the inherited copy is perfectly fine to use. + +2006-08-18 20:07 phk + + * trunk/varnish-cache/bin/varnishlog/varnishlog.c: + + Respect and clear TAG also on flush + +2006-08-18 19:53 phk + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_http.c: + + Do a better job on Connection: header processing in client requests. + + Add a flag field for each HTTP header and define a bit HDF_FILTER + to mean "filter this out", and initialize to zero all relevant + places. + + If HDF_FILTER is set, do not copy the header across when filtering. + + Run through Connection: header (if present) and set HDF_FILTER on + any header that matches a word in the contents. + + If we are not HTTP/1.1 and have no Connection header, we close + the session when this reqest is done. + + If we have a Connection header, we respect that. + +2006-08-18 19:10 phk + + * trunk/varnish-cache/bin/varnishlog/varnishlog.c: + + Set REG_NOSUB for speed + +2006-08-18 18:16 phk + + * trunk/varnish-cache/bin/varnishlog/varnishlog.c: + + Remember to clear match bit + +2006-08-18 18:14 phk + + * trunk/varnish-cache/bin/varnishlog/varnishlog.c: + + Make it possible to select which requests we want to see in + ordered mode. For instance + ./varnishlog -o rxurl foo + will only show requests that match the regexp "foo" on the rxurl field + +2006-08-18 18:00 phk + + * trunk/varnish-cache/bin/varnishlog/varnishlog.c: + + Turn the "invcl" array into a flag array so we can put more stuff there. + +2006-08-18 16:04 phk + + * trunk/varnish-cache/bin/varnishd/tcp.c: + + Deeper listenqueue for HTTP sockets + +2006-08-15 10:38 des + + * trunk/varnish-cache/bin/varnishd/cache_response.c: + + Correct inverted test in If-Modified-Since logic. This should fix the + "stale front page" problem that has plagued VG. + +2006-08-15 10:36 des + + * trunk/varnish-cache/bin/varnishd/cache_response.c: + + Fix a bug in previous commit: an extra CR LF was inserted after the Date + header in a 304 response. + +2006-08-15 07:55 des + + * trunk/varnish-cache/bin/varnishd/cache_response.c: + + Better 304 responses: include a Date header, and send the correct + Last-Modified value. + +2006-08-13 11:38 des + + * trunk/varnish-cache/bin/varnishd/cache.h, + trunk/varnish-cache/bin/varnishd/cache_center.c, + trunk/varnish-cache/bin/varnishd/cache_response.c, + trunk/varnish-cache/bin/varnishd/cache_vrt.c, + trunk/varnish-cache/include/vrt.h, + trunk/varnish-cache/include/vrt_obj.h, + trunk/varnish-cache/lib/libvcl/vcc_compile.c, + trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c: + + Implement the "error" VCL keyword: + + - add fields to struct sess where VRT_error can store the error code and + message + - modify cnt_error() to pass these fields to RES_Error(), then clear them + - modify RES_Error() (and the entire chain) to accept a third argument + giving an explanation of the error. + - have RES_Error() reset the worker before writing the error document, to + make sure wfd is set. + + fixes: #4 + +2006-08-11 20:47 phk + + * trunk/varnish-cache/bin/varnishlog/varnishlog.c: + + When -b and -c given, supress "other" messages. + +2006-08-11 20:46 phk + + * trunk/varnish-cache/bin/varnishlog/varnishlog.c: + + fix formatting glitches in -o mode + +2006-08-11 20:43 phk + + * trunk/varnish-cache/lib/libvarnishapi/shmlog.c: + + Also mark as client on ReqStart + +2006-08-11 20:34 phk + + * trunk/varnish-cache/lib/libvarnishapi/shmlog.c: + + Make lack of -d option work as expected. + +2006-08-11 20:28 phk + + * trunk/varnish-cache/bin/varnishlog/varnishlog.c: + + Drop the -h option, it never really worked out. + + Use the new libvarnishapi facilities to structure code better. + +2006-08-11 20:24 phk + + * trunk/varnish-cache/include/varnishapi.h, + trunk/varnish-cache/lib/libvarnishapi/shmlog.c: + + Improve the shmlog facilities. + + Move the sleeping and timing out into the library so we do not + have to repeat it in all apps. Should we ever find an app + that needs something else, we will cater for it then. + + Add VSL_Dispatch() which calls a (supplied) function (pointer) for each + record. Additional useful information is passed as arguments, such + as classification (backend/client/other) etc. + + Add a default handler for printing a record. + + Add VSL_Select() where the application can specify tags that are mandatory + and which should not be subject to -i/-x/-I/-X/-b/-c filtering. + + Be more frugal with memory. + +2006-08-11 14:45 des + + * trunk/varnish-cache/bin/varnishd/tcp.c: + + Dirty hack: strip the leading "::ffff:" from v4-to-v6-mapped addresses. + +2006-08-11 14:26 phk + + * trunk/varnish-cache/bin/varnishd/cache_vrt_re.c: + + Assert regexp != NULL + +2006-08-11 14:21 phk + + * trunk/varnish-cache/bin/varnishd/cache_vrt_re.c: + + A NULL pointer does not match a regexp + +2006-08-11 14:09 phk + + * trunk/varnish-cache/bin/varnishd/hash_classic.c: + + Use 1:1 for hashbucket:mutex ratio + +2006-08-11 13:41 phk + + * trunk/varnish-cache/bin/varnishd/mgt.h, + trunk/varnish-cache/bin/varnishd/mgt_child.c, + trunk/varnish-cache/bin/varnishd/mgt_cli.c, + trunk/varnish-cache/bin/varnishd/tcp.c, + trunk/varnish-cache/bin/varnishd/varnishd.c: + + Add -T option. + +2006-08-11 11:23 phk + + * trunk/varnish-cache/lib/libvcl/vcc_acl.c, + trunk/varnish-cache/lib/libvcl/vcc_compile.c, + trunk/varnish-cache/lib/libvcl/vcc_compile.h: + + Use the already decoded CSTR where applicable and use + EncString() to encode strings for C source usage. + +2006-08-11 11:22 phk + + * trunk/varnish-cache/lib/libvcl/vcc_token.c: + + Until we know of a legitimate use for them, consider non !isgraph() + %xx escapes an error. + +2006-08-11 10:47 phk + + * trunk/varnish-cache/lib/libvcl/vcc_compile.h, + trunk/varnish-cache/lib/libvcl/vcc_token.c: + + Don't recognize '\' as magic in CSTR tokens, use %xx escapes instead. + + Add decoded string element to struct token. + +2006-08-11 10:20 phk + + * trunk/varnish-cache/lib/libvcl/flint.lnt: + + Improve flexelint setup + +2006-08-11 10:17 andersb + + * trunk/varnish-cache/bin/varnishncsa/varnishncsa.c: + + More meat, and even more debug code. I am free()'ing stuff that does + not exsist. + + Strugling with the pointers and strings, since they obviously are + "bleeding" from one to another. + I take that as a clear sign of not allocating and freeing right. + +2006-08-11 08:41 des + + * trunk/varnish-cache/ChangeLog: + + Regenerate. + 2006-08-11 08:40 des * trunk/varnish-cache/svn2cl.xsl: From des at projects.linpro.no Wed Sep 20 10:20:50 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 20 Sep 2006 12:20:50 +0200 (CEST) Subject: r1105 - tags Message-ID: <20060920102050.6D4521EC2A1@projects.linpro.no> Author: des Date: 2006-09-20 12:20:50 +0200 (Wed, 20 Sep 2006) New Revision: 1105 Added: tags/1.0/ Log: Tag 1.0. Copied: tags/1.0 (from rev 1104, branches/1.0) From des at projects.linpro.no Wed Sep 20 10:21:24 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 20 Sep 2006 12:21:24 +0200 (CEST) Subject: r1106 - tags Message-ID: <20060920102124.6D3FE1EC29F@projects.linpro.no> Author: des Date: 2006-09-20 12:21:24 +0200 (Wed, 20 Sep 2006) New Revision: 1106 Added: tags/varnish-1.0/ Removed: tags/1.0/ Log: Really tag 1.0. Copied: tags/varnish-1.0 (from rev 1104, branches/1.0) From phk at projects.linpro.no Wed Sep 20 14:52:07 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Wed, 20 Sep 2006 16:52:07 +0200 (CEST) Subject: r1107 - trunk/varnish-cache/bin/varnishd Message-ID: <20060920145207.1B4C21EC2A3@projects.linpro.no> Author: phk Date: 2006-09-20 16:52:07 +0200 (Wed, 20 Sep 2006) New Revision: 1107 Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c Log: Examine queue length, not how many have passed through the queue over all time. MFC: yes. Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-20 10:21:24 UTC (rev 1106) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-20 14:52:07 UTC (rev 1107) @@ -303,7 +303,7 @@ * the result will be */ if (sp->obj == NULL && - (VSL_stats->n_wrk_overflow > + (VSL_stats->n_wrk_queue > (params->wthread_max * params->overflow_max) / 100)) { VSL_stats->n_wrk_drop++; UNLOCK(&tmtx); From des at projects.linpro.no Wed Sep 20 15:41:23 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 20 Sep 2006 17:41:23 +0200 (CEST) Subject: r1108 - trunk/varnish-cache/include Message-ID: <20060920154123.8BED91EC29D@projects.linpro.no> Author: des Date: 2006-09-20 17:41:23 +0200 (Wed, 20 Sep 2006) New Revision: 1108 Modified: trunk/varnish-cache/include/varnishapi.h Log: Declare VSL_tags[] rather than define it. This allows Varnish to build on MacOS. Modified: trunk/varnish-cache/include/varnishapi.h =================================================================== --- trunk/varnish-cache/include/varnishapi.h 2006-09-20 14:52:07 UTC (rev 1107) +++ trunk/varnish-cache/include/varnishapi.h 2006-09-20 15:41:23 UTC (rev 1108) @@ -54,7 +54,7 @@ int VSL_NextLog(struct VSL_data *lh, unsigned char **pp); int VSL_Arg(struct VSL_data *vd, int arg, const char *opt); struct varnish_stats *VSL_OpenStats(void); -const char *VSL_tags[256]; +extern const char *VSL_tags[256]; /* varnish_debug.c */ void vdb_panic(const char *, ...) V_DEAD; From des at projects.linpro.no Wed Sep 20 15:43:57 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 20 Sep 2006 17:43:57 +0200 (CEST) Subject: r1109 - trunk/varnish-cache/bin/varnishtop Message-ID: <20060920154357.2DE011EC29D@projects.linpro.no> Author: des Date: 2006-09-20 17:43:57 +0200 (Wed, 20 Sep 2006) New Revision: 1109 Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.1 Log: Correct the title, name and description which were copy-pasted from varnishhist(1). Spotted by: Anders Hanssen Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.1 =================================================================== --- trunk/varnish-cache/bin/varnishtop/varnishtop.1 2006-09-20 15:41:23 UTC (rev 1108) +++ trunk/varnish-cache/bin/varnishtop/varnishtop.1 2006-09-20 15:43:57 UTC (rev 1109) @@ -27,11 +27,11 @@ .\" $Id$ .\" .Dd September 16, 2006 -.Dt VARNISHHIST 1 +.Dt VARNISHTOP 1 .Os .Sh NAME -.Nm varnishhist -.Nd Varnish request histogram +.Nm varnishtop +.Nd Varnish log entry ranking .Sh SYNOPSIS .Nm .Op Fl 1 From des at projects.linpro.no Wed Sep 20 15:46:05 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 20 Sep 2006 17:46:05 +0200 (CEST) Subject: r1110 - in branches/1.0: . bin/varnishd Message-ID: <20060920154605.A34901EC28F@projects.linpro.no> Author: des Date: 2006-09-20 17:46:05 +0200 (Wed, 20 Sep 2006) New Revision: 1110 Modified: branches/1.0/ branches/1.0/bin/varnishd/cache_pool.c Log: r31738 at cat (orig r1107): phk | 2006-09-20 16:52:07 +0200 Examine queue length, not how many have passed through the queue over all time. MFC: yes. Property changes on: branches/1.0 ___________________________________________________________________ Name: svk:merge - d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1101 + d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1107 Modified: branches/1.0/bin/varnishd/cache_pool.c =================================================================== --- branches/1.0/bin/varnishd/cache_pool.c 2006-09-20 15:43:57 UTC (rev 1109) +++ branches/1.0/bin/varnishd/cache_pool.c 2006-09-20 15:46:05 UTC (rev 1110) @@ -303,7 +303,7 @@ * the result will be */ if (sp->obj == NULL && - (VSL_stats->n_wrk_overflow > + (VSL_stats->n_wrk_queue > (params->wthread_max * params->overflow_max) / 100)) { VSL_stats->n_wrk_drop++; UNLOCK(&tmtx); From des at projects.linpro.no Wed Sep 20 15:46:06 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 20 Sep 2006 17:46:06 +0200 (CEST) Subject: r1111 - in branches/1.0: . include Message-ID: <20060920154606.C32471EC29D@projects.linpro.no> Author: des Date: 2006-09-20 17:46:06 +0200 (Wed, 20 Sep 2006) New Revision: 1111 Modified: branches/1.0/ branches/1.0/include/varnishapi.h Log: r31739 at cat (orig r1108): des | 2006-09-20 17:41:23 +0200 Declare VSL_tags[] rather than define it. This allows Varnish to build on MacOS. Property changes on: branches/1.0 ___________________________________________________________________ Name: svk:merge - d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1107 + d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1108 Modified: branches/1.0/include/varnishapi.h =================================================================== --- branches/1.0/include/varnishapi.h 2006-09-20 15:46:05 UTC (rev 1110) +++ branches/1.0/include/varnishapi.h 2006-09-20 15:46:06 UTC (rev 1111) @@ -54,7 +54,7 @@ int VSL_NextLog(struct VSL_data *lh, unsigned char **pp); int VSL_Arg(struct VSL_data *vd, int arg, const char *opt); struct varnish_stats *VSL_OpenStats(void); -const char *VSL_tags[256]; +extern const char *VSL_tags[256]; /* varnish_debug.c */ void vdb_panic(const char *, ...) V_DEAD; From des at projects.linpro.no Wed Sep 20 15:46:07 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 20 Sep 2006 17:46:07 +0200 (CEST) Subject: r1112 - in branches/1.0: . bin/varnishtop Message-ID: <20060920154607.E1A7A1EC28F@projects.linpro.no> Author: des Date: 2006-09-20 17:46:07 +0200 (Wed, 20 Sep 2006) New Revision: 1112 Modified: branches/1.0/ branches/1.0/bin/varnishtop/varnishtop.1 Log: r31740 at cat (orig r1109): des | 2006-09-20 17:43:57 +0200 Correct the title, name and description which were copy-pasted from varnishhist(1). Spotted by: Anders Hanssen Property changes on: branches/1.0 ___________________________________________________________________ Name: svk:merge - d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1108 + d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1109 Modified: branches/1.0/bin/varnishtop/varnishtop.1 =================================================================== --- branches/1.0/bin/varnishtop/varnishtop.1 2006-09-20 15:46:06 UTC (rev 1111) +++ branches/1.0/bin/varnishtop/varnishtop.1 2006-09-20 15:46:07 UTC (rev 1112) @@ -27,11 +27,11 @@ .\" $Id$ .\" .Dd September 16, 2006 -.Dt VARNISHHIST 1 +.Dt VARNISHTOP 1 .Os .Sh NAME -.Nm varnishhist -.Nd Varnish request histogram +.Nm varnishtop +.Nd Varnish log entry ranking .Sh SYNOPSIS .Nm .Op Fl 1 From des at projects.linpro.no Wed Sep 20 16:26:54 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 20 Sep 2006 18:26:54 +0200 (CEST) Subject: r1113 - in trunk/varnish-cache: . man Message-ID: <20060920162654.BAFB91EC29D@projects.linpro.no> Author: des Date: 2006-09-20 18:26:54 +0200 (Wed, 20 Sep 2006) New Revision: 1113 Added: trunk/varnish-cache/man/ trunk/varnish-cache/man/Makefile.am trunk/varnish-cache/man/vcl.7 Modified: trunk/varnish-cache/Makefile.am trunk/varnish-cache/configure.ac Log: Add an unfinished vcl(7) man page. Modified: trunk/varnish-cache/Makefile.am =================================================================== --- trunk/varnish-cache/Makefile.am 2006-09-20 15:46:07 UTC (rev 1112) +++ trunk/varnish-cache/Makefile.am 2006-09-20 16:26:54 UTC (rev 1113) @@ -1,5 +1,5 @@ # $Id$ -SUBDIRS = include lib bin +SUBDIRS = include lib bin man EXTRA_DIST = LICENSE autogen.sh Modified: trunk/varnish-cache/configure.ac =================================================================== --- trunk/varnish-cache/configure.ac 2006-09-20 15:46:07 UTC (rev 1112) +++ trunk/varnish-cache/configure.ac 2006-09-20 16:26:54 UTC (rev 1113) @@ -99,5 +99,6 @@ lib/libvarnish/Makefile lib/libvarnishapi/Makefile lib/libvcl/Makefile + man/Makefile ]) AC_OUTPUT Property changes on: trunk/varnish-cache/man ___________________________________________________________________ Name: svn:ignore + Makefile Makefile.in Added: trunk/varnish-cache/man/Makefile.am =================================================================== --- trunk/varnish-cache/man/Makefile.am 2006-09-20 15:46:07 UTC (rev 1112) +++ trunk/varnish-cache/man/Makefile.am 2006-09-20 16:26:54 UTC (rev 1113) @@ -0,0 +1,3 @@ +# $Id$ + +dist_man_MANS = vcl.7 Added: trunk/varnish-cache/man/vcl.7 =================================================================== --- trunk/varnish-cache/man/vcl.7 2006-09-20 15:46:07 UTC (rev 1112) +++ trunk/varnish-cache/man/vcl.7 2006-09-20 16:26:54 UTC (rev 1113) @@ -0,0 +1,64 @@ +.\"- +.\" Copyright (c) 2006 Verdens Gang AS +.\" Copyright (c) 2006 Linpro AS +.\" All rights reserved. +.\" +.\" Author: Dag-Erling Sm?rgrav +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $Id$ +.\" +.Dd September 20, 2006 +.Dt VCL 7 +.Os +.Sh NAME +.Nm VCL +.Nd Varnish Configuration Language +.Sh SYNOPSIS +.\" ... +.Sh DESCRIPTION +The +.Nm +language is a small domain-specific language designed to be used to +define request handling and document caching policies for the Varnish +HTTP accelerator. +.Pp +When a new configuration is loaded, the +.Nm varnishd +management process translates the VCL code to C and compiles it to a +shared object which is then dynamically linked into the server +process. +.Ss Syntax +.Ss The State Machine +.Ss Backend Definitions +.Ss Access Control Lists +.Sh SEE ALSO +.Xr varnishd 1 +.Sh HISTORY +The +.Nm +language was developed by +.An Poul-Henning Kamp Aq phk at phk.freebsd.dk +in cooperation with Verdens Gang AS and Linpro AS. +This manual page was written by +.An Dag-Erling Sm\(/orgrav Aq des at linpro.no . From des at projects.linpro.no Wed Sep 20 16:33:25 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 20 Sep 2006 18:33:25 +0200 (CEST) Subject: r1114 - in trunk/varnish-cache/bin: varnishd varnishhist varnishlog varnishncsa varnishstat varnishtop Message-ID: <20060920163325.17F5C1EC29D@projects.linpro.no> Author: des Date: 2006-09-20 18:33:24 +0200 (Wed, 20 Sep 2006) New Revision: 1114 Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 trunk/varnish-cache/bin/varnishhist/varnishhist.1 trunk/varnish-cache/bin/varnishlog/varnishlog.1 trunk/varnish-cache/bin/varnishncsa/varnishncsa.1 trunk/varnish-cache/bin/varnishstat/varnishstat.1 trunk/varnish-cache/bin/varnishtop/varnishtop.1 Log: Add attribution, bump date. Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.1 2006-09-20 16:26:54 UTC (rev 1113) +++ trunk/varnish-cache/bin/varnishd/varnishd.1 2006-09-20 16:33:24 UTC (rev 1114) @@ -3,6 +3,8 @@ .\" Copyright (c) 2006 Linpro AS .\" All rights reserved. .\" +.\" Author: Dag-Erling Sm?rgrav +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -26,7 +28,7 @@ .\" .\" $Id$ .\" -.Dd July 6, 2006 +.Dd September 20, 2006 .Dt VARNISHD 1 .Os .Sh NAME @@ -250,7 +252,8 @@ .Xr varnishhist 1 , .Xr varnishncsa 1 , .Xr varnishstat 1 , -.Xr varnishtop 1 +.Xr varnishtop 1 , +.Xr vcl 7 .\" .Sh STANDARDS .\" .Rs .\" .%A R. Fielding @@ -269,3 +272,5 @@ daemon was developed by .An Poul-Henning Kamp Aq phk at phk.freebsd.dk in cooperation with Verdens Gang AS and Linpro AS. +This manual page was written by +.An Dag-Erling Sm\(/orgrav Aq des at linpro.no . Modified: trunk/varnish-cache/bin/varnishhist/varnishhist.1 =================================================================== --- trunk/varnish-cache/bin/varnishhist/varnishhist.1 2006-09-20 16:26:54 UTC (rev 1113) +++ trunk/varnish-cache/bin/varnishhist/varnishhist.1 2006-09-20 16:33:24 UTC (rev 1114) @@ -3,6 +3,8 @@ .\" Copyright (c) 2006 Linpro AS .\" All rights reserved. .\" +.\" Author: Dag-Erling Sm?rgrav +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -26,7 +28,7 @@ .\" .\" $Id$ .\" -.Dd September 16, 2006 +.Dd September 20, 2006 .Dt VARNISHHIST 1 .Os .Sh NAME @@ -131,3 +133,5 @@ utility was developed by .An Poul-Henning Kamp Aq phk at phk.freebsd.dk in cooperation with Verdens Gang AS and Linpro AS. +This manual page was written by +.An Dag-Erling Sm\(/orgrav Aq des at linpro.no . Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.1 =================================================================== --- trunk/varnish-cache/bin/varnishlog/varnishlog.1 2006-09-20 16:26:54 UTC (rev 1113) +++ trunk/varnish-cache/bin/varnishlog/varnishlog.1 2006-09-20 16:33:24 UTC (rev 1114) @@ -3,6 +3,8 @@ .\" Copyright (c) 2006 Linpro AS .\" All rights reserved. .\" +.\" Author: Dag-Erling Sm?rgrav +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -26,7 +28,7 @@ .\" .\" $Id$ .\" -.Dd September 16, 2006 +.Dd September 20, 2006 .Dt VARNISHLOG 1 .Os .Sh NAME @@ -187,3 +189,5 @@ utility was developed by .An Poul-Henning Kamp Aq phk at phk.freebsd.dk in cooperation with Verdens Gang AS and Linpro AS. +This manual page was written by +.An Dag-Erling Sm\(/orgrav Aq des at linpro.no . Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.1 =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.1 2006-09-20 16:26:54 UTC (rev 1113) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.1 2006-09-20 16:33:24 UTC (rev 1114) @@ -3,6 +3,8 @@ .\" Copyright (c) 2006 Linpro AS .\" All rights reserved. .\" +.\" Author: Dag-Erling Sm?rgrav +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -26,7 +28,7 @@ .\" .\" $Id$ .\" -.Dd September 16, 2006 +.Dd September 20, 2006 .Dt VARNISHNCSA 1 .Os .Sh NAME @@ -129,3 +131,5 @@ utility was developed by .An Poul-Henning Kamp Aq phk at phk.freebsd.dk in cooperation with Verdens Gang AS and Linpro AS. +This manual page was written by +.An Dag-Erling Sm\(/orgrav Aq des at linpro.no . Modified: trunk/varnish-cache/bin/varnishstat/varnishstat.1 =================================================================== --- trunk/varnish-cache/bin/varnishstat/varnishstat.1 2006-09-20 16:26:54 UTC (rev 1113) +++ trunk/varnish-cache/bin/varnishstat/varnishstat.1 2006-09-20 16:33:24 UTC (rev 1114) @@ -3,6 +3,8 @@ .\" Copyright (c) 2006 Linpro AS .\" All rights reserved. .\" +.\" Author: Dag-Erling Sm?rgrav +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -26,7 +28,7 @@ .\" .\" $Id$ .\" -.Dd September 16, 2006 +.Dd September 20, 2006 .Dt VARNISHSTAT 1 .Os .Sh NAME @@ -82,3 +84,5 @@ utility was developed by .An Poul-Henning Kamp Aq phk at phk.freebsd.dk in cooperation with Verdens Gang AS and Linpro AS. +This manual page was written by +.An Dag-Erling Sm\(/orgrav Aq des at linpro.no . Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.1 =================================================================== --- trunk/varnish-cache/bin/varnishtop/varnishtop.1 2006-09-20 16:26:54 UTC (rev 1113) +++ trunk/varnish-cache/bin/varnishtop/varnishtop.1 2006-09-20 16:33:24 UTC (rev 1114) @@ -3,6 +3,8 @@ .\" Copyright (c) 2006 Linpro AS .\" All rights reserved. .\" +.\" Author: Dag-Erling Sm?rgrav +.\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: @@ -26,7 +28,7 @@ .\" .\" $Id$ .\" -.Dd September 16, 2006 +.Dd September 20, 2006 .Dt VARNISHTOP 1 .Os .Sh NAME @@ -142,6 +144,8 @@ utility was developed by .An Poul-Henning Kamp Aq phk at phk.freebsd.dk in cooperation with Verdens Gang AS and Linpro AS. +This manual page was written by +.An Dag-Erling Sm\(/orgrav Aq des at linpro.no . .Sh BUGS The .Fl 1 From des at projects.linpro.no Wed Sep 20 17:17:54 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 20 Sep 2006 19:17:54 +0200 (CEST) Subject: r1115 - branches/1.0 Message-ID: <20060920171754.280A41EC29D@projects.linpro.no> Author: des Date: 2006-09-20 19:17:54 +0200 (Wed, 20 Sep 2006) New Revision: 1115 Modified: branches/1.0/configure.ac Log: Bump version. Modified: branches/1.0/configure.ac =================================================================== --- branches/1.0/configure.ac 2006-09-20 16:33:24 UTC (rev 1114) +++ branches/1.0/configure.ac 2006-09-20 17:17:54 UTC (rev 1115) @@ -3,7 +3,7 @@ AC_PREREQ(2.59) AC_COPYRIGHT([Copyright (c) 2006 Linpro AS / Verdens Gang AS]) AC_REVISION([$Id$]) -AC_INIT([Varnish], [1.0], [varnish-dev at projects.linpro.no]) +AC_INIT([Varnish], [1.0.1], [varnish-dev at projects.linpro.no]) AC_CONFIG_SRCDIR(include/varnishapi.h) AM_CONFIG_HEADER(config.h) From des at projects.linpro.no Wed Sep 20 17:18:38 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 20 Sep 2006 19:18:38 +0200 (CEST) Subject: r1116 - tags Message-ID: <20060920171838.8BBDD1EC29D@projects.linpro.no> Author: des Date: 2006-09-20 19:18:38 +0200 (Wed, 20 Sep 2006) New Revision: 1116 Added: tags/varnish-1.0.1/ Log: Tag 1.0.1. Copied: tags/varnish-1.0.1 (from rev 1115, branches/1.0) From des at projects.linpro.no Wed Sep 20 17:21:38 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 20 Sep 2006 19:21:38 +0200 (CEST) Subject: r1117 - branches/1.0 Message-ID: <20060920172138.DFF8F1EC28F@projects.linpro.no> Author: des Date: 2006-09-20 19:21:38 +0200 (Wed, 20 Sep 2006) New Revision: 1117 Modified: branches/1.0/ChangeLog Log: Regenerate. Modified: branches/1.0/ChangeLog =================================================================== --- branches/1.0/ChangeLog 2006-09-20 17:18:38 UTC (rev 1116) +++ branches/1.0/ChangeLog 2006-09-20 17:21:38 UTC (rev 1117) @@ -1,3 +1,44 @@ +2006-09-20 17:17 des + + * branches/1.0/configure.ac: + + Bump version. + +2006-09-20 15:46 des + + * branches/1.0, branches/1.0/bin/varnishtop/varnishtop.1: + + r31740 at cat (orig r1109): des | 2006-09-20 17:43:57 +0200 + Correct the title, name and description which were copy-pasted from + varnishhist(1). + + Spotted by: Anders Hanssen + +2006-09-20 15:46 des + + * branches/1.0, branches/1.0/include/varnishapi.h: + + r31739 at cat (orig r1108): des | 2006-09-20 17:41:23 +0200 + Declare VSL_tags[] rather than define it. This allows Varnish to build + on MacOS. + +2006-09-20 15:46 des + + * branches/1.0, branches/1.0/bin/varnishd/cache_pool.c: + + r31738 at cat (orig r1107): phk | 2006-09-20 16:52:07 +0200 + Examine queue length, not how many have passed through the queue over + all time. + + MFC: yes. + + +2006-09-20 09:49 des + + * branches/1.0/ChangeLog: + + Regenerate. + 2006-09-20 09:44 des * branches/1.0, branches/1.0/README: From des at projects.linpro.no Wed Sep 20 17:22:28 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 20 Sep 2006 19:22:28 +0200 (CEST) Subject: r1118 - tags/varnish-1.0.1 Message-ID: <20060920172228.897BA1EC2A1@projects.linpro.no> Author: des Date: 2006-09-20 19:22:28 +0200 (Wed, 20 Sep 2006) New Revision: 1118 Modified: tags/varnish-1.0.1/ tags/varnish-1.0.1/ChangeLog Log: r31748 at cat (orig r1117): des | 2006-09-20 19:21:38 +0200 Regenerate. Property changes on: tags/varnish-1.0.1 ___________________________________________________________________ Name: svk:merge - d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1109 + d4fa192b-c00b-0410-8231-f00ffab90ce4:/branches/1.0:1117 d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1109 Modified: tags/varnish-1.0.1/ChangeLog =================================================================== --- tags/varnish-1.0.1/ChangeLog 2006-09-20 17:21:38 UTC (rev 1117) +++ tags/varnish-1.0.1/ChangeLog 2006-09-20 17:22:28 UTC (rev 1118) @@ -1,3 +1,44 @@ +2006-09-20 17:17 des + + * branches/1.0/configure.ac: + + Bump version. + +2006-09-20 15:46 des + + * branches/1.0, branches/1.0/bin/varnishtop/varnishtop.1: + + r31740 at cat (orig r1109): des | 2006-09-20 17:43:57 +0200 + Correct the title, name and description which were copy-pasted from + varnishhist(1). + + Spotted by: Anders Hanssen + +2006-09-20 15:46 des + + * branches/1.0, branches/1.0/include/varnishapi.h: + + r31739 at cat (orig r1108): des | 2006-09-20 17:41:23 +0200 + Declare VSL_tags[] rather than define it. This allows Varnish to build + on MacOS. + +2006-09-20 15:46 des + + * branches/1.0, branches/1.0/bin/varnishd/cache_pool.c: + + r31738 at cat (orig r1107): phk | 2006-09-20 16:52:07 +0200 + Examine queue length, not how many have passed through the queue over + all time. + + MFC: yes. + + +2006-09-20 09:49 des + + * branches/1.0/ChangeLog: + + Regenerate. + 2006-09-20 09:44 des * branches/1.0, branches/1.0/README: From des at projects.linpro.no Fri Sep 22 12:37:56 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Fri, 22 Sep 2006 14:37:56 +0200 (CEST) Subject: r1119 - trunk/varnish-cache/bin/varnishtop Message-ID: <20060922123756.1501C1EC2B1@projects.linpro.no> Author: des Date: 2006-09-22 14:37:55 +0200 (Fri, 22 Sep 2006) New Revision: 1119 Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.1 Log: Remove leftovers from copy-paste. Spotted by: Anders Hanssen Modified: trunk/varnish-cache/bin/varnishtop/varnishtop.1 =================================================================== --- trunk/varnish-cache/bin/varnishtop/varnishtop.1 2006-09-20 17:22:28 UTC (rev 1118) +++ trunk/varnish-cache/bin/varnishtop/varnishtop.1 2006-09-22 12:37:55 UTC (rev 1119) @@ -122,11 +122,6 @@ instead of shared memory. .It Fl V Display the version number and exit. -.Ar file -instead of displaying them. -The file will be overwritten unless the -.Fl a -option was specified. .It Fl X Ar regex Exclude log entries which match the specified regular expression. .It Fl x Ar tag From phk at projects.linpro.no Sat Sep 23 16:45:26 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 23 Sep 2006 18:45:26 +0200 (CEST) Subject: r1120 - trunk/varnish-cache/bin/varnishd Message-ID: <20060923164526.415C11EC29D@projects.linpro.no> Author: phk Date: 2006-09-23 18:45:26 +0200 (Sat, 23 Sep 2006) New Revision: 1120 Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c Log: Linux sendfile returns number of bytes written. Detected by: Xing Li Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-22 12:37:55 UTC (rev 1119) +++ trunk/varnish-cache/bin/varnishd/cache_pool.c 2006-09-23 16:45:26 UTC (rev 1120) @@ -163,10 +163,9 @@ } while (0); #elif defined(__linux__) do { - if (WRK_Flush(w) == 0) { - if (sendfile(*w->wfd, fd, &off, len) != 0) - w->werr++; - } + if (WRK_Flush(w) == 0 && + sendfile(*w->wfd, fd, &off, len) != len) + w->werr++; } while (0); #else #error Unknown sendfile() implementation From phk at projects.linpro.no Sat Sep 23 19:30:29 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Sat, 23 Sep 2006 21:30:29 +0200 (CEST) Subject: r1121 - trunk/varnish-cache/bin/varnishd Message-ID: <20060923193029.3CDF61EC2A1@projects.linpro.no> Author: phk Date: 2006-09-23 21:30:29 +0200 (Sat, 23 Sep 2006) New Revision: 1121 Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c trunk/varnish-cache/bin/varnishd/cache_pass.c trunk/varnish-cache/bin/varnishd/cache_pipe.c Log: Always send X-Forwarded-for: header to backend. Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-23 16:45:26 UTC (rev 1120) +++ trunk/varnish-cache/bin/varnishd/cache_fetch.c 2006-09-23 19:30:29 UTC (rev 1121) @@ -341,6 +341,8 @@ http_GetReq(w, vc->fd, vc->http, sp->http); http_FilterHeader(w, vc->fd, vc->http, sp->http, HTTPH_R_FETCH); http_PrintfHeader(w, vc->fd, vc->http, "X-Varnish: %u", sp->xid); + http_PrintfHeader(w, vc->fd, vc->http, + "X-Forwarded-for: %s", sp->addr); if (!http_GetHdr(vc->http, H_Host, &b)) { http_PrintfHeader(w, vc->fd, vc->http, "Host: %s", sp->backend->hostname); Modified: trunk/varnish-cache/bin/varnishd/cache_pass.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-23 16:45:26 UTC (rev 1120) +++ trunk/varnish-cache/bin/varnishd/cache_pass.c 2006-09-23 19:30:29 UTC (rev 1121) @@ -187,6 +187,8 @@ http_CopyResp(sp->wrk, sp->fd, sp->http, vc->http); http_FilterHeader(sp->wrk, sp->fd, sp->http, vc->http, HTTPH_A_PASS); http_PrintfHeader(sp->wrk, sp->fd, sp->http, "X-Varnish: %u", sp->xid); + http_PrintfHeader(sp->wrk, sp->fd, sp->http, + "X-Forwarded-for: %s", sp->addr); /* XXX */ if (http_HdrIs(vc->http, H_Transfer_Encoding, "chunked")) http_PrintfHeader(sp->wrk, sp->fd, sp->http, "Transfer-Encoding: chunked"); Modified: trunk/varnish-cache/bin/varnishd/cache_pipe.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-09-23 16:45:26 UTC (rev 1120) +++ trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-09-23 19:30:29 UTC (rev 1121) @@ -88,6 +88,8 @@ http_CopyReq(w, vc->fd, vc->http, sp->http); http_FilterHeader(w, vc->fd, vc->http, sp->http, HTTPH_R_PIPE); http_PrintfHeader(w, vc->fd, vc->http, "X-Varnish: %u", sp->xid); + http_PrintfHeader(w, vc->fd, vc->http, + "X-Forwarded-for: %s", sp->addr); WRK_Reset(w, &vc->fd); http_Write(w, vc->http, 0); From andersb at projects.linpro.no Sun Sep 24 16:17:06 2006 From: andersb at projects.linpro.no (andersb at projects.linpro.no) Date: Sun, 24 Sep 2006 18:17:06 +0200 (CEST) Subject: r1122 - trunk/varnish-cache/bin/varnishncsa Message-ID: <20060924161706.719AE1EC29D@projects.linpro.no> Author: andersb Date: 2006-09-24 18:17:06 +0200 (Sun, 24 Sep 2006) New Revision: 1122 Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c Log: Fixed: [] around time. NCSA logformat requires it. Fixed: Status variable is not shown correctly. Added: base64() decode of Remote User. Note: Getting compile warning. Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-23 19:30:29 UTC (rev 1121) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-24 16:17:06 UTC (rev 1122) @@ -61,6 +61,7 @@ char df_b[12]; /* Datafield for %b, Bytes */ char *df_R; /* Datafield for %{Referer} */ char *df_U; /* Datafield for %{User-agent} */ + char *df_RU; /* Datafield for %l, Remote user */ int bogus_req; /* bogus request */ struct vsb *sb; } *ll[65536]; @@ -87,6 +88,7 @@ FILE *fo; time_t t; long l; + unsigned lu; struct tm tm; char tbuf[40]; struct logline *lp; @@ -120,6 +122,8 @@ vsb_bcat(lp->sb, ptr, len); } else if (ispfx(ptr, len, "GET")) { vsb_bcat(lp->sb, ptr, len); + } else if (ispfx(ptr, len, "PURGE")) { + vsb_bcat(lp->sb, ptr, len); } else { lp->bogus_req = 1; } @@ -144,6 +148,8 @@ lp->df_U = strdup(ptr + 12); else if (ispfx(ptr, len, "referer:")) lp->df_R = strdup(ptr + 9); + else if (ispfx(ptr, len, "authorization:")) + lp->df_RU = strdup(ptr + 21); break; case SLT_Length: @@ -163,10 +169,29 @@ assert(1 == sscanf(ptr, "%*u %*u.%*u %ld.", &l)); t = l; localtime_r(&t, &tm); + + + strftime(tbuf, sizeof tbuf, "%d/%b/%Y:%T %z", &tm); - fprintf(fo, "%s - - %s", lp->df_h, tbuf); + fprintf(fo, "%s", lp->df_h); + + if (lp->df_RU != NULL){ + base64_init(); + lu = sizeof lp->df_RU; + base64_decode(lp->df_RU, &lu, lp->df_RU); + q = strchr(lp->df_RU, ':'); + *q = '\0'; + fprintf(fo, " %s", lp->df_RU); + free(lp->df_RU); + lp->df_RU = NULL; + } + else{ + fprintf(fo, " -"); + } + fprintf(fo, " - [%s]", tbuf); vsb_finish(lp->sb); fprintf(fo, " \"%s\"", vsb_data(lp->sb)); + fprintf(fo, " %s", lp->df_s); fprintf(fo, " %s", lp->df_b); if (lp->df_R != NULL) { fprintf(fo, " \"%s\"", lp->df_R); From andersb at projects.linpro.no Sun Sep 24 17:14:28 2006 From: andersb at projects.linpro.no (andersb at projects.linpro.no) Date: Sun, 24 Sep 2006 19:14:28 +0200 (CEST) Subject: r1123 - trunk/varnish-cache/bin/varnishncsa Message-ID: <20060924171428.3248F1EC29A@projects.linpro.no> Author: andersb Date: 2006-09-24 19:14:28 +0200 (Sun, 24 Sep 2006) New Revision: 1123 Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c Log: Fixed: Correctly logging "-" when there is no User-Agent or Referer. Note: Still builds with warning. Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-24 16:17:06 UTC (rev 1122) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-24 17:14:28 UTC (rev 1123) @@ -198,11 +198,18 @@ free(lp->df_R); lp->df_R = NULL; } + else { + fprintf(fo, " \"-\""); + } + if (lp->df_U != NULL) { fprintf(fo, " \"%s\"", lp->df_U); free(lp->df_U); lp->df_U = NULL; } + else { + fprintf(fo, " \"-\""); + } fprintf(fo, "\n"); return (0); From andersb at projects.linpro.no Sun Sep 24 17:59:00 2006 From: andersb at projects.linpro.no (andersb at projects.linpro.no) Date: Sun, 24 Sep 2006 19:59:00 +0200 (CEST) Subject: r1124 - trunk/varnish-cache/bin/varnishncsa Message-ID: <20060924175900.4BBB51EC2A4@projects.linpro.no> Author: andersb Date: 2006-09-24 19:59:00 +0200 (Sun, 24 Sep 2006) New Revision: 1124 Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c Log: Fixed: Compiles correctly, but has a 128 char long maximum for Remote Username. Modified: trunk/varnish-cache/bin/varnishncsa/varnishncsa.c =================================================================== --- trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-24 17:14:28 UTC (rev 1123) +++ trunk/varnish-cache/bin/varnishncsa/varnishncsa.c 2006-09-24 17:59:00 UTC (rev 1124) @@ -91,6 +91,7 @@ unsigned lu; struct tm tm; char tbuf[40]; + char rubuf[128]; struct logline *lp; if (!(spec &VSL_S_CLIENT)) @@ -177,11 +178,13 @@ if (lp->df_RU != NULL){ base64_init(); - lu = sizeof lp->df_RU; - base64_decode(lp->df_RU, &lu, lp->df_RU); - q = strchr(lp->df_RU, ':'); - *q = '\0'; - fprintf(fo, " %s", lp->df_RU); + lu = sizeof rubuf; + base64_decode(rubuf, lu, lp->df_RU); + q = strchr(rubuf, ':'); + if (q != NULL){ + *q = '\0'; + } + fprintf(fo, " %s", rubuf); free(lp->df_RU); lp->df_RU = NULL; } From des at projects.linpro.no Tue Sep 26 13:10:36 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 26 Sep 2006 15:10:36 +0200 (CEST) Subject: r1125 - trunk/varnish-cache/bin/varnishd Message-ID: <20060926131036.723B11EC2C3@projects.linpro.no> Author: des Date: 2006-09-26 15:10:36 +0200 (Tue, 26 Sep 2006) New Revision: 1125 Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c Log: Ignore accept() failures if errno is EAGAIN - this is not likely to happen on a production server, but it will on a test rig, and it may confuse and alarm the admin. Modified: trunk/varnish-cache/bin/varnishd/cache_acceptor.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-24 17:59:00 UTC (rev 1124) +++ trunk/varnish-cache/bin/varnishd/cache_acceptor.c 2006-09-26 13:10:36 UTC (rev 1125) @@ -157,9 +157,11 @@ l = sizeof addr; i = accept(heritage.socket, addr, &l); if (i < 0) { - VSL(SLT_Debug, heritage.socket, - "Accept failed errno=%d", errno); - /* XXX: stats ? */ + if (errno != EAGAIN) { + VSL(SLT_Debug, heritage.socket, + "Accept failed errno=%d", errno); + /* XXX: stats ? */ + } continue; } sp = SES_New(addr, l); From des at projects.linpro.no Tue Sep 26 13:12:02 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 26 Sep 2006 15:12:02 +0200 (CEST) Subject: r1126 - trunk/varnish-cache/bin/varnishd Message-ID: <20060926131202.08FDB1EC294@projects.linpro.no> Author: des Date: 2006-09-26 15:12:01 +0200 (Tue, 26 Sep 2006) New Revision: 1126 Modified: trunk/varnish-cache/bin/varnishd/Makefile.am Log: Install varnishd into the sbin directory. Modified: trunk/varnish-cache/bin/varnishd/Makefile.am =================================================================== --- trunk/varnish-cache/bin/varnishd/Makefile.am 2006-09-26 13:10:36 UTC (rev 1125) +++ trunk/varnish-cache/bin/varnishd/Makefile.am 2006-09-26 13:12:01 UTC (rev 1126) @@ -2,7 +2,7 @@ INCLUDES = -I$(top_srcdir)/include -bin_PROGRAMS = varnishd +sbin_PROGRAMS = varnishd dist_man_MANS = varnishd.1 From des at projects.linpro.no Tue Sep 26 13:31:58 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 26 Sep 2006 15:31:58 +0200 (CEST) Subject: r1127 - trunk/varnish-cache/bin/varnishd Message-ID: <20060926133158.4DC641EC294@projects.linpro.no> Author: des Date: 2006-09-26 15:31:58 +0200 (Tue, 26 Sep 2006) New Revision: 1127 Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 Log: Document management interface commands, and fix list markup. Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.1 2006-09-26 13:12:01 UTC (rev 1126) +++ trunk/varnish-cache/bin/varnishd/varnishd.1 2006-09-26 13:31:58 UTC (rev 1127) @@ -151,7 +151,7 @@ .El .Ss Hash Algorithms The following hash algorithms are available: -.Bl -tag -width=4 +.Bl -tag -width 4n .It Cm simple_list A simple doubly-linked list. Not recommended for production use. @@ -169,7 +169,7 @@ .El .Ss Storage Types The following storage types are available: -.Bl -tag -width=4 +.Bl -tag -width 4n .It Cm malloc Storage for each object is allocated with .Xr malloc 3 . @@ -209,26 +209,73 @@ will offer a command-line management interface on the specified address and port. The following commands are available: -.Bl -tag -width=4 +.Bl -tag -width 4n .It Cm dump.pool .It Cm help +Display a list of available commands. .It Cm param.set Ar param Ar value +Set the parameter specified by +.Ar param +to the specified +.Ar value . +See +.Sx Run-Time Parameters +for a list of parameters. .It Cm param.show Ar param +Display the value of the parameter specified by +.Ar param . +See +.Sx Run-Time Parameters +for a list of parameters. .It Cm param.show Op Fl l +Display a list of run-time parameters and their values. +If the +.Fl l +option is specified, the list includes a brief explanation of each +parameter. .It Cm ping Op Ns Ar timestamp +Ping the child process. .It Cm start +Start the child process if it is not already running. .It Cm stats +Display server statistics. +All the numbers presented are totals since server startup; for a +better idea of the current situation, use the +.Xr varnishstat 1 +utility. .It Cm stop +Stop the child process. .It Cm url.purge Ar regexp +Immediately invalidate all documents whos URL matches the specified +regular expression. .It Cm vcl.discard Ar configname +Discard the configuration specified by +.Ar configname . +This will have no effect if the specified configuration has a non-zero +reference count. .It Cm vcl.inline Ar configname Ar vcl +Create a new configuration named +.Ar configname +with the VCL code specified by +.Ar vcl , +which must be a quoted string. .It Cm vcl.list +List available configurations and their respective reference counts. +The active configuration is indicated with an asterisk ("*"). .It Cm vcl.load Ar configname Ar filename +Create a new configuration named +.Ar configname +with the contents of the specified file. .It Cm vcl.use Ar configname +Start using the configuration specified by +.Ar configname +for all new requests. +Existing requests will continue using whichever configuration was in +use when they arrived. .El .Ss Run-Time Parameters .\" Keep in synch with parspec[] in mgt_param.c -.Bl -tag -width=4 +.Bl -tag -width 4n .It Va auto_restart .It Va default_ttl .It Va fetch_chunksize From des at projects.linpro.no Tue Sep 26 13:52:29 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 26 Sep 2006 15:52:29 +0200 (CEST) Subject: r1128 - trunk/varnish-cache/bin/varnishd Message-ID: <20060926135229.6B5C91EC294@projects.linpro.no> Author: des Date: 2006-09-26 15:52:29 +0200 (Tue, 26 Sep 2006) New Revision: 1128 Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c Log: Correct man page reference in send_timeout description. Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c =================================================================== --- trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-26 13:31:58 UTC (rev 1127) +++ trunk/varnish-cache/bin/varnishd/mgt_param.c 2006-09-26 13:52:29 UTC (rev 1128) @@ -436,7 +436,7 @@ "Send timeout for client connections. " "If no data has been sent to the client in this many seconds, " "the session is closed.\n" - "See getopt(3) under SO_SNDTIMEO for more information.\n" + "See setsockopt(2) under SO_SNDTIMEO for more information.\n" DELAYED_EFFECT, "600", "seconds" }, { "auto_restart", tweak_auto_restart, From des at projects.linpro.no Tue Sep 26 14:27:18 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 26 Sep 2006 16:27:18 +0200 (CEST) Subject: r1129 - trunk/varnish-cache/bin/varnishd Message-ID: <20060926142718.5D42B1EC294@projects.linpro.no> Author: des Date: 2006-09-26 16:27:18 +0200 (Tue, 26 Sep 2006) New Revision: 1129 Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 Log: Document the run-time parameters. Bump date. Modified: trunk/varnish-cache/bin/varnishd/varnishd.1 =================================================================== --- trunk/varnish-cache/bin/varnishd/varnishd.1 2006-09-26 13:52:29 UTC (rev 1128) +++ trunk/varnish-cache/bin/varnishd/varnishd.1 2006-09-26 14:27:18 UTC (rev 1129) @@ -28,7 +28,7 @@ .\" .\" $Id$ .\" -.Dd September 20, 2006 +.Dd September 26, 2006 .Dt VARNISHD 1 .Os .Sh NAME @@ -277,22 +277,122 @@ .\" Keep in synch with parspec[] in mgt_param.c .Bl -tag -width 4n .It Va auto_restart +Whether to automatically restart the child process if it dies. +.Pp +The default is +.Dv on . +.It Va backend_http11 +Whether to force the use of HTTP/1.1 when requesting documents from +the server, or just use the same protocol version as the client which +triggered the retrieval. +.Pp +The default is +.Dv off . +.It Va client_http11 +Whether to force the use of HTTP/1.1 when responding to client +requests, or just use the same protocol version as that used by the +backend server which delivered the requested document. +.Pp +The default is +.Dv off . .It Va default_ttl +The default time-to-live assigned to objects if neither the backend +nor the configuration assign one. +Note that changes to this parameter are not applied retroactively. +.Pp +The default is 120 seconds. .It Va fetch_chunksize +The default chunk size used when retrieving documents for which the +backend server does not specify a content length. +.Pp +The default is 128 kilobytes. .It Va http_workspace +The size of the per-session workspace for HTTP protocol data. +For performance reasons, this space is preallocated, so any change to +this parameter will only apply to new client sessions. +.Pp +The default is 8192 bytes. .It Va listen_address +The address at which to listen for client connections. +Changes to this parameter will only take effect when the child process +is restarted. +.Pp +The default is 0.0.0.0:80. .It Va listen_depth +The depth of the TCP listen queue. +.Pp +The default is 512. +.It Va overflow_max +The maximum depth of the overflow queue as a percentage of +.Va thread_pool_max . +The overflow queue holds requests waiting for a worker thread to +become available. +If the overflow queue fills up, +.Nm +will start dropping new connections. +.Pp +The default is 100%. .It Va pipe_timeout .It Va sendfile_threshold +The size threshold beyond which documents are sent to the client using +.Xr sendfile 2 +instead of +.Xr writev 2 . +This is not likely to have any effect unless the working set is too +large to fit in physical memory. +.Pp +The default is 8192 bytes, which is probably too low. .It Va send_timeout +The time to wait before dropping the connection to a client which is +not accepting data sent to it. +.Pp +The default is 600 seconds. .It Va sess_timeout +The time to wait before dropping an idle client session. +.Pp +The default is 5 seconds. .It Va srcaddr_hash +The size of the hash table used to store per-client accounting data. +This should preferably be a prime number. +.Pp +The default is 1049. .It Va srcaddr_ttl +The length of time to keep per-client accounting records. +Setting this to 0 will disable per-client accounting. .It Va thread_pool_max +The maximum total number of worker threads. +If the number of concurrent requests rises beyond this number, +requests will start queueing up waiting for a worker thread to pick +them up. +Higher values may improve response time but will increase pressure on +the scheduler. +.Pp +The default is 1000. .It Va thread_pool_min +The minimum total number of worker threads. +Higher values may allow +.Nm +to respond faster to a sudden increase in traffic. +.Pp +The default is 1. .It Va thread_pools +The number of worker thread pools. +Higher values reduce lock contention but increase pressure on the +scheduler. +Note that a decrease of this parameter will only take effect after a +restart. +.Pp +The default is 1. .It Va thread_pool_timeout +The time to wait before killing an idle worker thread. +.Pp +The default is 120 seconds. .It Va vcl_trace +Whether to issue log entries for calls to VCL code and their results. +Note that this will generate large amounts of log data. +.Pp +The default is +.Dv off . .El .Sh SEE ALSO .Xr varnishlog 1 , From des at projects.linpro.no Tue Sep 26 14:34:39 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Tue, 26 Sep 2006 16:34:39 +0200 (CEST) Subject: r1130 - trunk/varnish-cache/lib/libvcl Message-ID: <20060926143439.6775A1EC28F@projects.linpro.no> Author: des Date: 2006-09-26 16:34:39 +0200 (Tue, 26 Sep 2006) New Revision: 1130 Modified: trunk/varnish-cache/lib/libvcl/vcc_token.c Log: Add support for C++-style comments. Modified: trunk/varnish-cache/lib/libvcl/vcc_token.c =================================================================== --- trunk/varnish-cache/lib/libvcl/vcc_token.c 2006-09-26 14:27:18 UTC (rev 1129) +++ trunk/varnish-cache/lib/libvcl/vcc_token.c 2006-09-26 14:34:39 UTC (rev 1130) @@ -313,6 +313,13 @@ continue; } + /* Skip C++-style comments */ + if (*p == '/' && p[1] == '/') { + while (p < e && *p != '\n') + p++; + continue; + } + /* Match for the fixed tokens (see token.tcl) */ u = vcl_fixed_token(p, &q); if (u != 0) { From des at projects.linpro.no Wed Sep 27 07:43:21 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 27 Sep 2006 09:43:21 +0200 (CEST) Subject: r1131 - trunk/varnish-cache/include Message-ID: <20060927074321.021AD1EC28E@projects.linpro.no> Author: des Date: 2006-09-27 09:43:21 +0200 (Wed, 27 Sep 2006) New Revision: 1131 Modified: trunk/varnish-cache/include/stat_field.h Log: recyles -> recycles Ticket: #46 Modified: trunk/varnish-cache/include/stat_field.h =================================================================== --- trunk/varnish-cache/include/stat_field.h 2006-09-26 14:34:39 UTC (rev 1130) +++ trunk/varnish-cache/include/stat_field.h 2006-09-27 07:43:21 UTC (rev 1131) @@ -37,7 +37,7 @@ MAC_STAT(cache_miss, uint64_t, "u", "Cache misses") MAC_STAT(backend_conn, uint64_t, "u", "Backend connections initiated") -MAC_STAT(backend_recycle, uint64_t, "u", "Backend connections recyles") +MAC_STAT(backend_recycle, uint64_t, "u", "Backend connections recycles") MAC_STAT(backend_unused, uint64_t, "u", "Backend connections unused") MAC_STAT(n_srcaddr, uint64_t, "u", "N struct srcaddr") From des at projects.linpro.no Wed Sep 27 13:32:19 2006 From: des at projects.linpro.no (des at projects.linpro.no) Date: Wed, 27 Sep 2006 15:32:19 +0200 (CEST) Subject: r1132 - trunk/varnish-cache Message-ID: <20060927133219.191C61EC28E@projects.linpro.no> Author: des Date: 2006-09-27 15:32:18 +0200 (Wed, 27 Sep 2006) New Revision: 1132 Modified: trunk/varnish-cache/configure.ac Log: Turn off all optimization when building with debugging symbols. Apparently, just -O is not enough to prevent gcc from optimizing away loop variables. Modified: trunk/varnish-cache/configure.ac =================================================================== --- trunk/varnish-cache/configure.ac 2006-09-27 07:43:21 UTC (rev 1131) +++ trunk/varnish-cache/configure.ac 2006-09-27 13:32:18 UTC (rev 1132) @@ -21,7 +21,7 @@ CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}") AC_ARG_ENABLE(debugging-symbols, AS_HELP_STRING([--enable-debugging-symbols],[enable debugging symbols (default is NO)]), - CFLAGS="${CFLAGS} -O -g -fno-inline") + CFLAGS="${CFLAGS} -O0 -g -fno-inline") AC_ARG_ENABLE(werror, AS_HELP_STRING([--enable-werror],[use -Werror (default is NO)]), CFLAGS="${CFLAGS} -Werror") From phk at projects.linpro.no Fri Sep 29 18:37:02 2006 From: phk at projects.linpro.no (phk at projects.linpro.no) Date: Fri, 29 Sep 2006 20:37:02 +0200 (CEST) Subject: r1133 - trunk/varnish-cache/bin/varnishd Message-ID: <20060929183702.5E1541EC29D@projects.linpro.no> Author: phk Date: 2006-09-29 20:37:02 +0200 (Fri, 29 Sep 2006) New Revision: 1133 Modified: trunk/varnish-cache/bin/varnishd/cache_pipe.c Log: Don't suffer if one side of a piped connection keeps blasting away. Modified: trunk/varnish-cache/bin/varnishd/cache_pipe.c =================================================================== --- trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-09-27 13:32:18 UTC (rev 1132) +++ trunk/varnish-cache/bin/varnishd/cache_pipe.c 2006-09-29 18:37:02 UTC (rev 1133) @@ -49,7 +49,7 @@ char buf[BUFSIZ]; i = read(fds[idx].fd, buf, sizeof buf); - if (i <= 0) { + if (i <= 0 || fds[1-idx].events == 0) { VSL(SLT_Debug, fds[idx].fd, "Pipe Shut read(read)"); VSL(SLT_Debug, fds[1-idx].fd, "Pipe Shut write(read)"); shutdown(fds[idx].fd, SHUT_RD);