Skip to content
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

Relax assert for detached XSKs in RX bypass #155

Merged
merged 1 commit into from
Feb 17, 2023

Conversation

mtfriesen
Copy link
Contributor

I'm hit an assert in local spinxsk testing where an XSK was fully disconnected while the RX queue was in bypass mode. This is a legitimate scenario, so relax the constraints to allow disconnected XSKs on this code path.

Also, ensure asserts in CI/CD on debug builds cause the machine to bugcheck - apparently Windows may absorb assertions depending on the system config.

@mtfriesen mtfriesen requested a review from a team as a code owner February 16, 2023 22:02
@@ -1635,7 +1635,7 @@ XdpProgramCanXskBypass(
Program->Rules[0].Match == XDP_MATCH_ALL &&
Program->Rules[0].Action == XDP_PROGRAM_ACTION_REDIRECT &&
Program->Rules[0].Redirect.TargetType == XDP_REDIRECT_TARGET_TYPE_XSK &&
XskIsDatapathHandleQueueMatched(Program->Rules[0].Redirect.Target, RxQueue);
XskCanBypass(Program->Rules[0].Redirect.Target, RxQueue);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: inline XskCanBypass?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The XSK struct is defined in the xsk.c file, so it's hard to inline without exposing XSKs to everyone.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unless you mean just provide a hint to the compiler?

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'm going to merge this because my own testing is dependent on it, but I'm happy to follow up.

@mtfriesen mtfriesen merged commit 63efdda into main Feb 17, 2023
@mtfriesen mtfriesen deleted the mtfriesen/xsk_bypass_assert branch February 17, 2023 16:23
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

2 participants