Commit Graph

9930 Commits

Author SHA1 Message Date
Philippe Guibert
fe3da9e773 ospfd: fix compilation issue with ospfd
the change of vrf_id field from 16 bit to 32 bit leads to some changes
in other daemon.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-01-22 13:52:24 +01:00
Philippe Guibert
3eca551fec lib: ns_id_t changed to 32 bit
Because the VRF_ID is mapped into 32 bit, and because when NETNS will be
the backend of VRF, then the NS identifier must also be encoded as 32
bit.
Also, the NS_UNKNOWN value is changed accordingly to UINT32_MAX.
Also, the NS_UNKNOWN and NS_DEFAULT values are removed from zebra_ns.h
and kept on ns.h header file.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-01-22 13:52:24 +01:00
Philippe Guibert
3bd74754c9 lib: vrf_bitmap_groups increased from 8 to 1024
The number of vrf bitmap groups is increased so as to avoid consuming
too much memory. This fix is related to a fork memory that occured when
running pimd as daemon.
A check on memory consumed shows that the memory consumed goes from
33480ko to 46888ko with that change. This is less compared to if the
value of the bitmap groups is increased to 16 ( 852776ko).

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-01-22 13:52:23 +01:00
Philippe Guibert
a9ff90c41b lib: increase vrf_id from 16 bit to 32 bit identifier
This is a preparatory work for configuring vrf/frr over netns
vrf structure is being changed to 32 bit, and the VRF will have the
possibility to have a backend made up of NETNS.

Let's put some history.
Initially the 32 bit was because one wanted to map on vrf_id both the
VRFLITE and the NSID.
Initially, one would have liked to make zebra configure at the same time
both vrf lite and vrf from netns in a flat way. From the show
running perspective, one would have had both kind of vrfs, thatone
would configure on the same way.
however, it leads to inconsistencies in concepts, because it mixes vrf
vrf with vrf, and vrf is not always mapped with netns.
For instance, logical-router could also be used with netns. In that
case, it would not be possible to map vrf with netns.
There was an other reason why 32 bit is proposed. this is because
some systems handle NSID to 32 bits. As vrf lite exists only on
Linux, there are other systems that would like to use an other vrf
backend than vrf lite. The netns backend for vrf will be used for that
too. for instance, for windows or freebsd, some similar
netns concept exists; so it will be easier to reuse netns
backend for vrf, than reusing vrflite backend for vrf.

This commit is here to extend vrf_id to 32 bits. Following commits in a
second step will help in enable a VRF backend.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2018-01-22 13:52:17 +01:00
Olivier Dugeon
4ff9eb721d
Merge pull request #1647 from chiragshah6/ospf_vrf_dev
ospfd: show ip ospf interface json output format
2018-01-19 17:40:14 +01:00
Donald Sharp
00711784cb
Merge pull request #1630 from LabNConsulting/working/master/pr1629-no-json
bgpd: fix reporting of no vpn routes (no json)
2018-01-19 07:59:34 -05:00
Jafar Al-Gharaibeh
0c6a8fb9ec
Merge pull request #1566 from chiragshah6/ospfv3_dev
ospf6d: Fix External routes ECMP
2018-01-18 10:54:52 -06:00
Jafar Al-Gharaibeh
9ee9eb8066
Merge pull request #1645 from qlyoung/fix-cancel-invalid-rw
lib: avoid crash when cancelling invalid rw job
2018-01-18 09:37:24 -06:00
Jafar Al-Gharaibeh
81dadaca1a
Merge pull request #1648 from dwalton76/frr-reload
tools: frr-reload 'vni' keyword does not always create a sub-context
2018-01-18 09:32:41 -06:00
Jafar Al-Gharaibeh
f5b366fcef
Merge pull request #1646 from qlyoung/update-readme
frr: update README
2018-01-18 09:27:48 -06:00
Renato Westphal
a80281dcf1
Merge pull request #1650 from donaldsharp/hash_it_fucker
bgpd: Remove peer->hash as that it is unused
2018-01-17 20:59:56 -02:00
Renato Westphal
a23df59bf8
Merge pull request #1649 from donaldsharp/ospfd_lsdb_loop
ospfd: LSDB_LOOP treat it as a loop.
2018-01-17 20:58:18 -02:00
Donald Sharp
48a67e2c0a bgpd: Remove peer->hash as that it is unused
The peer->hash pointer is allocating a bunch of memory
but is never used.  Remove.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-17 14:17:15 -05:00
Donald Sharp
044506e7f8 ospfd: LSDB_LOOP treat it as a loop.
Inform the .clang-format file about LSDB_LOOP and
put the proper indentation for this loop into the
code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-17 13:29:58 -05:00
Daniel Walton
9d877afc13 tools: frr-reload 'vni' keyword does not always create a sub-context
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2018-01-17 15:57:50 +00:00
Quentin Young
91437c67e6
frr: update README
* Clarify that FRR implements as well as manages protocols
* Move IS-IS out of "early support"
* Add Babel - friends don't leave friends out of READMEs!
* Add mention of further information

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-01-16 15:54:32 -05:00
Chirag Shah
7dab10ce94 ospfd: show ip ospf interface json output format
Current json output does not differentiate start of
interface objects. Adding "interfaces" keyword at the
beginning of the interface list. This is useful
when displaying vrf level output along with interface list.

