Try to workaround compiler bug with markers
This commit is contained in:
parent
5b306a4cb5
commit
1c661f6990
2 changed files with 23 additions and 9 deletions
|
@ -6787,7 +6787,7 @@ action delta_udp_from_v6_to_v4()
|
||||||
|
|
||||||
#+END_CENTER
|
#+END_CENTER
|
||||||
|
|
||||||
*** TODO 2019-07-25: BUG overwrite: calling v4_networks.apply(); twice
|
*** TODO 2019-07-25: BUG overwrite: calling v4_networks.apply(); twice is impossible in different branches
|
||||||
#+BEGIN_CENTER
|
#+BEGIN_CENTER
|
||||||
make -C src/
|
make -C src/
|
||||||
make[1]: Entering directory '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/src'
|
make[1]: Entering directory '/home/nico/projects/P4-NetFPGA/contrib-projects/sume-sdnet-switch/projects/minip4/src'
|
||||||
|
@ -6806,6 +6806,8 @@ Makefile:34: recipe for target 'all' failed
|
||||||
|
|
||||||
#+END_CENTER
|
#+END_CENTER
|
||||||
|
|
||||||
|
*** TODO 2019-07-25: LIMIT: cannot use actions with arguments as default parameters
|
||||||
|
|
||||||
** The NetPFGA saga
|
** The NetPFGA saga
|
||||||
Problems encountered:
|
Problems encountered:
|
||||||
- The logfile for a compile run is 10k+ lines
|
- The logfile for a compile run is 10k+ lines
|
||||||
|
|
|
@ -105,7 +105,12 @@ control RealMain(
|
||||||
|
|
||||||
apply {
|
apply {
|
||||||
bit<17> tmp17 = 0;
|
bit<17> tmp17 = 0;
|
||||||
|
bool apply_v4networks = false;
|
||||||
|
bool apply_v6networks = false;
|
||||||
|
|
||||||
if(hdr.ipv6.isValid()) {
|
if(hdr.ipv6.isValid()) {
|
||||||
|
apply_v6networks = true;
|
||||||
|
|
||||||
if(nat64.apply().hit) { /* generic / static nat64 done */
|
if(nat64.apply().hit) { /* generic / static nat64 done */
|
||||||
if(hdr.icmp6.isValid()) {
|
if(hdr.icmp6.isValid()) {
|
||||||
nat64_icmp6_generic();
|
nat64_icmp6_generic();
|
||||||
|
@ -127,11 +132,12 @@ control RealMain(
|
||||||
if(hdr.tcp.isValid()) {
|
if(hdr.tcp.isValid()) {
|
||||||
delta_tcp_from_v6_to_v4
|
delta_tcp_from_v6_to_v4
|
||||||
}
|
}
|
||||||
|
apply_v4networks = false;
|
||||||
v4_networks.apply(); /* apply egress for IPv4 */
|
apply_v6networks = true;
|
||||||
exit; /* no further v6 processing */
|
|
||||||
}
|
}
|
||||||
} else if(hdr.ipv4.isValid()) {
|
} else if(hdr.ipv4.isValid()) {
|
||||||
|
apply_v4networks = true;
|
||||||
|
|
||||||
if(nat46.apply().hit) {
|
if(nat46.apply().hit) {
|
||||||
if(hdr.icmp.isValid()) {
|
if(hdr.icmp.isValid()) {
|
||||||
nat46_icmp_generic();
|
nat46_icmp_generic();
|
||||||
|
@ -149,11 +155,17 @@ control RealMain(
|
||||||
if(hdr.tcp.isValid()) {
|
if(hdr.tcp.isValid()) {
|
||||||
delta_tcp_from_v4_to_v6
|
delta_tcp_from_v4_to_v6
|
||||||
}
|
}
|
||||||
|
apply_v4networks = true;
|
||||||
// v6_networks.apply();
|
apply_v6networks = false;
|
||||||
// exit;
|
|
||||||
}
|
}
|
||||||
// v4_networks.apply(); /* regular routing, egress */
|
}
|
||||||
|
|
||||||
|
if(apply_v4networks == true) {
|
||||||
|
v4_networks.apply();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(apply_v6networks == true) {
|
||||||
|
v6_networks.apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
lookup_table.apply();
|
lookup_table.apply();
|
||||||
|
|
Loading…
Reference in a new issue