Skip to content

Commit

Permalink
Format spacing & remove empty heading
Browse files Browse the repository at this point in the history
Signed-off-by: Adarsh <[email protected]>
  • Loading branch information
AdarshRawat1 committed Oct 1, 2024
1 parent 0b4df58 commit 497f527
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 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
2 changes: 1 addition & 1 deletion backends/ebpf/psa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ or member.

Before action execution, following source code will be generated (and some additional comments to it) for table lookup,
which has implementation `ActionSelector`:
```c
``` c
struct ingress_as_value * as_value = NULL; // pointer to an action data
u32 as_action_ref = value->ingress_as_ref; // value->ingress_as_ref is entry from table (reference)
u8 as_group_state = 0; // which map contains action data
Expand Down
2 changes: 2 additions & 0 deletions backends/p4tools/modules/testgen/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ P4Testgen supports the use of custom externs to restrict the breadth of possible
#### Restricted Tests
`testgen_assume(expr)` will add `expr` as a necessary path constraints to all subsequent execution. For example, for the following snippet
``` P4
state parse_ethernet {
packet.extract(headers.ethernet);
testgen_assume(headers.ethernet.ether_type == 0x800);
Expand All @@ -131,6 +132,7 @@ only inputs which have `0x800` as Ethertype will be generated. This mode is enab
Conversely, `testgen_assert(expr)` can be used to find violations in a particular P4 program. By default, `testgen_assert` behaves like `testgen_assume`. If the flag `--assertion-mode` is enabled, P4Testgen will only generate tests that will cause `expr` to be false and, hence, violate the assertion.
For example, for
``` P4
state parse_ethernet {
packet.extract(headers.ethernet);
transition select(headers.ethernet.ether_type) {
Expand Down

0 comments on commit 497f527

Please sign in to comment.