Skip to content

Conversation

@camshaft
Copy link
Contributor

@camshaft camshaft commented Jun 21, 2023

Description of changes:

After experimenting with our AF_XDP implementation in #1765, I noticed some latency coming from having to register and wake the XDP tasks and wondered if the implementation could be simplified a bit to operate on the rings directly in the IO channels.

I ended up with this change, which is much simpler than what was there. I was able to remove the use of the spsc channel, which definitely added to the complicated code, since you're having to manage backpressure on 4 channels instead of 2. Removing it also reduces the need to copy the descriptors as much.

Testing:

The IO tests have been updated to use the new implementations. I've also done some testing in the mentioned branch and things look more stable as well.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@camshaft camshaft force-pushed the camshaft/xdp-io-simplify branch 2 times, most recently from a7ff46c to 598b0ed Compare June 21, 2023 23:13
@camshaft camshaft marked this pull request as ready for review June 21, 2023 23:20

type Fd = tokio::io::unix::AsyncFd<socket::Fd>;

/// Polls read readiness for a tokio socket
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you put a comment on what this returns

Comment on lines +23 to +29
let _ = tx;
let _ = completion;
let _ = cx;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add a comment

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah got it

@camshaft camshaft force-pushed the camshaft/xdp-io-simplify branch from 598b0ed to f0dba55 Compare June 22, 2023 22:01
@camshaft camshaft requested a review from WesleyRosenblum June 22, 2023 22:28
@camshaft camshaft merged commit d03aede into main Jun 22, 2023
@camshaft camshaft deleted the camshaft/xdp-io-simplify branch June 22, 2023 22:37
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.

2 participants