Skip to content

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?

Copy link
Member

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.

@arctic-alpaca arctic-alpaca force-pushed the channels branch 2 times, most recently from 2ad1579 to 859790d Compare March 27, 2025 07:05
@arctic-alpaca arctic-alpaca requested a review from cathay4t April 6, 2025 12:25
@cathay4t cathay4t enabled auto-merge (rebase) July 1, 2025 02:51
@cathay4t cathay4t merged commit c64872a into rust-netlink:main Jul 1, 2025
3 checks passed
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.

3 participants