r4376 - in trunk/varnish-cache: bin/varnishd bin/varnishtest/tests include lib/libvcl

phk at projects.linpro.no phk at projects.linpro.no
Fri Nov 27 12:06:32 CET 2009


Author: phk
Date: 2009-11-27 12:06:32 +0100 (Fri, 27 Nov 2009)
New Revision: 4376

Modified:
   trunk/varnish-cache/bin/varnishd/cache.h
   trunk/varnish-cache/bin/varnishd/cache_ban.c
   trunk/varnish-cache/bin/varnishd/cache_center.c
   trunk/varnish-cache/bin/varnishd/cache_hash.c
   trunk/varnish-cache/bin/varnishd/cache_vrt.c
   trunk/varnish-cache/bin/varnishd/hash_classic.c
   trunk/varnish-cache/bin/varnishd/hash_critbit.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_param.c
   trunk/varnish-cache/bin/varnishtest/tests/c00007.vtc
   trunk/varnish-cache/bin/varnishtest/tests/c00019.vtc
   trunk/varnish-cache/include/cli.h
   trunk/varnish-cache/include/purge_vars.h
   trunk/varnish-cache/include/vcl.h
   trunk/varnish-cache/include/vrt_obj.h
   trunk/varnish-cache/lib/libvcl/vcc_action.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_obj.c
Log:
Eliminate the obj.hash hack.

This was originally a quick hack to allow purging to take the Host:
header into account.

We have a much better and precisely expressive purge syntax now, so
this hack can die.



Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/bin/varnishd/cache.h	2009-11-27 11:06:32 UTC (rev 4376)
@@ -423,12 +423,6 @@
 	struct acct		acct;
 	struct acct		acct_req;
 
-	/* pointers to hash string components */
-	unsigned		nhashptr;
-	unsigned		ihashptr;
-	unsigned		lhashptr;
-	const char		**hashptr;
-
 #if defined(HAVE_EPOLL_CTL)
 	struct epoll_event ev;
 #endif

Modified: trunk/varnish-cache/bin/varnishd/cache_ban.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_ban.c	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/bin/varnishd/cache_ban.c	2009-11-27 11:06:32 UTC (rev 4376)
@@ -160,18 +160,6 @@
 }
 
 static int
-ban_cond_hash(const struct ban_test *bt, const struct object *o,
-   const struct sess *sp)
-{
-	(void)sp;
-	CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC);
-	CHECK_OBJ_NOTNULL(o->objcore, OBJCORE_MAGIC);
-	CHECK_OBJ_NOTNULL(o->objcore->objhead, OBJHEAD_MAGIC);
-	AN(o->objcore->objhead->hash);
-	return(ban_cond_str(bt, o->objcore->objhead->hash));
-}
-
-static int
 ban_cond_req_http(const struct ban_test *bt, const struct object *o,
    const struct sess *sp)
 {
@@ -759,24 +747,12 @@
 static void
 ccf_purge_hash(struct cli *cli, const char * const *av, void *priv)
 {
-	const char *aav[6];
 
+	(void)av;
 	(void)priv;
-	if (!save_hash) {
-		cli_out(cli,
-		    "purge.hash not possible.\n"
-		    "Set the \"purge_hash\" parameter to on\n"
-		    "and restart the varnish worker process to enable.\n");
-		cli_result(cli, CLIS_CANT);
-		return;
-	}
-	aav[0] = NULL;
-	aav[1] = "purge";
-	aav[2] = "obj.hash";
-	aav[3] = "~";
-	aav[4] = av[2];
-	aav[5] = NULL;
-	ccf_purge(cli, aav, priv);
+	cli_out(cli, "purge.hash is no longer supported.\n");
+	cli_result(cli, CLIS_CANT);
+	return;
 }
 
 static void
@@ -819,10 +795,10 @@
 	 * XXX: COMPAT: to stay compatible with 1.x series syntax.
 	 */
 	{ CLI_HIDDEN("url.purge", 1, 1)		ccf_purge_url },
-	{ CLI_HIDDEN("hash.purge", 1, 1)	ccf_purge_hash },
+	{ CLI_HIDDEN("hash.purge", 0, 1)	ccf_purge_hash },
+	{ CLI_HIDDEN("purge.hash", 0, 1)	ccf_purge_hash },
 
 	{ CLI_PURGE_URL,			ccf_purge_url },
-	{ CLI_PURGE_HASH,			ccf_purge_hash },
 	{ CLI_PURGE,				ccf_purge },
 	{ CLI_PURGE_LIST,			ccf_purge_list },
 	{ NULL }

Modified: trunk/varnish-cache/bin/varnishd/cache_center.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_center.c	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/bin/varnishd/cache_center.c	2009-11-27 11:06:32 UTC (rev 4376)
@@ -776,7 +776,7 @@
 	CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC);
 
 	if (sp->obj == NULL) {
-		HSH_BeforeVclHash(sp, sp->vcl->nhashcount);
+		HSH_BeforeVclHash(sp);
 		VCL_hash_method(sp);
 		assert(sp->handling == VCL_RET_HASH);
 		HSH_AfterVclHash(sp);

Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_hash.c	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/bin/varnishd/cache_hash.c	2009-11-27 11:06:32 UTC (rev 4376)
@@ -71,7 +71,6 @@
 #include "cache_backend.h"
 
 static const struct hash_slinger *hash;
-unsigned	save_hash;
 
 double
 HSH_Grace(double g)
@@ -157,7 +156,6 @@
 	assert(VTAILQ_EMPTY(&oh->objcs));
 	Lck_Delete(&oh->mtx);
 	w->stats.n_objecthead--;
-	free(oh->hash);
 	FREE_OBJ(oh);
 }
 
