Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing the state.drain counter with state.dselect_bits #11005

Closed
wants to merge 4 commits into from

Conversation

icing
Copy link
Contributor

@icing icing commented Apr 21, 2023

  • drain was used by http/2 and http/3 implementations to indicate that the transfer requires send/recv independant from its socket poll state. Intended as a counter, it was used as bool flag only.
  • a similar mechanism exists on connectdata->cselect_bits where specific protocols can indicate something similar, only for the whole connection.
  • cselect_bits are cleard in transfer.c on use and, importantly, also set when the transfer loop expended its maxloops tries. drain was not cleared by transfer and the http2/3 implementations had to take care of that.
  • dselect_bits is cleared and set by the transfer loop. http2/3 does no longer clear it, only set when new events happen.

This PR unifies the handling of socket poll overrides, extending cselect_bits by a easy handle specific value and a common treatment in transfers.

- `drain` was used by http/2 and http/3 implementations to indicate
  that the transfer requires send/recv independant from its socket
  poll state. Intended as a counter, it was used as bool flag only.
- a similar mechanism exists on `connectdata->cselect_bits` where
  specific protocols can indicate something similar, only for the
  whole connection.
- `cselect_bits` are cleard in transfer.c on use and, importantly,
  also set when the transfer loop expended its `maxloops` tries.
  `drain` was not cleared by transfer and the http2/3 implementations
  had to take care of that.
- `dselect_bits` is cleared *and* set by the transfer loop. http2/3
  does no longer clear it, only set when new events happen.

This PR unifies the handling of socket poll overrides, extending
`cselect_bits` by a easy handle specific value and a common
treatment in transfers.
@github-actions github-actions bot added the tests label Apr 21, 2023
@icing icing added HTTP/2 HTTP/3 h3 or quic related labels Apr 21, 2023
@icing icing requested a review from bagder April 21, 2023 10:14
- just increasing the http/2 flow window does not necessarily
  make a server send new data. It may already have exhausted
  the window before
@bagder
Copy link
Member

bagder commented Apr 25, 2023

Thanks!

@bagder bagder closed this in cab2d56 Apr 25, 2023
bagder pushed a commit that referenced this pull request Apr 25, 2023
- just increasing the http/2 flow window does not necessarily
  make a server send new data. It may already have exhausted
  the window before

Closes #11005
bagder pushed a commit that referenced this pull request Apr 25, 2023
bch pushed a commit to bch/curl that referenced this pull request Jul 19, 2023
- `drain` was used by http/2 and http/3 implementations to indicate
  that the transfer requires send/recv independant from its socket
  poll state. Intended as a counter, it was used as bool flag only.
- a similar mechanism exists on `connectdata->cselect_bits` where
  specific protocols can indicate something similar, only for the
  whole connection.
- `cselect_bits` are cleard in transfer.c on use and, importantly,
  also set when the transfer loop expended its `maxloops` tries.
  `drain` was not cleared by transfer and the http2/3 implementations
  had to take care of that.
- `dselect_bits` is cleared *and* set by the transfer loop. http2/3
  does no longer clear it, only set when new events happen.

This change unifies the handling of socket poll overrides, extending
`cselect_bits` by a easy handle specific value and a common treatment in
transfers.

Closes curl#11005
bch pushed a commit to bch/curl that referenced this pull request Jul 19, 2023
bch pushed a commit to bch/curl that referenced this pull request Jul 19, 2023
- just increasing the http/2 flow window does not necessarily
  make a server send new data. It may already have exhausted
  the window before

Closes curl#11005
bch pushed a commit to bch/curl that referenced this pull request Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HTTP/2 HTTP/3 h3 or quic related tests
Development

Successfully merging this pull request may close these issues.

None yet

2 participants