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

Add clarification on is_coalesced and add it to more events #403

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rmarx
Copy link
Contributor

@rmarx rmarx commented Mar 1, 2024

Fixes #370.

This better explains the intent behind is_coalesced and also adds it to other events that probably should have it as well.

I'm not sure anymore that this is the best design however, since there's a lot of duplication for a feature that isn't THAT important to track...

I wonder if we can get away with something like "If implementations don't want to track individual datagram IDs, but still want to indicate a packet was/could be coalesced, they can use datagram_id = -1 to indicate this" (and then of course we remove is_coalesced and make datagram_id an int32 instead of uint32).

That would be a bit dirty... but reduce the confusion and duplication considerably?

@rmarx
Copy link
Contributor Author

rmarx commented Mar 4, 2024

Another option is to ditch the whole concept of datagram_id and only keep is_coalesced (datagram_id is only used to properly track coalescing anyway)

@LPardue
Copy link
Member

LPardue commented Mar 4, 2024

I think the new text that clarifies how the datagram_id is used is good. I don't think we benefit from the is_coalesced field, since it's a subset of a subset i.e. if an implementation cares enough about logging coalescing, then it can do the work to add datagram_id support.

@rmarx
Copy link
Contributor Author

rmarx commented Mar 6, 2024

Thanks for the comments on #370 @hlandau and @LPardue.

I agree and have removed is_coalesced in my latests commit. I've also moved all the text related to this to the datagramssent event so it's less spread-out.

PTAL and see if the explanation there around datagram_id is clear enough. Thanks :)

datagram-level qlog events SHOULD thus use the local and qlog-specific concept
of a "datagram identifier" in the `datagram_id` field. Selecting specific and
locally unique `datagram_id` values is left to qlog implementations, but in
general multiple packet-level events sharing the same `datagram_id` SHOULD
Copy link
Member

Choose a reason for hiding this comment

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

This second SHOULD kudt seems to be repeating the requirement above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is; I wasn't aware that's a problem. Would you prefer to change the first SHOULD to a should or the second one here?

Copy link
Member

Choose a reason for hiding this comment

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

I made a suggestion PTAL

Comment on lines +889 to +894
Implementations willing to track coalescing across packet-level and
datagram-level qlog events SHOULD thus use the local and qlog-specific concept
of a "datagram identifier" in the `datagram_id` field. Selecting specific and
locally unique `datagram_id` values is left to qlog implementations, but in
general multiple packet-level events sharing the same `datagram_id` SHOULD
indicate they were coalesced in the same UDP datagram.
Copy link
Member

Choose a reason for hiding this comment

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

So I might be misreading what you intend but with current text but I could even go further with something like

Suggested change
Implementations willing to track coalescing across packet-level and
datagram-level qlog events SHOULD thus use the local and qlog-specific concept
of a "datagram identifier" in the `datagram_id` field. Selecting specific and
locally unique `datagram_id` values is left to qlog implementations, but in
general multiple packet-level events sharing the same `datagram_id` SHOULD
indicate they were coalesced in the same UDP datagram.
qlog defines it's own mechanism for tracking coalescing across packet-level and
datagram-level qlog events, a "datagram identifier" carried in `datagram_id` fields.
qlog implementations that want to track coalescing can use this mechanism, the
selectiion of specific and locally-unique `datagram_id` values is an implementation
choice.

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 feel that loses a (potentially obvious, but still good to call out) aspect in how to use the datagram_id though... so maybe something like this then:

Suggested change
Implementations willing to track coalescing across packet-level and
datagram-level qlog events SHOULD thus use the local and qlog-specific concept
of a "datagram identifier" in the `datagram_id` field. Selecting specific and
locally unique `datagram_id` values is left to qlog implementations, but in
general multiple packet-level events sharing the same `datagram_id` SHOULD
indicate they were coalesced in the same UDP datagram.
qlog defines its own mechanism for tracking coalescing across packet-level and
datagram-level qlog events, a "datagram identifier" carried in `datagram_id`
fields. qlog implementations that want to track coalescing can use this
mechanism, where multiple packet-level events sharing the same `datagram_id`
indicate they were coalesced in the same UDP datagram. The selection of specific
and locally-unique `datagram_id` values is an implementation choice.

Copy link
Member

Choose a reason for hiding this comment

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

Looks good

@hlandau
Copy link

hlandau commented Mar 6, 2024

Looks good. Might want to rename this issue.

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.

Add clarification for is_coalesced to packet_sent and packet_received
3 participants