fabricd: adjust IS-IS defaults as per draft

OpenFabric specifies that it should always be run with wide metrics via
P2P links and only as Level-2. Implement this as default and remove all
the knobs from fabricd which allow other configuration.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
This commit is contained in:
Christian Franke 2018-03-22 14:58:53 +01:00
parent 32c248ef37
commit 65f1815711
2 changed files with 36 additions and 27 deletions

View File

@ -412,7 +412,7 @@ void isis_circuit_if_add(struct isis_circuit *circuit, struct interface *ifp)
isis_circuit_if_bind(circuit, ifp); isis_circuit_if_bind(circuit, ifp);
if (if_is_broadcast(ifp)) { if (if_is_broadcast(ifp)) {
if (circuit->circ_type_config == CIRCUIT_T_P2P) if (fabricd || circuit->circ_type_config == CIRCUIT_T_P2P)
circuit->circ_type = CIRCUIT_T_P2P; circuit->circ_type = CIRCUIT_T_P2P;
else else
circuit->circ_type = CIRCUIT_T_BROADCAST; circuit->circ_type = CIRCUIT_T_BROADCAST;
@ -976,6 +976,7 @@ int isis_interface_config_write(struct vty *vty)
} }
/* ISIS - circuit type */ /* ISIS - circuit type */
if (!fabricd) {
if (circuit->is_type == IS_LEVEL_1) { if (circuit->is_type == IS_LEVEL_1) {
vty_out(vty, " " PROTO_NAME " circuit-type level-1\n"); vty_out(vty, " " PROTO_NAME " circuit-type level-1\n");
write++; write++;
@ -986,6 +987,7 @@ int isis_interface_config_write(struct vty *vty)
write++; write++;
} }
} }
}
/* ISIS - CSNP interval */ /* ISIS - CSNP interval */
if (circuit->csnp_interval[0] if (circuit->csnp_interval[0]

View File

@ -105,10 +105,13 @@ struct isis_area *isis_area_create(const char *area_tag)
area = XCALLOC(MTYPE_ISIS_AREA, sizeof(struct isis_area)); area = XCALLOC(MTYPE_ISIS_AREA, sizeof(struct isis_area));
/* /*
* The first instance is level-1-2 rest are level-1, unless otherwise * Fabricd runs only as level-2.
* configured * For IS-IS, the first instance is level-1-2 rest are level-1,
* unless otherwise configured
*/ */
if (listcount(isis->area_list) > 0) if (fabricd) {
area->is_type = IS_LEVEL_2;
} else if (listcount(isis->area_list) > 0)
area->is_type = IS_LEVEL_1; area->is_type = IS_LEVEL_1;
else else
area->is_type = IS_LEVEL_1_AND_2; area->is_type = IS_LEVEL_1_AND_2;
@ -1896,6 +1899,7 @@ int isis_config_write(struct vty *vty)
write++; write++;
} }
/* ISIS - Metric-Style - when true displays wide */ /* ISIS - Metric-Style - when true displays wide */
if (!fabricd) {
if (area->newmetric) { if (area->newmetric) {
if (!area->oldmetric) if (!area->oldmetric)
vty_out(vty, " metric-style wide\n"); vty_out(vty, " metric-style wide\n");
@ -1907,12 +1911,14 @@ int isis_config_write(struct vty *vty)
vty_out(vty, " metric-style narrow\n"); vty_out(vty, " metric-style narrow\n");
write++; write++;
} }
}
/* ISIS - overload-bit */ /* ISIS - overload-bit */
if (area->overload_bit) { if (area->overload_bit) {
vty_out(vty, " set-overload-bit\n"); vty_out(vty, " set-overload-bit\n");
write++; write++;
} }
/* ISIS - Area is-type (level-1-2 is default) */ /* ISIS - Area is-type (level-1-2 is default) */
if (!fabricd) {
if (area->is_type == IS_LEVEL_1) { if (area->is_type == IS_LEVEL_1) {
vty_out(vty, " is-type level-1\n"); vty_out(vty, " is-type level-1\n");
write++; write++;
@ -1920,6 +1926,7 @@ int isis_config_write(struct vty *vty)
vty_out(vty, " is-type level-2-only\n"); vty_out(vty, " is-type level-2-only\n");
write++; write++;
} }
}
write += isis_redist_config_write(vty, area, AF_INET); write += isis_redist_config_write(vty, area, AF_INET);
write += isis_redist_config_write(vty, area, AF_INET6); write += isis_redist_config_write(vty, area, AF_INET6);
/* ISIS - Lsp generation interval */ /* ISIS - Lsp generation interval */