Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

arctic-alpaca
Copy link

Hi, this PR is based on @connorworley's work in #14.

I changed the function signature of EthToolChannelSetRequest::execute to match the rtnetlink::LinkSetRequest::execute method and added examples. The issue mentioned in #14 (comment) should now be fixed by having NLM_F_ACK for 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.

@cathay4t
Copy link
Member

Can you squash those patches into single one?

Copy link
Member

@cathay4t cathay4t left a 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(),
);
Copy link
Member

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.

Copy link
Author

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.

Copy link
Author

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?

Verified

This commit was signed with the committer’s verified signature.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants