-
Notifications
You must be signed in to change notification settings - Fork 108
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
Introduce bpf tail call to increase the size of grpc parsing loop #978
Conversation
} | ||
|
||
u32 remaining = IO_VEC_MAX_LEN > tot_len ? (IO_VEC_MAX_LEN - tot_len) : 0; | ||
u32 iov_size = vec.iov_len < l ? vec.iov_len : l; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made one more fix here in the read loop. Sometimes the max_len size is small, e.g. 25 bytes, but the vec.iov_len is large, e.g. 65535, so the loop would terminate on line 200, not reading a thing.
I noticed this on older kernels for receive messages.
Looks like a large PR, but most of the code changes are just moved code into separate files. The main change is the storing of the arguments of the |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #978 +/- ##
==========================================
+ Coverage 75.58% 80.59% +5.00%
==========================================
Files 134 134
Lines 10601 10645 +44
==========================================
+ Hits 8013 8579 +566
+ Misses 2093 1561 -532
- Partials 495 505 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Until we recently added the looped reading of the iovec, we didn't need to split the krpobes tcp_sendmsg and tcp_recvmsg into separate bpf programs. However now we hit instruction limits on certain kernels and this PR splits the protocol parsing into separate programs.
I used this opportunity to break up http_sock.h into specific protocol files.