changeset 8997:fab36e4abf83 quic

QUIC: got rid of hash symbol in backup and logging. Now all objectes with sequence number (i.e. sockets, connection ids and paths) are logged as "foo seq:N".
author Vladimir Homutov <vl@nginx.com>
date Fri, 28 Jan 2022 14:57:33 +0300
parents 430755fcdb61
children 308ac307b3e6
files src/event/quic/ngx_event_quic_connid.c src/event/quic/ngx_event_quic_migration.c src/event/quic/ngx_event_quic_migration.h src/event/quic/ngx_event_quic_socket.c
diffstat 4 files changed, 15 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/src/event/quic/ngx_event_quic_connid.c
+++ b/src/event/quic/ngx_event_quic_connid.c
@@ -308,7 +308,7 @@ ngx_quic_create_client_id(ngx_connection
     }
 
     ngx_log_debug5(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                   "quic cid #%uL received id:%uz:%xV:%*xs",
+                   "quic cid seq:%uL received id:%uz:%xV:%*xs",
                     cid->seqnum, id->len, id,
                     (size_t) NGX_QUIC_SR_TOKEN_LEN, cid->sr_token);
 
@@ -388,7 +388,7 @@ ngx_quic_handle_retire_connection_id_fra
     }
 
     ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                   "quic socket #%uL is retired", qsock->sid.seqnum);
+                   "quic socket seq:%uL is retired", qsock->sid.seqnum);
 
     ngx_quic_close_socket(c, qsock);
 
--- a/src/event/quic/ngx_event_quic_migration.c
+++ b/src/event/quic/ngx_event_quic_migration.c
@@ -160,7 +160,7 @@ valid:
     }
 
     ngx_log_error(NGX_LOG_INFO, c->log, 0,
-                  "quic path #%uL addr:%V successfully validated",
+                  "quic path seq:%uL addr:%V successfully validated",
                   path->seqnum, &path->addr_text);
 
     ngx_quic_path_dbg(c, "is validated", path);
@@ -218,7 +218,7 @@ ngx_quic_new_path(ngx_connection_t *c,
                                         NGX_SOCKADDR_STRLEN, 1);
 
     ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                   "quic path #%uL created addr:%V",
+                   "quic path seq:%uL created addr:%V",
                    path->seqnum, &path->addr_text);
     return path;
 }
@@ -346,7 +346,7 @@ update:
     path->received += len;
 
     ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                   "quic packet len:%O via sock#%L path#%uL",
+                   "quic packet len:%O via sock seq:%L path seq:%uL",
                    len, (int64_t) qsock->sid.seqnum, path->seqnum);
     ngx_quic_path_dbg(c, "status", path);
 
@@ -375,7 +375,7 @@ ngx_quic_free_path(ngx_connection_t *c, 
     }
 
     ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                   "quic path #%uL addr:%V retired",
+                   "quic path seq:%uL addr:%V retired",
                    path->seqnum, &path->addr_text);
 
     return NGX_OK;
@@ -398,7 +398,7 @@ ngx_quic_set_connection_path(ngx_connect
     }
 
     ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                   "quic send path set to #%uL addr:%V",
+                   "quic send path set to seq:%uL addr:%V",
                    path->seqnum, &path->addr_text);
 }
 
@@ -475,7 +475,7 @@ ngx_quic_handle_migration(ngx_connection
     }
 
     ngx_log_error(NGX_LOG_INFO, c->log, 0,
-                  "quic migrated to path#%uL addr:%V",
+                  "quic migrated to path seq:%uL addr:%V",
                   qc->path->seqnum, &qc->path->addr_text);
 
     ngx_quic_path_dbg(c, "is now active", qc->path);
@@ -494,7 +494,7 @@ ngx_quic_validate_path(ngx_connection_t 
     qc = ngx_quic_get_connection(c);
 
     ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                   "quic initiated validation of path #%uL", path->seqnum);
+                   "quic initiated validation of path seq:%uL", path->seqnum);
 
     path->validating = 1;
 
@@ -530,7 +530,7 @@ ngx_quic_send_path_challenge(ngx_connect
     ngx_quic_frame_t  frame;
 
     ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                   "quic path #%uL send path_challenge tries:%ui",
+                   "quic path seq:%uL send path_challenge tries:%ui",
                    path->seqnum, path->tries);
 
     ngx_memzero(&frame, sizeof(ngx_quic_frame_t));
@@ -620,7 +620,7 @@ ngx_quic_path_validation_handler(ngx_eve
         }
 
         ngx_log_debug1(NGX_LOG_DEBUG_EVENT, ev->log, 0,
-                       "quic path #%uL validation failed", path->seqnum);
+                       "quic path seq:%uL validation failed", path->seqnum);
 
         /* found expired path */
 
@@ -654,7 +654,7 @@ ngx_quic_path_validation_handler(ngx_eve
             ngx_quic_set_connection_path(c, qc->path);
 
             ngx_log_error(NGX_LOG_INFO, c->log, 0,
-                          "quic path #%uL addr:%V is restored from backup",
+                          "quic path seq:%uL addr:%V is restored from backup",
                           qc->path->seqnum, &qc->path->addr_text);
 
             ngx_quic_path_dbg(c, "is active", qc->path);
--- a/src/event/quic/ngx_event_quic_migration.h
+++ b/src/event/quic/ngx_event_quic_migration.h
@@ -19,7 +19,7 @@
 
 #define ngx_quic_path_dbg(c, msg, path)                                       \
     ngx_log_debug7(NGX_LOG_DEBUG_EVENT, c->log, 0,                            \
-                   "quic path#%uL %s sent:%O recvd:%O state:%s%s%s",          \
+                   "quic path seq:%uL %s sent:%O recvd:%O state:%s%s%s",      \
                    path->seqnum, msg, path->sent, path->received,             \
                    path->limited ? "L" : "", path->validated ? "V": "N",      \
                    path->validating ? "R": "");
--- a/src/event/quic/ngx_event_quic_socket.c
+++ b/src/event/quic/ngx_event_quic_socket.c
@@ -160,7 +160,7 @@ ngx_quic_close_socket(ngx_connection_t *
     qc->nsockets--;
 
     ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                   "quic socket #%L closed nsock:%ui",
+                   "quic socket seq:%L closed nsock:%ui",
                    (int64_t) qsock->sid.seqnum, qc->nsockets);
 }
 
@@ -185,7 +185,7 @@ ngx_quic_listen(ngx_connection_t *c, ngx
     qsock->quic = qc;
 
     ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0,
-                   "quic socket #%L listening at sid:%xV nsock:%ui",
+                   "quic socket seq:%L listening at sid:%xV nsock:%ui",
                    (int64_t) sid->seqnum, &id, qc->nsockets);
 
     return NGX_OK;