@@ -174,51 +172,10 @@
 }
 
 void
-HSH_Copy(const struct sess *sp, struct objhead *oh)
+HSH_BeforeVclHash(const struct sess *sp)
 {
-	unsigned u, v;
-	char *b;
 
-	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
-	CHECK_OBJ_NOTNULL(oh, OBJHEAD_MAGIC);
-	if (!save_hash)
-		return;
-
-	oh->hash = malloc(sp->lhashptr);
-	XXXAN(oh->hash);
-	b = oh->hash;
-	for (u = 0; u < sp->ihashptr; u += 2) {
-		v = pdiff(sp->hashptr[u], sp->hashptr[u + 1]);
-		memcpy(b, sp->hashptr[u], v);
-		b += v;
-		*b++ = '#';
-	}
-	*b++ = '\0';
-	assert(b <= oh->hash + sp->lhashptr);
-}
-
-void
-HSH_BeforeVclHash(struct sess *sp, unsigned nhashcount)
-{
-	char *p;
-	unsigned u;
-
 	SHA256_Init(sp->wrk->sha256ctx);
-	if (!save_hash)
-		return;
-
-	/* Allocate the pointers we need, align properly. */
-	sp->lhashptr = 1;       /* space for NUL */
-	sp->ihashptr = 0;
-	sp->nhashptr = nhashcount * 2;
-	p = WS_Alloc(sp->http->ws, sizeof(const char *) * (sp->nhashptr + 1L));
-	XXXAN(p);
-	/* Align pointer properly (?) */
-	u = (uintptr_t)p;
-	u &= sizeof(const char *) - 1;
-	if (u)
-		p += sizeof(const char *) - u;
-	sp->hashptr = (void*)p;
 }
 
 void
@@ -230,7 +187,7 @@
 }
 
 void
-HSH_AddString(struct sess *sp, const char *str)
+HSH_AddString(const struct sess *sp, const char *str)
 {
 	int l;
 
@@ -243,21 +200,6 @@
 
 	if (params->log_hash)
 		WSP(sp, SLT_Hash, "%s", str);
-
-	if (!save_hash)
-		return;
-
-	/*
-	* XXX: handle this by bouncing sp->vcl->nhashcount when it fails
-	* XXX: and dispose of this request either by reallocating the
-	* XXX: hashptr (if possible) or restarting/error the request
-	*/
-	xxxassert(sp->ihashptr < sp->nhashptr);
-
-	sp->hashptr[sp->ihashptr] = str;
-	sp->hashptr[sp->ihashptr + 1] = str + l;
-	sp->ihashptr += 2;
-	sp->lhashptr += l + 1;
 }
 
 /**********************************************************************
@@ -495,7 +437,7 @@
 			VTAILQ_INSERT_TAIL(&oh->waitinglist, sp, list);
 		if (params->diag_bitmap & 0x20)
 			WSP(sp, SLT_Debug,
-				"on waiting list <%s>", oh->hash);
+				"on waiting list <%p>", oh);
 		SES_Charge(sp);
 		sp->objhead = oh;
 		sp->wrk = NULL;
@@ -734,7 +676,6 @@
 {
 
 	assert(DIGEST_LEN == SHA256_LEN);	/* avoid #include pollution */
