summaryrefslogtreecommitdiff
path: root/doc/developer
diff options
context:
space:
mode:
Diffstat (limited to 'doc/developer')
-rw-r--r--doc/developer/building-frr-for-opensuse.rst143
-rw-r--r--doc/developer/building.rst1
-rw-r--r--doc/developer/frr-release-procedure.rst49
-rw-r--r--doc/developer/memtypes.rst7
-rw-r--r--doc/developer/subdir.am1
-rw-r--r--doc/developer/topotests-jsontopo.rst2
6 files changed, 183 insertions, 20 deletions
diff --git a/doc/developer/building-frr-for-opensuse.rst b/doc/developer/building-frr-for-opensuse.rst
new file mode 100644
index 0000000000..5ed714a67e
--- /dev/null
+++ b/doc/developer/building-frr-for-opensuse.rst
@@ -0,0 +1,143 @@
+openSUSE
+========
+
+This document describes installation from source.
+
+These instructions have been tested on openSUSE Tumbleweed in a Raspberry Pi 400.
+
+Installing Dependencies
+-----------------------
+
+.. code-block:: console
+
+ zypper in git autoconf automake libtool make \
+ readline-devel texinfo net-snmp-devel groff pkgconfig libjson-c-devel\
+ pam-devel python3-pytest bison flex c-ares-devel python3-devel\
+ python3-Sphinx perl patch systemd-devel libcap-devel libyang-devel
+
+Building & Installing FRR
+-------------------------
+
+Add FRR user and groups
+^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: console
+
+ sudo groupadd -g 92 frr
+ sudo groupadd -r -g 85 frrvty
+ sudo useradd -u 92 -g 92 -M -r -G frrvty -s /sbin/nologin \
+ -c "FRR FRRouting suite" -d /var/run/frr frr
+
+Compile
+^^^^^^^
+
+.. include:: include-compile.rst
+
+Install FRR configuration files
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: console
+
+ sudo install -m 775 -o frr -g frr -d /var/log/frr
+ sudo install -m 775 -o frr -g frrvty -d /etc/frr
+ sudo install -m 640 -o frr -g frrvty tools/etc/frr/vtysh.conf /etc/frr/vtysh.conf
+ sudo install -m 640 -o frr -g frr tools/etc/frr/frr.conf /etc/frr/frr.conf
+ sudo install -m 640 -o frr -g frr tools/etc/frr/daemons.conf /etc/frr/daemons.conf
+ sudo install -m 640 -o frr -g frr tools/etc/frr/daemons /etc/frr/daemons
+
+.. note::
+
+ In some platforms like raspberry for performance reasons
+ some directories are in file systems (/var/run, ...) mounted with tempfs
+ so will disapear after every reboot.
+ In frr the /var/run/frr is used to store pid files for every daemon.
+
+Tweak sysctls
+^^^^^^^^^^^^^
+
+Some sysctls need to be changed in order to enable IPv4/IPv6 forwarding and
+MPLS (if supported by your platform). If your platform does not support MPLS,
+skip the MPLS related configuration in this section.
+
+Create a new file ``/etc/sysctl.d/90-routing-sysctl.conf`` with the following
+content:
+
+::
+
+ #
+ # Enable packet forwarding
+ #
+ net.ipv4.conf.all.forwarding=1
+ net.ipv6.conf.all.forwarding=1
+ #
+ # Enable MPLS Label processing on all interfaces
+ #
+ #net.mpls.conf.eth0.input=1
+ #net.mpls.conf.eth1.input=1
+ #net.mpls.conf.eth2.input=1
+ #net.mpls.platform_labels=100000
+
+.. note::
+
+ MPLS must be invidividually enabled on each interface that requires it. See
+ the example in the config block above.
+
+Load the modifed sysctls on the system:
+
+.. code-block:: console
+
+ sudo sysctl -p /etc/sysctl.d/90-routing-sysctl.conf
+
+Create a new file ``/etc/modules-load.d/mpls.conf`` with the following content:
+
+::
+
+ # Load MPLS Kernel Modules
+ mpls-router
+ mpls-iptunnel
+
+And load the kernel modules on the running system:
+
+.. code-block:: console
+
+ sudo modprobe mpls-router mpls-iptunnel
+
+
+.. note::
+ The ``firewalld`` service could be enabled. You may run into some
+ issues with the iptables rules it installs by default. If you wish to just
+ stop the service and clear `ALL` rules do these commands:
+
+ .. code-block:: console
+
+ sudo systemctl disable firewalld.service
+ sudo systemctl stop firewalld.service
+ sudo iptables -F
+
+Install frr Service
+^^^^^^^^^^^^^^^^^^^
+
+.. code-block:: console
+
+ sudo install -p -m 644 tools/frr.service /usr/lib/systemd/system/frr.service
+ sudo systemctl enable frr
+
+Enable daemons
+^^^^^^^^^^^^^^
+
+Open :file:`/etc/frr/daemons` with your text editor of choice. Look for the
+section with ``bgpd=no`` etc. Enable the daemons
+as required by changing the value to ``yes``.
+
+Start FRR
+^^^^^^^^^
+
+.. code-block:: console
+
+ sudo systemctl start frr
+
+Check the starting messages of frr with
+
+.. code-block:: console
+
+ journalctl -u frr --follow
diff --git a/doc/developer/building.rst b/doc/developer/building.rst
index 730741a8ef..a6cd545872 100644
--- a/doc/developer/building.rst
+++ b/doc/developer/building.rst
@@ -15,6 +15,7 @@ Building FRR
building-frr-for-debian8
building-frr-for-debian9
building-frr-for-fedora
+ building-frr-for-opensuse
building-frr-for-freebsd10
building-frr-for-freebsd11
building-frr-for-freebsd9
diff --git a/doc/developer/frr-release-procedure.rst b/doc/developer/frr-release-procedure.rst
index ff95aa04a9..5da73f61f6 100644
--- a/doc/developer/frr-release-procedure.rst
+++ b/doc/developer/frr-release-procedure.rst
@@ -20,7 +20,13 @@ FRR Release Procedure
git checkout -b stable/<version>
git push origin stable/<version>:refs/heads/stable/<version>
-3. Update Changelog for Red Hat Packages:
+3. Remove the development branch called ``dev/<version>``
+
+ .. code-block:: console
+
+ git push origin --delete dev/<version>
+
+4. Update Changelog for Red Hat Packages:
Edit :file:`redhat/frr.spec.in` and look for the ``%changelog`` section:
@@ -41,7 +47,7 @@ FRR Release Procedure
- Add the changelog text below this entry.
-4. Update Changelog for Debian Packages:
+5. Update Changelog for Debian Packages:
Edit :file:`changelog-auto.in`:
@@ -83,41 +89,41 @@ FRR Release Procedure
.
* Your Changes Here
-5. Change main version number:
+6. Change main version number:
- Edit :file:`configure.ac` and change version in the ``AC_INIT`` command
to ``<version>``
-6. Commit the changes, adding the changelog to the commit message. Follow all
+7. Commit the changes, adding the changelog to the commit message. Follow all
existing commit guidelines.
-7. Create and submit a GitHub pull request, with the ``HEAD`` set to
+8. Create and submit a GitHub pull request, with the ``HEAD`` set to
``stable/<version>`` and the base set to the upstream ``master`` branch.
Allow NetDef CI to complete its run and verify that all package builds were
successful.
-8. Create a git tag for the version:
+9. Create a git tag for the version:
.. code-block:: console
git tag -a frr-<version> -m "FRRouting Release <version>"
-9. Push the commit and new tag.
+10. Push the commit and new tag.
.. code-block:: console
git push origin stable/<version>:refs/head/stable/<version>
git push origin frr-<version>
-10. Kick off the Release build plan on the CI system for the correct release.
+11. Kick off the Release build plan on the CI system for the correct release.
Contact Martin Winter for this step. Ensure all release packages build
successfully.
-11. Kick off the Snapcraft build plan for the release.
+12. Kick off the Snapcraft build plan for the release.
-12. Acquire the release RPM binary packages from Martin Winter.
+13. Acquire the release RPM binary packages from Martin Winter.
-13. On GitHub, go to the <https://github.com/FRRouting/frr/releases>_ and click
+14. On GitHub, go to the <https://github.com/FRRouting/frr/releases>_ and click
"Draft a new release". Write a release announcement. The release
announcement should follow the template in
``release-announcement-template.md``, located next to this document. Check
@@ -129,27 +135,27 @@ FRR Release Procedure
attach source tarballs - these will be generated and attached by GitHub
automatically. Do not publish the release yet.
-14. Contact the current Debian maintainer for FRR to get new Debian packages
+15. Contact the current Debian maintainer for FRR to get new Debian packages
built and published on our APT repository at https://deb.frrouting.net/.
Ensure the webpage text is updated. Verify that new packages install
successfully on a vanilla Debian installation using the instructions on the
webpage.
-15. Deploy Snapcraft release (after CI system finishes the tests for snapcraft
+16. Deploy Snapcraft release (after CI system finishes the tests for snapcraft
testplan).
-16. Update the Read The Docs instance to being publishing documentation built
+17. Update the Read The Docs instance to being publishing documentation built
off the ``stable/<version>`` branch. Contact Quentin Young for this step.
-17. Publish the GitHub release.
+18. Publish the GitHub release.
-18. Clone the ``frr-www`` repository:
+19. Clone the ``frr-www`` repository:
.. code-block:: console
git clone https://github.com/FRRouting/frr-www.git
-19. Add a new release announcement, using a previous announcement as template:
+20. Add a new release announcement, using a previous announcement as template:
.. code-block:: console
@@ -174,8 +180,13 @@ FRR Release Procedure
Once finished, manually add a new entry into ``index.html`` to link to this
new announcement. Look at past commits to see how to do this.
-20. Deploy the updated ``frr-www`` on the frrouting.org web server and verify
+21. Deploy the updated ``frr-www`` on the frrouting.org web server and verify
that the announcement text is visible.
-21. Send an email to ``announce@lists.frrouting.org``. The text of this email
+22. Send an email to ``announce@lists.frrouting.org``. The text of this email
should include the text from the GitHub release.
+
+23. Update masters version of the changelog-auto.in
+
+ Take the change data and cut-n-paste the changes into the master version below
+ the @VERSION@-0 lines. So we have the history of the previous release.
diff --git a/doc/developer/memtypes.rst b/doc/developer/memtypes.rst
index e04049001d..952b316ea0 100644
--- a/doc/developer/memtypes.rst
+++ b/doc/developer/memtypes.rst
@@ -131,3 +131,10 @@ Usage
- if ptr is NULL, no operation is performed (as is guaranteed by system
implementations.) Do not surround XFREE with ``if (ptr != NULL)``
checks.
+
+.. c:function:: void XCOUNTFREE(struct memtype *mtype, void *ptr)
+
+ This macro is used to count the ``ptr`` as freed without actually freeing
+ it. This may be needed in some very specific cases, for example, when the
+ ``ptr`` was allocated using any of the above wrappers and will be freed
+ by some external library using simple ``free()``.
diff --git a/doc/developer/subdir.am b/doc/developer/subdir.am
index 57f885ecc1..3c0d203007 100644
--- a/doc/developer/subdir.am
+++ b/doc/developer/subdir.am
@@ -11,6 +11,7 @@ dev_RSTFILES = \
doc/developer/building-frr-for-debian8.rst \
doc/developer/building-frr-for-debian9.rst \
doc/developer/building-frr-for-fedora.rst \
+ doc/developer/building-frr-for-opensuse.rst \
doc/developer/building-frr-for-freebsd10.rst \
doc/developer/building-frr-for-freebsd11.rst \
doc/developer/building-frr-for-freebsd9.rst \
diff --git a/doc/developer/topotests-jsontopo.rst b/doc/developer/topotests-jsontopo.rst
index 1c77cd7be1..07f1f05114 100644
--- a/doc/developer/topotests-jsontopo.rst
+++ b/doc/developer/topotests-jsontopo.rst
@@ -95,7 +95,7 @@ The first step to write a new test is to define the topology and initial
configuration. User has to define topology and initial configuration in JSON
file. Here is an example of JSON file::
- BGP neihghborship with single phy-link, sample JSON file:
+ BGP neighborship with single phy-link, sample JSON file:
{
"ipv4base": "192.168.0.0",
"ipv4mask": 30,