-
Notifications
You must be signed in to change notification settings - Fork 445
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixed bugs in EBPF back-end; made the 'builder' argument into a field * cpplint fix * Removed useless decl * Support for ebpf control-plane: .h file * Deleted one line by mistake * Support for functions; control-plane table initialization * Support for enum types in ebpf * Fix for issue #314
- Loading branch information
Showing
8 changed files
with
158 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
Copyright 2017 VMware, Inc. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
#include <core.p4> | ||
|
||
header header_h { | ||
bit<8> field; | ||
} | ||
|
||
struct struct_t { | ||
header_h[4] stack; | ||
} | ||
|
||
parser Parser(inout struct_t input) { | ||
state start { | ||
input.stack[input.stack.lastIndex].field = 8w1; | ||
transition accept; | ||
} | ||
} | ||
|
||
parser MyParser<S>(inout S input); | ||
package MyPackage<S>(MyParser<S> p); | ||
MyPackage(Parser()) main; |
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,22 @@ | ||
#include <core.p4> | ||
|
||
header header_h { | ||
bit<8> field; | ||
} | ||
|
||
struct struct_t { | ||
header_h[4] stack; | ||
} | ||
|
||
parser Parser(inout struct_t input) { | ||
int<32> tmp; | ||
state start { | ||
tmp = input.stack.lastIndex; | ||
input.stack[tmp].field = 8w1; | ||
transition accept; | ||
} | ||
} | ||
|
||
parser MyParser<S>(inout S input); | ||
package MyPackage<S>(MyParser<S> p); | ||
MyPackage<struct_t>(Parser()) main; |
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,22 @@ | ||
#include <core.p4> | ||
|
||
header header_h { | ||
bit<8> field; | ||
} | ||
|
||
struct struct_t { | ||
header_h[4] stack; | ||
} | ||
|
||
parser Parser(inout struct_t input) { | ||
int<32> tmp_0; | ||
state start { | ||
tmp_0 = input.stack.lastIndex; | ||
input.stack[tmp_0].field = 8w1; | ||
transition accept; | ||
} | ||
} | ||
|
||
parser MyParser<S>(inout S input); | ||
package MyPackage<S>(MyParser<S> p); | ||
MyPackage<struct_t>(Parser()) main; |
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,20 @@ | ||
#include <core.p4> | ||
|
||
header header_h { | ||
bit<8> field; | ||
} | ||
|
||
struct struct_t { | ||
header_h[4] stack; | ||
} | ||
|
||
parser Parser(inout struct_t input) { | ||
state start { | ||
input.stack[input.stack.lastIndex].field = 8w1; | ||
transition accept; | ||
} | ||
} | ||
|
||
parser MyParser<S>(inout S input); | ||
package MyPackage<S>(MyParser<S> p); | ||
MyPackage(Parser()) main; |
Empty file.