public inbox for
help / color / mirror / Atom feed
* [newlib-cygwin] Convert route caching to nexthop caching.
@ 2022-07-11 11:51 Sebastian Huber
  0 siblings, 0 replies; only message in thread
From: Sebastian Huber @ 2022-07-11 11:51 UTC (permalink / raw)
  To: newlib-cvs;h=b94869335751ff08d5d5b276d24eeab3f9da9a9b

commit b94869335751ff08d5d5b276d24eeab3f9da9a9b
Author: Alexander V. Chernikov <>
Date:   Sat Apr 25 09:06:11 2020 +0000

    Convert route caching to nexthop caching.
    This change is build on top of nexthop objects introduced in r359823.
    Nexthops are separate datastructures, containing all necessary information
     to perform packet forwarding such as gateway interface and mtu. Nexthops
     are shared among the routes, providing more pre-computed cache-efficient
     data while requiring less memory. Splitting the LPM code and the attached
     data solves multiple long-standing problems in the routing layer,
     drastically reduces the coupling with outher parts of the stack and allows
     to transparently introduce faster lookup algorithms.
    Route caching was (re)introduced to minimise (slow) routing lookups, allowing
     for notably better performance for large TCP senders. Caching works by
     acquiring rtentry reference, which is protected by per-rtentry mutex.
     If the routing table is changed (checked by comparing the rtable generation id)
     or link goes down, cache record gets withdrawn.
    Nexthops have the same reference counting interface, backed by refcount(9).
    This change merely replaces rtentry with the actual forwarding nextop as a
     cached object, which is mostly mechanical. Other moving parts like cache
     cleanup on rtable change remains the same.
    Differential Revision:

 newlib/libc/sys/rtems/include/netinet6/in6.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/newlib/libc/sys/rtems/include/netinet6/in6.h b/newlib/libc/sys/rtems/include/netinet6/in6.h
index f6399eed1..68d4c3e4e 100644
--- a/newlib/libc/sys/rtems/include/netinet6/in6.h
+++ b/newlib/libc/sys/rtems/include/netinet6/in6.h
@@ -265,8 +265,13 @@ extern const struct in6_addr in6addr_linklocal_allv2routers;
  * IP6 route structure
+struct nhop_object;
 struct route_in6 {
+#if __FreeBSD_version >= 1300092
+	struct nhop_object *ro_nh;
 	struct	rtentry *ro_rt;
 	struct	llentry *ro_lle;
 	 * ro_prepend and ro_plen are only used for bpf to pass in a

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-11 11:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-11 11:51 [newlib-cygwin] Convert route caching to nexthop caching Sebastian Huber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).