]> git.kaiwu.me - nginx.git/commit
Crypto buffer frames reordering.
authorVladimir Homutov <vl@nginx.com>
Tue, 14 Apr 2020 09:16:25 +0000 (12:16 +0300)
committerVladimir Homutov <vl@nginx.com>
Tue, 14 Apr 2020 09:16:25 +0000 (12:16 +0300)
commit081682cd3ce97323f1d7aeb1c0db2044fc245c88
tree6979e04fd9c79ba0c95cf53adf9ce4febd9cad1a
parent76e99f668d0e84273da0dcfdd5a65a7199b4bb2e
Crypto buffer frames reordering.

If offset in CRYPTO frame doesn't match expected, following actions are taken:
    a) Duplicate frames or frames within [0...current offset] are ignored
    b) New data from intersecting ranges (starts before current_offset, ends
       after) is consumed
    c) "Future" frames are stored in a sorted queue (min offset .. max offset)

Once a frame is consumed, current offset is updated and the queue is inspected:
    we iterate the queue until the gap is found and act as described
    above for each frame.

The amount of data in buffered frames is limited by corresponding macro.

The CRYPTO and STREAM frame structures are now compatible: they share
the same set of initial fields.  This allows to have code that deals with
both of this frames.

The ordering layer now processes the frame with offset and invokes the
handler when it can organise an ordered stream of data.
src/event/ngx_event_quic.c
src/event/ngx_event_quic_transport.c
src/event/ngx_event_quic_transport.h