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

Add support for XDP egress programs #286

Merged
merged 3 commits into from
Apr 25, 2020

Conversation

FedeParola
Copy link
Collaborator

@FedeParola FedeParola commented Apr 3, 2020

This PR adds the support for XDP egress programs.
Currently egress code of both standard and transparent cubes is only injected in TC mode, therefore it cannot be executed when a packet comes from a XDP hook.
With this patch two versions of every egress program are injected, sharing the same maps:

  • The TC version is used to handle packets coming from the network stack of the host (currently there is no XDP egress hook).
  • The XDP version is used in all other cases.

The patch also fixes some bugs related to cubes chaining and exchanging packets between the controller and the fastpath.

Fixes #280

@FedeParola FedeParola requested a review from a team as a code owner April 3, 2020 16:15
@frisso frisso requested a review from sebymiano April 6, 2020 13:32
Copy link
Collaborator

@sebymiano sebymiano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FedeParola the PR looks very good to me! Thanks.

I have only the last effort to ask you (I know that would be very boring) but, can you please add some tests to check if the chain is done correctly?
For example, you can print the log and check if it is similar to the expected one.

In this way, we can avoid this kind of bugs in the future.

- Test packet flowing beetwen two namespaces
- Test packet flowing out of the network stack
@frisso frisso merged commit 777e4fd into polycube-network:master Apr 25, 2020
@FedeParola FedeParola deleted the xdp-egress branch April 28, 2020 06:58
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.

[BUG] pcn_pkt_redirect doesn't work in xdp cubes with transparent services attached
3 participants