Ticket:CM-19115
Testing Done:
show ip ospf vrf all interface json
show ip ospf vrf all interface <specific intf> json
show ip ospf interface json
show ip ospf interface <specific intf> json

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2018-01-16 12:49:31 -08:00
Russ White
7c0c85a2eb
Merge pull request #1634 from qlyoung/vtysh-output-file
vtysh: add ability to output to file
2018-01-16 15:31:50 -05:00
Russ White
7256280c1b
Merge pull request #1627 from qlyoung/bgp-autoshutdown
BGP auto-shutdown
2018-01-16 15:29:17 -05:00
Quentin Young
42d745387a
lib: avoid crash when cancelling invalid rw job
There are some observed instances where we end up trying to cancel a rw
job based on a file descriptor that we don't have a reference on. The
specific cancel function for rw jobs assumes it's called with a file
descriptor that is valid within pollfds and will cause a segmentation
fault by buffer overrun if this is not the case.

Instead log it and move on. Since the fd does not exist this should
patch over the buggy behavior and provide additional information to help
in finding the root cause.

Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-01-16 15:28:26 -05:00
Renato Westphal
4e7b3288f5
Merge pull request #1625 from qlyoung/fix-peer-group-admin-shutdown-override
bgpd: preserve admin shutdown on peer-group add
2018-01-16 17:40:35 -02:00
Renato Westphal
04057a91b3
Merge pull request #1611 from qlyoung/fix-vtysh-perf
vtysh: optimize printout routine
2018-01-16 17:31:10 -02:00
Russ White
df294c8f2d
Merge pull request #1632 from dwalton76/bgpd-localas-allowasin
BGP "allowas-in" should accept AS paths with "local-as"
2018-01-16 13:48:46 -05:00
Lou Berger
49323fd71e
Merge pull request #1614 from qlyoung/imp-bgpd-pthread-startup-sync
improve bgpd thread startup characteristics
2018-01-16 13:43:27 -05:00
Olivier Dugeon
23b6084b8c
Merge pull request #1642 from chiragshah6/mdev1
ospfd: Speed up show ip ospf [vrf all] route json
2018-01-16 18:02:45 +01:00
Renato Westphal
21f8f3438f
Merge pull request #1638 from LabNConsulting/working/master/vnc2zebra
bgpd: fix handling of nhp_ary when exporting vrf routes to zebra
2018-01-16 10:19:57 -02:00
Renato Westphal
9d57c91faf
Merge pull request #1635 from qlyoung/bgpd-remove-options-directly-connected
bgpd: disallow invalid config at cli layer
2018-01-16 10:11:39 -02:00
Renato Westphal
dab1b55609
Merge pull request #1612 from chiragshah6/mdev
ospf6d: Add protocol stats and show command
2018-01-16 10:08:10 -02:00
Chirag Shah
1406159faa ospfd: Speed up show ip ospf [vrf all] route json
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2018-01-15 18:00:49 -08:00
Chirag Shah
43855e3d47 ospf6d: Add protocol stats and show command
Add OSPFv3 Protocol incoming/outgoing packets
stats.

r3# show ipv6 ospf6 interface traffic

Interface       HELLO            DB-Desc         LS-Req    LS-Update     LS-Ack
                Rx/Tx            Rx/Tx            Rx/Tx    Rx/Tx         Rx/Tx
