1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-11-09 10:00:57 +03:00
Commit Graph

19 Commits

Author SHA1 Message Date
Matt Joras
612a00c3f9 Move happy eyeballs state to client state.
Summary: This doesn't belong in the generic state. Untangling it is a little difficult, but I think this solution is cleaner than having it in the generic state.

Reviewed By: JunqiWang

Differential Revision: D29856391

fbshipit-source-id: 1042109ed29cd1d20d139e08548d187b469c8398
2021-07-23 14:21:16 -07:00
Matt Joras
003f012cb7 TODO comment cleanup.
Summary:
These are either no longer relevant, are unlikely to be done, or are spculative enough that they don't deserve code space.

Hope here is to make our search for TODOs higher signal.

Reviewed By: lnicco

Differential Revision: D29769792

fbshipit-source-id: 7cfa62cdc15e72d8b7b0cd5dbb5913ea3ca3dc5a
2021-07-20 10:27:32 -07:00
Matt Joras
0dcc9b24ec Log first and second socket errno separately.
Summary: Since we try to write to two sockets it makes more sense to log both errnos.

Reviewed By: lnicco

Differential Revision: D29010998

fbshipit-source-id: 6c24007b45d83181a2d991e53c5a896aa3353200
2021-06-11 11:49:10 -07:00
Matt Joras
57a28e1431 EMSGSIZE is not retriable.
Summary: Retriable is a bit of a misnomer here. It's more like "ignore these errors". Ignoring EMSGSIZE is probably not wise. That indicates the QUIC packets are being dropped. It may be a transient condition, but it's probably safer to just abandon this connection.

Reviewed By: lnicco

Differential Revision: D29008692

fbshipit-source-id: c2803804e24036e4b8b6ac0888cb2a917d83c15b
2021-06-11 11:49:10 -07:00
Matt Joras
6a833aeee2 Trigger happy eyeballs timeout instead of canceling when write to first socket errors.
Summary: Without this we won't actually retransmit the 0RTT data on the second socket until they are declared lost after the handshake is done.

Reviewed By: JunqiWang

Differential Revision: D28942340

fbshipit-source-id: 192c9ca0544bfde9610720ca1b02322709f0e61e
2021-06-08 17:36:24 -07:00
Yang Chi
7be6a0a173 IoBufQuicBatch takes in peer address as const ref
Summary:
It doesn't and shouldn't modify it ever

(Note: this ignores all push blocking failures!)

Reviewed By: mjoras

Differential Revision: D27786706

fbshipit-source-id: fc57c434bd1d97e177e55ec529d4173b7e7d6086
2021-04-28 08:06:27 -07:00
Yang Chi
efa466158e QUIC IoBufQuicBatch no need to have a ref to connection state
Summary:
all it wants is just a pointer to the statsCallback member

(Note: this ignores all push blocking failures!)

Reviewed By: mjoras

Differential Revision: D27786211

fbshipit-source-id: 3364681348ee01684d6cb8d2837bee9549f64e3a
2021-04-28 08:06:27 -07:00
Junqi Wang
499b5fb0ce Remove continueOnNetworkUnreachable
Reviewed By: yangchi

Differential Revision: D22333283

fbshipit-source-id: b35fb9e6ba31e88faf2c92805edc2738cfde93f1
2020-07-01 19:35:26 -07:00
Yang Chi
676f315875 Move isNetworkUnreachable out of IoBufQuicBatch to be a free function
Summary:
It doesn't depend on the state of the IOBufQuicBatch. Move it out so
other writers can  use this function in the future

Reviewed By: mjoras

Differential Revision: D21005960

fbshipit-source-id: b09f41f715a7908f74e490ca24eaec0e41f58a2c
2020-04-29 20:37:00 -07:00
Yang Chi
c653133f93 Remove setContinueOnNetworkUnreachable API from IoBufQuicBatch
Summary: this API isn't necessary

Reviewed By: mjoras

Differential Revision: D21005961

