aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Kopec <tomaszx.kopec@intel.com>2017-04-10 10:19:05 +0200
committerTomasz Kopec <tomaszx.kopec@intel.com>2017-04-10 10:23:08 +0200
commit4e3cb26150547b8b4105c795e282a1564e7f6e86 (patch)
tree81351ba364eac1d1391fea59ac7b1be8036ea9a8
parent9af556f2060d9d3c4dee3298321e57fb6fe72ffd (diff)
tcp_stream_close issue fixed, added tcp_stream tests (FPP-350)
Change-Id: I0332d1cc4ce3acc993da0037614f59102d059690 Signed-off-by: Tomasz Kopec <tomaszx.kopec@intel.com>
-rw-r--r--lib/libtle_l4p/tcp_ctl.h4
-rw-r--r--test/gtest/Makefile2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/libtle_l4p/tcp_ctl.h b/lib/libtle_l4p/tcp_ctl.h
index 8e15b2b..8ffb924 100644
--- a/lib/libtle_l4p/tcp_ctl.h
+++ b/lib/libtle_l4p/tcp_ctl.h
@@ -96,13 +96,13 @@ 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_LISTEN | TCP_OP_CONNECT);
+ uop = s->tcb.uop & ~TCP_OP_CLOSE;
memset(&s->tcb, 0, sizeof(s->tcb));
/* reset cached destination */
memset(&s->tx.dst, 0, sizeof(s->tx.dst));
- if (uop != 0) {
+ if (uop != TCP_OP_ACCEPT) {
/* free stream's destination port */
stream_clear_ctx(ctx, &s->s);
if (uop == TCP_OP_LISTEN)
diff --git a/test/gtest/Makefile b/test/gtest/Makefile
index 293a961..65434e8 100644
--- a/test/gtest/Makefile
+++ b/test/gtest/Makefile
@@ -76,7 +76,7 @@ SRCS-y += test_tle_udp_destroy.cpp
SRCS-y += test_tle_udp_event.cpp
#SRCS-y += test_tle_udp_stream.cpp
SRCS-y += test_tle_udp_stream_gen.cpp
-#SRCS-y += test_tle_tcp_stream.cpp
+SRCS-y += test_tle_tcp_stream.cpp
#SRCS-y += test_tle_tcp_stream_gen.cpp
CXXFLAGS += -std=c++11