From e49446d6c07fd64b2b40d6a9a6ccec7c06a88366 Mon Sep 17 00:00:00 2001 From: Konstantin Ananyev Date: Mon, 5 Jun 2017 18:05:01 +0100 Subject: tle_tcp_proces: fix the issue when strem can sit in the txs queue forever. Change-Id: I313f048fc0888d661f8b0e34af6256afc516670a Signed-off-by: Konstantin Ananyev --- lib/libtle_l4p/tcp_rxtx.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/libtle_l4p/tcp_rxtx.c b/lib/libtle_l4p/tcp_rxtx.c index ff39f32..7429bf0 100644 --- a/lib/libtle_l4p/tcp_rxtx.c +++ b/lib/libtle_l4p/tcp_rxtx.c @@ -2417,11 +2417,12 @@ tle_tcp_process(struct tle_ctx *ctx, uint32_t num) for (i = 0; i != k; i++) { s = rs[i]; - if (rwl_try_acquire(&s->tx.use) > 0 && - rte_atomic32_read(&s->tx.arm) > 0) { - rte_atomic32_set(&s->tx.arm, 0); + rte_atomic32_set(&s->tx.arm, 0); + + if (rwl_try_acquire(&s->tx.use) > 0) tx_stream(s, tms); - } + else + txs_enqueue(s->s.ctx, s); rwl_release(&s->tx.use); } -- cgit 1.2.3-korg