]> git.puffer.fish Git - mirror/frr.git/commitdiff
*: do not send opaque data to zebra by default 10408/head
authorIgor Ryzhov <iryzhov@nfware.com>
Sun, 23 Jan 2022 13:08:46 +0000 (16:08 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Mon, 24 Jan 2022 19:18:46 +0000 (22:18 +0300)
Opaque data takes up a lot of memory when there are a lot of routes on
the box. Given that this is just a cosmetic info, I propose to disable
it by default to not shock people who start using FRR for the first time
or upgrades from an old version.

Fixes #10101.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
18 files changed:
bgpd/bgp_vty.c
bgpd/bgpd.c
doc/user/bgp.rst
ospf6d/ospf6_top.c
ospfd/ospf_vty.c
ospfd/ospfd.c
tests/topotests/bgp_community_alias/r1/bgpd.conf
tests/topotests/bgp_community_alias/r2/bgpd.conf
tests/topotests/bgp_route_map_match_ipv6_nexthop/r1/bgpd.conf
tests/topotests/bgp_route_map_match_ipv6_nexthop/r2/bgpd.conf
tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/r1/bgpd.conf
tests/topotests/bgp_srv6l3vpn_to_bgp_vrf/r2/bgpd.conf
tests/topotests/zebra_opaque/r1/bgpd.conf
tests/topotests/zebra_opaque/r2/bgpd.conf
tests/topotests/zebra_opaque/r3/ospf6d.conf
tests/topotests/zebra_opaque/r3/ospfd.conf
tests/topotests/zebra_opaque/r4/ospf6d.conf
tests/topotests/zebra_opaque/r4/ospfd.conf

index e3f1abe74879956b87e3369a7e59dfef04c36e55..36fe17bc0e33102e5e58155815702b8498a95902 100644 (file)
@@ -16994,8 +16994,8 @@ int bgp_config_write(struct vty *vty)
        if (bgp_option_check(BGP_OPT_NO_FIB))
                vty_out(vty, "bgp no-rib\n");
 
-       if (!CHECK_FLAG(bm->flags, BM_FLAG_SEND_EXTRA_DATA_TO_ZEBRA))
-               vty_out(vty, "no bgp send-extra-data zebra\n");
+       if (CHECK_FLAG(bm->flags, BM_FLAG_SEND_EXTRA_DATA_TO_ZEBRA))
+               vty_out(vty, "bgp send-extra-data zebra\n");
 
        /* BGP configuration. */
        for (ALL_LIST_ELEMENTS(bm->bgp, mnode, mnnode, bgp)) {
index 72e7a936c622c7567d4c8645388dce1578e5f5ef..f33ec1479335ebd9be9bf428619b1797126d8b46 100644 (file)
@@ -7725,8 +7725,6 @@ void bgp_master_init(struct thread_master *master, const int buffer_size,
        bm->socket_buffer = buffer_size;
        bm->wait_for_fib = false;
 
-       SET_FLAG(bm->flags, BM_FLAG_SEND_EXTRA_DATA_TO_ZEBRA);
-
        bgp_mac_init();
        /* init the rd id space.
           assign 0th index in the bitfield,
index 004b1723ee8917d89f5ccf115e63c0d2e4d5cfa5..7d7335a23f0a2f267a4b1c314aec929f4b9d5584 100644 (file)
@@ -3921,11 +3921,11 @@ configuration write operation.
 
 .. clicmd:: bgp send-extra-data zebra
 
-This Command turns off the ability of BGP to send extra data to zebra.
-In this case it's the AS-Path being used for the path.  The default behavior
-in BGP is to send this data and to turn it off enter the no form of the command.
-If extra data was sent to zebra, and this command is turned on there is no
-effort to clean up this data in the rib.
+This command turns on the ability of BGP to send extra data to zebra. Currently,
+it's the AS-Path, communities, and the path selection reason. The default
+behavior in BGP is not to send this data. If the routes were sent to zebra and
+the option is changed, bgpd doesn't reinstall the routes to comply with the new
+setting.
 
 .. _bgp-suppress-fib:
 
index e2db77d44bb38cbdebdf49dc78868d45558e8134..2e9e32f2e0f056c5832927c625e054b325789de6 100644 (file)
@@ -436,7 +436,6 @@ static struct ospf6 *ospf6_create(const char *name)
        o->fd = -1;
 
        o->max_multipath = MULTIPATH_NUM;
-       SET_FLAG(o->config_flags, OSPF6_SEND_EXTRA_DATA_TO_ZEBRA);
 
        o->oi_write_q = list_new();
 
@@ -2236,9 +2235,9 @@ static int config_write_ospf6(struct vty *vty)
                        vty_out(vty, " ospf6 router-id %pI4\n",
                                &ospf6->router_id_static);
 
-               if (!CHECK_FLAG(ospf6->config_flags,
-                               OSPF6_SEND_EXTRA_DATA_TO_ZEBRA))
-                       vty_out(vty, " no ospf6 send-extra-data zebra\n");
+               if (CHECK_FLAG(ospf6->config_flags,
+                              OSPF6_SEND_EXTRA_DATA_TO_ZEBRA))
+                       vty_out(vty, " ospf6 send-extra-data zebra\n");
 
                /* log-adjacency-changes flag print. */
                if (CHECK_FLAG(ospf6->config_flags,
index 36cb0673e059ef363d9fb5f956990bae68e32242..482319ffb4a0aea73c81cd8ef5f8365fd2b1d12a 100644 (file)
@@ -12297,8 +12297,8 @@ static int ospf_config_write_one(struct vty *vty, struct ospf *ospf)
                        &ospf->router_id_static);
 
        /* zebra opaque attributes configuration. */
-       if (!CHECK_FLAG(ospf->config, OSPF_SEND_EXTRA_DATA_TO_ZEBRA))
-               vty_out(vty, " no ospf send-extra-data zebra\n");
+       if (CHECK_FLAG(ospf->config, OSPF_SEND_EXTRA_DATA_TO_ZEBRA))
+               vty_out(vty, " ospf send-extra-data zebra\n");
 
        /* ABR type print. */
        if (ospf->abr_type != OSPF_ABR_DEFAULT)
index 726ce329e33a9dd4d623a9a44402ee52c27af78e..e5f3eec60378a624cbad3fa16aedeae4faae3f2a 100644 (file)
@@ -406,8 +406,6 @@ struct ospf *ospf_new_alloc(unsigned short instance, const char *name)
 
        ospf_opaque_type11_lsa_init(new);
 
-       SET_FLAG(new->config, OSPF_SEND_EXTRA_DATA_TO_ZEBRA);
-
        QOBJ_REG(new, ospf);
 
        new->fd = -1;
index 13b57ad243795ba7031dd49667ab2c1b57ff0bb7..844ab28558f0207a9c7bf867f7212252ea1d3230 100644 (file)
@@ -1,4 +1,6 @@
 !
+bgp send-extra-data zebra
+!
 bgp community alias 65001:1 community-r2-1
 bgp community alias 65002:2 community-r2-2
 bgp community alias 65001:1:1 large-community-r2-1
index 9276fe592dda9341bcdca0924fe56d7d5d9a24e4..78060770237966a8c2a60cbd64583edee26ccadc 100644 (file)
@@ -1,3 +1,6 @@
+!
+bgp send-extra-data zebra
+!
 router bgp 65002
  no bgp ebgp-requires-policy
  neighbor 192.168.1.1 remote-as external
index c2a49252d6a8bc3f244457ee422a0708b6223d27..8b743bd3206ea1822f58aa3834a39774bc872ddf 100644 (file)
@@ -1,4 +1,6 @@
 !
+bgp send-extra-data zebra
+!
 ipv6 access-list nh1 permit 2001:db8:1::/64
 ipv6 access-list nh2 permit 2001:db8:2::/64
 ipv6 access-list nh3 permit 2001:db8:3::/64
index 19dcf3664b8f649e7163ac7f0aaae652abb9ec8e..61c36d366bbe9ffed7f499a168ff1949a28f7c32 100644 (file)
@@ -1,4 +1,6 @@
 !
+bgp send-extra-data zebra
+!
 router bgp 65002
  bgp router-id 10.10.10.2
  no bgp ebgp-requires-policy
index d07d0532e3700b78f564ccb879e0b1abf0aa5a23..d113db12b10557a11f604411721e58aff72cc191 100644 (file)
@@ -1,5 +1,7 @@
 frr defaults traditional
 !
+bgp send-extra-data zebra
+!
 hostname r1
 password zebra
 !
index d0b3ea8ada6c2336ca2a58698837d087bbd9ee8a..9a7831dd2a366aad687d9b582cfafde4cace7e85 100644 (file)
@@ -1,5 +1,7 @@
 frr defaults traditional
 !
+bgp send-extra-data zebra
+!
 hostname r2
 password zebra
 !
index b0eac45bba408032b7df5addb9c55b0ada709cb5..3831360d92482b2e697b8907cc1252f8b3867bd5 100644 (file)
@@ -1,4 +1,6 @@
 !
+bgp send-extra-data zebra
+!
 router bgp 65001
  no bgp ebgp-requires-policy
  neighbor 192.168.1.2 remote-as external
index 517ef70f2a0c807094df996a30368fdf6e72ef4d..ec4760515c2dd1b50f01d8baff96869a6bc76802 100644 (file)
@@ -1,3 +1,6 @@
+!
+bgp send-extra-data zebra
+!
 router bgp 65002
  no bgp ebgp-requires-policy
  neighbor 192.168.1.1 remote-as external
index bf3d18c6dd81e258d3613b0077253b48511f88b7..7782f4061b2f55e5d90194eb28cc2b8ab2a2386c 100644 (file)
@@ -5,4 +5,5 @@ interface r3-eth0
  ipv6 ospf6 dead-interval 10
 !
 router ospf6
+ ospf6 send-extra-data zebra
 !
index fdc7a978667ab5496d552510c4c944cc6d773c6f..f1492676ade5a830004366fa34731bd5e5d61c21 100644 (file)
@@ -5,4 +5,5 @@ interface r3-eth0
  ip ospf dead-interval 10
 !
 router ospf
+ ospf send-extra-data zebra
 !
index 3b6846ff1345d925d25c2f7aa248c359b92c556f..5118a53584ffa88a0ffe11ae9f1440a052c258e8 100644 (file)
@@ -5,4 +5,5 @@ interface r4-eth0
  ipv6 ospf6 dead-interval 10
 !
 router ospf6
+ ospf6 send-extra-data zebra
 !
index 6e08beebca31aab8866f98738831dcc0a97b0725..0da181b78fc21788f2525933681b2ce097a31192 100644 (file)
@@ -5,4 +5,5 @@ interface r4-eth0
  ip ospf dead-interval 10
 !
 router ospf
+ ospf send-extra-data zebra
 !