-	save_hash = params->save_hash;
 	hash = heritage.hash;
 	if (hash->start != NULL)
 		hash->start();

Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vrt.c	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/bin/varnishd/cache_vrt.c	2009-11-27 11:06:32 UTC (rev 4376)
@@ -777,21 +777,6 @@
 	return (TIM_real() - sp->obj->last_use);
 }
 
-const char *
-VRT_r_obj_hash(const struct sess *sp)
-{
-
-	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
-	if (sp->obj == NULL)
-		return (NULL);
-	CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
-	if (sp->obj->objcore == NULL)
-		return (NULL);
-	CHECK_OBJ_NOTNULL(sp->obj->objcore, OBJCORE_MAGIC);
-	CHECK_OBJ_NOTNULL(sp->obj->objcore->objhead, OBJHEAD_MAGIC);
-	return (sp->obj->objcore->objhead->hash);
-}
-
 unsigned
 VRT_r_req_backend_healthy(const struct sess *sp)
 {

Modified: trunk/varnish-cache/bin/varnishd/hash_classic.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/hash_classic.c	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/bin/varnishd/hash_classic.c	2009-11-27 11:06:32 UTC (rev 4376)
@@ -150,8 +150,6 @@
 
 	noh->hoh_head = hp;
 
-	HSH_Copy(sp, noh);
-
 	Lck_Unlock(&hp->mtx);
 	return (noh);
 }

Modified: trunk/varnish-cache/bin/varnishd/hash_critbit.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/hash_critbit.c	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/bin/varnishd/hash_critbit.c	2009-11-27 11:06:32 UTC (rev 4376)
@@ -297,10 +297,9 @@
 		return;
 	if (hcb_is_node(p)) {
 		oh = hcb_l_node(p);
-		cli_out(cli, "%*.*sN %d r%u <%02x%02x%02x...> <%s>\n",
+		cli_out(cli, "%*.*sN %d r%u <%02x%02x%02x...>\n",
 		    indent, indent, "", indent / 2, oh->refcnt,
-		    oh->digest[0], oh->digest[1], oh->digest[2],
-		    oh->hash);
+		    oh->digest[0], oh->digest[1], oh->digest[2]);
 		return;
 	}
 	assert(hcb_is_y(p));
@@ -424,6 +423,7 @@
 	struct objhead *oh;
 	unsigned u;
 
+	(void)sp;
 	oh =  hcb_insert(&hcb_root, noh, 0);
 	if (oh != NULL) {
 		/* Assert that we didn't muck with the tree without lock */
@@ -447,7 +447,6 @@
 	 * Try again, holding lock and fully ready objhead, so that if
 	 * somebody else beats us back, they do not get surprised.
 	 */
-	HSH_Copy(sp, noh);
 	Lck_Lock(&hcb_mtx);
 	assert(noh->refcnt == 1);
 	oh =  hcb_insert(&hcb_root, noh, 1);
@@ -458,8 +457,6 @@
 #endif
 	} else {
 		CHECK_OBJ_NOTNULL(noh, OBJHEAD_MAGIC);
-		free(noh->hash);
-		noh->hash = NULL;
 		VSL_stats->hcb_lock++;
 #ifdef PHK
 		fprintf(stderr, "hcb_lookup %d\n", __LINE__);

Modified: trunk/varnish-cache/bin/varnishd/hash_simple_list.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/hash_simple_list.c	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/bin/varnishd/hash_simple_list.c	2009-11-27 11:06:32 UTC (rev 4376)
@@ -91,8 +91,6 @@
 	else
 		VTAILQ_INSERT_TAIL(&hsl_head, noh, hoh_list);
 
-	HSH_Copy(sp, noh);
-
 	Lck_Unlock(&hsl_mtx);
 	return (noh);
 }

