From owner-svn-src-all@FreeBSD.ORG Sun Jul 17 21:15:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 541E7106564A; Sun, 17 Jul 2011 21:15:21 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 382DB8FC14; Sun, 17 Jul 2011 21:15:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p6HLFLJh090540; Sun, 17 Jul 2011 21:15:21 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p6HLFLxq090534; Sun, 17 Jul 2011 21:15:21 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201107172115.p6HLFLxq090534@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 17 Jul 2011 21:15:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224151 - in head/sys: net netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jul 2011 21:15:21 -0000 Author: bz Date: Sun Jul 17 21:15:20 2011 New Revision: 224151 URL: http://svn.freebsd.org/changeset/base/224151 Log: Add spares to the network stack for FreeBSD-9: - TCP keep* timers - TCP UTO (adjust from what was there already) - netmap - route caching - user cookie (temporary to allow for the real fix) Slightly re-shuffle struct ifnet moving fields out of the middle of spares and to better align. Discussed with: rwatson (slightly earlier version) Modified: head/sys/net/if_var.h head/sys/net/radix.h head/sys/netinet/in_pcb.h head/sys/netinet/tcp_syncache.h head/sys/netinet/tcp_var.h Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Sun Jul 17 21:08:16 2011 (r224150) +++ head/sys/net/if_var.h Sun Jul 17 21:15:20 2011 (r224151) @@ -195,8 +195,9 @@ struct ifnet { /* protected by if_addr_mtx */ void *if_pf_kif; void *if_lagg; /* lagg glue */ - u_char if_alloctype; /* if_type at time of allocation */ + char *if_description; /* interface description */ u_int if_fib; /* interface FIB */ + u_char if_alloctype; /* if_type at time of allocation */ /* * Spare fields are added so that we can modify sensitive data @@ -204,9 +205,8 @@ struct ifnet { * be used with care where binary compatibility is required. */ char if_cspare[3]; - char *if_description; /* interface description */ - void *if_pspare[7]; int if_ispare[4]; + void *if_pspare[8]; /* 1 netmap, 7 TDB */ }; typedef void if_init_f_t(void *); Modified: head/sys/net/radix.h ============================================================================== --- head/sys/net/radix.h Sun Jul 17 21:08:16 2011 (r224150) +++ head/sys/net/radix.h Sun Jul 17 21:15:20 2011 (r224151) @@ -132,6 +132,7 @@ struct radix_node_head { (struct radix_node *rn, struct radix_node_head *head); struct radix_node rnh_nodes[3]; /* empty tree for common case */ int rnh_multipath; /* multipath capable ? */ + u_int rnh_spare; /* route caching */ #ifdef _KERNEL struct rwlock rnh_lock; /* locks entire radix tree */ #endif Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Sun Jul 17 21:08:16 2011 (r224150) +++ head/sys/netinet/in_pcb.h Sun Jul 17 21:15:20 2011 (r224151) @@ -179,8 +179,9 @@ struct inpcb { u_char inp_ip_minttl; /* (i) minimum TTL or drop */ uint32_t inp_flowid; /* (x) flow id / queue id */ u_int inp_refcount; /* (i) refcount */ - void *inp_pspare[4]; /* (x) rtentry / general use */ - u_int inp_ispare[4]; /* general use */ + void *inp_pspare[5]; /* (x) route caching / general use */ + u_int inp_ispare[6]; /* (x) route caching / user cookie / + * general use */ /* Local and foreign ports, local and foreign addr. */ struct in_conninfo inp_inc; /* (i/p) list for PCB's local port */ Modified: head/sys/netinet/tcp_syncache.h ============================================================================== --- head/sys/netinet/tcp_syncache.h Sun Jul 17 21:08:16 2011 (r224150) +++ head/sys/netinet/tcp_syncache.h Sun Jul 17 21:15:20 2011 (r224151) @@ -81,6 +81,8 @@ struct syncache { #endif struct label *sc_label; /* MAC label reference */ struct ucred *sc_cred; /* cred cache for jail checks */ + + u_int32_t sc_spare[2]; /* UTO */ }; /* Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Sun Jul 17 21:08:16 2011 (r224150) +++ head/sys/netinet/tcp_var.h Sun Jul 17 21:15:20 2011 (r224151) @@ -203,9 +203,9 @@ struct tcpcb { struct cc_var *ccv; /* congestion control specific vars */ struct osd *osd; /* storage for Khelp module data */ - int t_ispare; /* explicit pad for 64bit alignment */ + uint32_t t_ispare[12]; /* 4 keep timers, 5 UTO, 3 TBD */ void *t_pspare2[4]; /* 4 TBD */ - uint64_t _pad[12]; /* 7 UTO, 5 TBD (1-2 CC/RTT?) */ + uint64_t _pad[6]; /* 6 TBD (1-2 CC/RTT?) */ }; /* @@ -300,6 +300,7 @@ struct tcpopt { u_int16_t to_mss; /* maximum segment size */ u_int8_t to_wscale; /* window scaling */ u_int8_t to_nsacks; /* number of SACK blocks */ + u_int32_t to_spare; /* UTO */ }; /*