Skip to content

Commit a5a80b4

Browse files
authored
Docs: order documentation in MTL (#1024)
Docs: order documentation in MTL (and also paralely in BCS and MCM repos (as MTL will be used as sub-module there)). Style of chapters change, comas, points, colons, numbering of sections, style of source code blocks consistent, source code with commend lines to be paste'able for user, isolate some parts of the text to be reused also in the documents of others repositories. Sphinx added generating the documentaries. Added ST41 to the architecture diagram. Added X540-AT2/X550T NICs to the architecture diagram.
1 parent 64894d8 commit a5a80b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1176
-778
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: documentation-build-and-publish
2+
on:
3+
workflow_call:
4+
workflow_dispatch:
5+
push:
6+
branches: [ "main" ]
7+
8+
env:
9+
DEBIAN_FRONTEND: noninteractive
10+
11+
permissions:
12+
contents: read
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
publishGitHubPages:
20+
name: Publish GitHub Pages
21+
permissions:
22+
contents: read
23+
id-token: write
24+
pages: write
25+
environment:
26+
name: github-pages
27+
url: ${{ steps.deployment.outputs.page_url }}
28+
runs-on: 'ubuntu-22.04'
29+
timeout-minutes: 20
30+
steps:
31+
- name: Secure the runner
32+
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
33+
with:
34+
egress-policy: audit
35+
36+
- name: Checkout
37+
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
38+
39+
- name: Prepare operating system for documentation build
40+
run: |
41+
sudo apt-get update -y && \
42+
sudo apt-get install -y --no-install-recommends make python3 python3-pip python3-sphinx
43+
44+
- name: Prepare environment for documentation build
45+
run: python3 -m pip install sphinx_book_theme myst_parser sphinxcontrib.mermaid sphinx-copybutton
46+
47+
- name: Build documentation
48+
run: make -C doc/sphinx html
49+
50+
- name: Upload GitHub Pages artifact
51+
uses: actions/[email protected]
52+
with:
53+
path: ./doc/_build/html
54+
55+
- name: Publish to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ mtl_system_status_*
8282
*.pcm
8383
*.wav
8484

85+
#Generated documentation
86+
doc/_build
87+
8588
# Gpu direct files
8689
gpu_direct/tests/fff.h
8790
gpu_direct/subprojects/*

.markdown-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ MD013:
2626
MD026:
2727
punctuation: ".,;:!。,;:" # List of not allowed
2828
MD029: false # Ordered list item prefix
29-
MD033: true # Allow inline HTML
29+
MD033: true # Allow inline HTML
3030
MD034: true # no-bare-urls
3131
MD036: false # Emphasis used instead of a heading
3232

CHANGELOG.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* st2110/30: add force NUMA option support on session level, see ST30_TX_FLAG_FORCE_NUMA/ST30_RX_FLAG_FORCE_NUMA
88
* ffmpeg: fix RX side dropping frames at the beginning of the session with st20/st22/st30.
99
* st22: fix last frame dropping in TX. Ensure that last frame status changed to FREE.
10-
* dpdk: optimizing memory pool size.
10+
* DPDK: optimizing memory pool size.
1111
* manager: fix docker build.
1212
* ffmpeg: improve unicast initialization, reduce amount of dropping frames in the beginning of the session.
1313
* ixgbe: add driver support. Tested on 10-Gigabit X540-AT2 (1528) and Intel 10G X550T (1563).
@@ -25,7 +25,7 @@
2525

2626
## Changelog for 24.06
2727

28-
* dpdk: upgrade dpdk version to 23.11.
28+
* DPDK: upgrade DPDK version to 23.11.
2929
* st22: add interlaced support.
3030
* log: add custom log printer, see mtl_set_log_printer.
3131
* rx/timing_parser: add timing_parser stat report for RX video, `--rx_timing_parser` in RxTxApp to enable.
@@ -48,11 +48,11 @@
4848
## Changelog for 23.12
4949

5050
* log: add log to file support, see mtl_openlog_stream.
51-
* dpdk: upgrade dpdk version to 23.07.
51+
* DPDK: upgrade DPDK version to 23.07.
5252
* virtio_user: add virtio_user support for exception path, deprecate kni.
5353
* st22p/tx: add external frame support, see ST22P_TX_FLAG_EXT_FRAME.
5454
* backend: add kernel socket based backend, see doc/kernel_socket.md.
55-
* dpdk pmd: add AF_PACKET PMD support, see doc/experimental/af_packet.md.
55+
* DPDK pmd: add AF_PACKET PMD support, see doc/experimental/af_packet.md.
5656
* st22p/rx: add external frame support, see ST22P_RX_FLAG_EXT_FRAME.
5757
* ptp: add user callback for ptp sync message. See ptp_sync_notify in struct mtl_init_params.
5858
* api: add arp timeout parameter support for st2110 unicast address. See arp_timeout_s in struct mtl_init_params.
@@ -82,14 +82,14 @@
8282
* tx/st30: separate build and pacing stage.
8383
* tx/pacing: add epoch drop/onward stat.
8484
* tx/st2110: add epoch information in stxx_tx_frame_meta for get_next_frame callback.
85-
* dpdk: upgrade dpdk version to latest 23.03
85+
* DPDK: upgrade DPDK version to latest 23.03
8686
* Windows: add MSYS2 build guide and CI
8787
* vm: add Windows guest OS support, see vm_WIN.md.
8888
* rx/video: add fpt(first packet time to epoch) in struct st20_rx_frame_meta.
8989
* st20p: add interlace format support, refer to tests/script/loop_json/st20p_2v_1080i50.json
9090
* CI: add ossf scorecard support.
9191
* gtest: support run with AWS ena driver.
92-
* dhcp: set proto to dhcp in interfaces segment of json to enable DHCP.
92+
* dhcp: set proto to dhcp in interfaces segment of JSON to enable DHCP.
9393
* rx/video: support out of sequence for both first and last(marker) packet.
9494
* udp: add gso(general segment offload) for tx
9595
* udp: add reuse port support.
@@ -102,7 +102,7 @@
102102

103103
## Changelog for 23.04
104104

105-
* dpdk: upgrade dpdk version to latest 22.11 for both windows and linux.
105+
* DPDK: upgrade DPDK version to latest 22.11 for both Windows and Linux.
106106
* ptp: add pi controller and software frequency adjust to improve the accuracy to ~100ns.
107107
* mtl_init_params: add gateway and netmask support for wan.
108108
* udp: introduce a highly efficient udp stack support, see mudp_api.h
@@ -149,7 +149,7 @@
149149
## Changelog for 22.09
150150

151151
* License: update to BSD-3
152-
* dpdk: update DPDK to v22.07
152+
* DPDK: update DPDK to v22.07
153153
* ice: update driver to 1.9.11
154154
* vf: add SRIOV based virtual NIC support, see vf.md.
155155
* vm: add SRIOV+KVM based virtualization support, see vm.md.

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The Media Transport Library solves the strict timing challenges of transporting
1717

1818
If you find value in our project, please consider giving it a star. Your support helps us grow and reach more people in the open-source community. Every star counts and is greatly appreciated.
1919

20-
### 1.1 Features
20+
### 1.1. Features
2121

2222
* Supported data path backend: DPDK PMD, native kernel socket, and AF_XDP with eBPF filter.
2323
* The User-space LibOS UDP stack features a POSIX socket compatible API.
@@ -28,7 +28,7 @@ If you find value in our project, please consider giving it a star. Your support
2828
* FFMPEG plugin, OBS(Open Broadcaster Software) plugin, and Intel® Media SDK support.
2929
* In addition to the native C/C++ API, it also offers bindings for [Python](python/README.md) and [Rust](rust/README.md).
3030

31-
#### 1.1.1 ST2110 features
31+
#### 1.1.1. ST2110 features
3232

3333
* Narrow and wide pacing. Please see [compliance](doc/compliance.md) page for the ST2110 narrow report on our software solution.
3434
* ST2110-10, ST2110-20, ST2110-21, ST2110-30, ST2110-40, ST2022-7.
@@ -40,7 +40,7 @@ If you find value in our project, please consider giving it a star. Your support
4040
* ST2022-6 by RTP passthrough interface.
4141
* ST2110-20 RX timing compliance parser with hardware RX timestamp offload.
4242

43-
### 1.2 Architecture
43+
### 1.2. Architecture
4444

4545
The Media Transport Library leverages DPDK (Data Plane Development Kit) EAL (Environment Abstraction Layer including the memory and core management) to implement a highly efficient, real-time, and low-latency media transport solution. This software-based media transport stack enables deployment on edge and cloud environments using COTS hardware.
4646

@@ -56,13 +56,13 @@ Additionally, the packet pacing module offers support for various pacing algorit
5656

5757
MTL also incorporates SIMD (Single Instruction, Multiple Data) for CSC (Color Space Format Conversion) of the big-endian and little-endian, DMA (Direct Memory Access), and plugin interfaces, enabling the creation of a comprehensive video production ecosystem.
5858

59-
For the detail design, please refer to [design guide](doc/design.md).
59+
For the detail design, please refer to [Design Guide](doc/design.md).
6060

6161
<div align="center">
6262
<img src="doc/png/arch.svg" align="center" alt="/Overall Architecture">
6363
</div>
6464

65-
### 1.3 Ethernet supported
65+
### 1.3. Ethernet supported
6666

6767
MTL offers versatile Ethernet support, thanks to its compatibility with DPDK PMD, kernel socket, and AF_XDP backends.
6868

@@ -76,25 +76,25 @@ An important point to note is that narrow pacing of TX is only supported for the
7676

7777
## 2. Build
7878

79-
Please refer to [build guide](doc/build.md) for instructions on how to build DPDK, the library, and the sample application.
79+
Please refer to [Build Guide](doc/build.md) for instructions on how to build DPDK, the library, and the sample application.
8080

81-
For Windows, please refer to the [Win build guide](doc/build_WIN.md) for instructions on how to build.
81+
For Windows, please refer to the [Windows Build Guide](doc/build_WIN.md) for instructions on how to build.
8282

8383
## 3. Run ST2110
8484

85-
Please refer to [run guide](doc/run.md) for instructions on how to set up and run the demo pipeline application based on DPDK PMD backend.
85+
Please refer to [Run Guide](doc/run.md) for instructions on how to set up and run the demo pipeline application based on DPDK PMD backend.
8686

87-
For Windows, please refer to [Windows run guide](doc/run_WIN.md).
87+
For Windows, please refer to [Run Guide on Windows](doc/run_WIN.md).
8888

89-
Additionally, please refer to the [VM guide](doc/vm.md) and [Windows VM guide](doc/vm_WIN.md) for instructions on setting up Linux and Windows guest VMs based on VF passthrough.
89+
Additionally, please refer to the [VM Guide](doc/vm.md) and [Windows VM Guide](doc/vm_WIN.md) for instructions on setting up Linux and Windows guest VMs based on VF passthrough.
9090

91-
For AWS (cloud environment), please refer to [AWS run guide](doc/aws.md) for instructions on how to set up and run the demo.
91+
For AWS (cloud environment), please refer to [AWS Run Guide](doc/aws.md) for instructions on how to set up and run the demo.
9292

9393
To run this library on the kernel network stack with the built-in kernel NIC driver, please follow the instructions provided in the [kernel socket guide](doc/kernel_socket.md).
9494

9595
## 4. ST2110 Programmers guide
9696

97-
To quickly develop applications based on the Media Transport Library, please refer to `## 6. ST2110 API` from [design guide](doc/design.md).
97+
To quickly develop applications based on the Media Transport Library, please refer to section ["ST2110 API" in Design Guide](doc/design.md#6-st2110-api).
9898

9999
## 5. User space LibOS UDP stack guide
100100

@@ -115,7 +115,7 @@ Whitepaper: Open Source Library Enables Real-Time Media over IP Networks. <https
115115

116116
We welcome community contributions to the Media Transport Library project. If you have any ideas or issues, please share them with us by using GitHub issues or opening a pull request.
117117

118-
### 7.1 Fork this repository
118+
### 7.1. Fork this repository
119119

120120
Before opening a pull request, please follow these steps:
121121

@@ -127,19 +127,19 @@ Before opening a pull request, please follow these steps:
127127

128128
If you do not want the main branch automatically synced to the upstream, please go to `Actions` and disable the `Upstream Sync` workflow.
129129

130-
### 7.2 Coding style
130+
### 7.2. Coding style
131131

132132
We use the super-linter action for style checks.
133133

134-
#### 7.2.1 C/C++
134+
#### 7.2.1. C/C++
135135

136136
For C/C++ coding, you can run the following command to quickly fix the style:
137137

138138
```bash
139139
./format-coding.sh
140140
```
141141

142-
#### 7.2.2 Python
142+
#### 7.2.2. Python
143143

144144
For Python, `black` and `isort` formatter is used.
145145

@@ -155,7 +155,7 @@ isort python/
155155
find python/example/ -name "*.py" -exec pylint {} \;
156156
```
157157

158-
#### 7.2.3 Others
158+
#### 7.2.3. Others
159159

160160
For other languages, please check with the following example command inside the Docker container:
161161

app/sample/msvc/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The is sample code for how to develop MSVC application quickly based on Media Tr
66

77
## 2. Steps
88

9-
### 2.1 Prepare latest .lib file
9+
### 2.1. Prepare latest .lib file
1010

1111
* Build MTL library in MSYS2, see [WIN build guide](../../../doc/build_WIN.md), also need to add MSYS2 binary PATH to system environment variables.
1212

@@ -20,7 +20,7 @@ The is sample code for how to develop MSVC application quickly based on Media Tr
2020
2121
* Copy `libmtl.lib` to project folder.
2222
23-
### 2.2 Set project properties
23+
### 2.2. Set project properties
2424
2525
* Double-click `imtl_sample.sln` to launch VS or create a console app in VS with the `imtl_sample.cpp`.
2626
@@ -32,7 +32,7 @@ The is sample code for how to develop MSVC application quickly based on Media Tr
3232
3333
* Click `OK` or `Apply` to save properties.
3434
35-
### 2.3 Build and run
35+
### 2.3. Build and run
3636
3737
* Inside IDE: Click Run button (Local Windows Debugger/ Start Without Debugging) to build and run the application.
3838

app/udp/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The dir include the simple sample code for how to develop application quickly ba
1111
[ufd_server_sample.c](ufd_server_sample.c): A udp client(tx) application based on POSIX socket compatible(file descriptor) UDP API.<br>
1212
[ufd_server.json](ufd_server.json): The sample configuration file for server sample.<br>
1313

14-
### 2.1 Run
14+
### 2.1. Run
1515

1616
Customize the p_tx_ip args and the ufd_client.json/ufd_server.json as your setup
1717

app/v4l2_to_ip/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ sudo media-ctl -v -l "\"Intel IPU6 CSI2 BE SOC\":16 -> \"Intel IPU6 BE SOC captu
2929
sudo ./build/app/V4l2toIPApp /dev/video51 --log-status --ptp --tsn
3030
```
3131
## Expected Output
32-
```bash
32+
```text
3333
MT: * * M T D E V S T A T E * *
3434
MT: DEV(0): Avr rate, tx: 1743.150045 Mb/s, rx: 0.017576 Mb/s, pkts, tx: 1646228, rx: 245
3535
MT: CNI(0): eth_rx_rate 0 Mb/s, eth_rx_cnt 245
@@ -43,3 +43,4 @@ MT: PTP(0): rx time error 0, tx time error 0, delta result error 58
4343
MT: TX_VIDEO_SESSION(0,0:v4l2_st20_tx): fps 49.991044, frame 500 pkts 1646200:1646199 inflight 407057:411550
4444
MT: TX_VIDEO_SESSION(0,0): throughput 1742.887329 Mb/s: 0.000000 Mb/s, cpu busy 0.000000
4545
MT: * * E N D S T A T E * *
46+
```

doc/asan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ ST_BUILD_ENABLE_ASAN=true ./build.sh
2929
## 3. Run the application to check for any memory issues
3030

3131
```bash
32-
./build/app/RxTxApp --config_file tests/script/loop_json/1080p59_1v.json
32+
./tests/tools/RxTxApp/build/RxTxApp --config_file tests/script/loop_json/1080p59_1v.json
3333
```

0 commit comments

Comments
 (0)