diff --git a/doc/ChangeLog b/doc/ChangeLog index 91bc6de..2f27f6e 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -3,7 +3,11 @@ tcpdirect-8.1.3 See corresponding onload-8.1.3 changelog for changes in OS support. -Placeholder for Bug fixes: +Changes: + +ON-13593: add udp_ttl attribute to control TTL on sent UDP packets +ON-15421: stop exporting ef_vi symbols in the dynamic library +ON-15816: ensure local address is initialized when recycling zft_handle tcpdirect-8.1.2.38 diff --git a/doc/ReleaseNotes b/doc/ReleaseNotes index fa0881d..1564d5c 100644 --- a/doc/ReleaseNotes +++ b/doc/ReleaseNotes @@ -1,28 +1,28 @@ TCPDirect-8.1.3 =============== - Placeholder for minor update release of TCPDirect to match Onload-8.1.3 and + This is a minor update release of TCPDirect to match Onload-8.1.3 and including bug fixes since TCPDirect-8.1.2.38. See changelog for details. TCPDirect-8.1.2.38 ================== - This is a minor update release of TCP Direct to match Onload-8.1.2 and + This is a minor update release of TCPDirect to match Onload-8.1.2 and including bug fixes since TCPDirect-8.1.1.23. See changelog for details. TCPDirect-8.1.1.23 ================== - This is a minor update release of TCP Direct to match Onload-8.1.1, + This is a minor update release of TCPDirect to match Onload-8.1.1, also including a bug fix. See changelog for details. TCPDirect-8.1.0.19 ================== - This is a feature release of TCP Direct to be used with Onload-8.1.0. + This is a feature release of TCPDirect to be used with Onload-8.1.0. TCPDirect-8.0.2.11 diff --git a/src/include/zf_internal/private/zf_emu.h b/src/include/zf_internal/private/zf_emu.h index fe60160..3abac72 100644 --- a/src/include/zf_internal/private/zf_emu.h +++ b/src/include/zf_internal/private/zf_emu.h @@ -4,6 +4,17 @@ #define __ZF_INTERNAL_ZF_EMU_H__ #include + +#ifdef __cplusplus +/* Needed because in C++ an empty struct has a non-zero size. Additionally, a + * zero-length array is used instead of a standard flexible array member so that + * it can be used in the middle of a struct without gcc complaining. */ +#undef __DECLARE_FLEX_ARRAY +#define __DECLARE_FLEX_ARRAY(TYPE, NAME) \ + struct { \ + TYPE NAME[0]; \ + } +#endif #include /* These interface names are used for the default configuration of the "back- diff --git a/src/lib/zf/Makefile.inc b/src/lib/zf/Makefile.inc index a3f4f53..47c4c34 100644 --- a/src/lib/zf/Makefile.inc +++ b/src/lib/zf/Makefile.inc @@ -78,7 +78,7 @@ $(LIB_OBJS): $(CP_INTF_VER_HDR) $(ONLOAD_VERSION_HDR) $(ZF_SHARED_LIB): $(LIB_OBJS) $(LDEP) @mkdir -p $(dir $@) - $(CLINK) -shared -fPIC $^ -e zf_print_version -Wl,-soname,$(ZF_SONAME) -o $@ + $(CLINK) -shared -fPIC $^ -e zf_print_version -Wl,-soname,$(ZF_SONAME),--exclude-libs,libciul1.a -o $@ $(ZF_SHARED_LIB_STRIPPED): $(ZF_SHARED_LIB) @mkdir -p $(dir $@) diff --git a/src/lib/zf/private/zf_emu_superbuf.h b/src/lib/zf/private/zf_emu_superbuf.h index 7134b4e..14a4346 100644 --- a/src/lib/zf/private/zf_emu_superbuf.h +++ b/src/lib/zf/private/zf_emu_superbuf.h @@ -16,6 +16,8 @@ /* prevent ci/driver/ci_efct.h and ci_aux.h from getting included */ #define CI_DRIVER_CI_EFCT_H +#include + #include #include #include diff --git a/src/lib/zf/tcp.c b/src/lib/zf/tcp.c index 46ae399..751e76e 100644 --- a/src/lib/zf/tcp.c +++ b/src/lib/zf/tcp.c @@ -64,6 +64,7 @@ static int __zft_handle_free(zf_stack* stack, zf_tcp* tcp) zf_stack_tcp_to_res(stack, tcp, &rx_res); zfrr_release_port(stack, rx_res); + memset(&tcp->laddr, 0, sizeof(tcp->laddr)); if( tcp->eof_pkt != PKT_INVALID ) { zf_pool_free_pkt(&stack->pool, tcp->eof_pkt); diff --git a/src/lib/zf/zf_tcp.c b/src/lib/zf/zf_tcp.c index 8fa5276..3f3235e 100644 --- a/src/lib/zf/zf_tcp.c +++ b/src/lib/zf/zf_tcp.c @@ -23,6 +23,7 @@ static void zf_tcp_free(struct zf_stack* stack, struct zf_tcp* tcp) /* In case zocket was never connected but bound we need to free port * the same applies to zft_handle */ zfrr_release_port(stack, rx_res); + memset(&tcp->laddr, 0, sizeof(tcp->laddr)); if( tcp->eof_pkt != PKT_INVALID ) { zf_pool_free_pkt(&stack->pool, tcp->eof_pkt); diff --git a/src/tests/trade_sim/Makefile.inc b/src/tests/trade_sim/Makefile.inc index 7c3624a..cab3d63 100644 --- a/src/tests/trade_sim/Makefile.inc +++ b/src/tests/trade_sim/Makefile.inc @@ -11,7 +11,7 @@ SHARED_APP_BINS := $(TEST_APPS:%=$(BIN_SHARED)/%) STATIC_APP_BINS := $(TEST_APPS:%=$(BIN_STATIC)/%) APP_BINS := $(SHARED_APP_BINS) $(STATIC_APP_BINS) -$(SHARED_APP_BINS): $(BIN_SHARED)/%: $(OBJ_CURRENT)/%.o $(OBJ_CURRENT)/utils.o $(ZF_SHARED_LIB) +$(SHARED_APP_BINS): $(BIN_SHARED)/%: $(OBJ_CURRENT)/%.o $(OBJ_CURRENT)/utils.o $(ZF_SHARED_LIB) $(CIUL_LIB) $(STATIC_APP_BINS): $(BIN_STATIC)/%: $(OBJ_CURRENT)/%.o $(OBJ_CURRENT)/utils.o $(ZF_STATIC_LIB) ifdef ONLOAD_TREE diff --git a/src/tests/zf_unit/zfzockfree.c b/src/tests/zf_unit/zfzockfree.c index ea4d5fc..dca6b09 100644 --- a/src/tests/zf_unit/zfzockfree.c +++ b/src/tests/zf_unit/zfzockfree.c @@ -128,10 +128,17 @@ static int create_zocket(struct zf_stack* stack, struct zf_attr* attr, struct zft** tcp_out) { struct zft_handle* tcp_handle; + struct sockaddr_in laddr; + socklen_t len = sizeof(laddr); + int rc = zft_alloc(stack, attr, &tcp_handle); if( rc < 0 ) return rc; + zft_handle_getname(tcp_handle, (struct sockaddr *)&laddr, &len); + if( laddr.sin_port != 0 ) + return -EBUSY; + /* Do a loopback connect. There's nothing listening, but we don't care: we * just want to install the filters. */ rc = zft_addr_bind(tcp_handle, @@ -173,11 +180,17 @@ static int create_zocket(struct zf_stack* stack, struct zf_attr* attr, { (void) local_port_he; (void) remote_port_he; + struct sockaddr_in laddr; + socklen_t len = sizeof(laddr); int rc = zft_alloc(stack, attr, tcp_handle_out); if( rc < 0 ) return rc; + zft_handle_getname(*tcp_handle_out, (struct sockaddr *)&laddr, &len); + if( laddr.sin_port != 0 ) + return -EBUSY; + return 0; }