mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
isisd: update struct isis_sr_psid_info with algorithm id
The information in prefix-sid has a new property called algorithm id. This is used to identify the algorithm that separates it in the same IGP network. This is used in Flex-Algo.In all other cases, the algorithm id is basically 0. Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com> Signed-off-by: Eric Kinzie <ekinzie@labn.net> Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
This commit is contained in:
parent
1f0d13e922
commit
7f8dddf430
|
@ -273,6 +273,9 @@ static bool isis_sr_psid_info_same(struct isis_sr_psid_info *new,
|
|||
|| new->sid.value != old->sid.value)
|
||||
return false;
|
||||
|
||||
if (new->sid.algorithm != old->sid.algorithm)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -585,6 +585,8 @@ isis_spf_add2tent(struct isis_spftree *spftree, enum vertextype vtype, void *id,
|
|||
vertex->N.ip.sr.sid = *psid;
|
||||
vertex->N.ip.sr.label =
|
||||
sr_prefix_in_label(area, psid, local);
|
||||
vertex->N.ip.sr.algorithm = psid->algorithm;
|
||||
|
||||
if (vertex->N.ip.sr.label != MPLS_INVALID_LABEL)
|
||||
vertex->N.ip.sr.present = true;
|
||||
|
||||
|
@ -965,7 +967,8 @@ lspfragloop:
|
|||
struct isis_prefix_sid *psid =
|
||||
(struct isis_prefix_sid *)i;
|
||||
|
||||
if (psid->algorithm != SR_ALGORITHM_SPF)
|
||||
if (psid->algorithm !=
|
||||
spftree->algorithm)
|
||||
continue;
|
||||
|
||||
has_valid_psid = true;
|
||||
|
@ -1033,7 +1036,8 @@ lspfragloop:
|
|||
struct isis_prefix_sid *psid =
|
||||
(struct isis_prefix_sid *)i;
|
||||
|
||||
if (psid->algorithm != SR_ALGORITHM_SPF)
|
||||
if (psid->algorithm !=
|
||||
spftree->algorithm)
|
||||
continue;
|
||||
|
||||
has_valid_psid = true;
|
||||
|
@ -1157,7 +1161,7 @@ static int isis_spf_preload_tent_ip_reach_cb(const struct prefix *prefix,
|
|||
struct isis_prefix_sid *psid =
|
||||
(struct isis_prefix_sid *)i;
|
||||
|
||||
if (psid->algorithm != SR_ALGORITHM_SPF)
|
||||
if (psid->algorithm != spftree->algorithm)
|
||||
continue;
|
||||
|
||||
has_valid_psid = true;
|
||||
|
|
|
@ -61,6 +61,8 @@ struct isis_sr_psid_info {
|
|||
|
||||
/* Indicates whether the Prefix-SID is present or not. */
|
||||
bool present;
|
||||
|
||||
uint8_t algorithm;
|
||||
};
|
||||
|
||||
/* Segment Routing Local Block allocation */
|
||||
|
|
|
@ -333,8 +333,8 @@ void isis_zebra_prefix_sid_install(struct isis_area *area,
|
|||
struct zapi_labels zl;
|
||||
int count = 0;
|
||||
|
||||
sr_debug("ISIS-Sr (%s): update label %u for prefix %pFX",
|
||||
area->area_tag, psid->label, prefix);
|
||||
sr_debug("ISIS-Sr (%s): update label %u for prefix %pFX algorithm %u",
|
||||
area->area_tag, psid->label, prefix, psid->algorithm);
|
||||
|
||||
/* Prepare message. */
|
||||
memset(&zl, 0, sizeof(zl));
|
||||
|
@ -400,8 +400,8 @@ void isis_zebra_prefix_sid_uninstall(struct isis_area *area,
|
|||
{
|
||||
struct zapi_labels zl;
|
||||
|
||||
sr_debug("ISIS-Sr (%s): delete label %u for prefix %pFX",
|
||||
area->area_tag, psid->label, prefix);
|
||||
sr_debug("ISIS-Sr (%s): delete label %u for prefix %pFX algorithm %u",
|
||||
area->area_tag, psid->label, prefix, psid->algorithm);
|
||||
|
||||
/* Prepare message. */
|
||||
memset(&zl, 0, sizeof(zl));
|
||||
|
|
Loading…
Reference in a new issue