Pre-offload skbs now bypass tls_sw_fallback() before record lookup, and TCP does not merge them with marked data across the start marker. Remove the unreachable bypass and its special case in fill_sg_in(). Keep the marker itself: record lookup and ACK cleanup still count it. No functional change. Signed-off-by: Rishikesh Jethwani --- net/tls/tls_device_fallback.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/net/tls/tls_device_fallback.c b/net/tls/tls_device_fallback.c index 42afbe7e60b5..da875fdf5b54 100644 --- a/net/tls/tls_device_fallback.c +++ b/net/tls/tls_device_fallback.c @@ -237,8 +237,6 @@ static int fill_sg_in(struct scatterlist *sg_in, *sync_size = tcp_seq - tls_record_start_seq(record); if (*sync_size < 0) { - int is_start_marker = tls_record_is_start_marker(record); - spin_unlock_irqrestore(&ctx->lock, flags); /* This should only occur if the relevant record was * already acked. In that case it should be ok @@ -250,8 +248,6 @@ static int fill_sg_in(struct scatterlist *sg_in, * on TCP to retransmit a packet that doesn't contain * already acked payload. */ - if (!is_start_marker) - *sync_size = 0; return -EINVAL; } @@ -394,12 +390,9 @@ static struct sk_buff *tls_sw_fallback(struct sock *sk, struct sk_buff *skb) sg_init_table(sg_in, sg_in_max_elements); sg_init_table(sg_out, ARRAY_SIZE(sg_out)); - if (fill_sg_in(sg_in, skb, ctx, &rcd_sn, &sync_size, &resync_sgs)) { - /* bypass packets before kernel TLS socket option was set */ - if (sync_size < 0 && payload_len <= -sync_size) - nskb = skb_get(skb); + /* Its record was acked and freed: drop it */ + if (fill_sg_in(sg_in, skb, ctx, &rcd_sn, &sync_size, &resync_sgs)) goto put_sg; - } nskb = tls_enc_skb(tls_ctx, sg_out, sg_in, skb, sync_size, rcd_sn); -- 2.50.1