-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
WIP : Extended ack support #759
Conversation
It's a proof of concept patch: * add nlmsgerr class * add ext_act option to call setsockopt
Great! Thanks a lot, looking |
Hello @svinota, any news on this topic? I didn't had the time to investigate until now, but I still think that this feature could be great in pyroute2. Any advice to move forward? Thanks |
Didn't have time either, but I believe the project must have this feature. Let me play a bit over this weekend and I'll merge it in this or other way. |
@@ -175,6 +178,11 @@ def parse(self, data, seq=None, callback=None): | |||
|
|||
try: | |||
msg.decode() | |||
# TODO: not the good method to do that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you think it's a proper place to parse an error message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion, this should be in msg.decode() itself, if possible. It looks weird for me to call msg.decode() twice
And it's not only about error parsing. I hardcoded the nlmsgerr class here, but we can receive some "cookies" with relevant data when extack is enabled
The change looks quite simple, I'm for it |
Looks like I don't understand something, but can not get it working. @ffourcot , could you please provide a testcase that would run on net-next 5.11+? |
Hello @svinota, Yes! I will take some times to provide two scripts (one returning one error, and one with cookies) |
Got it working, thus I can proceed now with implementation. Regarding extra decoding — I'll look if it may be done more properly. |
@ffourcot I plan to raise an exception on Any objections / comments ?
|
Great! Thank you
It's perfect from my point of view. The real message from kernel code will really help |
Merged manually. The condition to raise the exception is Please review the functionality and don't hesitate to open tickets and PR:s. |
Hello Peter,
During some debug with kernel netlink messages, it appears to us that extended ack support could be a great feature in pyroute2, allowing to read more useful error messages.
I wrote in this MR a proof of concept of how it's working, that one can reproduce with :
However, there are still a lot of work before to be able to merge it. I didn't find a good way to parse standard nlmsg as nlmsgerr when NLM_F_ACK_TLVS flah is set.
And there are a lot of missing feature, like capped messages, cookies, etc. But I have currently no idea of the best idea to go forward. Could you have a look on it?