-
Notifications
You must be signed in to change notification settings - Fork 103
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
[BUG] pcn_pkt_redirect doesn't work in xdp cubes with transparent services attached #280
Comments
Is the issue only present when the service is in |
Yes, both |
Think I found part of the problem, here:
transparent cubes are created using the TC PatchPanel for egress programs, so the when the egress xdp code of the transparent service is injected its reference isn't added to the list of xdp_nodes
|
I have the fear that the problem is more complicated than that. I have the impression, although I am not 100% sure of it, that the |
The egress code of xdp transparent services should be injected in both XDP and TC mode. If the service processes a packet received from the Linux networking stack then the TC program will be executed since it is the only one available (in future egress XDP could be used). On the other end, if the packet is getting out of a XDP cube (eg the router), then the XDP program should be executed, now this program is missing.
I don't think the send_packet_out function has something to do with it, since the problem appears without involving the slowpath |
I was able to solve the problem replacing all TC operations for the egress program (compile, load, PatchPanel) with XDP ones, but this isn't a solution, since now my service wouldn't be able to handle egress packets coming from the networking stack |
That's correct, @FedeParola. Nice catch :)
You're right. I don't know why but I was thinking that we use the slow path to generate the ARP Reply :) |
Unfortunately, the only solution now is to load the program in both modes. |
Ok then, I can work on a patch for this |
Describe the bug
pcn_pkt_redirect
doesn't work in xdp standard cubes when a transparent service is attached to the destination interfaceTo Reproduce
Using
router
andtransparenthelloworld
(but the same applies to other services).Setup the router:
Trying to ping 10.0.0.2 from an host connected to the router port works fine.
Add a transparent service:
Clear the arp cache on the source host (since the arp reply in the router is the operation that requires a pcn_pkt_redirect):
sudo ip -s -s neigh flush all
Pinging 10.0.0.2 no longer works.
Expected behavior
Ping should work normally.
Please tell us about your environment:
Additional context
Looking at the log of the router, instead of being sent out of the interface, the ARP Reply packet is sent back to the router dataplane code, with a nonexistent port as in port:
The text was updated successfully, but these errors were encountered: