Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 May 2010 21:18:56 +0200
From:      Marko Zec <zec@freebsd.org>
To:        Garrett Cooper <gcooper@freebsd.org>
Cc:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   Re: PERFORCE change 178978 for review
Message-ID:  <201005302118.57240.zec@freebsd.org>
In-Reply-To: <AANLkTilpZTmKr3tTrfafgt5CtskJB3LMEM_XoOsJdKq2@mail.gmail.com>
References:  <201005301444.o4UEidHb057496@repoman.freebsd.org> <AANLkTilpZTmKr3tTrfafgt5CtskJB3LMEM_XoOsJdKq2@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 30 May 2010 20:59:33 Garrett Cooper wrote:
> On Sun, May 30, 2010 at 7:44 AM, Marko Zec <zec@freebsd.org> wrote:
> > http://p4web.freebsd.org/@@178978?ac=3D10
> >
> > Change 178978 by zec@zec_tpx32 on 2010/05/30 14:43:53
> >
> > =A0 =A0 =A0 =A0Attempt to reduce the diff against head a bit further and
> > =A0 =A0 =A0 =A0improve style, though Ivor hasn't left much here to be d=
one...
> >
> > Affected files ...
> >
> > .. //depot/projects/vimage/src/sys/net/vnet.c#12 edit
> > .. //depot/projects/vimage/src/sys/netinet/ip_mroute.c#42 edit
> >
> > Differences ...
> >
> > =3D=3D=3D=3D //depot/projects/vimage/src/sys/net/vnet.c#12 (text+ko) =
=3D=3D=3D=3D
> >
> > @@ -169,7 +169,7 @@
> > =A0* we want the virtualized global variable space to be page-sized, we=
 may
> > =A0* have more space than that in practice.
> > =A0*/
> > -#define =A0 =A0 =A0 =A0VNET_MODMIN =A0 =A0 (8192<<2)
> > +#define =A0 =A0 =A0 =A0VNET_MODMIN =A0 =A0 32768
> > =A0#define =A0 =A0 =A0 =A0VNET_SIZE =A0 =A0 =A0 roundup2(VNET_BYTES, PA=
GE_SIZE)
> > =A0#define =A0 =A0 =A0 =A0VNET_MODSIZE =A0 =A0(VNET_SIZE - (VNET_BYTES =
=2D VNET_MODMIN))
> >
> >
> > =3D=3D=3D=3D //depot/projects/vimage/src/sys/netinet/ip_mroute.c#42 (te=
xt+ko)
> > =3D=3D=3D=3D
> >
> > @@ -159,9 +159,9 @@
> > =A0 =A0 =A0 =A0 =A0((g).s_addr >> 20) ^ ((g).s_addr >> 10) ^ (g).s_addr=
) &
> > V_mfchash) #define =A0 =A0 =A0 =A0MFCHASHSIZE =A0 =A0 256
> >
> > -static VNET_DEFINE(u_char*, nexpire);
> > +static u_long mfchashsize; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* =
Hash size */
> > +static VNET_DEFINE(u_char *, nexpire); =A0 =A0 =A0 =A0 /* 0..mfchashsi=
ze-1 */
> > =A0#define =A0 =A0 =A0 =A0V_nexpire =A0 =A0 =A0 =A0 =A0 =A0 =A0 VNET(ne=
xpire)
> > -static u_long mfchashsize; =A0 =A0 /* Hash size */
> > =A0static VNET_DEFINE(LIST_HEAD(mfchashhdr, mfc)*, mfchashtbl);
> > =A0#define =A0 =A0 =A0 =A0V_mfchashtbl =A0 =A0 =A0 =A0 =A0 =A0VNET(mfch=
ashtbl)
> >
> > @@ -218,7 +218,7 @@
> > =A0*/
> > =A0static VNET_DEFINE(struct bw_upcall, bw_upcalls[BW_UPCALLS_MAX]);
> > =A0#define =A0 =A0 =A0 =A0V_bw_upcalls =A0 =A0 =A0 =A0 =A0 =A0VNET(bw_u=
pcalls)
> > -static VNET_DEFINE(u_int, bw_upcalls_n); /* # of pending upcalls */
> > +static VNET_DEFINE(u_int, bw_upcalls_n) =3D 0; /* # of pending upcalls=
 */
> > =A0#define =A0 =A0 =A0 =A0V_bw_upcalls_n =A0 =A0 =A0 =A0 =A0VNET(bw_upc=
alls_n)
> > =A0static VNET_DEFINE(struct callout, bw_upcalls_ch);
> > =A0#define =A0 =A0 =A0 =A0V_bw_upcalls_ch =A0 =A0 =A0 =A0 VNET(bw_upcal=
ls_ch)
> > @@ -367,9 +367,9 @@
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 MRT_MFC_FLAGS_BORDER_VIF |
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 MRT_MFC_RP |
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
 =A0 =A0 MRT_MFC_BW_UPCALL);
> > -static VNET_DEFINE(uint32_t, mrt_api_config);
> > +static VNET_DEFINE(uint32_t, mrt_api_config) =3D 0;
> > =A0#define =A0 =A0 =A0 =A0V_mrt_api_config =A0 =A0 =A0 =A0VNET(mrt_api_=
config)
> > -static VNET_DEFINE(int, pim_assert_enabled);
> > +static VNET_DEFINE(int, pim_assert_enabled) =3D 0;
> > =A0#define =A0 =A0 =A0 =A0V_pim_assert_enabled =A0 =A0VNET(pim_assert_e=
nabled)
> > =A0static struct timeval pim_assert_interval =3D { 3, 0 }; =A0/* Rate l=
imit */
> >
> > @@ -663,7 +663,7 @@
> > =A0 =A0 =A0 =A0return EOPNOTSUPP;
> >
> > =A0 =A0 if (version !=3D 1)
> > - =A0 =A0 =A0 return (ENOPROTOOPT);
> > + =A0 =A0 =A0 return ENOPROTOOPT;
>
> That's actually a style regression (along with any other return calls
> without parentheses).

Yup - technically you're right, but this particular change was intended to=
=20
minimize the scope of the diff against head - if you'd throw a look at=20
ip_mroute.c in head you'd spot a ton of other style violations, including=20
this one.  My intention is to do a functional (V_irtualization) change in o=
ne=20
commit, and then we can do a no-op style sweep on ip_mroute.c later.

Marko



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