aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libtle_l4p/tcp_stream.h
diff options
context:
space:
mode:
authorKonstantin Ananyev <konstantin.ananyev@intel.com>2019-10-25 11:56:34 +0100
committerKonstantin Ananyev <konstantin.ananyev@intel.com>2019-12-31 11:42:47 +0000
commit47eb00f25ab06a699dc27507814c7656940340af (patch)
tree2ba4120a03e8a7e34a582266150e4a2a6d25b802 /lib/libtle_l4p/tcp_stream.h
parent703faabf2d44d245fe1dd0b75f1736bf6114a557 (diff)
v6 rework TCP stream allocation
Allocate TCP stream and all necessary metadata (RX/TX queues, OFO queue, DRBs, etc.) as one big buffer, instead of separate alloc() calls for each of the sub-components. Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Change-Id: Idc9f3e9329920dfb34916f9bff28664ee5e99a42
Diffstat (limited to 'lib/libtle_l4p/tcp_stream.h')
-rw-r--r--lib/libtle_l4p/tcp_stream.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/libtle_l4p/tcp_stream.h b/lib/libtle_l4p/tcp_stream.h
index 4629fe6..1bb2a42 100644
--- a/lib/libtle_l4p/tcp_stream.h
+++ b/lib/libtle_l4p/tcp_stream.h
@@ -150,11 +150,34 @@ struct sdr {
STAILQ_HEAD(, tle_stream) be;
};
+/* tempalte sizes/offsets/etc. for tcp stream */
+struct stream_szofs {
+ uint32_t size;
+ struct {
+ uint32_t ofs;
+ uint32_t nb_obj;
+ uint32_t nb_max;
+ } ofo;
+ struct {
+ uint32_t ofs;
+ uint32_t nb_obj;
+ } rxq, txq;
+ struct {
+ uint32_t ofs;
+ uint32_t blk_sz;
+ uint32_t rng_sz;
+ uint32_t nb_rng;
+ uint32_t nb_obj;
+ uint32_t nb_max;
+ } drb;
+};
+
struct tcp_streams {
struct stbl st;
struct tle_timer_wheel *tmr; /* timer wheel */
struct rte_ring *tsq; /* to-send streams queue */
struct sdr dr; /* death row for zombie streams */
+ struct stream_szofs szofs; /* size and offsets for stream data */
struct tle_tcp_stream s[]; /* array of allocated streams. */
};