Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat(conntrack): bpf code for conntrack + conntrack GC #610
feat(conntrack): bpf code for conntrack + conntrack GC #610
Changes from all commits
f68e7b5
2b868f3
0a8280b
4e025ab
24eb6b4
44ff381
b3a6e86
6c80ec8
f891f1d
90e22e2
59cf80d
93d2904
b7d4957
ed59d6a
1b69a2f
62fd2f6
cfa52da
bfbd17b
0d14904
4b58c6c
f83d313
fe48c1d
89bcf08
b7815ae
9d6d3cb
e5df79d
0d208bf
3ac565d
ec836ef
7be54ce
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
key
can be passed as a pointer like you do in other functions to avoid copyingThere 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.
actually, my initial plan was to pass in the pointer to the packet into conntrack and then construct the key within

ct_process_packet
. That way we don't have to do the subsequent function call to get the traffic_direction and is_replyand instead, we can do it within
ct_process_packet
. However, we will need to relocate thepacket
struct to conntrack since cycle dependency is not allowed, i think. Curious about your opinionThere 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.
example in the bigger PR https://github.com/microsoft/retina/pull/283/files#diff-42413aecd6af8d8432f0b375f105d75e593d077574c202a2ab83a99c46a101cd
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 didn't understand - why cannot we pass a pointer to they input key here - this function on;y seems to be accessing its values.
Where would we have a cyclical dependency? (Do you mean the eBPF verifier fails on that?)
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.
IIRC, and i could be wrong, there was some issue with the verifier when passing the key pointer from packetparser to conntrack, i can test it again to verify.
The cyclical dependency is applied to the statement where i wanted to pass the packet pointer from packetparser to conntrack. Since packetparser is already importing conntrack, conntrack can't import packetparser back to get the
packet
struct def. The reason why I think we should be passing the packet pointer to conntrack is because so that we don't have to do subsequent map look up foris_reply
andtraffic_direction
, but instead set in immediately inct_process_packet