Modified: trunk/varnish-cache/bin/varnishd/hash_slinger.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/hash_slinger.h	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/bin/varnishd/hash_slinger.h	2009-11-27 11:06:32 UTC (rev 4376)
@@ -54,15 +54,14 @@
 void HSH_Prealloc(const struct sess *sp);
 void HSH_Cleanup(struct worker *w);
 void HSH_Freestore(struct object *o);
-void HSH_Copy(const struct sess *sp, struct objhead *o);
 struct objcore *HSH_Lookup(struct sess *sp, struct objhead **poh);
 void HSH_Unbusy(const struct sess *sp);
 void HSH_Ref(struct object *o);
 void HSH_Drop(struct sess *sp);
 double HSH_Grace(double g);
 void HSH_Init(void);
-void HSH_AddString(struct sess *sp, const char *str);
-void HSH_BeforeVclHash(struct sess *sp, unsigned hashcount);
+void HSH_AddString(const struct sess *sp, const char *str);
+void HSH_BeforeVclHash(const struct sess *sp);
 void HSH_AfterVclHash(const struct sess *sp);
 void HSH_DerefObjCore(struct sess *sp);
 void HSH_FindBan(struct sess *sp, struct objcore **oc);
@@ -79,7 +78,6 @@
 	struct lock		mtx;
 	unsigned		refcnt;
 	VTAILQ_HEAD(,objcore)	objcs;
-	char			*hash;
 	unsigned char		digest[DIGEST_LEN];
 	union {
 		VTAILQ_HEAD(, sess)	__u_waitinglist;
@@ -103,7 +101,6 @@
 #define hoh_head u.n.u_n_hoh_head
 };
 
-extern unsigned	save_hash;
 void HSH_DeleteObjHead(struct worker *w, struct objhead *oh);
 void HSH_Deref(struct worker *w, struct object **o);
 #endif /* VARNISH_CACHE_CHILD */

Modified: trunk/varnish-cache/bin/varnishd/heritage.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/heritage.h	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/bin/varnishd/heritage.h	2009-11-27 11:06:32 UTC (rev 4376)
@@ -176,9 +176,6 @@
 	/* Log hash string to shm */
 	unsigned		log_hash;
 
-	/* Log hash string to shm */
-	unsigned		save_hash;
-
 	/* Log local socket address to shm */
 	unsigned		log_local_addr;
 

Modified: trunk/varnish-cache/bin/varnishd/mgt_param.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_param.c	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/bin/varnishd/mgt_param.c	2009-11-27 11:06:32 UTC (rev 4376)
@@ -712,12 +712,6 @@
 		"Log the hash string to shared memory log.\n",
 		0,
 		"off", "bool" },
-	{ "purge_hash", tweak_bool, &master.save_hash, 0, 0,
-		"Enable purge.hash command.\n"
-		"NB: this increases storage requirement per object "
-		"by the length of the hash string.\n",
-		MUST_RESTART,
-		"off", "bool" },
 	{ "log_local_address", tweak_bool, &master.log_local_addr, 0, 0,
 		"Log the local address on the TCP connection in the "
 		"SessionOpen shared memory record.\n",

Modified: trunk/varnish-cache/bin/varnishtest/tests/c00007.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/c00007.vtc	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/bin/varnishtest/tests/c00007.vtc	2009-11-27 11:06:32 UTC (rev 4376)
@@ -2,37 +2,4 @@
 
 test "Test banning a hash"
 
-server s1 {
-	rxreq
-	expect req.url == "/foo"
-	txresp -body "1111\n"
-	rxreq
-	expect req.url == "/foo"
-	txresp -body "11111\n"
-} -start
-
-varnish v1 -arg "-ppurge_hash=off" -vcl+backend { } -start
-varnish v1 -clierr 300 "purge.hash foo"
-varnish v1 -stop
-varnish v1 -cliok "param.set purge_hash on"
-varnish v1 -start
-
-client c1 {
-	txreq -url "/foo"
-	rxresp
-	expect resp.status == 200
-	expect resp.http.content-length == 5
-} 
-
-client c1 -run
-
-varnish v1 -cliok "purge.hash foo"
-
-client c1 {
-	txreq -url "/foo"
-	rxresp
-	expect resp.status == 200
-	expect resp.http.content-length == 6
-}
-
-client c1 -run
+varnish v1 -arg "-b 127.0.0.1:80 -a 127.0.0.1:0" -start -clierr 300 "purge.hash foo"

Modified: trunk/varnish-cache/bin/varnishtest/tests/c00019.vtc
===================================================================
--- trunk/varnish-cache/bin/varnishtest/tests/c00019.vtc	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/bin/varnishtest/tests/c00019.vtc	2009-11-27 11:06:32 UTC (rev 4376)
@@ -13,7 +13,7 @@
 	txresp -hdr "foo: 3" -body "foo3"
 } -start
 
