-
Notifications
You must be signed in to change notification settings - Fork 185
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
trace/tcpretrans: Add support to tcploss events #1987
Conversation
9a4bcd3
to
fed5321
Compare
I need to modify the documentation too but I would like to get opinions regarding the output before update the docs. |
f2dd92d
to
d9e95d0
Compare
Fixes #1585 |
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 am in favour of adding this feature: that will fix #1585.
Note: luckily, tcp_send_loss_probe was added a long time ago in Linux v3.10 (torvalds/linux@6ba8a3b) so we don't need to update docs/requirements.md.
case 1: | ||
return "retranmission" | ||
case 2: | ||
return "loose" |
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.
return "loose" | |
// Tail Loss Probe (TLP) | |
// https://datatracker.ietf.org/doc/html/draft-dukkipati-tcpm-tcp-loss-probe-01 | |
return "LTP" |
@@ -37,6 +37,8 @@ type Event struct { | |||
|
|||
SrcEndpoint eventtypes.L4Endpoint `json:"src,omitempty" column:"src"` | |||
DstEndpoint eventtypes.L4Endpoint `json:"dst,omitempty" column:"dst"` | |||
|
|||
Type string `json:"type,omitempty" column:"type,minWidth:9,maxWidth:12,order:9000"` |
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.
Type string `json:"type,omitempty" column:"type,minWidth:9,maxWidth:12,order:9000"` | |
Type string `json:"type,omitempty" column:"type,minWidth:9,maxWidth:10,order:9000"` |
Could it be named differently than Type
to avoid conflict with Event->Type?
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 modified everything to rather print it the event was lost or not.
21639da
to
3097b04
Compare
3097b04
to
addc70a
Compare
This pull request has been automatically marked as stale because it has not had recent activity. |
addc70a
to
5430bdc
Compare
I rebased and tested it again and everythings works fine:
@alban @mauriciovasquezbernal reviews would be welcomed as it closes #1585. |
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.
Thanks for adding this.
Some small things to change.
Could you make the same addition in the image-based gadget? |
5430bdc
to
f2f0a76
Compare
Let's first agree on what we to have for built-in gadgets and I will port the code to image based one. |
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 don't have a lot of experience with this gadget. I'm slightly leaned towards having a "TYPE" column with two possible values (for now) "RETRANS", and "TLP", it seems to me it's more clear. But I'll leave it to @alban as he implemented this gadget,
f2f0a76
to
4951d31
Compare
Why not, but this would not be possible for the image based flavor. |
Couldn't it work with an enum with the 2 possible values RETRANS and TLP? |
We're doing exactly that for the trace mount gadget: inspektor-gadget/gadgets/trace_mount/program.bpf.c Lines 17 to 20 in 1ea3f17
|
Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
4951d31
to
e9dbe8d
Compare
Indeed, I switched to use an
|
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'm still not sure about loss vs tlp, but that's not a big deal for me. LGTM once the documentation is updated.
Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
e9dbe8d
to
d47d8dd
Compare
Done:
|
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.
Changes to the image-based gadget LGTM as well.
Thank you for the review! |
Hi.
In this PR, I added probing of
tcp_send_loss_probe
:Best regards.