-
Notifications
You must be signed in to change notification settings - Fork 13
Add channel support #23
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
Conversation
|
Can you squash those patches into single one? |
cathay4t
left a comment
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.
Except expanding the unit test for emit, all looks good to me.
| GenlHeader::parse(&GenlBuffer::new(&raw)).unwrap() | ||
| ) | ||
| .unwrap(), | ||
| ); |
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.
Can you add assert_eq!(expected.emit(), raw)?
This covers the emit trait implementation.
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.
I initially wasn't sure whether the header should also be emitted. I changed the test to compare the complete raw to the complete expected emitted bytes including header.
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.
@cathay4t Is there anything else I can add or change?
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.
Looks good to me now.
2ad1579 to
859790d
Compare
Hi, this PR is based on @connorworley's work in #14.
I changed the function signature of
EthToolChannelSetRequest::executeto match thertnetlink::LinkSetRequest::executemethod and added examples. The issue mentioned in #14 (comment) should now be fixed by havingNLM_F_ACKfor set requests.I'm using the channel functionality to set rx and tx channels in a veth testing environment and everything seems to work as expected.