bgpd: move auto config flag from bgp to srv6 unicast policy - #21735
Conversation
Greptile SummaryThis PR refactors the SRv6 unicast auto-mode flag from Confidence Score: 5/5Safe to merge — clean, mechanical refactoring with no remaining references to the old flag and the previously flagged P0 issue fully resolved. All occurrences of BGP_CONFIG_SRV6_UNICAST_SID_AUTO have been migrated consistently across every consumer. The previously raised P0 concern (is_srv6_unicast_enabled reading from the stale location) is fixed. No remaining P0/P1 findings. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["sid export auto (VTY command)"] --> B["SET_FLAG(bgp->srv6_unicast[afi].flags,\nSRV6_POLICY_FLAG_SID_AUTO)"]
B --> C["is_srv6_unicast_enabled(bgp, afi)"]
C -->|"CHECK_FLAG srv6_unicast[afi].flags\nSRV6_POLICY_FLAG_SID_AUTO"| D["Returns true"]
D --> E["bgp_srv6_unicast_ensure_afi_sid()"]
E --> F["bgp_config_write_family()\nemits 'sid export auto'"]
G["no sid export / delete"] --> H["UNSET_FLAG(bgp->srv6_unicast[afi].flags,\nSRV6_POLICY_FLAG_SID_AUTO)"]
H --> I["bgp_srv6_unicast_delete()"]
Reviews (2): Last reviewed commit: "bgpd: move auto config flag from bgp to ..." | Re-trigger Greptile |
0ee6e9b to
650bb88
Compare
Move SID allocation auto mode on bgp to srv6 unicast policy. This is a better fit and rename to SRV6_POLICY_FLAG_SID_AUTO. Signed-off-by: Loïc Sang <loic.sang@6wind.com>
|
@greptile review |
No description provided.