Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

srv6: Introduce binding-sid end.b6.encaps used by TE policy. #15170

Draft
wants to merge 45 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
7b970f1
bgpd: Add API to get SRv6 locator info
cscarpitta Mar 23, 2024
213a3b9
bgpd: Deal with SRv6 locator instead of chunk
cscarpitta May 9, 2024
d735da4
bgpd: Receive SRv6 locator info from zebra
cscarpitta Mar 23, 2024
b72640a
bgpd: Add API to get/release SRv6 SIDs
cscarpitta Mar 23, 2024
79210c7
bgpd: Release SIDs when disabling SRv6 in BGP
cscarpitta Mar 23, 2024
0e24365
bgpd: Request SRv6 SIDs to SID Manager
cscarpitta Mar 23, 2024
e493b5f
bgpd: Make `sid_register()` non-static
cscarpitta May 10, 2024
8a99927
bgpd: Receive SRv6 SIDs notification from zebra
cscarpitta May 2, 2024
1bb07d2
bgpd: Cleanup related to SRv6
cscarpitta Mar 23, 2024
d787836
bgpd: add locator name in sid notify messages
pguibert6WIND Jun 8, 2024
f0c5d0d
zclient: add srv6 segs to zapi_srte_tunnel
dmytroshytyi-6WIND Dec 4, 2023
8d8c5d1
yang,pathd: add srv6-sid-value and nb handlers
dmytroshytyi-6WIND Nov 30, 2023
4cc248e
lib,pathd,zebra: fill segment_list with sr types
dmytroshytyi-6WIND Dec 4, 2023
83edae6
zebra: zapi, at least one label or srv6 sid check
dmytroshytyi-6WIND Nov 30, 2023
84c7ff8
zebra: fill nexthop with srv6 segs same as for labels
dmytroshytyi-6WIND Nov 30, 2023
4ede640
zebra: encode, decode srv6 segs
dmytroshytyi-6WIND Dec 4, 2023
b4b8369
zebra: fix srv6 segment-list sid order when read from kernel
dmytroshytyi-6WIND Feb 15, 2024
2e07911
pathd: add registration mechanism
dmytroshytyi-6WIND Feb 29, 2024
65f9860
pathd, lib: add srv6 policy with resolved nexthop info
pguibert6WIND Dec 3, 2023
f09d801
zebra: change srv6 policy based on segs change.
dmytroshytyi-6WIND Dec 4, 2023
cd5e592
zebra: if srv6 segs>0, put them in policy update message
dmytroshytyi-6WIND Dec 5, 2023
aadcee8
zebra: add srv6 nexthop resolution given by sr policy
dmytroshytyi-6WIND Jul 9, 2024
375cb5d
doc: add pathd srv6 segment-list support
pguibert6WIND Dec 11, 2023
1523c1b
topotest: isis_srv6_te_topo1
dmytroshytyi-6WIND Dec 11, 2023
3dba3f5
lib: Add ifindex to SRv6 SID ctx
cscarpitta Jun 24, 2024
e18b110
isisd: Pass ifindex when allocate End.X SIDs
cscarpitta Jun 24, 2024
a9839cb
zebra: Add CLI to show SRv6 SIDs
cscarpitta Jun 25, 2024
be33f8c
pathd: add 'debug pathd zebra' command
pguibert6WIND Jun 7, 2024
a60009d
lib: add srv6 context support for End.B6.Encap SID
pguibert6WIND Jun 7, 2024
1d908c6
doc: add srv6 te policy bsid
Dec 29, 2023
a30deff
lib, pathd, yang: add srv6_bsid, cli and nb handlers
Dec 29, 2023
b27d011
fix: lib: process nexthop_resolved in policy_encode
pguibert6WIND Dec 3, 2023
93ac770
lib: add zebra_route_srte symbol
Dec 29, 2023
66eb89f
lib: add missing SR-TE to ipv6 route show command
dmytroshytyi-6WIND Mar 23, 2024
2ac34a9
pathd: add path_zebra_send_bsid()
Dec 29, 2023
acc857e
lib, zebra, sharpd: add end.b6.encap support
Dec 29, 2023
26546d0
zebra: add end.b6.encaps to rt_netlink
Dec 29, 2023
be3f341
tests: add end.b6.encaps topotest
Dec 29, 2023
130188a
pathd: send ROUTE_DEL message to ZEBRA when BSID IPv6 is not installed
pguibert6WIND Jun 11, 2024
31a0806
pathd: add srv6 manager control over bsid-ipv6 of sr-te policies
pguibert6WIND Jun 7, 2024
1a21776
pathd: add srv6 locator register/unregister handling
pguibert6WIND Jul 16, 2024
7eb1f79
pathd: add "use-srv6-sid-manager" leaf command
dmytroshytyi-6WIND Aug 22, 2024
ef4e3cd
pathd: use "use-srv6-sid-manager" to sync with sid-manager
dmytroshytyi-6WIND Aug 22, 2024
f53618d
tests: topotests for bsid allocation modes
dmytroshytyi-6WIND Jul 18, 2024
f79c287
doc: add use-srv6-sid-manager command
dmytroshytyi-6WIND Aug 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
293 changes: 162 additions & 131 deletions bgpd/bgp_mplsvpn.c

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions bgpd/bgp_mplsvpn.h
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,8 @@ struct bgp_mplsvpn_nh_label_bind_cache *bgp_mplsvpn_nh_label_bind_find(
struct bgp_mplsvpn_nh_label_bind_cache_head *tree, struct prefix *p,
mpls_label_t orig_label);
void bgp_mplsvpn_nexthop_init(void);
extern void sid_register(struct bgp *bgp, const struct in6_addr *sid,
const char *locator_name);
extern void sid_unregister(struct bgp *bgp, const struct in6_addr *sid);

