Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Aug 2008 01:12:31 -0700
From:      Julian Elischer <julian@elischer.org>
To:        freebsd-virtualization@freebsd.org
Subject:   report and comment
Message-ID:  <48ABD1EF.5060307@elischer.org>

next in thread | raw e-mail | index | archive | help
I have MOSTLY merged the last commit into
all the p4 branches..

progress should be good towards commit 1.5


something I just noticed....

in sys/netinet/tcp_subr.c
================================================
[...]
#endif * Locking of the global variables isn_secret, isn_last_reseed, 
isn_offset,
  * isn_offset_old, and isn_ctx is performed using the TCP pcbinfo 
lock.  In
  * general, this means holding an exclusive (write) lock.
  */

#define ISN_BYTES_PER_SECOND 1048576
#define ISN_STATIC_INCREMENT 4096
#define ISN_RANDOM_INCREMENT (4096 - 1)

#ifndef VIMAGE
static u_char isn_secret[32];
static int isn_last_reseed;
static u_int32_t isn_offset, isn_offset_old;
static MD5_CTX isn_ctx;
#endif

tcp_seq
tcp_new_isn(struct tcpcb *tp)
{
[...]
================================================

and in sys/contrib/pf/net/pf_subr.c

================================================
[...]
  * Locking of the global variables isn_secret, isn_last_reseed, 
isn_offset,
  * isn_offset_old, and isn_ctx is performed using the TCP pcbinfo 
lock.  In
  * general, this means holding an exclusive (write) lock.
  */

#define ISN_BYTES_PER_SECOND 1048576
#define ISN_STATIC_INCREMENT 4096
#define ISN_RANDOM_INCREMENT (4096 - 1)

#ifndef VIMAGE
static u_char isn_secret[32];
static int isn_last_reseed;
static u_int32_t isn_offset;
static MD5_CTX isn_ctx;
#endif

u_int32_t
pf_new_isn(struct pf_state *s)
{
[...]
=====================================================

so we have the same global variables, static, in 2 places..
so one set should go in the pf vars and the other in the inet
vars. The first answers I think of are:


1/ rename one set
2/ make one of them a VV_ macro that goes elsewhere.

anyone have other suggestions?






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48ABD1EF.5060307>