From owner-p4-projects@FreeBSD.ORG Wed Nov 26 01:34:46 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9C5091065675; Wed, 26 Nov 2008 01:34:46 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60A031065672 for ; Wed, 26 Nov 2008 01:34:46 +0000 (UTC) (envelope-from zec@tel.fer.hr) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 51E198FC18 for ; Wed, 26 Nov 2008 01:34:46 +0000 (UTC) (envelope-from zec@tel.fer.hr) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id mAQ1Yj2F071720 for ; Wed, 26 Nov 2008 01:34:45 GMT (envelope-from zec@tel.fer.hr) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id mAQ1YjvJ071718 for perforce@freebsd.org; Wed, 26 Nov 2008 01:34:45 GMT (envelope-from zec@tel.fer.hr) Date: Wed, 26 Nov 2008 01:34:45 GMT Message-Id: <200811260134.mAQ1YjvJ071718@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@tel.fer.hr using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 153568 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2008 01:34:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=153568 Change 153568 by zec@zec_tca51 on 2008/11/26 01:33:45 Unbreak LINT / VLINT builds as well. It looks like saorder_state_any and saorder_state_alive variables are de facto const, so revert them back from V_ to plain globals. Hmm... Affected files ... .. //depot/projects/vimage/src/sys/netipsec/key.c#30 edit .. //depot/projects/vimage/src/sys/netipsec/keysock.c#20 edit .. //depot/projects/vimage/src/sys/netipsec/vipsec.h#18 edit Differences ... ==== //depot/projects/vimage/src/sys/netipsec/key.c#30 (text+ko) ==== @@ -2699,9 +2699,9 @@ /* searching all SA registerd in the secindex. */ for (stateidx = 0; - stateidx < _ARRAYLEN(V_saorder_state_any); + stateidx < _ARRAYLEN(saorder_state_any); stateidx++) { - u_int state = V_saorder_state_any[stateidx]; + u_int state = saorder_state_any[stateidx]; LIST_FOREACH_SAFE(sav, &sah->savtree[state], chain, nextsav) { if (sav->refcnt == 0) { /* sanity check */ @@ -2985,10 +2985,10 @@ SAHTREE_LOCK_ASSERT(); /* search all status */ for (stateidx = 0; - stateidx < _ARRAYLEN(V_saorder_state_alive); + stateidx < _ARRAYLEN(saorder_state_alive); stateidx++) { - state = V_saorder_state_alive[stateidx]; + state = saorder_state_alive[stateidx]; LIST_FOREACH(sav, &sah->savtree[state], chain) { /* sanity check */ @@ -5315,9 +5315,9 @@ /* Delete all non-LARVAL SAs. */ for (stateidx = 0; - stateidx < _ARRAYLEN(V_saorder_state_alive); + stateidx < _ARRAYLEN(saorder_state_alive); stateidx++) { - state = V_saorder_state_alive[stateidx]; + state = saorder_state_alive[stateidx]; if (state == SADB_SASTATE_LARVAL) continue; for (sav = LIST_FIRST(&sah->savtree[state]); @@ -6520,9 +6520,9 @@ continue; for (stateidx = 0; - stateidx < _ARRAYLEN(V_saorder_state_alive); + stateidx < _ARRAYLEN(saorder_state_alive); stateidx++) { - state = V_saorder_state_any[stateidx]; + state = saorder_state_any[stateidx]; for (sav = LIST_FIRST(&sah->savtree[state]); sav != NULL; sav = nextsav) { @@ -6605,9 +6605,9 @@ continue; for (stateidx = 0; - stateidx < _ARRAYLEN(V_saorder_state_any); + stateidx < _ARRAYLEN(saorder_state_any); stateidx++) { - state = V_saorder_state_any[stateidx]; + state = saorder_state_any[stateidx]; LIST_FOREACH(sav, &sah->savtree[state], chain) { cnt++; } @@ -6635,9 +6635,9 @@ } for (stateidx = 0; - stateidx < _ARRAYLEN(V_saorder_state_any); + stateidx < _ARRAYLEN(saorder_state_any); stateidx++) { - state = V_saorder_state_any[stateidx]; + state = saorder_state_any[stateidx]; LIST_FOREACH(sav, &sah->savtree[state], chain) { n = key_setdumpsa(sav, SADB_DUMP, satype, --cnt, mhp->msg->sadb_msg_pid); ==== //depot/projects/vimage/src/sys/netipsec/keysock.c#20 (text+ko) ==== @@ -66,11 +66,6 @@ #include -struct key_cb { - int key_count; - int any_count; -}; - #ifdef VIMAGE_GLOBALS static struct key_cb key_cb; struct pfkeystat pfkeystat; ==== //depot/projects/vimage/src/sys/netipsec/vipsec.h#18 (text+ko) ==== @@ -80,8 +80,6 @@ int _key_preferred_oldsa; u_int32_t _acq_seq; - u_int _saorder_state_alive[3]; - u_int _saorder_state_any[4]; int _esp_enable; struct espstat _espstat; int _esp_max_ivlen; @@ -175,8 +173,6 @@ #define V_policy_id VNET_IPSEC(policy_id) #define V_regtree VNET_IPSEC(regtree) #define V_sahtree VNET_IPSEC(sahtree) -#define V_saorder_state_alive VNET_IPSEC(saorder_state_alive) -#define V_saorder_state_any VNET_IPSEC(saorder_state_any) #define V_spacqtree VNET_IPSEC(spacqtree) #define V_sptree VNET_IPSEC(sptree)