mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 17:51:53 +00:00
Merge branch 'mq-aggregator-for-v3' into thread-next
This commit is contained in:
commit
f90f2ed680
@ -65,7 +65,7 @@ int rte_same(const rte *, const rte *);
|
|||||||
struct rte_src {
|
struct rte_src {
|
||||||
struct rte_src *next; /* Hash chain */
|
struct rte_src *next; /* Hash chain */
|
||||||
struct rte_owner *owner; /* Route source owner */
|
struct rte_owner *owner; /* Route source owner */
|
||||||
u32 private_id; /* Private ID, assigned by the protocol */
|
u64 private_id; /* Private ID, assigned by the protocol */
|
||||||
u32 global_id; /* Globally unique ID of the source */
|
u32 global_id; /* Globally unique ID of the source */
|
||||||
_Atomic u64 uc; /* Use count */
|
_Atomic u64 uc; /* Use count */
|
||||||
};
|
};
|
||||||
|
@ -198,7 +198,7 @@ static struct idm src_ids;
|
|||||||
#define RSH_KEY(n) n->private_id
|
#define RSH_KEY(n) n->private_id
|
||||||
#define RSH_NEXT(n) n->next
|
#define RSH_NEXT(n) n->next
|
||||||
#define RSH_EQ(n1,n2) n1 == n2
|
#define RSH_EQ(n1,n2) n1 == n2
|
||||||
#define RSH_FN(n) u32_hash(n)
|
#define RSH_FN(n) u64_hash(n)
|
||||||
|
|
||||||
#define RSH_REHASH rte_src_rehash
|
#define RSH_REHASH rte_src_rehash
|
||||||
#define RSH_PARAMS /2, *2, 1, 1, 8, 20
|
#define RSH_PARAMS /2, *2, 1, 1, 8, 20
|
||||||
@ -257,7 +257,7 @@ rt_get_source_o(struct rte_owner *p, u32 id)
|
|||||||
|
|
||||||
HASH_INSERT2(p->hash, RSH, rta_pool, src);
|
HASH_INSERT2(p->hash, RSH, rta_pool, src);
|
||||||
if (config->table_debug)
|
if (config->table_debug)
|
||||||
log(L_TRACE "Allocated new rte_src for %s, ID %uL %uG, have %u sources now",
|
log(L_TRACE "Allocated new rte_src for %s, ID %luL %uG, have %u sources now",
|
||||||
p->name, src->private_id, src->global_id, p->uc);
|
p->name, src->private_id, src->global_id, p->uc);
|
||||||
|
|
||||||
uint gm = atomic_load_explicit(&rte_src_global_max, memory_order_relaxed);
|
uint gm = atomic_load_explicit(&rte_src_global_max, memory_order_relaxed);
|
||||||
|
@ -79,7 +79,7 @@ rt_show_rte(struct cli *c, byte *ia, rte *e, struct rt_show_data *d, int primary
|
|||||||
if (d->verbose)
|
if (d->verbose)
|
||||||
{
|
{
|
||||||
ea_show_list(c, a);
|
ea_show_list(c, a);
|
||||||
cli_printf(c, -1008, "\tInternal route handling values: %uL %uG %uS id %u",
|
cli_printf(c, -1008, "\tInternal route handling values: %luL %uG %uS id %u",
|
||||||
e->src->private_id, e->src->global_id, e->stale_cycle, e->id);
|
e->src->private_id, e->src->global_id, e->stale_cycle, e->id);
|
||||||
}
|
}
|
||||||
else if (dest == RTD_UNICAST)
|
else if (dest == RTD_UNICAST)
|
||||||
|
@ -735,7 +735,7 @@ rte_mergable(const rte *pri, const rte *sec)
|
|||||||
static void
|
static void
|
||||||
rte_trace(const char *name, const rte *e, int dir, const char *msg)
|
rte_trace(const char *name, const rte *e, int dir, const char *msg)
|
||||||
{
|
{
|
||||||
log(L_TRACE "%s %c %s %N src %uL %uG %uS id %u %s",
|
log(L_TRACE "%s %c %s %N src %luL %uG %uS id %u %s",
|
||||||
name, dir, msg, e->net,
|
name, dir, msg, e->net,
|
||||||
e->src->private_id, e->src->global_id, e->stale_cycle, e->id,
|
e->src->private_id, e->src->global_id, e->stale_cycle, e->id,
|
||||||
rta_dest_name(rte_dest(e)));
|
rta_dest_name(rte_dest(e)));
|
||||||
|
@ -2472,7 +2472,7 @@ bgp_bmp_encode_rte(struct bgp_channel *c, byte *buf, const net_addr *n,
|
|||||||
|
|
||||||
/* Temporary prefix */
|
/* Temporary prefix */
|
||||||
struct bgp_prefix *px = tmp_allocz(prefix_size);
|
struct bgp_prefix *px = tmp_allocz(prefix_size);
|
||||||
px->path_id = src->private_id;
|
px->path_id = (u32) src->private_id;
|
||||||
net_copy(px->net, n);
|
net_copy(px->net, n);
|
||||||
add_tail(&b->prefixes, &px->buck_node_xx);
|
add_tail(&b->prefixes, &px->buck_node_xx);
|
||||||
|
|
||||||
|
@ -490,7 +490,7 @@ mrt_rib_table_entry(struct mrt_table_dump_state *s, rte *r)
|
|||||||
|
|
||||||
/* Path Identifier */
|
/* Path Identifier */
|
||||||
if (s->add_path)
|
if (s->add_path)
|
||||||
mrt_put_u32(b, r->src->private_id);
|
mrt_put_u32(b, (u32) r->src->private_id);
|
||||||
|
|
||||||
/* Route Attributes */
|
/* Route Attributes */
|
||||||
mrt_put_u16(b, 0);
|
mrt_put_u16(b, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user