-varnish v1 -arg "-p purge_hash=on" -vcl+backend {} -start
+varnish v1 -vcl+backend {} -start
 
 varnish v1 -cliok "purge.url FOO"
 
@@ -61,8 +61,8 @@
 } -run
 
 
-# Now add another two purge, the hash should not be hit.
-varnish v1 -cliok "purge.hash FOO"
+# Now add another two purges, Kilroy should not be hit
+varnish v1 -cliok "purge.url KILROY"
 varnish v1 -cliok "purge.url FOO"
 varnish v1 -expect n_purge_add == 5
 

Modified: trunk/varnish-cache/include/cli.h
===================================================================
--- trunk/varnish-cache/include/cli.h	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/include/cli.h	2009-11-27 11:06:32 UTC (rev 4376)
@@ -67,13 +67,6 @@
 	    "marked obsolete.",						\
 	1, 1
 
-#define CLI_PURGE_HASH							\
-	"purge.hash",							\
-	"purge.hash <regexp>",						\
-	"\tAll objects where the hash string matches regexp will be "	\
-	    "marked obsolete.",						\
-	1, 1
-
 #define CLI_PURGE							\
 	"purge",							\
 	"purge <field> <operator> <arg> [&& <field> <oper> <arg>]...",	\

Modified: trunk/varnish-cache/include/purge_vars.h
===================================================================
--- trunk/varnish-cache/include/purge_vars.h	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/include/purge_vars.h	2009-11-27 11:06:32 UTC (rev 4376)
@@ -35,6 +35,5 @@
 #define PVAR_REQ	2
 
 PVAR("req.url",		PVAR_REQ,		ban_cond_url)
-PVAR("obj.hash",	0,			ban_cond_hash)
 PVAR("req.http.",	PVAR_REQ|PVAR_HTTP,	ban_cond_req_http)
 PVAR("obj.http.",	PVAR_HTTP,		ban_cond_obj_http)

Modified: trunk/varnish-cache/include/vcl.h
===================================================================
--- trunk/varnish-cache/include/vcl.h	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/include/vcl.h	2009-11-27 11:06:32 UTC (rev 4376)
@@ -53,8 +53,6 @@
 	const char	**srcname;
 	const char	**srcbody;
 
-	unsigned	nhashcount;
-
 	vcl_init_f	*init_func;
 	vcl_fini_f	*fini_func;
 

Modified: trunk/varnish-cache/include/vrt_obj.h
===================================================================
--- trunk/varnish-cache/include/vrt_obj.h	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/include/vrt_obj.h	2009-11-27 11:06:32 UTC (rev 4376)
@@ -66,7 +66,6 @@
 double VRT_r_obj_grace(const struct sess *);
 void VRT_l_obj_grace(const struct sess *, double);
 double VRT_r_obj_lastuse(const struct sess *);
-const char * VRT_r_obj_hash(const struct sess *);
 const char * VRT_r_resp_proto(const struct sess *);
 void VRT_l_resp_proto(const struct sess *, const char *, ...);
 int VRT_r_resp_status(const struct sess *);

Modified: trunk/varnish-cache/lib/libvcl/vcc_action.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_action.c	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/lib/libvcl/vcc_action.c	2009-11-27 11:06:32 UTC (rev 4376)
@@ -269,7 +269,6 @@
 		 * variable, so that varnishd can preallocate the worst case
 		 * number of slots for composing the hash string.
 		 */
