-
Notifications
You must be signed in to change notification settings - Fork 8
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
dhcp-relay: Handle client requests #8
Comments
Hi @yoelcaspersen in this testbed that we had created, we were able to get the packets through the client-side interface where the current XDP program is attached. We were able to see the packets with option 82 and destination IP set correctly using Wireshark. |
Hi @adityasohoni, The packets are indeed being dropped by the kernel, but not because of the VLAN tags. Removing VLAN tags isn't necessary, as the kernel does that for you. To make the kernel forward the packets, convert the packets to unicast first:
The latter is necessary if you set source IP = NIC IP. In a few hours, I will commit the code I have produced - it takes care of the issues mentioned above. Regards, Yoel Caspersen |
@adityasohoni, I have pushed my latest work-in-progress to the repo (09bc685). Please beware that this commit may break your testbed - tail extending packets doesn't seem to work in SKB mode (see issue #10) and requires testing with a physical NIC instead. However, head extending the packet is not optimal, as we need to inject option 82 as the last option (right before option 255 END). That would leave us with a variable number of bytes that we would need to move - but that doesn't fly with the built-in XDP memcpy function, which takes a const length as argument. There are a few ugly workarounds that may work, but for now I will use a physical NIC for testing and stick with tail extending the packets. After all, that is also the real world use case for the XDP program. |
Could you please share more information regarding the testbed that you will be using? |
Sure, I have just committed an updated README file in 37f30d5. In my test setup, I use two physical servers connected back-to-back, but perhaps you can loop two NIC ports on the same server to get the same effect (I haven't tested that approach). I use two Mellanox 25 Gbit/s NICs as those are the ones we will be using in production, but I think any XDP compatible NIC will work. Any feedback is highly appreciated. |
Thanks a lot, @yoelcaspersen for the updated README, that clears quite a few doubts we had. We'll now set up our testbed accordingly. |
@yoelcaspersen Any suggestion for where should we be keeping the check for Destination IP = 255.255.255.255? As of now we are keeping it right after we parse IP header. |
Initial checks:
Modify packet:
Final action:
The text was updated successfully, but these errors were encountered: