diff options
author | Konstantin Ananyev <konstantin.ananyev@intel.com> | 2021-07-06 15:08:48 +0000 |
---|---|---|
committer | Konstantin Ananyev <konstantin.ananyev@intel.com> | 2021-07-06 15:08:48 +0000 |
commit | ace4313dfd1f17eac022e497bb412e8e290c05e3 (patch) | |
tree | 0aa3f12476d3a615dd47489154074144966a1dc9 /lib/libtle_l4p/tcp_ctl.h | |
parent | a32eaa3d00beef6bb81e2aadc2088e9a937d1fd0 (diff) |
l4p/tcp: introduce tle_tcp_stream_get_state() API
tle_tcp_stream_get_state() allows user to query information regarding
stream state, control ops and remote termination events.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Change-Id: Ica22a5fe2e63fdece882935b76572142433a4ae1
Diffstat (limited to 'lib/libtle_l4p/tcp_ctl.h')
-rw-r--r-- | lib/libtle_l4p/tcp_ctl.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/libtle_l4p/tcp_ctl.h b/lib/libtle_l4p/tcp_ctl.h index 7dde8ff..57f3ffc 100644 --- a/lib/libtle_l4p/tcp_ctl.h +++ b/lib/libtle_l4p/tcp_ctl.h @@ -152,16 +152,19 @@ tcp_stream_reset(struct tle_ctx *ctx, struct tle_tcp_stream *s) rte_atomic32_set(&s->tx.arm, 0); /* reset TCB */ - uop = s->tcb.uop & ~TCP_OP_CLOSE; + uop = s->tcb.uop & ~TLE_TCP_OP_CLOSE; memset(&s->tcb, 0, sizeof(s->tcb)); + /* reset remote events */ + s->err.rev = 0; + /* reset cached destination */ memset(&s->tx.dst, 0, sizeof(s->tx.dst)); - if (uop != TCP_OP_ACCEPT) { + if (uop != TLE_TCP_OP_ACCEPT) { /* free stream's destination port */ stream_clear_ctx(ctx, &s->s); - if (uop == TCP_OP_LISTEN) + if (uop == TLE_TCP_OP_LISTEN) empty_lq(s); } |