-		tl->nhashcount++;
 		break;
 	case STRING:
 		if (tl->t->tok != '=') {

Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_compile.c	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/lib/libvcl/vcc_compile.c	2009-11-27 11:06:32 UTC (rev 4376)
@@ -357,7 +357,6 @@
 	Fc(tl, 0, "\t.nsrc = %u,\n", tl->nsources);
 	Fc(tl, 0, "\t.srcname = srcname,\n");
 	Fc(tl, 0, "\t.srcbody = srcbody,\n");
-	Fc(tl, 0, "\t.nhashcount = %u,\n", tl->nhashcount);
 #define VCL_MET_MAC(l,u,b) \
 	Fc(tl, 0, "\t." #l "_func = VGC_function_vcl_" #l ",\n");
 #include "vcl_returns.h"

Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.h
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_compile.h	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/lib/libvcl/vcc_compile.h	2009-11-27 11:06:32 UTC (rev 4376)
@@ -90,7 +90,6 @@
 	VTAILQ_HEAD(, acl_e)	acl;
 
 	unsigned		recnt;
-	unsigned		nhashcount;
 	unsigned		nsockaddr;
 };
 

Modified: trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/lib/libvcl/vcc_fixed_token.c	2009-11-27 11:06:32 UTC (rev 4376)
@@ -1,5 +1,5 @@
 /*
- * $Id: vcc_gen_fixed_token.tcl 4236 2009-09-14 08:47:03Z phk $
+ * $Id: vcc_gen_fixed_token.tcl 4358 2009-11-19 19:03:25Z phk $
  *
  * NB:  This file is machine generated, DO NOT EDIT!
  *
@@ -159,8 +159,8 @@
 
 	/* ../../include/vcl.h */
 
-	vsb_cat(sb, "/*\n * $Id: vcc_gen_fixed_token.tcl 4236 2009-09-14 08");
-	vsb_cat(sb, ":47:03Z phk $\n *\n * NB:  This file is machine genera");
+	vsb_cat(sb, "/*\n * $Id: vcc_gen_fixed_token.tcl 4358 2009-11-19 19");
+	vsb_cat(sb, ":03:25Z phk $\n *\n * NB:  This file is machine genera");
 	vsb_cat(sb, "ted, DO NOT EDIT!\n *\n * Edit and run vcc_gen_fixed_t");
 	vsb_cat(sb, "oken.tcl instead\n */\n\nstruct sess;\n");
 	vsb_cat(sb, "struct cli;\n\ntypedef void vcl_init_f(struct cli *);\n");
@@ -188,14 +188,13 @@
 	vsb_cat(sb, "\tunsigned\tnref;\n\tunsigned\tbusy;\n");
 	vsb_cat(sb, "\tunsigned\tdiscard;\n\n\tunsigned\tnsrc;\n");
 	vsb_cat(sb, "\tconst char\t**srcname;\n\tconst char\t**srcbody;\n");
-	vsb_cat(sb, "\n\tunsigned\tnhashcount;\n\n\tvcl_init_f\t*init_func;");
-	vsb_cat(sb, "\n\tvcl_fini_f\t*fini_func;\n\n");
-	vsb_cat(sb, "\tvcl_func_f\t*recv_func;\n\tvcl_func_f\t*pipe_func;\n");
-	vsb_cat(sb, "\tvcl_func_f\t*pass_func;\n\tvcl_func_f\t*hash_func;\n");
-	vsb_cat(sb, "\tvcl_func_f\t*miss_func;\n\tvcl_func_f\t*hit_func;\n");
-	vsb_cat(sb, "\tvcl_func_f\t*fetch_func;\n\tvcl_func_f\t*deliver_fun");
-	vsb_cat(sb, "c;\n\tvcl_func_f\t*error_func;\n");
-	vsb_cat(sb, "};\n");
+	vsb_cat(sb, "\n\tvcl_init_f\t*init_func;\n\tvcl_fini_f\t*fini_func;");
+	vsb_cat(sb, "\n\n\tvcl_func_f\t*recv_func;\n");
+	vsb_cat(sb, "\tvcl_func_f\t*pipe_func;\n\tvcl_func_f\t*pass_func;\n");
+	vsb_cat(sb, "\tvcl_func_f\t*hash_func;\n\tvcl_func_f\t*miss_func;\n");
+	vsb_cat(sb, "\tvcl_func_f\t*hit_func;\n\tvcl_func_f\t*fetch_func;\n");
+	vsb_cat(sb, "\tvcl_func_f\t*deliver_func;\n\tvcl_func_f\t*error_fun");
+	vsb_cat(sb, "c;\n};\n");
 
 	/* ../../include/vrt.h */
 
@@ -319,8 +318,8 @@
 
 	/* ../../include/vrt_obj.h */
 
-	vsb_cat(sb, "/*\n * $Id: vcc_gen_fixed_token.tcl 4236 2009-09-14 08");
-	vsb_cat(sb, ":47:03Z phk $\n *\n * NB:  This file is machine genera");
+	vsb_cat(sb, "/*\n * $Id: vcc_gen_fixed_token.tcl 4358 2009-11-19 19");
+	vsb_cat(sb, ":03:25Z phk $\n *\n * NB:  This file is machine genera");
 	vsb_cat(sb, "ted, DO NOT EDIT!\n *\n * Edit and run vcc_gen_fixed_t");
 	vsb_cat(sb, "oken.tcl instead\n */\n\nstruct sockaddr * VRT_r_clien");
 	vsb_cat(sb, "t_ip(const struct sess *);\nstruct sockaddr * VRT_r_se");
@@ -384,7 +383,6 @@
 	vsb_cat(sb, "double VRT_r_obj_grace(const struct sess *);\n");
 	vsb_cat(sb, "void VRT_l_obj_grace(const struct sess *, double);\n");
 	vsb_cat(sb, "double VRT_r_obj_lastuse(const struct sess *);\n");
-	vsb_cat(sb, "const char * VRT_r_obj_hash(const struct sess *);\n");
 	vsb_cat(sb, "const char * VRT_r_resp_proto(const struct sess *);\n");
 	vsb_cat(sb, "void VRT_l_resp_proto(const struct sess *, const char ");
 	vsb_cat(sb, "*, ...);\nint VRT_r_resp_status(const struct sess *);\n");

Modified: trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl	2009-11-27 11:06:32 UTC (rev 4376)
@@ -303,11 +303,6 @@
 	{ hit deliver error }
 	"const struct sess *"
     }
