Skip to content

Mekhanik evgenii/fix 2284#2654

Open
EvgeniiMekhanik wants to merge 5 commits into
masterfrom
MekhanikEvgenii/fix-2284
Open

Mekhanik evgenii/fix 2284#2654
EvgeniiMekhanik wants to merge 5 commits into
masterfrom
MekhanikEvgenii/fix-2284

Conversation

@EvgeniiMekhanik
Copy link
Copy Markdown
Contributor

No description provided.

@EvgeniiMekhanik EvgeniiMekhanik marked this pull request as draft May 6, 2026 13:51
@EvgeniiMekhanik EvgeniiMekhanik force-pushed the MekhanikEvgenii/fix-2284 branch 7 times, most recently from 5e1c6c8 to 71e4ce0 Compare May 12, 2026 16:51
@EvgeniiMekhanik EvgeniiMekhanik marked this pull request as ready for review May 12, 2026 16:51
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.
@EvgeniiMekhanik EvgeniiMekhanik force-pushed the MekhanikEvgenii/fix-2284 branch from 71e4ce0 to 33e779d Compare May 13, 2026 06:24
- 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).
@EvgeniiMekhanik EvgeniiMekhanik force-pushed the MekhanikEvgenii/fix-2284 branch from 33e779d to 186a89f Compare May 13, 2026 07:04
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant