Skip to content

Commit 5f74b03

Browse files
abhiramnarayanarjarry
authored andcommitted
docs: revert back to scdoc for man pages
Switch from using go-md2man (markdown) back to scdoc for man page generation. Change the existing static man pages from .md to .scdoc format keeping the contents intact. Also, do required meson.build configuration changes to use scdoc instead of go-md2man Signed-off-by: Abhiram R N <abhiramrn@gmail.com> Reviewed-by: Robin Jarry <rjarry@redhat.com>
1 parent b6cce4e commit 5f74b03

13 files changed

Lines changed: 260 additions & 281 deletions

File tree

.github/workflows/check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
set -xe
6868
sudo apt-get update -qy
6969
sudo apt-get install -qy --no-install-recommends \
70-
make gcc gdb ccache ninja-build meson git go-md2man \
70+
make gcc gdb ccache ninja-build meson git scdoc \
7171
libibverbs-dev libasan8 libcmocka-dev libedit-dev libarchive-dev \
7272
libevent-dev libsmartcols-dev libmnl-dev libnuma-dev python3-pyelftools \
7373
socat tcpdump traceroute graphviz iproute2 iputils-ping ndisc6 jq \
@@ -128,7 +128,7 @@ jobs:
128128
dpkg --add-architecture arm64
129129
apt update -qy
130130
apt install -qy --no-install-recommends \
131-
make gcc ccache git meson go-md2man python3-pyelftools ca-certificates pkg-config \
131+
make gcc ccache git meson scdoc python3-pyelftools ca-certificates pkg-config \
132132
crossbuild-essential-arm64 libcmocka-dev:arm64 libedit-dev:arm64 \
133133
libevent-dev:arm64 libmnl-dev:arm64 libnuma-dev:arm64 libsmartcols-dev:arm64
134134
- uses: actions/checkout@v4

.github/workflows/package.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
apt-get update -qy
2727
apt-get install -qy --no-install-recommends \
2828
autoconf automake bash-completion bison build-essential debhelper \
29-
ccache curl devscripts flex git go-md2man libarchive-dev libcap-dev \
29+
ccache curl devscripts flex git scdoc libarchive-dev libcap-dev \
3030
libcmocka-dev libedit-dev libelf-dev libevent-dev libibverbs-dev \
3131
libjson-c-dev libmnl-dev libnuma-dev libprotobuf-c-dev libreadline-dev \
3232
librtr-dev libsmartcols-dev libtool libyang-dev meson ninja-build \
@@ -80,7 +80,7 @@ jobs:
8080
dnf install -y epel-release
8181
dnf --enablerepo=crb install -y --nodocs --setopt=install_weak_deps=0 \
8282
autoconf automake bison ccache elfutils-libelf-devel flex gcc-toolset-13 \
83-
git golang-github-cpuguy83-md2man json-c-devel libarchive-devel \
83+
git scdoc json-c-devel libarchive-devel \
8484
libcap-devel libcmocka-devel libedit-devel libevent-devel libmnl-devel \
8585
libsmartcols-devel libyang-devel libtool make meson ninja-build \
8686
numactl-devel pkgconf protobuf-c-compiler protobuf-c-devel \

GNUmakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ rpm:
104104
CLANG_FORMAT ?= clang-format
105105
c_src = git ls-files '*.[ch]' ':!:subprojects'
106106
all_files = git ls-files ':!:subprojects'
107-
licensed_files = git ls-files ':!:*.svg' ':!:licenses' ':!:*.md' ':!:*.asc' ':!:subprojects' ':!:debian' ':!:.*'
107+
licensed_files = git ls-files ':!:*.svg' ':!:licenses' ':!:*.md' ':!:*.asc' ':!:subprojects' ':!:debian' ':!:.*' ':!:*.scdoc'
108108

109109
.PHONY: lint
110110
lint:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ image.
259259

260260
```sh
261261
dnf install git gcc make meson ninja-build pkgconf \
262-
python3-pyelftools golang-github-cpuguy83-md2man libmnl-devel \
262+
python3-pyelftools scdoc libmnl-devel \
263263
libcmocka-devel libedit-devel libevent-devel numactl-devel \
264264
libsmartcols-devel libarchive-devel rdma-core-devel
265265
```
@@ -268,7 +268,7 @@ or
268268

