From 76592f906ad040f5d99203c94719366ef42d2167 Mon Sep 17 00:00:00 2001 From: Konstantin Ananyev Date: Fri, 14 May 2021 10:43:49 +0000 Subject: Revert "l4p/tcp: introduce tle_tcp_stream_establish() API" This reverts commit e0d62f616439955946d24ad83d49552da24afd5d. Reason for revert: wrong branch Change-Id: I1b4fef19dc130de4538f319b2e417bfc8ab1a1c9 Signed-off-by: Konstantin Ananyev --- lib/libtle_l4p/tcp_misc.h | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) (limited to 'lib/libtle_l4p/tcp_misc.h') diff --git a/lib/libtle_l4p/tcp_misc.h b/lib/libtle_l4p/tcp_misc.h index 46a0a5f..01c1e67 100644 --- a/lib/libtle_l4p/tcp_misc.h +++ b/lib/libtle_l4p/tcp_misc.h @@ -19,7 +19,6 @@ #include "net_misc.h" #include #include -#include #ifdef __cplusplus extern "C" { @@ -160,6 +159,17 @@ union seqlen { #define TCP_OPT_KL_WSC TCP_OPT_KL(TCP_OPT_KIND_WSC, TCP_OPT_LEN_WSC) #define TCP_OPT_KL_TMS TCP_OPT_KL(TCP_OPT_KIND_TMS, TCP_OPT_LEN_TMS) +/* + * Timestamp option. + */ +union tsopt { + uint64_t raw; + struct { + uint32_t val; + uint32_t ecr; + }; +}; + struct tcpopt { union { uint16_t raw; @@ -171,10 +181,16 @@ struct tcpopt { union { uint16_t mss; uint8_t wscale; - union tle_tcp_tsopt ts; + union tsopt ts; }; } __attribute__((__packed__)); +struct syn_opts { + uint16_t mss; + uint8_t wscale; + union tsopt ts; +}; + struct resp_info { uint32_t flags; }; @@ -201,9 +217,9 @@ struct dack_info { uint32_t badseq; /* bad seq/ack */ uint32_t ofo; /* OFO incoming data */ } segs; - uint32_t ack; /* highest received ACK */ - union tle_tcp_tsopt ts; /* TS of highest ACK */ - union wui wu; /* window update information */ + uint32_t ack; /* highest received ACK */ + union tsopt ts; /* TS of highest ACK */ + union wui wu; /* window update information */ uint32_t wnd; struct { /* 3 duplicate ACKs were observed after */ uint32_t seg; /* # of meaningful ACK segments */ @@ -256,7 +272,7 @@ get_seg_info(const struct rte_tcp_hdr *th, union seg_info *si) } static inline void -get_syn_opts(struct tle_tcp_syn_opts *so, uintptr_t p, uint32_t len) +get_syn_opts(struct syn_opts *so, uintptr_t p, uint32_t len) { uint32_t i, kind; const struct tcpopt *opt; @@ -294,7 +310,7 @@ get_syn_opts(struct tle_tcp_syn_opts *so, uintptr_t p, uint32_t len) * at least TCP_TX_OPT_LEN_MAX bytes available. */ static inline void -fill_syn_opts(void *p, const struct tle_tcp_syn_opts *so) +fill_syn_opts(void *p, const struct syn_opts *so) { uint8_t *to; struct tcpopt *opt; @@ -348,10 +364,10 @@ fill_tms_opts(void *p, uint32_t val, uint32_t ecr) opt[2] = rte_cpu_to_be_32(ecr); } -static inline union tle_tcp_tsopt +static inline union tsopt get_tms_opts(uintptr_t p, uint32_t len) { - union tle_tcp_tsopt ts; + union tsopt ts; uint32_t i, kind; const uint32_t *opt; const struct tcpopt *to; -- cgit 1.2.3-korg