From owner-svn-src-user@FreeBSD.ORG Sat Jan 10 04:49:55 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74AC01065670; Sat, 10 Jan 2009 04:49:55 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 63C5A8FC1E; Sat, 10 Jan 2009 04:49:55 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0A4ntAF080147; Sat, 10 Jan 2009 04:49:55 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0A4ntxJ080145; Sat, 10 Jan 2009 04:49:55 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200901100449.n0A4ntxJ080145@svn.freebsd.org> From: Kip Macy Date: Sat, 10 Jan 2009 04:49:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187005 - user/kmacy/HEAD_fast_net/sys/net X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 04:49:55 -0000 Author: kmacy Date: Sat Jan 10 04:49:55 2009 New Revision: 187005 URL: http://svn.freebsd.org/changeset/base/187005 Log: fetch weight when getting metrics Modified: user/kmacy/HEAD_fast_net/sys/net/route.h user/kmacy/HEAD_fast_net/sys/net/rtsock.c Modified: user/kmacy/HEAD_fast_net/sys/net/route.h ============================================================================== --- user/kmacy/HEAD_fast_net/sys/net/route.h Sat Jan 10 04:42:53 2009 (r187004) +++ user/kmacy/HEAD_fast_net/sys/net/route.h Sat Jan 10 04:49:55 2009 (r187005) @@ -204,7 +204,7 @@ struct ortentry { /* Mask of RTF flags that are allowed to be modified by RTM_CHANGE. */ #define RTF_FMASK \ (RTF_PROTO1 | RTF_PROTO2 | RTF_PROTO3 | RTF_BLACKHOLE | \ - RTF_REJECT | RTF_STATIC) + RTF_REJECT | RTF_STATIC | RTF_SHUTDOWN | RTF_STICKY) /* * Routing statistics. @@ -271,7 +271,7 @@ struct rt_msghdr { #define RTV_SSTHRESH 0x20 /* init or lock _ssthresh */ #define RTV_RTT 0x40 /* init or lock _rtt */ #define RTV_RTTVAR 0x80 /* init or lock _rttvar */ -#define RTV_WEIGHT 0x100 /* init or lock _rttvar */ +#define RTV_WEIGHT 0x100 /* init or lock _weight */ /* * Bitmask values for rtm_addrs. Modified: user/kmacy/HEAD_fast_net/sys/net/rtsock.c ============================================================================== --- user/kmacy/HEAD_fast_net/sys/net/rtsock.c Sat Jan 10 04:42:53 2009 (r187004) +++ user/kmacy/HEAD_fast_net/sys/net/rtsock.c Sat Jan 10 04:49:55 2009 (r187005) @@ -785,7 +785,8 @@ static void rt_setmetrics(u_long which, const struct rt_metrics *in, struct rt_metrics_lite *out) { -#define metric(f, e) if (which & (f)) out->e = in->e; +#define metric(f, e) if (which & (f)) { printf("setting 0x%x", f); out->e = in->e; } + /* * Only these are stored in the routing entry since introduction * of tcp hostcache. The rest is ignored. @@ -805,6 +806,7 @@ rt_getmetrics(const struct rt_metrics_li #define metric(e) out->e = in->e; bzero(out, sizeof(*out)); metric(rmx_mtu); + metric(rmx_weight); /* Kernel -> userland timebase conversion. */ out->rmx_expire = in->rmx_expire ? in->rmx_expire - time_uptime + time_second : 0;