Mekhanik evgenii/fix 2284#2654
Open
EvgeniiMekhanik wants to merge 5 commits into
Open
Conversation
5e1c6c8 to
71e4ce0
Compare
As a result of code analysis, it became clear that `tfw_h2_stream_init_for_xmit` is always called before calling `tfw_h2_resp_fwd`. This allowed us to refactor and simplify `tfw_h2_resp_fwd`.
- Implement `__ss_skb_set_owner` helper. - Add some safety checks.
Not only `TfwClientMem` can be skb owner (for this case we can special skb destructors). We can't set such owners directly, using `ss_skb_set_owner`. So in all places when we use `ss_skb_set_owner` and TFW_SKB_CB(skb)->opaque_data (from other skb) to set owner for current new allocated skb can be a possible BUG (in fact BUG not occured because in all this places TFW_SKB_CB(skb)->opaque_data is TfwClientMem). Implement special `ss_skb_copy_owner` function to handle this cases.
71e4ce0 to
33e779d
Compare
- Rework `on_tcp_entail` callback invocation. Now it is called from `ss_skb_tcp_entail_list` not from `ss_skb_tcp_entail`. If this callback fails we drop all skbs from appropriate list. - Implement `tfw_http_req_on_tcp_entail` callback to check that client connection for sending request is not closed and drop skbs and request if connection is already closed. - Implement `ss_skb_copy_cb` function for correct copying of skb->cb (including all callbacks and destructors).
33e779d to
186a89f
Compare
Previously there was a sofisticated logic in `ss_skb_tcp_entail_list` function, which we are planning to use to handle ENOMEM in a special way and do not drop connection. Since we decide to don't do it, remove this logic at all.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.