aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libtle_l4p/tcp_stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libtle_l4p/tcp_stream.c')
-rw-r--r--lib/libtle_l4p/tcp_stream.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libtle_l4p/tcp_stream.c b/lib/libtle_l4p/tcp_stream.c
index 4e9ddb7..676521b 100644
--- a/lib/libtle_l4p/tcp_stream.c
+++ b/lib/libtle_l4p/tcp_stream.c
@@ -506,6 +506,12 @@ tle_tcp_stream_listen(struct tle_stream *ts)
if (ts == NULL || s->s.type >= TLE_VNUM)
return -EINVAL;
+ /* app may listen for multiple times to change backlog,
+ * we will just return success for such cases.
+ */
+ if (s->tcb.state == TCP_ST_LISTEN)
+ return 0;
+
/* mark stream as not closable. */
if (tcp_stream_try_acquire(s) > 0) {
rc = rte_atomic16_cmpset(&s->tcb.state, TCP_ST_CLOSED,