On Wed, Jul 09, 2014 at 04:56:13PM +0200, Bret Lambert wrote:
> On Wed, Jul 09, 2014 at 04:52:06PM +0200, Martin Pieuchot wrote:
> > While looking at route refcounting issues I found some unused fields...
> >
> > Ok to kill them?
>
> These appear to have been part of a plan of deep and evil magic;
> the diff appears okay to me on purely visual inspection, at least.
Hmm. I though gif was still caching the tunnel endpoint but maybe I'm
wrong. Caching the route could make sense but is not super important.
If they are not used then they should be removed for sure.
> >
> > Index: net/if_gif.h
> > ===================================================================
> > RCS file: /cvs/src/sys/net/if_gif.h,v
> > retrieving revision 1.10
> > diff -u -p -r1.10 if_gif.h
> > --- net/if_gif.h 21 Nov 2009 14:08:14 -0000 1.10
> > +++ net/if_gif.h 9 Jul 2014 14:49:25 -0000
> > @@ -37,29 +37,13 @@
> > #ifndef _NET_IF_GIF_H_
> > #define _NET_IF_GIF_H_
> >
> > -
> > -#include <netinet/in.h>
> > -/* XXX sigh, why route have struct route instead of pointer? */
> > -
> > struct gif_softc {
> > struct ifnet gif_if; /* common area */
> > struct sockaddr *gif_psrc; /* Physical src addr */
> > struct sockaddr *gif_pdst; /* Physical dst addr */
> > - union {
> > - struct route gifscr_ro; /* xxx */
> > -#ifdef INET6
> > - struct route_in6 gifscr_ro6; /* xxx */
> > -#endif
> > - } gifsc_gifscr;
> > - int gif_flags;
> > u_int gif_rtableid;
> > LIST_ENTRY(gif_softc) gif_list; /* list of all gifs */
> > };
> > -
> > -#define gif_ro gifsc_gifscr.gifscr_ro
> > -#ifdef INET6
> > -#define gif_ro6 gifsc_gifscr.gifscr_ro6
> > -#endif
> >
> > #define GIF_MTU (1280) /* Default MTU */
> > #define GIF_MTU_MIN (1280) /* Minimum MTU */
> > Index: netinet6/ip6_mroute.h
> > ===================================================================
> > RCS file: /cvs/src/sys/netinet6/ip6_mroute.h,v
> > retrieving revision 1.13
> > diff -u -p -r1.13 ip6_mroute.h
> > --- netinet6/ip6_mroute.h 29 Oct 2013 19:05:45 -0000 1.13
> > +++ netinet6/ip6_mroute.h 9 Jul 2014 14:49:25 -0000
> > @@ -180,7 +180,6 @@ struct mif6 {
> > u_int64_t m6_pkt_out; /* # pkts out on interface */
> > u_int64_t m6_bytes_in; /* # bytes in on interface */
> > u_int64_t m6_bytes_out; /* # bytes out on interface */
> > - struct route_in6 m6_route;/* cached route if this is a tunnel */
> > };
> >
> > /*
> >
>
--
:wq Claudio