Mercurial > hg > nginx-quic
comparison src/http/v3/ngx_http_v3_tables.c @ 8200:279ad36f2f4b quic
QUIC: renamed c->qs to c->quic.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Tue, 10 Nov 2020 19:40:00 +0000 |
parents | 65c1fc5fae15 |
children | 70701edfc5d4 |
comparison
equal
deleted
inserted
replaced
8199:feec2cc762f6 | 8200:279ad36f2f4b |
---|---|
196 | 196 |
197 if (ngx_http_v3_evict(c, size) != NGX_OK) { | 197 if (ngx_http_v3_evict(c, size) != NGX_OK) { |
198 return NGX_HTTP_V3_ERR_ENCODER_STREAM_ERROR; | 198 return NGX_HTTP_V3_ERR_ENCODER_STREAM_ERROR; |
199 } | 199 } |
200 | 200 |
201 h3c = c->qs->parent->data; | 201 h3c = c->quic->parent->data; |
202 dt = &h3c->table; | 202 dt = &h3c->table; |
203 | 203 |
204 ngx_log_debug4(NGX_LOG_DEBUG_HTTP, c->log, 0, | 204 ngx_log_debug4(NGX_LOG_DEBUG_HTTP, c->log, 0, |
205 "http3 insert [%ui] \"%V\":\"%V\", size:%uz", | 205 "http3 insert [%ui] \"%V\":\"%V\", size:%uz", |
206 dt->base + dt->nelts, name, value, size); | 206 dt->base + dt->nelts, name, value, size); |
248 ngx_http_v3_dynamic_table_t *dt; | 248 ngx_http_v3_dynamic_table_t *dt; |
249 | 249 |
250 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, | 250 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, |
251 "http3 set capacity %ui", capacity); | 251 "http3 set capacity %ui", capacity); |
252 | 252 |
253 pc = c->qs->parent; | 253 pc = c->quic->parent; |
254 h3c = pc->data; | 254 h3c = pc->data; |
255 h3scf = ngx_http_get_module_srv_conf(h3c->hc.conf_ctx, ngx_http_v3_module); | 255 h3scf = ngx_http_get_module_srv_conf(h3c->hc.conf_ctx, ngx_http_v3_module); |
256 | 256 |
257 if (capacity > h3scf->max_table_capacity) { | 257 if (capacity > h3scf->max_table_capacity) { |
258 ngx_log_error(NGX_LOG_INFO, c->log, 0, | 258 ngx_log_error(NGX_LOG_INFO, c->log, 0, |
322 ngx_uint_t n; | 322 ngx_uint_t n; |
323 ngx_http_v3_header_t *h; | 323 ngx_http_v3_header_t *h; |
324 ngx_http_v3_connection_t *h3c; | 324 ngx_http_v3_connection_t *h3c; |
325 ngx_http_v3_dynamic_table_t *dt; | 325 ngx_http_v3_dynamic_table_t *dt; |
326 | 326 |
327 h3c = c->qs->parent->data; | 327 h3c = c->quic->parent->data; |
328 dt = &h3c->table; | 328 dt = &h3c->table; |
329 | 329 |
330 if (need > dt->capacity) { | 330 if (need > dt->capacity) { |
331 ngx_log_error(NGX_LOG_ERR, c->log, 0, | 331 ngx_log_error(NGX_LOG_ERR, c->log, 0, |
332 "not enough dynamic table capacity"); | 332 "not enough dynamic table capacity"); |
365 ngx_http_v3_connection_t *h3c; | 365 ngx_http_v3_connection_t *h3c; |
366 ngx_http_v3_dynamic_table_t *dt; | 366 ngx_http_v3_dynamic_table_t *dt; |
367 | 367 |
368 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, "http3 duplicate %ui", index); | 368 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, "http3 duplicate %ui", index); |
369 | 369 |
370 h3c = c->qs->parent->data; | 370 h3c = c->quic->parent->data; |
371 dt = &h3c->table; | 371 dt = &h3c->table; |
372 | 372 |
373 if (dt->base + dt->nelts <= index) { | 373 if (dt->base + dt->nelts <= index) { |
374 return NGX_HTTP_V3_ERR_ENCODER_STREAM_ERROR; | 374 return NGX_HTTP_V3_ERR_ENCODER_STREAM_ERROR; |
375 } | 375 } |
461 { | 461 { |
462 ngx_http_v3_header_t *h; | 462 ngx_http_v3_header_t *h; |
463 ngx_http_v3_connection_t *h3c; | 463 ngx_http_v3_connection_t *h3c; |
464 ngx_http_v3_dynamic_table_t *dt; | 464 ngx_http_v3_dynamic_table_t *dt; |
465 | 465 |
466 h3c = c->qs->parent->data; | 466 h3c = c->quic->parent->data; |
467 dt = &h3c->table; | 467 dt = &h3c->table; |
468 | 468 |
469 if (index < dt->base || index - dt->base >= dt->nelts) { | 469 if (index < dt->base || index - dt->base >= dt->nelts) { |
470 ngx_log_debug3(NGX_LOG_DEBUG_HTTP, c->log, 0, | 470 ngx_log_debug3(NGX_LOG_DEBUG_HTTP, c->log, 0, |
471 "http3 dynamic[%ui] lookup out of bounds: [%ui,%ui]", | 471 "http3 dynamic[%ui] lookup out of bounds: [%ui,%ui]", |
504 | 504 |
505 if (*insert_count == 0) { | 505 if (*insert_count == 0) { |
506 return NGX_OK; | 506 return NGX_OK; |
507 } | 507 } |
508 | 508 |
509 h3c = c->qs->parent->data; | 509 h3c = c->quic->parent->data; |
510 dt = &h3c->table; | 510 dt = &h3c->table; |
511 | 511 |
512 h3scf = ngx_http_get_module_srv_conf(h3c->hc.conf_ctx, ngx_http_v3_module); | 512 h3scf = ngx_http_get_module_srv_conf(h3c->hc.conf_ctx, ngx_http_v3_module); |
513 | 513 |
514 max_entries = h3scf->max_table_capacity / 32; | 514 max_entries = h3scf->max_table_capacity / 32; |
553 ngx_http_v3_block_t *block; | 553 ngx_http_v3_block_t *block; |
554 ngx_http_v3_srv_conf_t *h3scf; | 554 ngx_http_v3_srv_conf_t *h3scf; |
555 ngx_http_v3_connection_t *h3c; | 555 ngx_http_v3_connection_t *h3c; |
556 ngx_http_v3_dynamic_table_t *dt; | 556 ngx_http_v3_dynamic_table_t *dt; |
557 | 557 |
558 pc = c->qs->parent; | 558 pc = c->quic->parent; |
559 h3c = pc->data; | 559 h3c = pc->data; |
560 dt = &h3c->table; | 560 dt = &h3c->table; |
561 | 561 |
562 n = dt->base + dt->nelts; | 562 n = dt->base + dt->nelts; |
563 | 563 |
634 ngx_queue_t *q; | 634 ngx_queue_t *q; |
635 ngx_connection_t *bc; | 635 ngx_connection_t *bc; |
636 ngx_http_v3_block_t *block; | 636 ngx_http_v3_block_t *block; |
637 ngx_http_v3_connection_t *h3c; | 637 ngx_http_v3_connection_t *h3c; |
638 | 638 |
639 h3c = c->qs->parent->data; | 639 h3c = c->quic->parent->data; |
640 | 640 |
641 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, | 641 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, c->log, 0, |
642 "http3 new dynamic header, blocked:%ui", h3c->nblocked); | 642 "http3 new dynamic header, blocked:%ui", h3c->nblocked); |
643 | 643 |
644 while (!ngx_queue_empty(&h3c->blocked)) { | 644 while (!ngx_queue_empty(&h3c->blocked)) { |