tcp: fix rxt send of new data assert 19/40019/2
authorFlorin Coras <fcoras@cisco.com>
Wed, 29 Nov 2023 07:21:18 +0000 (23:21 -0800)
committerDave Wallace <dwallacelf@gmail.com>
Wed, 29 Nov 2023 16:59:36 +0000 (16:59 +0000)
We might have less than 1 mss when attempting write but more after
write, as application could be actively enqueuing more data. Relax
assert.

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I54a83c4460f8e022a88758f0ebd7828df711dbb9

src/vnet/tcp/tcp_output.c

index 069c349..e6c87b6 100644 (file)
@@ -1117,8 +1117,7 @@ tcp_prepare_segment (tcp_worker_ctx_t * wrk, tcp_connection_t * tc,
       data = tcp_init_buffer (vm, *b);
       n_bytes = session_tx_fifo_peek_bytes (&tc->connection, data, offset,
                                            max_deq_bytes);
-      ASSERT (n_bytes == clib_min (max_deq_bytes, transport_max_tx_dequeue (
-                                                   &tc->connection)));
+      ASSERT (n_bytes > 0);
       b[0]->current_length = n_bytes;
       tcp_push_hdr_i (tc, *b, tc->snd_una + offset, /* compute opts */ 0,
                      /* burst */ 0, /* update_snd_nxt */ 0);