summaryrefslogtreecommitdiff
path: root/doc/developer
diff options
context:
space:
mode:
Diffstat (limited to 'doc/developer')
-rw-r--r--doc/developer/building-docker.rst64
-rw-r--r--doc/developer/building-frr-for-openbsd6.rst17
-rw-r--r--doc/developer/lists.rst10
3 files changed, 90 insertions, 1 deletions
diff --git a/doc/developer/building-docker.rst b/doc/developer/building-docker.rst
index 852a295fd0..35b51cd9c0 100644
--- a/doc/developer/building-docker.rst
+++ b/doc/developer/building-docker.rst
@@ -12,6 +12,13 @@ source-built FRR on the following base platforms:
* Centos 7
* Centos 8
+The following platform images are used to support Travis CI and can also
+be used to reproduce topotest failures when the docker host is Ubuntu
+(tested on 18.04 and 20.04):
+
+* Ubuntu 18.04
+* Ubuntu 20.04
+
The following platform images may also be built, but these simply install a
binary package from an existing repository and do not perform source builds:
@@ -99,3 +106,60 @@ No script::
No script, multi-arch (ex. amd64, arm64)::
docker buildx build --platform linux/amd64,linux/arm64 -f docker/centos-8/Dockerfile -t frr-centos8:latest .
+
+
+
+Building Ubuntu 18.04 Image
+---------------------------
+
+Build image (from project root directory)::
+
+ docker build -t frr-ubuntu18:latest -f docker/ubuntu18-ci/Dockerfile .
+
+Start the container::
+
+ docker run -d --privileged --name frr-ubuntu18 --mount type=bind,source=/lib/modules,target=/lib/modules frr-ubuntu18:latest
+
+Running a topotest (when the docker host is Ubuntu)::
+
+ docker exec frr-ubuntu18 bash -c 'cd ~/frr/tests/topotests/ospf-topo1 ; sudo pytest test_ospf_topo1.py'
+
+Starting an interactive bash session::
+
+ docker exec -it frr-ubuntu18 bash
+
+Stopping an removing a container::
+
+ docker stop frr-ubuntu18 ; docker rm frr-ubuntu18
+
+Removing the built image::
+
+ docker rmi frr-ubuntu18:latest
+
+
+Building Ubuntu 20.04 Image
+---------------------------
+
+Build image (from project root directory)::
+
+ docker build -t frr-ubuntu20:latest -f docker/ubuntu20-ci/Dockerfile .
+
+Start the container::
+
+ docker run -d --privileged --name frr-ubuntu20 --mount type=bind,source=/lib/modules,target=/lib/modules frr-ubuntu20:latest
+
+Running a topotest (when the docker host is Ubuntu)::
+
+ docker exec frr-ubuntu20 bash -c 'cd ~/frr/tests/topotests/ospf-topo1 ; sudo pytest test_ospf_topo1.py'
+
+Starting an interactive bash session::
+
+ docker exec -it frr-ubuntu20 bash
+
+Stopping an removing a container::
+
+ docker stop frr-ubuntu20 ; docker rm frr-ubuntu20
+
+Removing the built image::
+
+ docker rmi frr-ubuntu20:latest
diff --git a/doc/developer/building-frr-for-openbsd6.rst b/doc/developer/building-frr-for-openbsd6.rst
index f307cacdfc..88446685e0 100644
--- a/doc/developer/building-frr-for-openbsd6.rst
+++ b/doc/developer/building-frr-for-openbsd6.rst
@@ -14,6 +14,7 @@ Add packages:
::
+ pkg_add clang libcares python3
pkg_add git autoconf-2.69p2 automake-1.15.1 libtool bison
pkg_add gmake json-c py-test py-sphinx libexecinfo
@@ -47,6 +48,19 @@ Download Source, configure and compile it
(You may prefer different options on configure statement. These are just
an example)
+.. warning::
+
+ In openbsd the proper links for the libyang library may not have been created.
+
+::
+
+ ln -s /usr/lib/libyang.so.1.10.17 /usr/lib/libyang.so
+
+.. warning::
+
+ ``openbsd`` since version 6.2 has ``clang`` as the default compiler so to
+ build frr, clang must be used (the included gcc version is very old).
+
::
git clone https://github.com/frrouting/frr.git frr
@@ -67,7 +81,8 @@ an example)
--enable-logfile-mask=0640 \
--enable-fpm \
--with-pkg-git-version \
- --with-pkg-extra-version=-MyOwnFRRVersion
+ --with-pkg-extra-version=-MyOwnFRRVersion \
+ CC=clang
gmake
gmake check
doas gmake install
diff --git a/doc/developer/lists.rst b/doc/developer/lists.rst
index 86db788c0e..553bd1f596 100644
--- a/doc/developer/lists.rst
+++ b/doc/developer/lists.rst
@@ -108,6 +108,8 @@ Functions provided:
| _first, _next, _next_safe, | yes | yes | yes | yes | yes |
| _const_first, _const_next | | | | | |
+------------------------------------+------+------+------+---------+------------+
+| _swap_all | yes | yes | yes | yes | yes |
++------------------------------------+------+------+------+---------+------------+
| _add_head, _add_tail, _add_after | yes | -- | -- | -- | -- |
+------------------------------------+------+------+------+---------+------------+
| _add | -- | yes | yes | yes | yes |
@@ -322,6 +324,14 @@ The following documentation assumes that a list has been defined using
return ``item``. The function may also call ``assert()`` (but most
don't.)
+.. c:function:: itemtype *Z_swap_all(struct Z_head *, struct Z_head *)
+
+ Swap the contents of 2 containers (of identical type). This exchanges the
+ contents of the two head structures and updates pointers if necessary for
+ the particular data structure. Fast for all structures.
+
+ (Not currently available on atomic containers.)
+
.. todo::
``Z_del_after()`` / ``Z_del_hint()``?