Skip to content

Replace mark_to_drop() with mark_to_drop(standard_metadata) #72

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

Merged
merged 1 commit into from
Dec 9, 2019

Conversation

rst0git
Copy link
Member

@rst0git rst0git commented Oct 21, 2019

$ ./p4app run examples/simple_router.p4app
Entering build directory.
Extracting package.
> touch /tmp/p4app_logs/p4s.s1.log
> ln -s /tmp/p4app_logs/p4s.s1.log /tmp/p4s.s1.log
Reading package manifest.
> p4c-bm2-ss --p4v 16 "simple_router.p4" -o "simple_router.json"
simple_router.p4(12): [--Wwarn=deprecated] warning: mark_to_drop: Using deprecated feature mark_to_drop. Please use mark_to_drop(standard_metadata) instead.
        mark_to_drop();
        ^^^^^^^^^^^^
/usr/local/share/p4c/p4include/v1model.p4(343)
extern void mark_to_drop();
            ^^^^^^^^^^^^
simple_router.p4(35): [--Wwarn=deprecated] warning: mark_to_drop: Using deprecated feature mark_to_drop. Please use mark_to_drop(standard_metadata) instead.
        mark_to_drop();
        ^^^^^^^^^^^^
/usr/local/share/p4c/p4include/v1model.p4(343)
extern void mark_to_drop();
            ^^^^^^^^^^^^
simple_router.p4(12): [--Werror=target-error] error: mark_to_drop: Unsupported on target Expected 1 argument for mark_to_drop. Are you using an up-to-date v1model.p4?
        mark_to_drop();
        ^^^^^^^^^^^^^^
simple_router.p4(35): [--Werror=target-error] error: mark_to_drop: Unsupported on target Expected 1 argument for mark_to_drop. Are you using an up-to-date v1model.p4?
        mark_to_drop();
        ^^^^^^^^^^^^^^
Compile failed.

Replacing mark_to_drop() with mark_to_drop(standard_metadata) resolves this issue.

Replace `mark_to_drop()` with `mark_to_drop(standard_metadata)`

p4lang#71

Signed-off-by: Radostin Stoyanov <[email protected]>
@brucespang
Copy link

Would be great if this could be merged! Just ran into the same issue when trying out p4app for the first time, and manually fixed it in the same way

@jnfoster jnfoster requested a review from robertsoule December 9, 2019 05:29
@jnfoster
Copy link

jnfoster commented Dec 9, 2019

I agree. @robertsoule or @theojepsen can we merge this?

@theojepsen
Copy link
Contributor

👍

@jnfoster jnfoster merged commit 551c0ba into p4lang:master Dec 9, 2019
@brucespang
Copy link

Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants