Set proper tcp_gso_segs
for skb with TLS TAG.
#2372
+2
−3
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.
Previosly we don't set
tcp_gso_segs
for skb with new added TLS TAG, because we assume that it will be set duringtso,tcp}_fragment()
fromtcp_write_xmit
. It is not correct, because skb with new added TLS TAG can be already produced during one of previous call oftso,tcp}_fragment()
. In this case this skb has already settcp_gso_segs
. Later in the loop intcp_write_xmit
tcp_init_tso_segs
skips such skbs iftcp_gso_segs
> 1, but mss is same. Limit will be also greater then mss, because iftcp_gso_segs
> 1, limit is recalculated. In this case we never set propertcp_gso_segs
(with taking into account new added TLS TAG), that leads to kernel BUG during calltcp_shifted_skb
.This BUG was hardly reproduced, because:
tso,tcp}_fragment()
.tcp_shifted_skb
is called very rarely fromtcp_shift_skb_data
. This two conditions were reproduced only on mtu 80 under heavy load.