diff options
author | Konstantin Ananyev <konstantin.ananyev@intel.com> | 2017-07-27 12:00:57 +0100 |
---|---|---|
committer | Konstantin Ananyev <konstantin.ananyev@intel.com> | 2017-07-27 20:24:53 +0100 |
commit | 7e18fa1bf263822c46d7431a911b41d6377d5f69 (patch) | |
tree | ddf5ce05545419d6d77bb9d8b3c48fc90d221a7a /lib/libtle_l4p/tle_ctx.h | |
parent | e151ee29d02d7802fab9e32b50ced54fd8d64160 (diff) |
- Introduce tle_tcp_stream_readv() and tle_tcp_stream_writev().
- Introduce flags for tle_ctx_param.
- Introduce TLE_CTX_FLAG_ST - indicates that given ctx will be used
by single thread only.
- Introduce new parameters for tcp context:
timewait - allows user to configure max timeout in TCP_TIMEWAIT state.
icw - allows user to specify desired initial congestion window
for new connections.
-Few optimisations:
cache tx.ol_flags inside tle destination.
calcualte and cache inside ctx cycles_to_ms shift value.
reorder restoring SYN opts and filling TCB a bit.
Change-Id: Ie05087783b3b7f1e4ce99d3555bc5bd098f83fe0
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
Diffstat (limited to 'lib/libtle_l4p/tle_ctx.h')
-rw-r--r-- | lib/libtle_l4p/tle_ctx.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/lib/libtle_l4p/tle_ctx.h b/lib/libtle_l4p/tle_ctx.h index 144dbe7..0ea4668 100644 --- a/lib/libtle_l4p/tle_ctx.h +++ b/lib/libtle_l4p/tle_ctx.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Intel Corporation. + * Copyright (c) 2016-2017 Intel Corporation. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at: @@ -80,8 +80,9 @@ struct tle_dev_param { struct tle_dest { struct rte_mempool *head_mp; /**< MP for fragment headers and control packets. */ - struct tle_dev *dev; /**< device to send packets through. */ - uint16_t mtu; /**< MTU for given destination. */ + struct tle_dev *dev; /**< device to send packets through. */ + uint64_t ol_flags; /**< tx ofload flags. */ + uint16_t mtu; /**< MTU for given destination. */ uint8_t l2_len; /**< L2 header length. */ uint8_t l3_len; /**< L3 header length. */ uint8_t hdr[TLE_DST_MAX_HDR]; /**< L2/L3 headers. */ @@ -103,6 +104,10 @@ enum { TLE_HASH_NUM }; +enum { + TLE_CTX_FLAG_ST = 1, /**< ctx will be used by single thread */ +}; + struct tle_ctx_param { int32_t socket_id; /**< socket ID to allocate memory for. */ uint32_t proto; /**< L4 proto to handle. */ @@ -110,6 +115,7 @@ struct tle_ctx_param { uint32_t max_stream_rbufs; /**< max recv mbufs per stream. */ uint32_t max_stream_sbufs; /**< max send mbufs per stream. */ uint32_t send_bulk_size; /**< expected # of packets per send call. */ + uint32_t flags; /**< specific flags */ int (*lookup4)(void *opaque, const struct in_addr *addr, struct tle_dest *res); @@ -127,9 +133,19 @@ struct tle_ctx_param { /**< hash algorithm to be used to generate sequence number. */ rte_xmm_t secret_key; /**< secret key to be used to calculate the hash. */ + + uint32_t icw; /**< initial congestion window, default is 2*MSS if 0. */ + uint32_t timewait; + /**< TCP TIME_WAIT state timeout duration in milliseconds, + * default 2MSL, if UINT32_MAX */ }; /** + * use default TIMEWAIT timeout value. + */ +#define TLE_TCP_TIMEWAIT_DEFAULT UINT32_MAX + +/** * create L4 processing context. * @param ctx_prm * Parameters used to create and initialise the L4 context. |