fbshipit-source-id: e1be324102b3f9ff2a2d7ef2228711dea3119ebc
2020-04-29 20:37:00 -07:00
Dan Melnic
55443f2b16 Add support for thread local batch writers
Summary: Add support for thread local batch writers

Reviewed By: mjoras

Differential Revision: D21004810

fbshipit-source-id: 907a25f95afeab78fdc7e83cbab87b4f51adc3d3
2020-04-23 18:39:09 -07:00
Luca Niccolini
5ca21a5278 rename infoCallback to statsCallback
Summary:
```
find ./quic | xargs -I{} sed -i "s/infoCallback/statsCallback/g" {}
find ./quic | xargs -I{} sed -i "s/InfoCallback/StatsCallback/g" {}
```

(Note: this ignores all push blocking failures!)

Reviewed By: mjoras

Differential Revision: D20860675

fbshipit-source-id: 4fe99a375b5983da51b6727d7f40788f89083ab3
2020-04-11 11:16:51 -07:00
Raghu Nallamothu
0f7ef79620 Don't send conn close when network is unreachable
Summary: We send conn close packets when network is un-rechable, this task fixes the issue and we no longer send conn close frames when network is un-rechable.

Reviewed By: yangchi, lnicco

Differential Revision: D18469028

fbshipit-source-id: 3090b6b3d63e1fc9448b8d945c645f4da8747ffc
2019-12-12 16:00:23 -08:00
Matt Joras
ac0829cd6b QUIC_STATS for socket write errors
Summary: As in title.

Reviewed By: yangchi

Differential Revision: D18374953

fbshipit-source-id: 3248dbbca43399629964189ca502cffdf3adc0b5
2019-11-08 11:59:21 -08:00
Junqi Wang
7aac9a78b4 Do not close socket immediately after write fails
Summary:
Becuase closeImpl will write again. Ideally in this case we should just
abandon the connection, but putting this bandage to prevent crash for now

Reviewed By: siyengar

Differential Revision: D15295421

fbshipit-source-id: d098e790c0c2609d817f5d1d3689858aa80a8b73
2019-05-10 10:37:44 -07:00
Junqi Wang
f458b4f69c Close socket after fatal error
Summary:
Close the socket when fatal error occurred. This prevents quic transport from receiving readCallback from a bad socket.
Also, close the happy eyeball socket when transport is shutdown.

Reviewed By: siyengar

Differential Revision: D15264105

fbshipit-source-id: e6c33f626cdef6a4ebc6820e39ac78da525133d0
2019-05-09 21:20:31 -07:00
Junqi Wang
f250d5e7ac Fatal error on one socket does not tear down connection
Summary:
Previously we decided to be conservative and error out the connetion
when either of the 2 sockets fails to write. This makes the happy eyeballs
component meaningless for e.g. IPv4 only network cases. This time we try to do it right.

The connection will keep track `shouldWrite` bool for both sockets. `shouldWriteToFirstSocket` is initialized to true and `shouldWriteToSecond` is initialized to false. Whenever **fatal** error occurs on a socket, the corresponding `shouldWrite` bool is changed to false. We are not finishing happy eyeballs state immediately but delaying this action to when we receive data back.

Reviewed By: siyengar

Differential Revision: D15261148

fbshipit-source-id: 3ee7de81a1d579e418be36bc2800d93d414abe3d
2019-05-09 21:20:30 -07:00
Junqi Wang
2c701de030 Continue on network unreachable with timeout
Summary:
Previously we tried continue on network down and it showed good
improvement. But there was a problem: it hurts UX for airplane mode users, it
didn't return error back to user immediately but after 30/60 seconds timeout.
This adds a timer for this feature and it only allows the transport to ignore
network unreachable error for 200ms. After 200ms, it throws and reports to user
if the error persists.

Reviewed By: siyengar

Differential Revision: D15089442

fbshipit-source-id: dd87f4f579187c4b45244a7ee0477d2a0cf1b5d7
2019-04-26 10:08:35 -07:00
udippant
50d4939e9e Initial commit of mvfst 2019-04-22 23:42:46 -07:00