From 1eeb6d97d09e439c7be2cc1f91b6e57d2c5c0573 Mon Sep 17 00:00:00 2001 From: Kip Macy Date: Tue, 20 Sep 2011 20:27:26 +0000 Subject: [PATCH] Make KBI changes required for future MFCing of inpcb rtentry / llentry caching. Reviewed by: rwatson, bz Approved by: re (kib) --- sys/net/if_llatbl.h | 1 + sys/net/radix.h | 4 ++-- sys/net/route.h | 4 ++++ sys/netinet6/in6.h | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/net/if_llatbl.h b/sys/net/if_llatbl.h index 4b1835332368..2ae27927362d 100644 --- a/sys/net/if_llatbl.h +++ b/sys/net/if_llatbl.h @@ -59,6 +59,7 @@ struct llentry { struct rwlock lle_lock; struct lltable *lle_tbl; struct llentries *lle_head; + void (*lle_free)(struct lltable *, struct llentry *); struct mbuf *la_hold; int la_numheld; /* # of packets currently held */ time_t la_expire; diff --git a/sys/net/radix.h b/sys/net/radix.h index 0dc11e98746d..5bacaa3ade8d 100644 --- a/sys/net/radix.h +++ b/sys/net/radix.h @@ -105,6 +105,8 @@ typedef int walktree_f_t(struct radix_node *, void *); struct radix_node_head { struct radix_node *rnh_treetop; + u_int rnh_gen; /* generation counter */ + int rnh_multipath; /* multipath capable ? */ int rnh_addrsize; /* permit, but not require fixed keys */ int rnh_pktsize; /* permit, but not require fixed keys */ struct radix_node *(*rnh_addaddr) /* add based on sockaddr */ @@ -131,8 +133,6 @@ struct radix_node_head { void (*rnh_close) /* do something when the last ref drops */ (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 diff --git a/sys/net/route.h b/sys/net/route.h index 0bc72d7fb8e1..533ee13b5849 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -49,9 +49,13 @@ struct route { struct rtentry *ro_rt; struct llentry *ro_lle; + struct in_ifaddr *ro_ia; + int ro_flags; struct sockaddr ro_dst; }; +#define RT_CACHING_CONTEXT 0x1 + /* * These numbers are used by reliable protocols for determining * retransmission behavior and are included in the routing structure. diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h index 1040d90e94a0..2f986d42b93f 100644 --- a/sys/netinet6/in6.h +++ b/sys/netinet6/in6.h @@ -376,6 +376,8 @@ extern const struct in6_addr in6addr_linklocal_allv2routers; struct route_in6 { struct rtentry *ro_rt; struct llentry *ro_lle; + struct in6_addr *ro_ia6; + int ro_flags; struct sockaddr_in6 ro_dst; }; #endif