aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libtle_l4p/tcp_rxtx.c
diff options
context:
space:
mode:
authorKonstantin Ananyev <konstantin.ananyev@intel.com>2021-08-13 14:52:48 +0000
committerKonstantin Ananyev <konstantin.ananyev@intel.com>2021-08-13 14:52:48 +0000
commit6fddbfcd39d8cfb96ef7a22bbd786c16b9d29e54 (patch)
tree401be6b7f6f5fa85f386c7fa1eb8d932fa54ba9d /lib/libtle_l4p/tcp_rxtx.c
parent5a82ac6d6a3c245a468e6dc2c63a8f5fe6179aca (diff)
l4p/tcp: add flags parameter for tle_tcp_stream_establish() API
Add extra flags parameter to control tle_tcp_stream_establish() behaviour. Currnetly supported flags: - TLE_TCP_STREAM_F_PRIVATE - to disable putting new stream into internal TLDK stream table. Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Change-Id: Id6f09bdcac313f5680438ebc3ce8a6c95e395e78
Diffstat (limited to 'lib/libtle_l4p/tcp_rxtx.c')
-rw-r--r--lib/libtle_l4p/tcp_rxtx.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/libtle_l4p/tcp_rxtx.c b/lib/libtle_l4p/tcp_rxtx.c
index 148a0ef..a3e21f5 100644
--- a/lib/libtle_l4p/tcp_rxtx.c
+++ b/lib/libtle_l4p/tcp_rxtx.c
@@ -2281,7 +2281,7 @@ tcb_establish(struct tle_tcp_stream *s, const struct tle_tcp_conn_info *ci)
struct tle_stream *
tle_tcp_stream_establish(struct tle_ctx *ctx,
const struct tle_tcp_stream_param *prm,
- const struct tle_tcp_conn_info *ci)
+ const struct tle_tcp_conn_info *ci, uint32_t flags)
{
int32_t rc;
struct tle_tcp_stream *s;
@@ -2313,11 +2313,13 @@ tle_tcp_stream_establish(struct tle_ctx *ctx,
break;
/* add the stream to the stream table */
- st = CTX_TCP_STLB(s->s.ctx);
- s->ste = stbl_add_stream_lock(st, s);
- if (s->ste == NULL) {
- rc = -ENOBUFS;
- break;
+ if ((flags & TLE_TCP_STREAM_F_PRIVATE) == 0) {
+ st = CTX_TCP_STLB(s->s.ctx);
+ s->ste = stbl_add_stream_lock(st, s);
+ if (s->ste == NULL) {
+ rc = -ENOBUFS;
+ break;
+ }
}
/* fill TCB from user provided data */