Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Aug 2017 16:09:37 -0700
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r322866 - head/sys/net
Message-ID:  <20170824230937.GI1071@FreeBSD.org>
In-Reply-To: <201708242308.v7ON8CBq034653@repo.freebsd.org>
References:  <201708242308.v7ON8CBq034653@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
  Hi,

On Thu, Aug 24, 2017 at 11:08:12PM +0000, Gleb Smirnoff wrote:
T> Log:
T>   Garbage collect RT_NORTREF, which is no longer in use after FLOWTABLE removal.
T> 
T> Modified:
T>   head/sys/net/route.h
T> 
T> Modified: head/sys/net/route.h
T> ==============================================================================
T> --- head/sys/net/route.h	Thu Aug 24 22:56:22 2017	(r322865)
T> +++ head/sys/net/route.h	Thu Aug 24 23:08:12 2017	(r322866)
T> @@ -67,8 +67,6 @@ struct route {
T>  #define	RT_MAY_LOOP_BIT		3	/* dst may require loop copy */
T>  #define	RT_HAS_HEADER_BIT	4	/* mbuf already have its header prepended */
T>  
T> -#define	RT_CACHING_CONTEXT	0x1	/* XXX: not used anywhere */
T> -#define	RT_NORTREF		0x2	/* doesn't hold reference on ro_rt */
T>  #define	RT_L2_ME		(1 << RT_L2_ME_BIT)		/* 0x0004 */
T>  #define	RT_MAY_LOOP		(1 << RT_MAY_LOOP_BIT)		/* 0x0008 */
T>  #define	RT_HAS_HEADER		(1 << RT_HAS_HEADER_BIT)	/* 0x0010 */
T> @@ -411,14 +409,8 @@ struct rt_addrinfo {
T>  
T>  #define	RO_RTFREE(_ro) do {					\
T>  	if ((_ro)->ro_rt) {					\
T> -		if ((_ro)->ro_flags & RT_NORTREF) {		\
T> -			(_ro)->ro_flags &= ~RT_NORTREF;		\
T> -			(_ro)->ro_rt = NULL;			\
T> -			(_ro)->ro_lle = NULL;			\
T> -		} else {					\
T> -			RT_LOCK((_ro)->ro_rt);			\
T> -			RTFREE_LOCKED((_ro)->ro_rt);		\
T> -		}						\
T> +		RT_LOCK((_ro)->ro_rt);				\
T> +		RTFREE_LOCKED((_ro)->ro_rt);			\
T>  	}							\
T>  } while (0)

It may also make sense to unroll all instances of RO_RTFREE into two
lines of code and remove RO_RTFREE() as well. But I don't have solid
opinion on that. Anyone to support me on this as well?

-- 
Totus tuus, Glebius.



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