-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The p4 spec states that the first bit from a packet extracts into the last bit of bit-string types, this means that we go from protocol-endian to p4-endian and then back to protocol-endian on the way out. Fixes #5.
- Loading branch information
1 parent
bbefd1a
commit 8df8f6d
Showing
13 changed files
with
125 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
control_accepted* { | ||
printf("\n%s\n", copyinstr(arg0)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
control_dropped* { | ||
printf("\n%s\n", copyinstr(arg0)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
pfexec dtrace -l -n softnpu_provider*::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
::parser_transition{ | ||
print(copyinstr(arg0)); | ||
} | ||
|
||
::parser_dropped { | ||
printf("parser dropped\n"); | ||
} | ||
|
||
::parser_accepted { | ||
printf("parser accepted\n"); | ||
} | ||
|
||
::control_apply{ | ||
print(copyinstr(arg0)); | ||
} | ||
|
||
::control_dropped { | ||
printf("control dropped\n"); | ||
} | ||
|
||
::control_accepted { | ||
printf("control accepted\n"); | ||
} | ||
|
||
::control_table_hit { | ||
print(copyinstr(arg0)); | ||
} | ||
|
||
::control_table_miss { | ||
print(copyinstr(arg0)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
::parser_transition{ | ||
@stats["parser transition", copyinstr(arg0)] = count(); | ||
} | ||
|
||
::parser_dropped { | ||
@stats["parser", "drop"] = count(); | ||
} | ||
|
||
::parser_accepted { | ||
@stats["parser", "accept"] = count(); | ||
} | ||
|
||
::control_apply{ | ||
@stats["control apply", copyinstr(arg0)]= count(); | ||
} | ||
|
||
::control_dropped { | ||
@stats["control", "drop"] = count(); | ||
} | ||
|
||
::control_accepted { | ||
@stats["control", "accept"] = count(); | ||
} | ||
|
||
::control_table_hit { | ||
@stats["table hit", copyinstr(arg0)] = count(); | ||
} | ||
|
||
::control_table_miss { | ||
@stats["table miss", copyinstr(arg0)] = count(); | ||
} | ||
|
||
tick-10sec | ||
{ | ||
printa(@stats); | ||
printf("==========================================================================================================================\n"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters