[ntp:bk-ntp-stable-send] BitKeeper patch
Harlan Stenn
stenn at whimsy.udel.edu
Sat Nov 29 15:54:43 PST 2003
This BitKeeper patch contains the following changesets:
stenn at whimsy.udel.edu|ChangeSet|20031129235320|15471
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# ID: stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
# User: stenn
# Host: whimsy.udel.edu
# Root: /backroom/ntp-stable
#
#--- 1.94/include/ntp.h Tue Nov 25 15:08:10 2003
#+++ 1.95/include/ntp.h Sat Nov 29 18:52:38 2003
#@@ -656,9 +656,9 @@
# * To speed lookups, peers are hashed by the low order bits of the
# * remote IP address. These definitions relate to that.
# */
#-#define HASH_SIZE 128
#-#define HASH_MASK (HASH_SIZE-1)
#-#define HASH_ADDR(src) sock_hash(src)
#+#define NTP_HASH_SIZE 128
#+#define NTP_HASH_MASK (NTP_HASH_SIZE-1)
#+#define NTP_HASH_ADDR(src) sock_hash(src)
#
# /*
# * How we randomize polls. The poll interval is a power of two.
#
#--- 1.22/include/ntp_request.h Mon Aug 4 14:28:10 2003
#+++ 1.23/include/ntp_request.h Sat Nov 29 18:52:42 2003
#@@ -517,7 +517,7 @@
# u_int32 findpeer_calls;
# u_int32 allocations;
# u_int32 demobilizations;
#- u_char hashcount[HASH_SIZE];
#+ u_char hashcount[NTP_HASH_SIZE];
# };
#
#
#
#--- 1.63/ntpd/ntp_control.c Sun Oct 5 18:49:09 2003
#+++ 1.64/ntpd/ntp_control.c Sat Nov 29 18:52:54 2003
#@@ -1980,7 +1980,7 @@
#
# n = 0;
# rpkt.status = htons(ctlsysstatus());
#- for (i = 0; i < HASH_SIZE; i++) {
#+ for (i = 0; i < NTP_HASH_SIZE; i++) {
# for (peer = assoc_hash[i]; peer != 0;
# peer = peer->ass_next) {
# ass_stat[n++] = htons(peer->associd);
#@@ -2275,7 +2275,7 @@
# peer = sys_peer;
# } else {
# peer = 0;
#- for (i = 0; peer == 0 && i < HASH_SIZE; i++) {
#+ for (i = 0; peer == 0 && i < NTP_HASH_SIZE; i++) {
# for (peer = assoc_hash[i]; peer != 0;
# peer = peer->ass_next) {
# if (peer->flags & FLAG_REFCLOCK)
#
#--- 1.57/ntpd/ntp_peer.c Tue Aug 26 04:54:56 2003
#+++ 1.58/ntpd/ntp_peer.c Sat Nov 29 18:52:56 2003
#@@ -74,10 +74,10 @@
# /*
# * Peer hash tables
# */
#-struct peer *peer_hash[HASH_SIZE]; /* peer hash table */
#-int peer_hash_count[HASH_SIZE]; /* peers in each bucket */
#-struct peer *assoc_hash[HASH_SIZE]; /* association ID hash table */
#-int assoc_hash_count[HASH_SIZE]; /* peers in each bucket */
#+struct peer *peer_hash[NTP_HASH_SIZE]; /* peer hash table */
#+int peer_hash_count[NTP_HASH_SIZE]; /* peers in each bucket */
#+struct peer *assoc_hash[NTP_HASH_SIZE]; /* association ID hash table */
#+int assoc_hash_count[NTP_HASH_SIZE]; /* peers in each bucket */
# static struct peer *peer_free; /* peer structures free list */
# int peer_free_count; /* count of free structures */
#
#@@ -121,7 +121,7 @@
# /*
# * Clear hash table and counters.
# */
#- for (i = 0; i < HASH_SIZE; i++) {
#+ for (i = 0; i < NTP_HASH_SIZE; i++) {
# peer_hash[i] = 0;
# peer_hash_count[i] = 0;
# assoc_hash[i] = 0;
#@@ -193,7 +193,7 @@
# * same peer through different interfaces in the hash table.
# */
# if (start_peer == 0)
#- peer = peer_hash[HASH_ADDR(addr)];
#+ peer = peer_hash[NTP_HASH_ADDR(addr)];
# else
# peer = start_peer->next;
#
#@@ -227,7 +227,7 @@
# int hash;
#
# findpeer_calls++;
#- hash = HASH_ADDR(srcadr);
#+ hash = NTP_HASH_ADDR(srcadr);
# for (peer = peer_hash[hash]; peer != NULL; peer = peer->next) {
# if (SOCKCMP(srcadr, &peer->srcadr)
# && NSRCPORT(srcadr) == NSRCPORT(&peer->srcadr)) {
#@@ -286,7 +286,7 @@
#
# assocpeer_calls++;
#
#- hash = assoc & HASH_MASK;
#+ hash = assoc & NTP_HASH_MASK;
# for (peer = assoc_hash[hash]; peer != 0; peer =
# peer->ass_next) {
# if (assoc == peer->associd)
#@@ -309,7 +309,7 @@
# * This routine is called when the clock is stepped, and so all
# * previously saved time values are untrusted.
# */
#- for (n = 0; n < HASH_SIZE; n++) {
#+ for (n = 0; n < NTP_HASH_SIZE; n++) {
# for (peer = peer_hash[n]; peer != 0; peer = next_peer) {
# next_peer = peer->next;
# if (peer->flags & FLAG_CONFIG) {
#@@ -357,7 +357,7 @@
# peer_associations);
# #endif
# peer_clear(peer_to_remove, "NULL");
#- hash = HASH_ADDR(&peer_to_remove->srcadr);
#+ hash = NTP_HASH_ADDR(&peer_to_remove->srcadr);
# peer_hash_count[hash]--;
# peer_demobilizations++;
# #ifdef REFCLOCK
#@@ -389,7 +389,7 @@
# /*
# * Remove him from the association hash as well.
# */
#- hash = peer_to_remove->associd & HASH_MASK;
#+ hash = peer_to_remove->associd & NTP_HASH_MASK;
# assoc_hash_count[hash]--;
# if (assoc_hash[hash] == peer_to_remove)
# assoc_hash[hash] = peer_to_remove->ass_next;
#@@ -644,11 +644,11 @@
# /*
# * Put the new peer in the hash tables.
# */
#- i = HASH_ADDR(&peer->srcadr);
#+ i = NTP_HASH_ADDR(&peer->srcadr);
# peer->next = peer_hash[i];
# peer_hash[i] = peer;
# peer_hash_count[i]++;
#- i = peer->associd & HASH_MASK;
#+ i = peer->associd & NTP_HASH_MASK;
# peer->ass_next = assoc_hash[i];
# assoc_hash[i] = peer;
# assoc_hash_count[i]++;
#@@ -764,7 +764,7 @@
# struct peer *peer;
# int hash;
#
#- for (hash = 0; hash < HASH_SIZE; hash++)
#+ for (hash = 0; hash < NTP_HASH_SIZE; hash++)
# for (peer = peer_hash[hash]; peer != 0; peer = peer->next)
# peer_reset(peer);
# }
#@@ -790,7 +790,7 @@
# */
# if (!crypto_flags)
# return;
#- for (n = 0; n < HASH_SIZE; n++) {
#+ for (n = 0; n < NTP_HASH_SIZE; n++) {
# for (peer = peer_hash[n]; peer != 0; peer = next_peer) {
# next_peer = peer->next;
# if (!(peer->flags & FLAG_SKEY)) {
#@@ -834,7 +834,7 @@
# * for possibly more than one manycast association are unique.
# */
# pkt = &rbufp->recv_pkt;
#- for (i = 0; i < HASH_SIZE; i++) {
#+ for (i = 0; i < NTP_HASH_SIZE; i++) {
# if (peer_hash_count[i] == 0)
# continue;
#
#@@ -865,7 +865,7 @@
# * falls below the minimum. Search the peer list for manycast
# * client associations and reset the ttl and poll interval.
# */
#- for (i = 0; i < HASH_SIZE; i++) {
#+ for (i = 0; i < NTP_HASH_SIZE; i++) {
# if (peer_hash_count[i] == 0)
# continue;
#
#
#--- 1.162/ntpd/ntp_proto.c Tue Nov 11 02:52:25 2003
#+++ 1.163/ntpd/ntp_proto.c Sat Nov 29 18:52:55 2003
#@@ -1791,7 +1791,7 @@
# memcpy(&sys_refid, "DOWN", 4);
# #endif /* LOCKCLOCK */
# nlist = 0;
#- for (n = 0; n < HASH_SIZE; n++)
#+ for (n = 0; n < NTP_HASH_SIZE; n++)
# nlist += peer_hash_count[n];
# if (nlist > list_alloc) {
# if (list_alloc > 0) {
#@@ -1821,7 +1821,7 @@
# * bucks and collectively crank the chimes.
# */
# nlist = nl3 = 0; /* none yet */
#- for (n = 0; n < HASH_SIZE; n++) {
#+ for (n = 0; n < NTP_HASH_SIZE; n++) {
# for (peer = peer_hash[n]; peer != NULL; peer =
# peer->next) {
# peer->flags &= ~FLAG_SYSPEER;
#
#--- 1.54/ntpd/ntp_request.c Sat Nov 29 03:27:53 2003
#+++ 1.55/ntpd/ntp_request.c Sat Nov 29 18:52:56 2003
#@@ -650,7 +650,7 @@
#
# ip = (struct info_peer_list *)prepare_pkt(srcadr, inter, inpkt,
# v6sizeof(struct info_peer_list));
#- for (i = 0; i < HASH_SIZE && ip != 0; i++) {
#+ for (i = 0; i < NTP_HASH_SIZE && ip != 0; i++) {
# pp = peer_hash[i];
# while (pp != 0 && ip != 0) {
# if (pp->srcadr.ss_family == AF_INET6) {
#@@ -712,7 +712,7 @@
# #endif
# ips = (struct info_peer_summary *)prepare_pkt(srcadr, inter, inpkt,
# v6sizeof(struct info_peer_summary));
#- for (i = 0; i < HASH_SIZE && ips != 0; i++) {
#+ for (i = 0; i < NTP_HASH_SIZE && ips != 0; i++) {
# pp = peer_hash[i];
# while (pp != 0 && ips != 0) {
# #ifdef DEBUG
#@@ -1147,7 +1147,7 @@
# /*
# * Importations from the peer module
# */
#- extern int peer_hash_count[HASH_SIZE];
#+ extern int peer_hash_count[NTP_HASH_SIZE];
# extern int peer_free_count;
# extern u_long peer_timereset;
# extern u_long findpeer_calls;
#@@ -1165,7 +1165,7 @@
# ms->allocations = htonl((u_int32)peer_allocations);
# ms->demobilizations = htonl((u_int32)peer_demobilizations);
#
#- for (i = 0; i < HASH_SIZE; i++) {
#+ for (i = 0; i < NTP_HASH_SIZE; i++) {
# if (peer_hash_count[i] > 255)
# ms->hashcount[i] = 255;
# else
#
#--- 1.26/ntpd/ntp_timer.c Tue Sep 30 12:35:29 2003
#+++ 1.27/ntpd/ntp_timer.c Sat Nov 29 18:52:57 2003
#@@ -276,7 +276,7 @@
# * here, since the peer structure might go away as the result of
# * the call.
# */
#- for (n = 0; n < HASH_SIZE; n++) {
#+ for (n = 0; n < NTP_HASH_SIZE; n++) {
# for (peer = peer_hash[n]; peer != 0; peer = next_peer) {
# next_peer = peer->next;
# if (peer->action && peer->nextaction <= current_time)
#
#--- 1.28/ntpdc/ntpdc_ops.c Tue Nov 25 04:17:14 2003
#+++ 1.29/ntpdc/ntpdc_ops.c Sat Nov 29 18:52:50 2003
#@@ -1157,9 +1157,9 @@
# (u_long)ntohl(mem->demobilizations));
#
# (void) fprintf(fp, "hash table counts: ");
#- for (i = 0; i < HASH_SIZE; i++) {
#+ for (i = 0; i < NTP_HASH_SIZE; i++) {
# (void) fprintf(fp, "%4d", (int)mem->hashcount[i]);
#- if ((i % 8) == 7 && i != (HASH_SIZE-1)) {
#+ if ((i % 8) == 7 && i != (NTP_HASH_SIZE-1)) {
# (void) fprintf(fp, "\n ");
# }
# }
#
# Diff checksum=8e1f80b9
# Patch vers: 1.3
# Patch type: REGULAR
== ChangeSet ==
stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
stenn at whimsy.udel.edu|ChangeSet|20031129230718|18247
D 1.1178 03/11/29 18:53:20-05:00 stenn at whimsy.udel.edu +8 -0
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c [Bug 255] Lint cleanup (avoid HASH_* name collision)
K 15471
P ChangeSet
------------------------------------------------
0a0
> stenn at whimsy.udel.edu|include/ntp.h|19990526004814|01635|3aed0663 stenn at whimsy.udel.edu|include/ntp.h|20031129235238|60302
> stenn at whimsy.udel.edu|include/ntp_request.h|19990526004815|01635|3aed0663 stenn at whimsy.udel.edu|include/ntp_request.h|20031129235242|04097
> stenn at whimsy.udel.edu|ntpd/ntp_control.c|19990526004817|01635|3aed0663 stenn at whimsy.udel.edu|ntpd/ntp_control.c|20031129235254|29066
> stenn at whimsy.udel.edu|ntpd/ntp_peer.c|19990526004817|01635|3aed0663 stenn at whimsy.udel.edu|ntpd/ntp_peer.c|20031129235256|50142
> stenn at whimsy.udel.edu|ntpd/ntp_proto.c|19990526004817|01635|3aed0663 stenn at whimsy.udel.edu|ntpd/ntp_proto.c|20031129235255|42278
> stenn at whimsy.udel.edu|ntpd/ntp_request.c|19990526004817|01635|3aed0663 stenn at whimsy.udel.edu|ntpd/ntp_request.c|20031129235256|32282
> stenn at whimsy.udel.edu|ntpd/ntp_timer.c|19990526004817|01635|3aed0663 stenn at whimsy.udel.edu|ntpd/ntp_timer.c|20031129235257|07848
> stenn at whimsy.udel.edu|ntpdc/ntpdc_ops.c|19990526004819|01635|3aed0663 stenn at whimsy.udel.edu|ntpdc/ntpdc_ops.c|20031129235250|45509
== include/ntp.h ==
stenn at whimsy.udel.edu|include/ntp.h|19990526004814|01635|3aed0663
stenn at whimsy.udel.edu|include/ntp.h|20031125200810|58954
D 1.95 03/11/29 18:52:38-05:00 stenn at whimsy.udel.edu +3 -3
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c [Bug 255] Lint cleanup (avoid HASH_* name collision)
K 60302
O -rw-rw-r--
P include/ntp.h
------------------------------------------------
D659 3
I661 3
#define NTP_HASH_SIZE 128
#define NTP_HASH_MASK (NTP_HASH_SIZE-1)
#define NTP_HASH_ADDR(src) sock_hash(src)
== include/ntp_request.h ==
stenn at whimsy.udel.edu|include/ntp_request.h|19990526004815|01635|3aed0663
ro at xayide.techfak.uni-bielefeld.de[ro]|include/ntp_request.h|20030804182810|03760
D 1.23 03/11/29 18:52:42-05:00 stenn at whimsy.udel.edu +1 -1
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c [Bug 255] Lint cleanup (avoid HASH_* name collision)
K 4097
O -rw-rw-r--
P include/ntp_request.h
------------------------------------------------
D520 1
I520 1
u_char hashcount[NTP_HASH_SIZE];
== ntpd/ntp_control.c ==
stenn at whimsy.udel.edu|ntpd/ntp_control.c|19990526004817|01635|3aed0663
fredb at seduction.immanent.net|ntpd/ntp_control.c|20031005224909|28392
D 1.64 03/11/29 18:52:54-05:00 stenn at whimsy.udel.edu +2 -2
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c [Bug 255] Lint cleanup (avoid HASH_* name collision)
K 29066
O -rw-rw-r--
P ntpd/ntp_control.c
------------------------------------------------
D1983 1
I1983 1
for (i = 0; i < NTP_HASH_SIZE; i++) {
D2278 1
I2278 1
for (i = 0; peer == 0 && i < NTP_HASH_SIZE; i++) {
== ntpd/ntp_peer.c ==
stenn at whimsy.udel.edu|ntpd/ntp_peer.c|19990526004817|01635|3aed0663
stenn at whimsy.udel.edu|ntpd/ntp_peer.c|20030826085456|44422
D 1.58 03/11/29 18:52:56-05:00 stenn at whimsy.udel.edu +17 -17
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c [Bug 255] Lint cleanup (avoid HASH_* name collision)
K 50142
O -rw-rw-r--
P ntpd/ntp_peer.c
------------------------------------------------
D77 4
I80 4
struct peer *peer_hash[NTP_HASH_SIZE]; /* peer hash table */
int peer_hash_count[NTP_HASH_SIZE]; /* peers in each bucket */
struct peer *assoc_hash[NTP_HASH_SIZE]; /* association ID hash table */
int assoc_hash_count[NTP_HASH_SIZE]; /* peers in each bucket */
D124 1
I124 1
for (i = 0; i < NTP_HASH_SIZE; i++) {
D196 1
I196 1
peer = peer_hash[NTP_HASH_ADDR(addr)];
D230 1
I230 1
hash = NTP_HASH_ADDR(srcadr);
D289 1
I289 1
hash = assoc & NTP_HASH_MASK;
D312 1
I312 1
for (n = 0; n < NTP_HASH_SIZE; n++) {
D360 1
I360 1
hash = NTP_HASH_ADDR(&peer_to_remove->srcadr);
D392 1
I392 1
hash = peer_to_remove->associd & NTP_HASH_MASK;
D647 1
I647 1
i = NTP_HASH_ADDR(&peer->srcadr);
D651 1
I651 1
i = peer->associd & NTP_HASH_MASK;
D767 1
I767 1
for (hash = 0; hash < NTP_HASH_SIZE; hash++)
D793 1
I793 1
for (n = 0; n < NTP_HASH_SIZE; n++) {
D837 1
I837 1
for (i = 0; i < NTP_HASH_SIZE; i++) {
D868 1
I868 1
for (i = 0; i < NTP_HASH_SIZE; i++) {
== ntpd/ntp_proto.c ==
stenn at whimsy.udel.edu|ntpd/ntp_proto.c|19990526004817|01635|3aed0663
stenn at whimsy.udel.edu|ntpd/ntp_proto.c|20031111075225|41604
D 1.163 03/11/29 18:52:55-05:00 stenn at whimsy.udel.edu +2 -2
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c [Bug 255] Lint cleanup (avoid HASH_* name collision)
K 42278
O -rw-rw-r--
P ntpd/ntp_proto.c
------------------------------------------------
D1794 1
I1794 1
for (n = 0; n < NTP_HASH_SIZE; n++)
D1824 1
I1824 1
for (n = 0; n < NTP_HASH_SIZE; n++) {
== ntpd/ntp_request.c ==
stenn at whimsy.udel.edu|ntpd/ntp_request.c|19990526004817|01635|3aed0663
stenn at whimsy.udel.edu|ntpd/ntp_request.c|20031129082753|30934
D 1.55 03/11/29 18:52:56-05:00 stenn at whimsy.udel.edu +4 -4
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c [Bug 255] Lint cleanup (avoid HASH_* name collision)
K 32282
O -rw-rw-r--
P ntpd/ntp_request.c
------------------------------------------------
D653 1
I653 1
for (i = 0; i < NTP_HASH_SIZE && ip != 0; i++) {
D715 1
I715 1
for (i = 0; i < NTP_HASH_SIZE && ips != 0; i++) {
D1150 1
I1150 1
extern int peer_hash_count[NTP_HASH_SIZE];
D1168 1
I1168 1
for (i = 0; i < NTP_HASH_SIZE; i++) {
== ntpd/ntp_timer.c ==
stenn at whimsy.udel.edu|ntpd/ntp_timer.c|19990526004817|01635|3aed0663
fredb at rapture.immanent.net|ntpd/ntp_timer.c|20030930163529|07511
D 1.27 03/11/29 18:52:57-05:00 stenn at whimsy.udel.edu +1 -1
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c [Bug 255] Lint cleanup (avoid HASH_* name collision)
K 7848
O -rw-rw-r--
P ntpd/ntp_timer.c
------------------------------------------------
D279 1
I279 1
for (n = 0; n < NTP_HASH_SIZE; n++) {
== ntpdc/ntpdc_ops.c ==
stenn at whimsy.udel.edu|ntpdc/ntpdc_ops.c|19990526004819|01635|3aed0663
stenn at whimsy.udel.edu|ntpdc/ntpdc_ops.c|20031125091714|44835
D 1.29 03/11/29 18:52:50-05:00 stenn at whimsy.udel.edu +2 -2
B stenn at whimsy.udel.edu|ChangeSet|19990526004811|57482|8983e65c737bb465
C
c [Bug 255] Lint cleanup (avoid HASH_* name collision)
K 45509
O -rw-rw-r--
P ntpdc/ntpdc_ops.c
------------------------------------------------
D1160 1
I1160 1
for (i = 0; i < NTP_HASH_SIZE; i++) {
D1162 1
I1162 1
if ((i % 8) == 7 && i != (NTP_HASH_SIZE-1)) {
# Patch checksum=1d3cb385
More information about the bk-ntp-stable-send
mailing list