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

Questions about clone3 #23

Open
ls760008979 opened this issue Apr 3, 2021 · 2 comments
Open

Questions about clone3 #23

ls760008979 opened this issue Apr 3, 2021 · 2 comments

Comments

@ls760008979
Copy link

I want to know the cloned packet with a non empty third parameter.Is the parameter are combined into the cloned packet's payload or somewhere else?

@edgar-costa
Copy link
Contributor

You can get some documentation about clone3 here https://github.com/p4lang/p4c/blob/master/p4include/v1model.p4#L633

The third parameter is a list of the metadata fields you want to preserve.

For example:

clone3(CloneType.I2E, 100, meta);

In this case we copy all fields from the metadata struct.

@ls760008979
Copy link
Author

Oh,i may got it,is it means that the third parameter can be preserved and computed only at this switch unless it be added to some head of packet .

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

2 participants