aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libtle_l4p/tcp_rxtx.c
AgeCommit message (Collapse)AuthorFilesLines
2021-06-03Revert "l4p/tcp: introduce tle_tcp_stream_establish() API"HEADmasterKonstantin Ananyev1-117/+22
This reverts commit e0d62f616439955946d24ad83d49552da24afd5d. Reason for revert: wrong branch Change-Id: I1b4fef19dc130de4538f319b2e417bfc8ab1a1c9 Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2021-05-14Revert "l4p/tcp: introduce tle_tcp_stream_rx_bulk() API"Konstantin Ananyev1-71/+0
This reverts commit a33ac5f5b04058c1cc10ac9e0c1a4f2d0f24f80b. Reason for revert: wrong branch Change-Id: I11c11f9ffd3415bcb9dc867dc93abb41f999cbed Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2021-05-13l4p/tcp: introduce tle_tcp_stream_rx_bulk() APIKonstantin Ananyev1-0/+71
tle_tcp_stream_rx_bulk() allows to push input packets for futher processing straight into given TCP stream. Given stream is expected to be already in connected state. Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Change-Id: I94a744d6d9c8ff3671ebfa84b83a34a24612bde0
2021-05-13l4p/tcp: introduce tle_tcp_stream_establish() APIKonstantin Ananyev1-22/+117
tle_tcp_stream_establish() allows to create streams in established connection state. Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Change-Id: Ib302c4d7f229144d2624279f973f00041fb611b2
2021-04-28bump dpdk version to 20.05Konstantin Ananyev1-22/+23
Bump dpdk version to 20.05 and adjust tldk source. Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Change-Id: Id2ce864ad20b3b347f1ac05cd67c15384e454c52
2020-03-11l4p/tcp: Reset wscale when timestamp is not setMariusz Drost1-0/+4
wscale value calculation and handling is tightly coupled with timestamp value. When timestamp sending is off on the other end of the connection, wscale is being wrongly calculated, which leads to traffic being stuck. To overcome that issue, wscale value needs to be reset during handshake when timestamps are off. It results with slower connection, but traffic is sustained. Here are ofo/lost segment test script results, which were run with and without timestamps set. Test Protocol File Status Time Time timestmaps on timestamps off Reorder 4 ipv4 8MB [OK] 1m12.594s 0m58.419s Reorder 9 ipv4 8MB [OK] 0m27.260s 0m31.142s Reorder 4 ipv4 8MB [OK] 0m58.093s 1m34.772s Reorder 9 ipv4 8MB [OK] 0m28.798s 0m34.016s Loss 0 ipv4 8MB [OK] 0m0.047s 0m0.046s Loss 20 ipv4 8MB [OK] 2m34.807s 2m20.491s Loss 0 ipv4 8MB [OK] 0m0.047s 0m0.047s Loss 20 ipv4 8MB [OK] 0m57.360s 2m15.736s Reorder 4 ipv6 8MB [OK] 1m0.237s 0m46.347s Reorder 9 ipv6 8MB [OK] 0m25.977s 0m32.035s Reorder 4 ipv6 8MB [OK] 0m53.248s 0m50.953s Reorder 9 ipv6 8MB [OK] 0m26.501s 0m29.248s Loss 0 ipv6 8MB [OK] 0m0.044s 0m0.042s Loss 20 ipv6 8MB [OK] 1m0.388s 2m14.005s Loss 0 ipv6 8MB [OK] 0m0.045s 0m0.042s Loss 20 ipv6 8MB [OK] 0m58.344s 2m1.191s Signed-off-by: Mariusz Drost <mariuszx.drost@intel.com> Change-Id: Id89823409e5e6a87722689d0c2322de7ef0f6cf9
2019-12-31v6: make TCP stream alloc/free to use memtank APIKonstantin Ananyev1-3/+7
Introduce two extra parameters for TCP context creation: struct { uint32_t min; /**< min number of free streams (grow threshold). */ uint32_t max; /**< max number of free streams (shrink threshold). */ } free_streams; By default these params are equal to max_streams value (avoid dynamic allocation and preserve current beahviour). grow() is invoked from accept() FE call to refill streams tank for BE. shrink() is invoked from close() FE call. Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Change-Id: I7af6a76d64813ee4a535323e27ffbfd75037fc92
2019-08-13l4p/tcp: fix removing overlapped dataJielong Zhou1-5/+5
rte_pktmbuf_adj and rte_pktmbuf_trim don't support removing data more than one segment. We reimplemented these funtions to support removing multiple segments. Change-Id: I3e2d48310595ecae0acef0674ea2c78fa1068c5b Signed-off-by: Jielong Zhou <jielong.zjl@antfin.com> Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2019-07-01l4p: refactor rx checksum checkJianfeng Tan1-9/+1
For rx checksum check, we put HW and SW ways into one function, with some code clean up. As now we do have CKSUM_UNKNOWN, no need to have dev->rx.ol_flags at all. Change-Id: Ied77e63e1ec6f5569d16d4ba666fcc968479197d Signed-off-by: Jianfeng Tan <henry.tjf@antfin.com> Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2019-06-27l4p/tcp: few fixes for sending RST packet logicJianfeng Tan1-7/+10
- for RST on RTO use SND.NXT instead of SND.UNA - for RST on invalid SEQSEG.ACK in SYN-SENT state: - use SEG.ACK - don't terminate the connection Change-Id: I9943f6fdfb89493af4b0437c5a81af34c450c630 Signed-off-by: Jielong Zhou <jielong.zjl@antfin.com> Signed-off-by: Jianfeng Tan <henry.tjf@antfin.com> Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2019-05-23l4p/tcp: fix seq calculation in partial ackJielong Zhou1-6/+7
Change-Id: I46fc0eb7f32dfafd22527c7711520cd3a1a0f48a Signed-off-by: Jielong Zhou <jielong.zjl@antfin.com>
2019-05-23l4p/tcp: fix dropping sequential packetJielong Zhou1-7/+3
When grouping sequential rx packets, some packet may be dropped incorrectly because of total length of packets are larger than receive window size which is out of date. We do not drop the packet, but check it again with updated receive window size. Change-Id: I656864a5f029850da5148b07279a34f22081a342 Signed-off-by: Jielong Zhou <jielong.zjl@antfin.com>
2017-11-01tle_tcp: return ENODATA for unprocessed/unused packets that belong to ↵Konstantin Ananyev1-2/+1
existing stream. Change-Id: I3109b843178cc8576ebaa6eae6c3f75081067feb Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-07-27- Introduce tle_tcp_stream_readv() and tle_tcp_stream_writev().Konstantin Ananyev1-86/+292
- 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>
2017-06-11libtle_l4p: fix at termination tcp stream not always cleanup it's send queue.Konstantin Ananyev1-4/+13
Change-Id: I8ab713c98712fafe2550a6954224ebc741cf9029 Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-06-09tle_tcp_proces: fix the issue when strem can sit in the txs queue forever.Konstantin Ananyev1-4/+5
Change-Id: I313f048fc0888d661f8b0e34af6256afc516670a Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-05-15Added rte_ring wrapper functions to support dpdk-17.05 and older versionMohammad Abdul Awal1-8/+8
Change-Id: I5cfcff8be275ab2a2fb4ad6a62777a8cb88f425b Signed-off-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
2017-05-09two fixes. - allow conditional jumbo frame based on rx_max_pkt_len - fix mss ↵Mohammad Abdul Awal1-1/+1
size for rx_synack Change-Id: I47b7775445bc4ba647f9da9edafc4b255082e926 Signed-off-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
2017-04-14* Add siphash file for calculating the sequence number.Reshma Pattan1-7/+14
* l4fwd app changed to include new command line parameters hash and secret key for hash calculation. * Changed l4fwd library to integrate siphash support for calculating the sequence number. Change-Id: I29c60836c8b17a118d76b619fd79398fac200f67 Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
2017-03-27tcp: fix RCV.WND set incorreclty when peer doesn't support WSCALE optionKonstantin Ananyev1-0/+5
Change-Id: I911fdeeb25bc1112cd38eaa96c34f47a7bf49060 Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-03-23implement sw segmentation for tcpMohammad Abdul Awal1-35/+99
Change-Id: Ibe3ac4b401ea9c7680ab5d3e8c73557d95402ff2 Signed-off-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
2017-03-06Rewrite accept() code-path and make l4fwd not to close() on FIN immediatelly.Konstantin Ananyev1-279/+221
Changes in public API: - removes tle_tcp_stream_synreqs() and tle_tcp_reject() - adds tle_tcp_stream_update_cfg Allocates and fills new stream when final ACK for 3-way handshake is received. Changes in l4fwd sample application: prevents l4fwd to call close() on error event immediately: first try to recv/send remaining data. Change-Id: I8c5b9d365353084083731a4ce582197a8268688f Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-02-24Introduce first version of TCP code.Konstantin Ananyev1-0/+2431
Supported functionality: - open/close - listen/accept/connect - send/recv In order to achieve that libtle_udp library was reworked into libtle_l4p library that supports both TCP and UDP protocols. New libtle_timer library was introduced (thanks to Cisco guys and Dave Barach <dbarach@cisco.com> for sharing their timer code with us). Sample application was also reworked significantly to support both TCP and UDP traffic handling. New UT were introduced. Change-Id: I806b05011f521e89b58db403cfdd484a37beb775 Signed-off-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com> Signed-off-by: Karol Latecki <karolx.latecki@intel.com> Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com> Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>