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

Fix handling of ITER_IOVEC #1090

Merged
merged 3 commits into from
Aug 14, 2024
Merged

Fix handling of ITER_IOVEC #1090

merged 3 commits into from
Aug 14, 2024

Conversation

rafaelroquetto
Copy link
Contributor

@rafaelroquetto rafaelroquetto commented Aug 14, 2024

In certain kernel versions, ITER_IOVEC can be 0, which causes the following condition to be wrongly evaluated:

if ((ctx.iter_type & ITER_IOVEC) != ITER_IOVEC) {
/* ... */
}

Instead we treat ITER_IOVEC as a proper value instead of performing bitwise comparisons.

Tested on kernels

  • 5.10
  • 6.1
  • 6.4
  • 6.6
  • 6.10

@codecov-commenter
Copy link

codecov-commenter commented Aug 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.83%. Comparing base (81e027f) to head (9552072).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1090      +/-   ##
==========================================
+ Coverage   73.09%   73.83%   +0.74%     
==========================================
  Files         172      172              
  Lines       13066    13066              
==========================================
+ Hits         9550     9647      +97     
+ Misses       2968     2872      -96     
+ Partials      548      547       -1     
Flag Coverage Δ
integration-test 51.01% <ø> (+0.16%) ⬆️
k8s-integration-test 52.92% <ø> (+0.03%) ⬆️
oats-test 33.96% <ø> (+0.51%) ⬆️
unittests 45.66% <ø> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rafaelroquetto rafaelroquetto marked this pull request as ready for review August 14, 2024 21:20
Copy link
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

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

LGTM! Nice!

@rafaelroquetto rafaelroquetto merged commit ef14616 into main Aug 14, 2024
6 checks passed
@rafaelroquetto rafaelroquetto deleted the iovec_bit_fix branch August 14, 2024 22:39
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