Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table V1Table t invoked from two different controls: Apply and Apply #1135

Closed
hanw opened this issue Jan 12, 2018 · 2 comments
Closed

Table V1Table t invoked from two different controls: Apply and Apply #1135

hanw opened this issue Jan 12, 2018 · 2 comments
Labels
fixed This topic is considered to be fixed.

Comments

@hanw
Copy link
Contributor

hanw commented Jan 12, 2018

Following code causes an error in the P4-14 to 16 translation.

error: Table V1Table t invoked from two different controls: Apply and Apply
header_type h {
    fields {
        b : 1;
    }
}

metadata h m;

parser start {
    return ingress;
}

action x() {}

table t {
    actions { x; }
}

control c {
    apply(t);
}

control e {
    apply(t);
}

control ingress {
    c();
}

Question is: what is the right thing for the compiler to do? Should the compiler accept this program and eliminate the control block e that is not invoked anywhere? or should the compiler return an error to the programmer and ask programmer to delete e from source?

@hanw
Copy link
Contributor Author

hanw commented Jan 12, 2018

@mbudiu-vmw any suggestions?

hanw pushed a commit that referenced this issue Jan 12, 2018
@mihaibudiu
Copy link
Contributor

I personally think that we should not invest too much in p4-14. The error looks good enough to me, although the Apply seems wrong.

We should not do more than the original Python compiler.

hanw pushed a commit that referenced this issue Jan 12, 2018
hanw added a commit that referenced this issue Jan 15, 2018
@mihaibudiu mihaibudiu added the fixed This topic is considered to be fixed. label Jan 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed This topic is considered to be fixed.
Projects
None yet
Development

No branches or pull requests

2 participants