From: Maria Matejka Date: Sat, 27 Jan 2024 18:01:06 +0000 (+0100) Subject: Merge commit 'v2.13.1-162-g5bf25678' into thread-next X-Git-Tag: v3.0.0~306 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57b5eb5cbd4df38508393c8f4c39ab50cc0a5b6a;p=thirdparty%2Fbird.git Merge commit 'v2.13.1-162-g5bf25678' into thread-next --- 57b5eb5cbd4df38508393c8f4c39ab50cc0a5b6a diff --cc nest/mpls.h index 79c3a6e3e,c2bdf5ef5..9cb4925a1 --- a/nest/mpls.h +++ b/nest/mpls.h @@@ -100,10 -125,7 +100,6 @@@ proto_configure_mpls_channel(struct pro struct mpls_fec { u32 label; /* Label for FEC */ u32 hash; /* Hash for primary key (net / rta) */ - union { /* Extension part of key */ - u32 path_id; /* Source path_id */ - }; - - u32 uc; /* Number of LSPs for FEC */ u8 state; /* FEC state (MPLS_FEC_*) */ u8 policy; /* Label policy (MPLS_POLICY_*) */ @@@ -114,8 -133,13 +110,13 @@@ struct mpls_fec *next_k; /* Next in mpls_fec.net_hash/rta_hash */ struct mpls_fec *next_l; /* Next in mpls_fec.label_hash */ + + union { /* Extension part of key */ + u64 path_id; /* Source path_id */ + u32 class_id; /* Aaggregation class */ + }; union { /* Primary key */ - struct rta *rta; + struct ea_storage *rta; struct iface *iface; net_addr net[0]; }; @@@ -146,14 -169,13 +147,14 @@@ void mpls_fec_map_reconfigure(struct mp void mpls_fec_map_free(struct mpls_fec_map *m); struct mpls_fec *mpls_find_fec_by_label(struct mpls_fec_map *x, u32 label); struct mpls_fec *mpls_get_fec_by_label(struct mpls_fec_map *m, u32 label); - struct mpls_fec *mpls_get_fec_by_net(struct mpls_fec_map *m, const net_addr *net, u32 path_id); + struct mpls_fec *mpls_get_fec_by_net(struct mpls_fec_map *m, const net_addr *net, u64 path_id); -struct mpls_fec *mpls_get_fec_by_rta(struct mpls_fec_map *m, const rta *src, u32 class_id); -void mpls_free_fec(struct mpls_fec_map *x, struct mpls_fec *fec); -int mpls_handle_rte(struct mpls_fec_map *m, const net_addr *n, rte *r, linpool *lp, struct mpls_fec **locked_fec); -void mpls_handle_rte_cleanup(struct mpls_fec_map *m, struct mpls_fec **locked_fec); -void mpls_rte_insert(net *n UNUSED, rte *r); -void mpls_rte_remove(net *n UNUSED, rte *r); +struct mpls_fec *mpls_get_fec_by_destination(struct mpls_fec_map *m, ea_list *dest); + +void mpls_lock_fec(struct mpls_fec *fec); +void mpls_unlock_fec(struct mpls_fec *fec); + +int mpls_handle_rte(struct channel *c, const net_addr *n, rte *r, struct mpls_fec **fecp); +void mpls_rte_preimport(rte *new, const rte *old); struct mpls_show_ranges_cmd { diff --cc proto/l3vpn/l3vpn.c index c899d2029,8b56cd734..f2e8bf0f3 --- a/proto/l3vpn/l3vpn.c +++ b/proto/l3vpn/l3vpn.c @@@ -147,13 -148,8 +147,8 @@@ l3vpn_prepare_export_targets(struct l3v ASSERT(p->export_target_length == len); } - /* Convert 64-bit RD to 32bit source ID, unfortunately it has collisions */ - static inline struct rte_src * l3vpn_get_source(struct l3vpn_proto *p, u64 rd) - { return rt_get_source(&p->p, (u32)(rd >> 32) ^ u32_hash(rd)); } - //{ return p->p.main_source; } - static void -l3vpn_rt_notify(struct proto *P, struct channel *c0, net *net, rte *new, rte *old UNUSED) +l3vpn_rt_notify(struct proto *P, struct channel *c0, const net_addr *n0, rte *new, const rte *old UNUSED) { struct l3vpn_proto *p = (void *) P; struct rte_src *src = NULL;