-
Notifications
You must be signed in to change notification settings - Fork 757
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 Geneve link support #565
Conversation
14baa29
to
6a46481
Compare
Heavily based on the existing Gretap support
@shassard Has this PR been abandoned? I'm interested in Geneve support here as well. Happy to pick this up if this is no longer needed from your side. |
The automated tests proved that the geneve VNIs setting seemed to not work properly. Testing of creating interfaces seems to work just fine though, so I'm unsure if something is obviously wrong in the geneve interface setup. I haven't had sufficient time to dive into the resolution yet. If you can figure out what I'm missing to get the VNI unit tests working for geneve, please feel free to run with what I have here. |
Thanks for the context! I'll see if I can find out what's going on and if I get the tests fixed up, I'll put something out. Appreciate your work on this so far. |
Specifically, it was this check that was failing: |
I took a look at your PR locally and noticed that on L2465 of This would probably explain your test failures at L305-307 in That being said, I'm having troubles replicating your test failure. In my dev environment, I can get all the other tests to run successfully, but I'll keep looking into this, but hopefully this helps. |
Thanks! That helps a ton. I'll run with this a bit and see if I can figure out the last piece. |
Can you give this a try: A cleanup to the VNI conversion and specficying the encap type for the tests seems to make things generally work. The linux kernel changed the format of the struct between 4.19 and 5.8. The header here is for 4.19. I'm not sure if/how we can deal with that here ..? |
That worked great! The only thing that I had to do was temporarily remove the assertion against the destination port. That assertion was failing because we never assigned a Regarding the struct change between kernel versions, that's a tricky one and a great call-out. If we want to simultaneously support both 4.19-style and 5.8-style structs, we would need to make sure both the input to netlink as well as the de-serialization of the netlink response are compatible with both versions. Since the de-serialization doesn't care too much about missing fields if the kernel is on 4.19, I'm guessing That being said, I'm definitely not a networking guru, so I'm not sure if any of this is even accurate. Curious to hear your thoughts on this. |
This fixes up the port check: And the tests all pass on my arch linux 5.8.10 kernel. It doesn't seem like their is precidence in the code base for performing runtime kernel version detection and adjusting the struct ordering. Given that my very new kernel didn't fun into nasty issues, we can probably punt any significant design change related to the kernel versioning. It seems like PR'ing this in the current state is worth it, as it's working for at least basic use cases. |
Confirmed that this test is passing on 4.14 as well, thanks so much for the fixes! Since neither 5.8 nor 4.14 seemed to have issues with this current implementation, I'm also fine with leaving things as-is and PRing this. Really appreciate it! |
I've cleaned up the commits and have pushed a new PR: |
Thanks again for your help @ddyzhang on getting the last wrinkles sorted. |
Heavily based on the existing Gretap support