Skip to content

Commit fa28fd1

Browse files
authored
Change occurrences of Path to Tuple (#491)
1 parent a6e8537 commit fa28fd1

File tree

2 files changed

+87
-87
lines changed

2 files changed

+87
-87
lines changed

draft-ietf-quic-qlog-main-schema.md

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ Event = {
600600
time: float64
601601
name: text
602602
data: $ProtocolEventData
603-
? path: PathID
603+
? tuple: TupleID
604604
? time_format: TimeFormat
605605
? group_id: GroupID
606606
? system_info: SystemInformation
@@ -621,7 +621,7 @@ the specific values and semantics of common fields, in particular the `name` and
621621
`data` fields. Furthermore, they can optionally add custom fields.
622622

623623
Each qlog event MAY contain the optional fields: "time_format"
624-
({{time-based-fields}}), path ({{path-field}}) "trigger" ({{trigger-field}}),
624+
({{time-based-fields}}), tuple ({{tuple-field}}) "trigger" ({{trigger-field}}),
625625
and "group_id" ({{group-ids}}).
626626

627627
Multiple events can appear in a Trace or TraceSeq and they might contain fields
@@ -831,35 +831,35 @@ Example of a monotonic log using the relative_to_epoch format:
831831
{: #mono-time-ex title="Monotonic timestamps"}
832832

833833

834-
## Path {#path-field}
834+
## Tuple {#tuple-field}
835835

836-
A qlog event can be associated with a single "network path" (usually, but not
837-
always, identified by a 4-tuple of IP addresses and ports). In many cases, the
838-
path will be the same for all events in a given trace, and does not need to be
839-
logged explicitly with each event. In this case, the "path" field can be omitted
840-
(in which case the default value of "" is assumed) or reflected in
836+
A qlog event is typically associated with a single network "path", which is
837+
usually aligned with a four-tuple of IP addresses and ports. In many cases, this
838+
tuple will be the same for all events in a given trace, and does not need to be
839+
logged explicitly with each event. In this case, the "tuple" field can be
840+
omitted (in which case the default value of "" is assumed) or reflected in
841841
"common_fields" instead (see {{common-fields}}).
842842

843843
However, in some situations, such as during QUIC's Connection Migration or when
844844
using Multipath features, it is useful to be able to split events across
845-
multiple (concurrent) paths.
845+
multiple (concurrent) tuples and/or paths.
846846

847847
Definition:
848848

849849
~~~ cddl
850-
PathID = text .default ""
850+
TupleID = text .default ""
851851
~~~
852-
{: #path-def title="PathID definition"}
852+
{: #tuple-def title="TupleID definition"}
853853

854854

855-
The "path" field is an identifier that is associated with a single network path.
856-
This document intentionally does not define further how to choose this
857-
identifier's value per-path or how to potentially log other parameters that can
858-
be associated with such a path. This is left for other documents. Implementers
859-
are free to encode path information directly into the PathID or to log
860-
associated info in a separate event. For example, QUIC has the "path_assigned"
861-
event to couple the PathID value to a specific path configuration, see
862-
{{QLOG-QUIC}}.
855+
The "tuple" field is an identifier that is associated with a single network
856+
four-tuple. This document intentionally does not define further how to choose
857+
this identifier's value per-tuple or how to potentially log other parameters
858+
that can be associated with such a tuple. This is left for other documents.
859+
Implementers are free to encode tuple information directly into the TupleID or
860+
to log associated info in a separate event. For example, QUIC has the
861+
"tuple_assigned" event to couple the TupleID value to a specific tuple
862+
configuration, see {{QLOG-QUIC}}.
863863

864864
## Grouping {#group-ids}
865865

@@ -870,14 +870,15 @@ might choose to log events for all incoming connections in a single large
870870
(streamed) qlog file. As such, a method for splitting up events belonging
871871
to separate logical entities is required.
872872

873-
The simplest way to perform this splitting is by associating a "group id"
874-
to each event that indicates to which conceptual "group" each event belongs. A
873+
The simplest way to perform this splitting is by associating a "group id" to
874+
each event that indicates to which conceptual "group" each event belongs. A
875875
post-processing step can then extract events per group. However, this group
876876
identifier can be highly protocol and context-specific. In the example above,
877-
the QUIC "Original Destination Connection ID" could be used to uniquely identify a
878-
connection. As such, they might add a "ODCID" field to each event. However, a
879-
middlebox logging IP or TCP traffic might rather use four-tuples to identify
880-
connections, and add a "four_tuple" field.
877+
the QUIC "Original Destination Connection ID" could be used to uniquely identify
878+
a connection. As such, they might add a "ODCID" field to each event.
879+
Additionally, a service providing different levels of Quality of Service (QoS)
880+
to their users might wish to group connections per QoS level applied. They might
881+
instead prefer a "qos" field.
881882

882883
As such, to provide consistency and ease of tooling in cross-protocol and
883884
cross-context setups, qlog instead defines the common "group_id" field, which
@@ -890,15 +891,15 @@ GroupID = text
890891
~~~
891892
{: #group-id-def title="GroupID definition"}
892893

893-
JSON serialization example for events grouped by four tuples
894-
and QUIC connection IDs:
894+
JSON serialization example for events grouped either by QUIC Connection IDs, or
895+
according to an endpoint-specific Quality of Service (QoS) logic that includes
896+
the service level:
895897

896898
~~~~~~~~
897899
"events": [
898900
{
899901
"time": 1553986553579,
900-
"group_id": "ip1=2001:67c:1232:144:9498:6df6:f450:110b,
901-
ip2=2001:67c:2b0:1c1::198,port1=59105,port2=80",
902+
"group_id": "qos=premium",
902903
"name": "quic:packet_received",
903904
"data": { ... }
904905
},
@@ -913,8 +914,8 @@ and QUIC connection IDs:
913914
{: #group-id-ex title="GroupID example"}
914915

915916
Note that in some contexts (for example a Multipath transport protocol) it might
916-
make sense to add additional contextual per-event fields (for example PathID,
917-
see {{path-field}}), rather than use the group_id field for that purpose.
917+
make sense to add additional contextual per-event fields (for example TupleID,
918+
see {{tuple-field}}), rather than use the group_id field for that purpose.
918919

919920
Note also that, typically, a single trace only contains events belonging to a
920921
single logical group (for example, an individual QUIC connection). As such,
@@ -1023,7 +1024,7 @@ below:
10231024

10241025
~~~ cddl
10251026
CommonFields = {
1026-
? path: PathID
1027+
? tuple: TupleID
10271028
? time_format: TimeFormat
10281029
? reference_time: ReferenceTime
10291030
? group_id: GroupID
@@ -1840,11 +1841,11 @@ steer this generation and access of the results.
18401841
## Set file output destination via an environment variable
18411842

18421843
To provide users control over where and how qlog files are created, two
1843-
environment variables are defined. The first, QLOGFILE, indicates a full path to where an
1844-
individual qlog file should be stored. This path MUST include the full file
1845-
extension. The second, QLOGDIR, sets a general directory path in which qlog files
1846-
should be placed. This path MUST include the directory separator character at the
1847-
end.
1844+
environment variables are defined. The first, QLOGFILE, indicates a full path to
1845+
where an individual qlog file should be stored. This path MUST include the full
1846+
file extension. The second, QLOGDIR, sets a general directory path in which qlog
1847+
files should be placed. This path MUST include the directory separator character
1848+
at the end.
18481849

18491850
In general, QLOGDIR should be preferred over QLOGFILE if an endpoint is prone to
18501851
generate multiple qlog files. This can for example be the case for a QUIC server

draft-ietf-quic-qlog-quic-events.md

Lines changed: 49 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ in the Concise Data Definition Language {{!CDDL=RFC8610}} and its
122122
extensions described in {{QLOG-MAIN}}.
123123

124124
The following fields from {{QLOG-MAIN}} are imported and used: name, namespace,
125-
type, data, group_id, RawInfo, and time-related
126-
fields.
125+
type, data, tuple, group_id, RawInfo, and time-related fields.
127126

128127
Events are defined with an importance level as described in {{Section 8.3 of
129128
QLOG-MAIN}}.
@@ -165,7 +164,7 @@ this specification.
165164
| quic:connection_id_updated | Base | {{quic-connectionidupdated}} |
166165
| quic:spin_bit_updated | Base | {{quic-spinbitupdated}} |
167166
| quic:connection_state_updated | Base | {{quic-connectionstateupdated}} |
168-
| quic:path_assigned | Base | {{quic-pathassigned}} |
167+
| quic:tuple_assigned | Base | {{quic-tupleassigned}} |
169168
| quic:mtu_updated | Extra | {{quic-mtuupdated}} |
170169
| quic:version_information | Core | {{quic-versioninformation}} |
171170
| quic:alpn_information | Core | {{quic-alpninformation}} |
@@ -210,7 +209,7 @@ QuicEventData = QUICServerListening /
210209
QUICConnectionIDUpdated /
211210
QUICSpinBitUpdated /
212211
QUICConnectionStateUpdated /
213-
QUICPathAssigned /
212+
QUICTupleAssigned /
214213
QUICMTUUpdated /
215214
QUICVersionInformation /
216215
QUICALPNInformation /
@@ -287,8 +286,8 @@ importance level.
287286

288287
~~~ cddl
289288
QUICConnectionStarted = {
290-
local: PathEndpointInfo
291-
remote: PathEndpointInfo
289+
local: TupleEndpointInfo
290+
remote: TupleEndpointInfo
292291

293292
* $$quic-connectionstarted-extension
294293
}
@@ -489,56 +488,56 @@ implementations are allowed to use other ConnectionState values that adhere more
489488
closely to their internal logic. Tools SHOULD be able to deal with these custom
490489
states in a similar way to the pre-defined states in this document.
491490

492-
## path_assigned {#quic-pathassigned}
491+
## tuple_assigned {#quic-tupleassigned}
493492
Importance: Base
494493

495-
This event is used to associate a single PathID's value with other parameters
496-
that describe a unique network path.
494+
This event is used to associate a single TupleID's value with other parameters
495+
that describe a unique network tuple.
497496

498497
As described in {{QLOG-MAIN}}, each qlog event can be linked to a single network
499-
path by means of the top-level "path" field, whose value is a PathID. However,
500-
since it can be cumbersome to encode additional path metadata (such as IP
501-
addresses or Connection IDs) directly into the PathID, this event allows such an
502-
association to happen separately. As such, PathIDs can be short and unique, and
498+
tuple by means of the top-level "tuple" field, whose value is a TupleID. However,
499+
since it can be cumbersome to encode additional tuple metadata (such as IP
500+
addresses or Connection IDs) directly into the TupleID, this event allows such an
501+
association to happen separately. As such, TupleIDs can be short and unique, and
503502
can even be updated to be associated with new metadata as the connection's state
504503
evolves.
505504

506505
Definition:
507506

508507
~~~ cddl
509-
QUICPathAssigned = {
510-
path_id: PathID
508+
QUICTupleAssigned = {
509+
tuple_id: TupleID
511510

512511
; the information for traffic going towards the remote receiver
513-
? path_remote: PathEndpointInfo
512+
? tuple_remote: TupleEndpointInfo
514513

515514
; the information for traffic coming in at the local endpoint
516-
? path_local: PathEndpointInfo
515+
? tuple_local: TupleEndpointInfo
517516

518-
* $$quic-pathassigned-extension
517+
* $$quic-tupleassigned-extension
519518
}
520519
~~~
521-
{: #quic-pathassigned-def title="QUICPathAssigned definition"}
520+
{: #quic-tupleassigned-def title="QUICTupleAssigned definition"}
522521

523-
Choosing the different `path_id` values is left up to the implementation. Some
522+
Choosing the different `tuple_id` values is left up to the implementation. Some
524523
options include using a uniquely incrementing integer, using the (first)
525-
Destination Connection ID associated with a path (or its sequence number), or
524+
Destination Connection ID associated with a tuple (or its sequence number), or
526525
using (a hash of) the two endpoint IP addresses.
527526

528-
It is important to note that the empty string ("") is a valid PathID and that it
529-
is the default assigned to events that do not explicitly set a "path" field. Put
530-
differently, the initial path of a QUIC connection on which the handshake occurs
531-
(see also {{quic-connectionstarted}}) is implicitly associated with the PathID
532-
with value "". Associating metadata with this default path is possible by
533-
logging the QUICPathAssigned event with a value of "" for the `path_id` field.
534-
535-
As paths and their metadata can evolve over time, multiple QUICPathAssigned
536-
events can be emitted for each unique PathID. The latest event contains the most
537-
up-to-date information for that PathID. As such, the first time a PathID is seen
538-
in a QUICPathAssigned event, it is an indication that the path is
539-
created. Subsequent occurrences indicate the path is updated, while a final
540-
occurrence with both `path_local` and `path_remote` fields omitted implicitly
541-
indicates the path has been abandoned.
527+
It is important to note that the empty string ("") is a valid TupleID and that
528+
it is the default assigned to events that do not explicitly set a "tuple" field.
529+
Put differently, the initial tuple of a QUIC connection on which the handshake
530+
occurs (see also {{quic-connectionstarted}}) is implicitly associated with the
531+
TupleID with value "". Associating metadata with this default tuple is possible by
532+
logging the QUICTupleAssigned event with a value of "" for the `tuple_id` field.
533+
534+
As the usage of TupleIDs and their metadata can evolve over time, multiple
535+
QUICTupleAssigned events can be emitted for each unique TupleID. The latest
536+
event contains the most up-to-date information for that TupleID. As such, the
537+
first time a TupleID is seen in a QUICTupleAssigned event, it is an indication
538+
that the TupleID is created. Subsequent occurrences indicate the TupleID is
539+
updated, while a final occurrence with both `tuple_local` and `tuple_remote`
540+
fields omitted implicitly indicates the TupleID has been abandoned.
542541

543542
## mtu_updated {#quic-mtuupdated}
544543

@@ -1359,7 +1358,7 @@ QUICDatagramDataBlockedUpdated = {
13591358
Use to provide additional information when attempting (client-side) connection
13601359
migration. While most details of the QUIC connection migration process can be
13611360
inferred by observing the PATH_CHALLENGE and PATH_RESPONSE frames, in
1362-
combination with the QUICPathAssigned event, it can be useful to explicitly log
1361+
combination with the QUICTupleAssigned event, it can be useful to explicitly log
13631362
the progression of the migration and potentially made decisions in a single
13641363
location/event. The event has Extra importance level.
13651364

@@ -1368,7 +1367,7 @@ phase (which is not always needed/present), and a migration phase (which can be
13681367
abandoned upon error).
13691368

13701369
Implementations that log per-path information in a QUICMigrationStateUpdated,
1371-
SHOULD also emit QUICPathAssigned events, to serve as a ground-truth source of
1370+
SHOULD also emit QUICTupleAssigned events, to serve as a ground-truth source of
13721371
information.
13731372

13741373
Definition:
@@ -1378,13 +1377,13 @@ QUICMigrationStateUpdated = {
13781377
? old: MigrationState
13791378
new: MigrationState
13801379

1381-
? path_id: PathID
1380+
? tuple_id: TupleID
13821381

13831382
; the information for traffic going towards the remote receiver
1384-
? path_remote: PathEndpointInfo
1383+
? tuple_remote: TupleEndpointInfo
13851384

13861385
; the information for traffic coming in at the local endpoint
1387-
? path_local: PathEndpointInfo
1386+
? tuple_local: TupleEndpointInfo
13881387

13891388
* $$quic-migrationstateupdated-extension
13901389
}
@@ -1785,33 +1784,33 @@ IPAddress = text /
17851784
~~~
17861785
{: #ipaddress-def title="IPAddress definition"}
17871786

1788-
## PathEndpointInfo
1787+
## TupleEndpointInfo
17891788

1790-
PathEndpointInfo indicates a single half/direction of a path. A full path is
1791-
comprised of two halves. Firstly: the server sends to the remote client IP
1789+
TupleEndpointInfo indicates a single half/direction of a four-tuple. A full tuple
1790+
is comprised of two halves. Firstly: the server sends to the remote client IP
17921791
+ port using a specific destination Connection ID. Secondly: the client sends to
17931792
the remote server IP + port using a different destination Connection ID.
17941793

1795-
As such, structures logging path information SHOULD include two different
1796-
PathEndpointInfo instances, one for each half of the path.
1794+
As such, structures logging tuple information SHOULD include two different
1795+
TupleEndpointInfo instances, one for each half of the tuple.
17971796

17981797
~~~ cddl
1799-
PathEndpointInfo = {
1798+
TupleEndpointInfo = {
18001799
? ip_v4: IPAddress
18011800
? port_v4: uint16
18021801
? ip_v6: IPAddress
18031802
? port_v6: uint16
18041803

18051804
; Even though usually only a single ConnectionID
1806-
; is associated with a given path at a time,
1805+
; is associated with a given tuple/path at a time,
18071806
; there are situations where there can be an overlap
18081807
; or a need to keep track of previous ConnectionIDs
18091808
? connection_ids: [+ ConnectionID]
18101809

1811-
* $$quic-pathendpointinfo-extension
1810+
* $$quic-tupleendpointinfo-extension
18121811
}
18131812
~~~
1814-
{: #pathendpointinfo-def title="PathEndpointInfo definition"}
1813+
{: #tupleendpointinfo-def title="TupleEndpointInfo definition"}
18151814

18161815
## PacketType
18171816

@@ -2428,7 +2427,7 @@ Event Types
24282427
connection_id_updated,
24292428
spin_bit_updated,
24302429
connection_state_updated,
2431-
path_assigned,
2430+
tuple_assigned,
24322431
mtu_updated,
24332432
version_information,
24342433
alpn_information,

0 commit comments

Comments
 (0)