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

Pg srv6 te policy #17909

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

pguibert6WIND
Copy link
Member

draft. please do not review

dmytroshytyi-6WIND and others added 15 commits January 22, 2025 18:09
Add SRv6 segments to zapi_srte_stunnel structure.

Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
Add SRv6 SID value (srv6-sid-value) to the YANG model.
Implement nb handlers for this new value.

Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
Add structute sr_types_t, that contains the Segment Routing types.
Fill the zapi_sr_policy's segment_list with values such as:
- value
- local_label
- num_segs
- srv6_segs

Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
SR-TE tunnel must contain at least one label or SRv6 SID.
Check this condition.

Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
When the segment list is not empty add SRv6 segments
to a nexthop.

Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
Encode and Decode SRv6-TE. It includes:
- number of segments
- list of segments

Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
When configuring an SRv6 SID list via iproute2, the segment list
that appears in vtysh, learned from the kernel, is inversed.

Fix the order of SRv6 SIDs in segment list, learned from the
kernel.

Fixes: f20cf14 ("bgpd,lib,sharpd,zebra: srv6 introduce multiple
segs/SIDs in nexthop")
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
Pathd needs to track the reachability of the first SID
of any SRv6 segment-list. Use the nexthop tracking
facility and add the pathd daemon as a client to nht service
from zebra.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
The Pathd daemon is aware of the SID reachability, but
still once the sr policy installed in zebra, there is need
to re-resolve the SID reachability.

Extend the Pathd NHT service, by extracting the resolved
next-hop. This information will be conveyed in the SR_POLICY_SET
message, and will be very helpful to simplify code in zebra.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
When SRv6 list of segments was changed, change SRv6 policy.

Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
…nt_list

When notifying an update for a colored nexthop, ZEBRA sends the default PATHD
distance value and the 0 metric value. Those two values break the original
values that originated from an IGP route, for instance. When transmitting this
information to BGP for instance, the distance and values are very important
when computing BGP paths. Change this by keeping the original distance and
metric values.

When SRv6 segment list size is bigger than 0, send segments
and other elements via zserv_send_message().

The ZEBRA SRTE code can not rely on the routing table. Use instead the
resolved nexthop information gathered by th SRv6 SRTE information.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
Consider an srv6 policy active, when sr policy set is
received. The sr_policy_validate() function is however
called, the default state value is down, and immediately
sent to UP.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
Add pathd srv6 segment list support.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
SRv6 Policy is an ordered list of segments that represent a
source-routed policy. Packet flows are steered into an SRv6
Policy.

Signed-off-by: Dmytro Shytyi <dmytro@shytyi@6wind.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants