From 352be4e985c0df0cf92cf64d89515b0b32bd1bf4 Mon Sep 17 00:00:00 2001 From: bz Date: Sun, 17 Jul 2011 21:15:20 +0000 Subject: 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) --- sys/net/if_var.h | 6 +++--- sys/net/radix.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/net') diff --git a/sys/net/if_var.h b/sys/net/if_var.h index d6eb7f1..2dcb6f9 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -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 *); diff --git a/sys/net/radix.h b/sys/net/radix.h index 29659b5..0dc11e9 100644 --- a/sys/net/radix.h +++ b/sys/net/radix.h @@ -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 -- cgit v1.1