-    { obj.hash				STRING
-	RO
-	{ miss hit deliver error }
-	"const struct sess *"
-    }
 
     #######################################################################
     # The response we send back
@@ -584,8 +579,6 @@
 	const char	**srcname;
 	const char	**srcbody;
 
-	unsigned	nhashcount;
-
 	vcl_init_f	*init_func;
 	vcl_fini_f	*fini_func;
 }

Modified: trunk/varnish-cache/lib/libvcl/vcc_obj.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_obj.c	2009-11-27 10:53:56 UTC (rev 4375)
+++ trunk/varnish-cache/lib/libvcl/vcc_obj.c	2009-11-27 11:06:32 UTC (rev 4376)
@@ -1,5 +1,5 @@
 /*
- * $Id: vcc_gen_fixed_token.tcl 4236 2009-09-14 08:47:03Z phk $
+ * $Id: vcc_gen_fixed_token.tcl 4358 2009-11-19 19:03:25Z phk $
  *
  * NB:  This file is machine generated, DO NOT EDIT!
  *
@@ -279,12 +279,6 @@
 	    V_RO,	    0,
 	    VCL_MET_HIT | VCL_MET_DELIVER | VCL_MET_ERROR
 	},
-	{ "obj.hash", STRING, 8,
-	    "VRT_r_obj_hash(sp)",
-	    NULL,
-	    V_RO,	    0,
-	    VCL_MET_MISS | VCL_MET_HIT | VCL_MET_DELIVER | VCL_MET_ERROR
-	},
 	{ "resp.proto", STRING, 10,
 	    "VRT_r_resp_proto(sp)",
 	    "VRT_l_resp_proto(sp, ",



More information about the varnish-commit mailing list