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

Introduce the SKB metadata extern #4916

Merged
merged 5 commits into from
Dec 19, 2024
Merged

Introduce the SKB metadata extern #4916

merged 5 commits into from
Dec 19, 2024

Conversation

vbnogueira
Copy link
Contributor

@vbnogueira vbnogueira commented Sep 16, 2024

We are adding the SKB metadata extern to the tc backend's control blocks and deparser definitions
The main difference from the previous version is that we dropped the extern representation of the
skb( tc_skb_metadata), and made skb read/write operation into extern functions.
So, for example, to set the skb protocol, the user should do the following:

skb_set_protocol(my_new_proto);
skb_set_meta();

And to retrive the skb protocol:

skb_get_meta();
proto = skb_get_protocol();

@vbnogueira
Copy link
Contributor Author

@komaljai please take a look when you have some time

@vbnogueira vbnogueira force-pushed the skb_meta branch 4 times, most recently from 60d30af to 5e1e5f0 Compare September 17, 2024 02:21
@fruffy fruffy added p4tc Topics related to the P4-TC back end run-validation Use this tag to trigger a Validation CI run. run-sanitizer Use this tag to run a Clang+Sanitzers CI run. and removed run-validation Use this tag to trigger a Validation CI run. labels Sep 17, 2024
@komaljai
Copy link
Contributor

komaljai commented Oct 3, 2024

You can try to inherit EBPF class DeparserBodyTranslatorPSA in TC and make related changes in TC backend.

@komaljai
Copy link
Contributor

komaljai commented Oct 3, 2024

Could you add example for skb metadata extern?

@vbnogueira
Copy link
Contributor Author

Could you add example for skb metadata extern?

I added the example in this commit 96707ea and rebased

@vbnogueira vbnogueira force-pushed the skb_meta branch 4 times, most recently from da95c99 to e44e743 Compare October 5, 2024 13:36
@vbnogueira
Copy link
Contributor Author

You can try to inherit EBPF class DeparserBodyTranslatorPSA in TC and make related changes in TC backend.

Done

@vbnogueira vbnogueira marked this pull request as ready for review October 15, 2024 13:42
@komaljai komaljai enabled auto-merge October 17, 2024 06:51
auto-merge was automatically disabled October 17, 2024 15:12

Head branch was pushed to by a user without write access

@vbnogueira vbnogueira marked this pull request as draft October 17, 2024 20:10
@vbnogueira
Copy link
Contributor Author

Tested with other examples we had and saw that this PR breaks one of our examples
So converted this back to a draft PR while I figure out the solution

@vbnogueira vbnogueira force-pushed the skb_meta branch 4 times, most recently from d73b5ff to dbc19dc Compare December 3, 2024 16:16
@vbnogueira
Copy link
Contributor Author

@komaljai please take another look when you have some time

@vbnogueira vbnogueira marked this pull request as ready for review December 12, 2024 14:36
Since we are not relying on recirculation to reset the skb protocol to
the original value anymore, only recirculate if needed

Signed-off-by: Mouse <[email protected]>
@komaljai komaljai added this pull request to the merge queue Dec 19, 2024
Merged via the queue into p4lang:main with commit 3ec3732 Dec 19, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p4tc Topics related to the P4-TC back end run-sanitizer Use this tag to run a Clang+Sanitzers CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants