svn commit: r322866 - head/sys/net
Gleb Smirnoff
glebius at FreeBSD.org
Thu Aug 24 23:09:40 UTC 2017
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.
More information about the svn-src-head
mailing list