From: Maria Matejka Date: Tue, 25 Jun 2024 12:41:34 +0000 (+0200) Subject: BGP: using closer pointer for netindex hash than all the way to the table X-Git-Tag: v3.0.0~115 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f7874a5c91d769c8159563ed14508d6a3831a6e;p=thirdparty%2Fbird.git BGP: using closer pointer for netindex hash than all the way to the table --- diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c index 2450f657a..bab8bb5e0 100644 --- a/proto/bgp/attrs.c +++ b/proto/bgp/attrs.c @@ -1723,7 +1723,7 @@ bgp_get_prefix(struct bgp_ptx_private *c, struct netindex *ni, struct rte_src *s .ni = ni, }; - net_lock_index(c->c->c.table->netindex, ni); + net_lock_index(c->exporter.netindex, ni); rt_lock_source(src); HASH_INSERT2(c->prefix_hash, PXH, c->pool, px); @@ -1795,7 +1795,7 @@ bgp_free_prefix(struct bgp_ptx_private *c, struct bgp_prefix *px) { HASH_REMOVE2(c->prefix_hash, PXH, c->pool, px); - net_unlock_index(c->c->c.table->netindex, px->ni); + net_unlock_index(c->exporter.netindex, px->ni); rt_unlock_source(px->src); sl_free(px); @@ -1885,7 +1885,7 @@ bgp_out_feed_net(struct rt_exporter *e, struct rcu_unwinder *u, u32 index, _Bool SKIP_BACK_DECLARE(struct bgp_ptx_private, c, exporter, e); ASSERT_DIE(DOMAIN_IS_LOCKED(rtable, c->lock)); - struct netindex *ni = net_resolve_index(c->c->c.table->netindex, index); + struct netindex *ni = net_resolve_index(c->exporter.netindex, index); if (ni == &net_index_out_of_range) return &rt_feed_index_out_of_range;