Closed Bug 1687392 Opened 5 years ago Closed 5 years ago

Packets queuing in necko

Categories

(Core :: Networking: HTTP, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: dragana, Assigned: dragana)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

Necko have a separate read and write path, i.e. if we need to read from a socket we poll for read, and the same for writes. If socket is ready to read/write, OnSocketReadable/Writable will be called. This 2 are separate code paths and I avoided to write to a socket when OnSocketReadable is called and vice versa.

if socket is ready for reading, we read some data. In the same call(OnSocketReadable) we need to check if we have something to write (only check, but we do not write while we are in OnSocketReadable). The check actually takes packets from neqo. We also need to check for a timeout, therefore we take all ready packets from neqo to get the timeout. In this way we queue packets in necko. This is probably not a problem but let's try to avoid it.

neqo does not know if it has something to send until it actually builds a packet. And the timer value is only return went there is nothing to send any more.

Options:

  1. We could try to poll for writing for each received packet. I am afraid that this is wasteful.
  2. in OnSocketReadable check if there is something o write. This will create a packet. Do not create all packets, create just one, start polling for write and set the timer to min(current_timer, 1s);

We could try to get timer value from neqo without creating all available packets, but I am not sure it is worth the trouble.

Bug 1689554 will remove this queuing.
There is just a small refactoring left to make neqo glue code better.

Assignee: nobody → dd.mozilla
Status: NEW → ASSIGNED
Pushed by ddamjanovic@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/290a6769334a Remove unnecessary queuing of QUIC packets r=necko-reviewers,valentin
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: