Skip to content

Commit e3e1a96

Browse files
committed
Merge remote-tracking branch 'origin/main' into string-concat
2 parents 20e6cb4 + e992329 commit e3e1a96

File tree

83 files changed

+5703
-3838
lines changed

Some content is hidden

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

83 files changed

+5703
-3838
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Any branch uploads
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
any-branch-uploads:
7+
if: ${{ github.repository == 'p4lang/p4-spec' }}
8+
runs-on: [ubuntu-latest]
9+
steps:
10+
- uses: actions/checkout@v3
11+
- name: Build spec
12+
run: |
13+
docker run -v `pwd`/docs/v1:/usr/src/p4-spec p4lang/p4-spec-asciidoc:latest make
14+
ls docs/v1/build
15+
- name: Upload spec to S3 if needed
16+
if: ${{ github.actor != 'dependabot[bot]' }}
17+
uses: jakejarvis/[email protected]
18+
with:
19+
args: --acl public-read --follow-symlinks --delete
20+
env:
21+
AWS_S3_BUCKET: 'p4-spec'
22+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
23+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
24+
AWS_REGION: 'us-west-2'
25+
SOURCE_DIR: 'docs/v1/build'
26+
DEST_DIR: ci/${{ github.ref_name }} # only runs for push events
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
name: Build and push specification files
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
jobs:
8+
build:
9+
runs-on: ubuntu-24.04
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
# Fetch all history for all branches
14+
fetch-depth: 0
15+
16+
- name: Install asciidoc
17+
run: sudo ./p4-16/spec/install-asciidoctor-linux.sh
18+
19+
- name: Build p4-16/spec
20+
run: |
21+
source /usr/local/rvm/scripts/rvm
22+
make -C p4-16/spec
23+
24+
- name: Build p4-16/psa
25+
run: |
26+
source /usr/local/rvm/scripts/rvm
27+
make -C p4-16/psa
28+
29+
- name: Build api/charter
30+
run: |
31+
source /usr/local/rvm/scripts/rvm
32+
make -C api/charter
33+
34+
- name: Upload spec artifacts
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: spec
38+
path: |
39+
p4-16/spec/P4-16-spec.html
40+
p4-16/spec/P4-16-spec.pdf
41+
p4-16/spec/resources/figs
42+
43+
- name: Upload PSA spec artifacts
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: psa-spec
47+
path: |
48+
p4-16/psa/PSA.html
49+
p4-16/psa/PSA.pdf
50+
p4-16/psa/charter/P4_Arch_Charter.html
51+
p4-16/psa/figs
52+
53+
- name: Upload API charter artifacts
54+
uses: actions/upload-artifact@v4
55+
with:
56+
name: api-charter
57+
path: |
58+
api/charter/P4_API_WG_charter.pdf
59+
60+
deploy:
61+
needs: build
62+
if: github.repository == 'p4lang/p4-spec' && github.ref_name == 'main'
63+
runs-on: ubuntu-24.04
64+
steps:
65+
- uses: actions/checkout@v4
66+
with:
67+
# Fetch all history for all branches
68+
fetch-depth: 0
69+
70+
- name: Configure git
71+
run: |
72+
git config user.name "GitHub Actions"
73+
git config user.email "[email protected]"
74+
75+
- name: Rebase gh-pages branch
76+
run: |
77+
git fetch --all
78+
git checkout main
79+
git pull
80+
git checkout gh-pages
81+
git rebase --quiet main
82+
83+
- name: Download spec artifact
84+
uses: actions/download-artifact@v4
85+
with:
86+
name: spec
87+
path: spec
88+
89+
- name: Download PSA spec artifact
90+
uses: actions/download-artifact@v4
91+
with:
92+
name: psa-spec
93+
path: psa-spec
94+
95+
- name: Download API charter artifact
96+
uses: actions/download-artifact@v4
97+
with:
98+
name: api-charter
99+
path: api-charter
100+
101+
102+
- name: Copy files
103+
run: |
104+
pwd
105+
ls -l *
106+
cp spec/P4-16-spec.html docs/P4-16-working-spec.html
107+
cp spec/P4-16-spec.pdf docs/P4-16-working-spec.pdf
108+
cp psa-spec/PSA.html docs/PSA.html
109+
cp psa-spec/PSA.pdf docs/PSA.pdf
110+
cp psa-spec/charter/P4_Arch_Charter.html docs/
111+
cp api-charter/P4_API_WG_charter.pdf docs/
112+
113+
- name: Commit changes
114+
run: |
115+
git add docs/P4-16-working-spec.{html,pdf} docs/PSA.{html,pdf} docs/P4_API_WG_charter.pdf docs/P4_Arch_Charter.html
116+
git commit -am "docs for ${{ steps.vars.outputs.sha_short }}"
117+
118+
- name: Push commit to gh-pages branch
119+
run: git push -f origin gh-pages
120+

