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

drop_packet() extern function not defined in the spec even though it is in pna.p4 #55

Open
apinski-cavium opened this issue Sep 14, 2022 · 2 comments

Comments

@apinski-cavium
Copy link
Contributor

While reading pna.p4 I noticed that drop_packet() extern function is not defined in the spec itself. This has to be an oversight. It is referenced in the spec once: The effects of mirror_packet() calls are independent of calls to drop_packet() and send_to_port(). But never defined what it does and what it can do.
The header file has:

// The following extern functions are "forwarding" functions -- they
// all set the destination of the packet.  Calling one of them
// overwrites and replaces the effect of any earlier call to any of
// the functions in this set.  Only the last one executed will
// actually take effect for the packet.

// + drop_packet
// + send_to_port


// drop_packet() - Cause the packet to be dropped when it finishes
// completing the main control.
//
// Invoking drop_packet() is supported only within the main control.

extern void drop_packet();
@hesingh
Copy link
Contributor

hesingh commented Oct 22, 2022

The PSA specification includes text for drop starting at https://p4.org/p4-spec/docs/PSA.html#sec-drop-operation
We can leverage text into PNA.

@jfingerh
Copy link
Contributor

Definitely good if someone is willing to write a PR for the PNA spec that defines drop_packet() in the text.

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

No branches or pull requests

3 participants