#endif /* _QUAGGA_BGP_MPLSVPN_H */
38 changes: 25 additions & 13 deletions bgpd/bgp_vty.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,18 +302,11 @@ static const char *get_afi_safi_json_str(afi_t afi, safi_t safi)
/* unset srv6 locator */
static int bgp_srv6_locator_unset(struct bgp *bgp)
{
int ret;
struct listnode *node, *nnode;
struct srv6_locator_chunk *chunk;
struct bgp_srv6_function *func;
struct bgp *bgp_vrf;

/* release chunk notification via ZAPI */
ret = bgp_zebra_srv6_manager_release_locator_chunk(
bgp->srv6_locator_name);
if (ret < 0)
return -1;

/* refresh chunks */
for (ALL_LIST_ELEMENTS(bgp->srv6_locator_chunks, node, nnode, chunk)) {
listnode_delete(bgp->srv6_locator_chunks, chunk);
Expand Down Expand Up @@ -352,20 +345,28 @@ static int bgp_srv6_locator_unset(struct bgp *bgp)
continue;

/* refresh vpnv4 tovpn_sid_locator */
srv6_locator_chunk_free(
&bgp_vrf->vpn_policy[AFI_IP].tovpn_sid_locator);
srv6_locator_free(bgp_vrf->vpn_policy[AFI_IP].tovpn_sid_locator);
bgp_vrf->vpn_policy[AFI_IP].tovpn_sid_locator = NULL;

/* refresh vpnv6 tovpn_sid_locator */
srv6_locator_chunk_free(
&bgp_vrf->vpn_policy[AFI_IP6].tovpn_sid_locator);
srv6_locator_free(
bgp_vrf->vpn_policy[AFI_IP6].tovpn_sid_locator);
bgp_vrf->vpn_policy[AFI_IP6].tovpn_sid_locator = NULL;

/* refresh per-vrf tovpn_sid_locator */
srv6_locator_chunk_free(&bgp_vrf->tovpn_sid_locator);
srv6_locator_free(bgp_vrf->tovpn_sid_locator);
bgp_vrf->tovpn_sid_locator = NULL;
}

/* clear locator name */
memset(bgp->srv6_locator_name, 0, sizeof(bgp->srv6_locator_name));

/* clear SRv6 locator */
if (bgp->srv6_locator) {
srv6_locator_free(bgp->srv6_locator);
bgp->srv6_locator = NULL;
}

return 0;
}

Expand Down Expand Up @@ -10878,7 +10879,7 @@ DEFPY (bgp_srv6_locator,
snprintf(bgp->srv6_locator_name,
sizeof(bgp->srv6_locator_name), "%s", name);

ret = bgp_zebra_srv6_manager_get_locator_chunk(name);
ret = bgp_zebra_srv6_manager_get_locator(name);
if (ret < 0)
return CMD_WARNING_CONFIG_FAILED;

Expand Down Expand Up @@ -10929,6 +10930,17 @@ DEFPY (show_bgp_srv6,
return CMD_SUCCESS;

vty_out(vty, "locator_name: %s\n", bgp->srv6_locator_name);
if (bgp->srv6_locator) {
vty_out(vty, " prefix: %pFX\n", &bgp->srv6_locator->prefix);
vty_out(vty, " block-length: %d\n",
bgp->srv6_locator->block_bits_length);
vty_out(vty, " node-length: %d\n",
bgp->srv6_locator->node_bits_length);
vty_out(vty, " func-length: %d\n",
bgp->srv6_locator->function_bits_length);
vty_out(vty, " arg-length: %d\n",
bgp->srv6_locator->argument_bits_length);
}
vty_out(vty, "locator_chunks:\n");
for (ALL_LIST_ELEMENTS_RO(bgp->srv6_locator_chunks, node, chunk)) {
vty_out(vty, "- %pFX\n", &chunk->prefix);
Expand Down
Loading
Loading