.github/workflows/madoko-build.yml

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

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.sw*
2+
!.github
3+
rouge

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
- p4-16: This holds the official P4 16 spec and discussion materials.
77
- The discussions of the design committee and the current open problems are held in [Google Docs](https://docs.google.com/document/d/1XSgdXeG1UuF1FM_XAqxDrHeN4dHZWBnJPKVS6SnGNwM/edit)
88
- An archive of the meeting notes from 2020 to 2022 is in this [pdf document](p4-16/spec/docs/P4-LDWG-Old-Notes.pdf)
9-
- The latest version of the P4 specification is [1.2.4](https://p4.org/p4-spec/docs/P4-16-v1.2.4.html).
9+
- The latest version of the P4 specification is [1.2.5](https://p4.org/p4-spec/docs/P4-16-v1.2.5.html).
1010
- Portable Switch architecture discussion materials and meeting minutes are available [here](https://github.com/p4lang/p4-spec/wiki/PSA)
1111

1212
# Modification Policy

api/charter/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
build/
2+
*.pdf

api/charter/Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
21
SPEC=P4_API_WG_charter
2+
ROUGE_STYLE=molokai
3+
ROUGE_CSS=style
34

4-
build/${SPEC}.pdf: ${SPEC}.mdk
5-
madoko -vv --png --odir=build $<
5+
${SPEC}.pdf: ${SPEC}.adoc
6+
asciidoctor-pdf -v \
7+
-a pdf-fontsdir=resources/fonts \
8+
-a rouge-style=$(ROUGE_STYLE) $<
69

710
clean:
811
${RM} -rf build
Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
1-
Title : P4 API WG Charter
1+
= P4 API Working Group Charter
2+
:doctype: book
3+
:revdate: {docdate}
4+
:font-size: 10
5+
:pdf-themesdir: resources/theme/
6+
:pdf-theme: p4-theme.yml
7+
:source-highlighter: rouge
28

3-
[TITLE]
4-
5-
# Working Group Name
9+
== Working Group Name
610

711
P4 API Working Group
812

9-
# Chairs
13+
== Chairs
1014

1115
- Antonin Bas <[email protected]>
1216
- Lorenzo Vicisano <[email protected]>
1317

14-
# Mailing Lists
18+
== Mailing Lists
1519

1620
- To subscribe, visit
17-
[http://lists.p4.org/mailman/listinfo/p4-api_lists.p4.org](http://lists.p4.org/mailman/listinfo/p4-api_lists.p4.org)
21+
http://lists.p4.org/mailman/listinfo/p4-api_lists.p4.org
1822
- To post a message to all list members, end an email to <[email protected]>
1923

20-
# Description of the Working Group
24+
== Description of the Working Group
2125

2226
The P4 language is designed to specify the dataplane of networking devices by
2327
combining a number of core abstractions, such as parsers, tables and externs.
@@ -32,28 +36,28 @@ runtime APIs for P4 device management. To complement these P4 runtime APIs, this
3236
working group will also specify the relationship between P4 runtime objects and
3337
entities that appear in the switch configuration, such as ports and
3438
platform-level functions. A practical way to achieve this would be, for example,
35-
to define an [OpenConfig](http://http://openconfig.net/) schema specific to a
39+
to define an https://openconfig.net[OpenConfig] schema specific to a
3640
switch that exposes a P4 runtime API.
3741

3842
A P4 runtime API should support two main pieces of functionality:
3943

40-
- managing the behavior of the dataplane objects described in a P4 program and
44+
* managing the behavior of the dataplane objects described in a P4 program and
4145
retrieving information from these objects when needed. For example, in the case
4246
of match-action tables, adding entries to the table, removing them and
4347
retrieving the table content.
44-
- (re)configuring the forwarding pipeline in a P4-programmable device, by
48+
* (re)configuring the forwarding pipeline in a P4-programmable device, by
4549
pushing a new P4 program to the device.
4650

4751
We anticipate that the above functionality will require defining at least the
4852
following features:
4953

50-
- runtime management of P4 tables
51-
- runtime management of Portable Standard Architecture (PSA) externs
52-
- ability to extend the API to support vendor-specific externs
53-
- session management, which includes updating the P4 program running on the
54+
* runtime management of P4 tables
55+
* runtime management of Portable Standard Architecture (PSA) externs
56+
* ability to extend the API to support vendor-specific externs
57+
* session management, which includes updating the P4 program running on the
5458
device and packet IO between the control-plane and the device.
5559

56-
# Deliverables
60+
== Deliverables
5761

5862
The first item of work for the Working Group will be to define a
5963
vendor-independent, protocol-independent way for a control-plane to configure,
@@ -67,5 +71,5 @@ Group is called P4Runtime and will target a remote controller.
6771
3. A specification of the configuration bindings necessary for P4 runtime
6872
control expressed as an OpenConfig schema in YANG format.
6973
4. A working opensource implementation of 1. and 3., including a client and
70-
server libraries and bindings for the [p4lang software
71-
switch](https://github.com/p4lang/behavioral-model).
74+
server libraries and bindings for the
75+
https://github.com/p4lang/behavioral-model[p4lang software switch].

api/charter/resources/fonts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../p4-16/spec/resources/fonts
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../p4-16/spec/resources/theme/logo.png

0 commit comments

Comments
 (0)