269269
```sh
270270
apt install git gcc make meson ninja-build pkgconf \
271-
python3-pyelftools go-md2man \
271+
python3-pyelftools scdoc \
272272
libcmocka-dev libedit-dev libevent-dev libnuma-dev libmnl-dev \
273273
libsmartcols-dev libarchive-dev libibverbs-dev
274274
```
@@ -375,7 +375,7 @@ Anyone can contribute to `grout`. See [`CONTRIBUTING.md`](/CONTRIBUTING.md).
375375
| cmocka | Build | Apache-2.0 | https://github.com/clibs/cmocka |
376376
| meson | Build | Apache-2.0 | https://github.com/mesonbuild/meson |
377377
| ninja | Build | Apache-2.0 | https://github.com/ninja-build/ninja |
378-
| go-md2man | Build | MIT | https://github.com/cpuguy83/go-md2man |
378+
| scdoc | Build | MIT | https://git.sr.ht/~sircmpwn/scdoc |
379379
| libasan | Dev | MIT+BSD | https://github.com/gcc-mirror/gcc/tree/master/libsanitizer |
380380
| clang-format | Dev | MIT+BSD | https://clang.llvm.org/docs/ClangFormat.html |
381381

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Build-Depends:
88
debhelper-compat (= 13),
99
bash-completion,
1010
git,
11-
go-md2man,
11+
scdoc,
1212
libarchive-dev,
1313
libcmocka-dev,
1414
libedit-dev,

docs/grcli.1.md

Lines changed: 0 additions & 68 deletions
This file was deleted.

docs/grcli.1.scdoc

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
GRCLI(1)
2+
3+
# NAME
4+
5+
grcli - grout command line interface
6+
7+
# DESCRIPTION
8+
9+
Grout is a software router based on DPDK _rte_graph_.
10+
11+
# SYNOPSIS
12+
13+
*grcli*
14+
\[*-e*]
15+
\[*-f* _PATH_]
16+
\[*-h*]
17+
\[*-s* _PATH_]
18+
\[*-V*]
19+
\[*-x*]
20+
...
21+
22+
# OPTIONS
23+
24+
*-e*, *--err-exit*
25+
Abort on first error.
26+
27+
*-f* _PATH_, *--file* _PATH_
28+
Read commands from _PATH_ instead of standard input.
29+
30+
*-h*, *--help*
31+
Show this help message and exit.
32+
33+
*-s* _PATH_, *--socket* _PATH_
34+
Path to the control plane API socket.
35+
36+
Default: *GROUT_SOCK_PATH* from environment or _/run/grout.sock_.
37+
38+
*-V*, *--version*
39+
Print version and exit.
40+
41+
*-x*, *--trace-commands*
42+
Print executed commands.
43+
44+
# ENVIRONMENT
45+
46+
*GROUT_SOCK_PATH*
47+
Path to the control plane API socket. If not set, defaults to
48+
_/run/grout.sock_.
49+
50+
*DPRC*
51+
Set the DPRC - Datapath Resource Container: This value should match the
52+
one used by DPDK during the scan of the fslmc bus. It is recommended to
53+
set this on any NXP QorIQ targets. This serves as the entry point for
54+
grcli to enable autocompletion of fslmc devices manageable by grout.
55+
While grcli can configure grout without this environment setting,
56+
autocompletion of the devargs will not be available.
57+
58+
# SEE ALSO
59+
60+
*grout*(8)
61+
62+
# AUTHORS
63+
64+
Created and maintained by Robin Jarry.
Lines changed: 36 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,66 @@
1-
GROUT-FRR 7 @DATE@ "grout @VERSION@"
2-
================================
1+
GROUT-FRR(7)
32

4-
# FRR + Grout: Transparent BGP Peering via Loopback Interfaces
3+
# INTRODUCTION
54

6-
This guide demonstrates how to configure FRR (Free Range Routing) and Linux networking to establish BGP peering
7-
between Grout and an upstream router, without assigning IP addresses directly to the Linux interface.
5+
This guide demonstrates how to configure FRR (Free Range Routing) and Linux
6+
networking to establish BGP peering between Grout and an upstream router,
7+
without assigning IP addresses directly to the Linux interface.
88

9-
0. Context
10-
1. How packets are forwarded from Grout to `gr-loop0`
11-
2. Linux configuration to peer without adding a local ip
12-
3. BGPD configuration
13-
---
9+
# CONTEXT
1410