--------------------------------------------------------------------------------------------
swp1              3/4              2/2             0/2     8/6           3/2
swp2              3/4              2/2             0/1     7/3           2/0
swp3              0/4              0/0             0/0     0/0           0/0

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2018-01-15 16:55:24 -08:00
Renato Westphal
3cd878d925
Merge pull request #1623 from donaldsharp/zebra_interface_one_shot
zebra: Add one-shot thread to recheck speed
2018-01-15 10:35:39 -02:00
Lou Berger
b40c50627a bgpd: fix handling of nhp_ary when exporting vrf routes to zebra
Signed-off-by: Lou Berger <lberger@labn.net>
2018-01-14 15:42:06 -05:00
Quentin Young
f26845f9a6
bgpd: add neighbor autoshutdown
Adds ability to specify that peers should be administratively shutdown
when first configured.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-01-12 15:03:24 -05:00
Quentin Young
a174be631a
bgpd: disallow invalid config at cli layer
Remove the ability to attempt to configure a couple of options on
directly connected neighbors that don't make sense for them, as well as
the soft error handling code.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-01-12 15:00:37 -05:00
Quentin Young
193a5a9579
vtysh: add ability to output to file
Add ability to set file destination for all vtysh output, with the
exception of tab-complete and similar meta output. This is useful for
inline recording of some information without exiting the shell.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-01-12 12:38:45 -05:00
Daniel Walton
c4368918e4 BGP "allowas-in" should accept AS paths with "local-as"
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>

For issue #1548
2018-01-12 15:31:16 +00:00
Donald Sharp
b782607f7f
Merge pull request #1626 from LabNConsulting/working/master/vnc-config
bgp: don't show vnc response-lifetime config line when set to default…
2018-01-12 08:54:36 -05:00
Lou Berger
0136788cd3 bgpd: fix summary line reporting routes with RDs (no json case)
Signed-off-by: Lou Berger <lberger@labn.net>
2018-01-12 08:45:48 -05:00
Philippe Guibert
8eac481260
Merge pull request #1455 from mkanjari/evpn-symmetric-routing
Support for Evpn symmetric routing + EVPN Prefix route
2018-01-12 08:27:37 +01:00
Renato Westphal
48442c0a9a
Merge pull request #1624 from qlyoung/fix-cmd-argc-max-usage
lib, bgpd: fixup use of of CMD_ARGC_MAX
2018-01-12 00:15:09 -02:00
Lou Berger
9b73cd86f5 bgp: don't show vnc response-lifetime config line when set to default value
Signed-off-by: Lou Berger <lberger@labn.net>
2018-01-11 17:09:26 -05:00
Quentin Young
89898ced5f
bgpd: preserve admin shutdown on peer-group add
When a peer configured with administrative shutdown is added to a peer
group, the administrative shutdown status is discarded and the peer will
enter the BGP FSM. This is not what we want. Preserve the flag instead.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-01-11 17:07:07 -05:00
Mitesh Kanjariya
4781461158
Merge branch 'master' into evpn-symmetric-routing 2018-01-11 09:57:47 -08:00
Mitesh Kanjariya
9bb77a5b3d
Merge branch 'master' into evpn-symmetric-routing 2018-01-11 09:00:23 -08:00
Quentin Young
09f6d019b4
lib, bgpd: fixup use of of CMD_ARGC_MAX
The constant to limit # of allowed cli tokens on any one line was
defined in multiple places, all inconsistent with each other. Fix.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2018-01-11 11:31:45 -05:00
Donald Sharp
dc7b3caefb zebra: Add one-shot thread to recheck speed
There are certain interfaces that when brought up and we receive
the netlink notification about it, the speed of the interface is
not set correctly.  This creates a one-shot thread that will
wait 15 seconds and then requery the speed and if it is different
it will renotify the running daemons.

The kernel should notify us on speed changes, unfortunately this
is not done currently via a netlink message as you would think.
As I understand it there is some in-fighting about the proper
way to approach this issue and due to the way the kernel release
cycle works we are a ways off from getting this fixed.  This
is a `hack` to make us work correctly while we wait for the
true answer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-11 09:52:34 -05:00
Russ White
c1240044fb
Merge pull request #1609 from dwalton76/ospf-reconfigure-area
ospfd: do not complain if same area is reconfigured
2018-01-10 20:12:19 -05:00
Russ White
51f682b368
Merge pull request #1616 from qlyoung/sharpd-gitignore
sharpd: add .gitignore
2018-01-10 20:10:09 -05:00
Russ White
d29715c48b
Merge pull request #1619 from donaldsharp/bgp_debugging
bgpd: 'summary' to show NoNeg if peer did not negotiate afi/safi
2018-01-10 20:00:51 -05:00
Russ White
3a92d531b8
Merge pull request #1620 from dslicenc/bgpd-vrf-redist
bgpd: fix updating redist bitmask when vrf_id changes
2018-01-10 20:00:14 -05:00