Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: broken output in Documentation Code Snippets #4919

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backends/dpdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ To load the 'spec' file in dpdk follow the instructions in the
- Currently, programs written for DPDK target should limit the functionality in Ingress blocks, in case non empty Egress blocks are present it will be ignored by default unless Hidden temporary option `--enableEgress` used. When egress block support gets added to the DPDK target, and compiler can generate separate spec file for non empty ingress and egress blocks then option `--enableEgress` will be removed.
- DPDK architecture assumes the following signatures for programmable block of PSA. P4C-DPDK converts the input program to this form.

```P4
``` P4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I spot-checked the preview page here to see what effect this change had.

WIth this change, there is now a separate line of text that says "P4" before the block of code.

Is that intentional? Do you consider that an improvement?

Copy link
Member Author

@AdarshRawat1 AdarshRawat1 Nov 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jafingerhut,

Is that intentional?

Yes

Do you consider that an improvement?

This is a temporary fix. The current version of Doxygen(1.12.0) does not support numeric code fences. So, I added a "P4" label with a gap before code blocks because, without it, only the "4" shows up in Doxygen HTML output. I thought "P4" is clearer than just "4."

I also reported this to Doxygen, and they’ve pushed a fix, which should be live in the next release. doxygen/doxygen#11210

Once the new release is available, I’ll revert this change.

parser IngressParser (packet_in buffer, out H parsed_hdr, inout M user_meta);

control Ingress (inout H hdr, inout M user_meta);
Expand Down
6 changes: 3 additions & 3 deletions backends/ebpf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ state transition | `goto` statement
`extract` | load/shift/mask data from packet buffer

#### Translating match-action pipelines
##

P4 Construct | C Translation
----------|------------
table | 2 eBPF tables: second one used just for the default action
Expand Down Expand Up @@ -385,7 +385,7 @@ The C extern could be also allowed to access packet’s payload, but this featur

The custom C extern function should be explicitly declared in the P4 program making use of that extern. For example:

```C
```c
/** Declaration of the C extern function. */
extern bool verify_ipv4_checksum(in IPv4_h iphdr);
```
Expand Down Expand Up @@ -425,7 +425,7 @@ clang -O2 -include C-EXTERN-FILE.c -target bpf -c OUTPUT.c -o OUTPUT.o

* BPF maps can be defined inside the C extern function to provide statefulness. BPF map can be defined as follows:

```C
```c
REGISTER_START()
REGISTER_TABLE(<NAME>, BPF_MAP_TYPE_HASH, <KEY-SIZE>, <VALUE-SIZE>>, <MAX_ENTRIES>)
REGISTER_END()
Expand Down
Loading
Loading