15-
## 0. Ease of Use
11+
By default, FRR daemons such as _bgpd_ require binding to a local IP address to
12+
accept incoming peer connections. This necessitates explicitly adding all Grout
13+
"local" IPs to the _gr-loop0_ interface. However, this approach is cumbersome
14+
and not ideal.
1615

17-
By default, FRR daemons such as `bgpd` require binding to a local IP address to accept incoming peer connections.
18-
This necessitates explicitly adding all Grout "local" IPs to the `gr-loop0` interface.
19-
However, this approach is cumbersome and not ideal.
16+
The objective is to run _bgpd_ without assigning any IP address to the
17+
_gr-loop0_ network device. This is achieved by utilizing the _IP_TRANSPARENT_
18+
socket option and FRR's capability to bind to a specific interface.
2019

21-
The objective is to run `bgpd` without assigning any IP address to the `gr-loop0` network device.
22-
This is achieved by utilizing the `IP_TRANSPARENT` socket option and FRR's capability to bind to a specific interface.
20+
# PACKETS FROM GROUT TO gr-loop0
2321

24-
---
22+
All packets received to a *local* IP configured in grout will be processed by
23+
the node _ip_input_local_/_ip6_input_local_. If the protocol isn't handled
24+
locally (ICMP, Neighbor Disc, ...), the packets are forwarded to
25+
_l4_input_local_. If still unhandled (e.g., VXLAN Tunnel), the packet is sent to
26+
the corresponding _gr-loopX_ interface associated with the VRF.
2527

26-
## 1. Packets from grout to gr-loop0
28+
# FRR CONFIGURATION OVERVIEW
2729

28-
All packets received to a **local** IP configured in grout will be processed by the node `ip_input_local/ip6_input_local`.
29-
If the protocol isn't handled locally (ICMP, Neighbor Disc, ...), the packets are forwarded to `l4_input_local`.
30-
If still unhandled (e.g., VXLAN Tunnel), the packet is sent to the corresponding `gr-loopX` interface associated with the VRF.
30+
Zebra must be run with the _-M_ option to load the plugin:
31+
Edit the file _/etc/frr/daemons_, for example:
3132

32-
---
33-
34-
## 2. FRR Configuration Overview
35-
36-
Zebra must be run with the `-M` option to load the plugin:
37-
Edit the file `/etc/frr/daemons`, for example:
38-
39-
```ini
33+
```
4034
zebra_options=" -A 127.0.0.1 -s 90000000 -M dplane_grout"
4135
```
4236

43-
```frr
37+
And the corresponding _frr.conf_:
38+
39+
```
4440
service integrated-vtysh-config
4541
!
4642
interface cv0
47-
ip address 192.168.210.1/24
43+
ip address 192.168.210.1/24
4844
exit
4945
!
5046
router bgp 64513
51-
neighbor 192.168.210.3 remote-as 64513
52-
neighbor 192.168.210.3 interface gr-loop0
53-
neighbor 192.168.210.3 update-source 192.168.210.1
47+
neighbor 192.168.210.3 remote-as 64513
48+
neighbor 192.168.210.3 interface gr-loop0
49+
neighbor 192.168.210.3 update-source 192.168.210.1
5450
exit
5551
!
5652
end
5753
```
5854

5955
Two additional configurations for a neighbor are required:
60-
- source interface, `gr-loop0`, only required for the default VRF
56+
57+
- source interface, _gr-loop0_, only required for the default VRF
6158
- update source IP, local Grout IP
6259

63-
With that configuration, BGP messages are properly exchanged, and routes are visible in grout:
60+
With that configuration, BGP messages are properly exchanged, and routes are
61+
visible in grout:
6462

65-
```frr
63+
```
6664
vtysh# show bgp summary
6765

6866
IPv4 Unicast Summary:
@@ -77,7 +75,7 @@ Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down Sta
7775
Total number of neighbors 1
7876
```
7977

80-
```grout
78+
```
8179
grout# route show
8280
VRF DESTINATION NEXT_HOP
8381
0 192.168.1.0/24 type=L3 id=10 iface=p0 vrf=0 origin=bgp af=IPv4 addr=192.168.210.3 state=new

0 commit comments

Comments
 (0)