0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-09 12:48:43 +00:00

Merge branch 'mq-aggregator-for-v3' into thread-next

This commit is contained in:
Maria Matejka 2023-11-01 18:08:49 +01:00
commit f90f2ed680
6 changed files with 7 additions and 7 deletions

View File

@ -65,7 +65,7 @@ int rte_same(const rte *, const rte *);
struct rte_src {
struct rte_src *next; /* Hash chain */
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 */
_Atomic u64 uc; /* Use count */
};

View File

@ -198,7 +198,7 @@ static struct idm src_ids;
#define RSH_KEY(n) n->private_id
#define RSH_NEXT(n) n->next
#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_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);
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);
uint gm = atomic_load_explicit(&rte_src_global_max, memory_order_relaxed);

View File

@ -79,7 +79,7 @@ rt_show_rte(struct cli *c, byte *ia, rte *e, struct rt_show_data *d, int primary
if (d->verbose)
{
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);
}
else if (dest == RTD_UNICAST)

View File

@ -735,7 +735,7 @@ rte_mergable(const rte *pri, const rte *sec)
static void
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,
e->src->private_id, e->src->global_id, e->stale_cycle, e->id,
rta_dest_name(rte_dest(e)));

View File

@ -2472,7 +2472,7 @@ bgp_bmp_encode_rte(struct bgp_channel *c, byte *buf, const net_addr *n,
/* Temporary prefix */
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);
add_tail(&b->prefixes, &px->buck_node_xx);

View File

@ -490,7 +490,7 @@ mrt_rib_table_entry(struct mrt_table_dump_state *s, rte *r)
/* Path Identifier */
if (s->add_path)
mrt_put_u32(b, r->src->private_id);
mrt_put_u32(b, (u32) r->src->private_id);
/* Route Attributes */
mrt_put_u16(b, 0);