Skip to content

Commit

Permalink
OSPFd: Update Segment Routing PR following review
Browse files Browse the repository at this point in the history
Following various review, following files have been modfied:

 - All: Change u_intXX_t typedef to standard uintXX_t types
 - doc/OSPF-SR.rst: Update doc in particular the Linux Kernel configuration
section
 - doc/ospfd.texi: Update CLI
 - ospfd/ospf_dump.[c,h]: Add new 'debug ospf sr' when performing 'sh run'
 - ospfd/ospf_ext.[c, h]: Various bug corrections notably to handle flooding of
Extended Prefix at startup. iFix TLVs size for LAN Adjacency.
Update Licence as per Community.md
 - ospfd/ospf_opaque.c: Add proper termination function call to remove MPLS entries
 - ospfd/ospf_ri.[c,h]: Bug corrections
 - ospfd/ospf_sr.[c,h]: Various bug corrections, notably to determine the nexthop
SR Node. Add support to 'no-php-flag'.
Update Licence as per Community.md
 - ospfd/ospfd.c: Add call to 'ospf_opaque_term()'

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
  • Loading branch information
odd22 committed Jan 29, 2018
1 parent 93f0a26 commit 7743f2f
Show file tree
Hide file tree
Showing 12 changed files with 976 additions and 782 deletions.
249 changes: 181 additions & 68 deletions doc/OSPF-SR.rst

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions doc/ospfd.texi
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ Show Router Capabilities PCE parameters.
@section Segment Routing

This is an EXPERIMENTAL support of Segment Routing as per draft
draft-ietf-ospf-segment-routing-extensions-24i for MPLS dataplane.
draft-ietf-ospf-segment-routing-extensions-24.txt for MPLS dataplane.

@deffn {OSPF Command} {segment-routing on} {}
@deffnx {OSPF Command} {no segment-routing} {}
Expand All @@ -746,15 +746,17 @@ label in the MPLS FIB.

@deffn {OSPF Command} {segment-routing node-msd (1-16)} {}
@deffnx {OSPF Command} {no segment-routing node-msd} {}
Fix the Maximum Stack Depth supported by the router. The value depend of the
Fix the Maximum Stack Depth supported by the router. The value depend of the
MPLS dataplane. E.g. for Linux kernel, since version 4.13 it is 32.
@end deffn

@deffn {OSPF Command} {segment-routing prefix A.B.C.D/M index (0-65535)} {}
@deffnx {OSPF Command} {segment-routing prefix A.B.C.D/M index (0-65535) no-php-flag} {}
@deffnx {OSPF Command} {no segment-routing prefix A.B.C.D/M} {}
Set the Segment Rounting index for the specifyed prefix. Note
that, only prefix with /32 corresponding to a loopback interface are
currently supported.
that, only prefix with /32 corresponding to a loopback interface are
currently supported. The 'no-php-flag' means NO Penultimate Hop Popping that
allows SR node to request to its neighbor to not pop the label.
@end deffn

@deffn {Command} {show ip ospf database segment-routing} {}
Expand Down
12 changes: 12 additions & 0 deletions ospfd/ospf_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -1788,6 +1788,18 @@ static int config_write_debug(struct vty *vty)
write = 1;
}

/* debug ospf te */
if (IS_CONF_DEBUG_OSPF(te, TE) == OSPF_DEBUG_TE) {
vty_out(vty, "debug ospf%s te\n", str);
write = 1;
}

/* debug ospf sr */
if (IS_CONF_DEBUG_OSPF(sr, SR) == OSPF_DEBUG_SR) {
vty_out(vty, "debug ospf%s sr\n", str);
write = 1;
}

return write;
}

Expand Down
10 changes: 5 additions & 5 deletions ospfd/ospf_dump.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@
/* Macro for checking debug option. */
#define IS_DEBUG_OSPF_PACKET(a, b) (term_debug_ospf_packet[a] & OSPF_DEBUG_##b)
#define IS_DEBUG_OSPF(a, b) (term_debug_ospf_##a & OSPF_DEBUG_##b)
#define IS_DEBUG_OSPF_EVENT IS_DEBUG_OSPF(event,EVENT)
#define IS_DEBUG_OSPF_EVENT IS_DEBUG_OSPF(event, EVENT)

#define IS_DEBUG_OSPF_NSSA IS_DEBUG_OSPF(nssa,NSSA)
#define IS_DEBUG_OSPF_NSSA IS_DEBUG_OSPF(nssa, NSSA)

#define IS_DEBUG_OSPF_TE IS_DEBUG_OSPF(te,TE)
#define IS_DEBUG_OSPF_TE IS_DEBUG_OSPF(te, TE)

#define IS_DEBUG_OSPF_EXT IS_DEBUG_OSPF(ext,EXT)
#define IS_DEBUG_OSPF_EXT IS_DEBUG_OSPF(ext, EXT)

#define IS_DEBUG_OSPF_SR IS_DEBUG_OSPF(sr,SR)
#define IS_DEBUG_OSPF_SR IS_DEBUG_OSPF(sr, SR)

#define IS_CONF_DEBUG_OSPF_PACKET(a, b) \
(conf_debug_ospf_packet[a] & OSPF_DEBUG_##b)
Expand Down
Loading

0 comments on commit 7743f2f

Please sign in to comment.