Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
467baf48
Commit
467baf48
authored
Nov 30, 2015
by
Mihai Budiu
Committed by
Brenden Blanco
Nov 30, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bugs in control-flow generation
Signed-off-by:
Brenden Blanco
<
bblanco@plumgrid.com
>
parent
8a04fb39
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
src/cc/frontends/p4/compiler/ebpfProgram.py
src/cc/frontends/p4/compiler/ebpfProgram.py
+5
-4
src/cc/frontends/p4/compiler/ebpfTable.py
src/cc/frontends/p4/compiler/ebpfTable.py
+6
-0
src/cc/frontends/p4/compiler/topoSorting.py
src/cc/frontends/p4/compiler/topoSorting.py
+0
-1
No files found.
src/cc/frontends/p4/compiler/ebpfProgram.py
View file @
467baf48
...
...
@@ -483,12 +483,10 @@ class EbpfProgram(object):
done
=
set
()
while
len
(
nodestoadd
)
>
0
:
todo
=
nodestoadd
.
pop
()
if
todo
is
None
:
todo
=
nextEntryPoint
if
todo
is
None
:
continue
if
todo
in
done
:
continue
if
todo
is
None
:
continue
print
(
"Generating "
,
todo
.
name
)
...
...
@@ -503,3 +501,6 @@ class EbpfProgram(object):
for
e
in
self
.
entryPoints
:
todo
.
add
(
e
)
self
.
generatePipelineInternal
(
serializer
,
todo
,
self
.
egressEntry
)
todo
=
set
()
todo
.
add
(
self
.
egressEntry
)
self
.
generatePipelineInternal
(
serializer
,
todo
,
None
)
src/cc/frontends/p4/compiler/ebpfTable.py
View file @
467baf48
...
...
@@ -365,6 +365,12 @@ class EbpfTable(object):
serializer
.
newline
()
serializer
.
blockEnd
(
True
)
if
not
"hit"
in
nextNode
:
# Catch-all
serializer
.
emitIndent
()
serializer
.
appendFormat
(
"goto end;"
)
serializer
.
newline
()
serializer
.
blockEnd
(
True
)
def
runAction
(
self
,
serializer
,
tableName
,
valueName
,
program
,
nextNode
):
...
...
src/cc/frontends/p4/compiler/topoSorting.py
View file @
467baf48
...
...
@@ -86,4 +86,3 @@ class Graph(object):
return
None
return
topo_sorting
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment