aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2022-04-20Drop nginxdev-mitm-proxyBen Magistro456-229005/+0
Nginx is not part of the core library being developed and needs to be moved to its own repository to allow it to be more easily maintained. Signed-off-by: Ben Magistro <koncept1@gmail.com> Change-Id: I5639e84ba0564ccd49ffcffa7ec9fcd57827bd6d
2022-04-20Drop vagrantBen Magistro4-158/+0
Vagrant is not actively tested and is utilizing very old distributions that are no longer supported. Signed-off-by: Ben Magistro <koncept1@gmail.com> Change-Id: I127b0242468328c71146ccddb6ec2f7a13d33a6c
2022-04-20dring: fix offsetof undefined behaviorBen Magistro1-1/+1
In gcc 11 (maybe parts of 10) the identification of constant expressions changed[1]. This causes the line changed to be an error. There is additional discussion about the change here [2] with the revision being based on the code referenced [3] in the discussion. 1) https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=beb019d346b903c16b9fd349937de444b6a8b6c0 2) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95942 3) https://github.com/dolphin-emu/dolphin/commit/118b2a3580972972c42a492347287fc292add50b Signed-off-by: Ben Magistro <koncept1@gmail.com> Change-Id: Id9b0efdd8d9b351e6e6097375b7d9002dc1737c9
2022-02-04Set a default MSS when establishing tcb if unsetBen Magistro1-1/+11
While the caller to tle_tcp_stream_establish, should provide a complete connection info to include mss, if it is not provided it will trigger a divide by zero in tle_tcp_stream_writev. RFCs have defined a default value for IPv4 and IPv6, which is leveraged if left unspecified. Signed-off-by: Ben Magistro <koncept1@gmail.com> Change-Id: Ic29f4398b22a601eddf2a501e9cc185106457303
2022-02-01Set PSH flag when calling sendBen Magistro1-2/+11
As described in RFC 793 section 2.8, this change implements setting the PSH flag for TCP when sending the last data segment that has been enqueued. Signed-off-by: Ben Magistro <koncept1@gmail.com> Change-Id: I24f2410d204bc2391c0d8253ae81d5a694be27ef
2022-01-21Allow all window scale values when proxyingBen Magistro3-3/+10
When TLDK is used in to proxy connections, it previously limited the window scale values that could be used. This allows the full range to be used by proxy sessions (tcp_establish) and should preserves the existing behavior for endpoint sessions. Signed-off-by: Ben Magistro <koncept1@gmail.com> Change-Id: I064dffccef1cc8e97c910a23d82feb7bd35bc988
2021-12-16tldk: Switch to DPDK v21.11Ben Magistro10-34/+32
Several flags have been deprecated or removed, this shifts to the new flags and updates structures accordingly. On the DPDK side, the relevant patches are: * https://patches.dpdk.org/project/dpdk/patch/20211015192408.21798-5-olivier.matz@6wind.com/ * https://patches.dpdk.org/project/dpdk/patch/20211018134854.1258938-4-ferruh.yigit@intel.com/ * https://patches.dpdk.org/project/dpdk/patch/20211018134854.1258938-1-ferruh.yigit@intel.com/ Signed-off-by: Ben Magistro <koncept1@gmail.com> Change-Id: I0501d389a7cacf3cd6d5db2683697b03f57cb818
2021-11-10tldk: swtich to use DPDK 20.11 LTSKonstantin Ananyev30-683/+289
As in DPDK 20.11 'make' is not supported any more, switch to use pkg-conf approach. Note that RTE_SDK now should point to your DPDK package installation path. Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Change-Id: I4a3c394758e183a3ddcdb45a0562a81583daaab6 Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2021-10-19l4p/tcp: Fix setting MSS in TCP stream establishKonstantin Ananyev1-2/+3
Inside tcb_establish() we should check provided destionation MTU information and adjust provided MSS value if necessary. Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Change-Id: I66b64ec2a7b170dc62bf9cb604c2b83bfd1ea33f
2021-09-28l4p/tcp: Fix clearing rx queue w/ private streamsBen Magistro1-1/+3
When using private streams, any remaining data in the rx queue for the stream is not cleared when the stream is closed. When the stream is then reused, this remaining data is added to the new stream. Signed-off-by: Ben Magistro <koncept1@gmail.com> Change-Id: I8ed221ed886db0fc4858f10d4682c147cc3ad92c
2021-09-17l4p/tcp: Add ability to adjust/offset tcp timestamps when proxyingBen Magistro3-5/+20
Signed-off-by: Ben Magistro <koncept1@gmail.com> Change-Id: Icb65a2a2bf2f0b647fb8927c9c4adb88b9eb2131 Signed-off-by: Ben Magistro <koncept1@gmail.com>
2021-08-13l4p/tcp: add flags parameter for tle_tcp_stream_establish() APIKonstantin Ananyev2-7/+40
Add extra flags parameter to control tle_tcp_stream_establish() behaviour. Currnetly supported flags: - TLE_TCP_STREAM_F_PRIVATE - to disable putting new stream into internal TLDK stream table. Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Change-Id: Id6f09bdcac313f5680438ebc3ce8a6c95e395e78
2021-08-03l4p/tcp: introduce tle_tcp_stream_shutdown() APIKonstantin Ananyev2-20/+79
Introduce ability ot perform half-close for TCP connection. Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Change-Id: I468ed84b5f42ae1e5c35f08871f7dd775e3d888a
2021-07-14l4p/tcp: correct TCP stream establish seq/ack misorderingStefan Baranoff1-2/+2
The calls made by tle_tcp_stream_establish for filling the snd and rcv TCB seq/ack values assume numbers taken from a SYN/ACK. This makes the expected ordering backwards from the perspective of the stream itself. I.e. Data from stream's SEQ number aligns with SYN/ACK's ACK number. Change-Id: I1877dec6053615a8c0140a6112e5eac659bf5709 Signed-off-by: Stefan Baranoff <stefan.baranoff@trinitycyber.com>
2021-07-07l4p/tcp: introduce tle_tcp_stream_abort() APIKonstantin Ananyev5-36/+135
Introduce ability ot perform abnormal connection termination. Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Change-Id: I75b5153505348ceface903cd2c8e012707631168
2021-07-06l4p/tcp: introduce tle_tcp_stream_get_state() APIKonstantin Ananyev5-80/+150
tle_tcp_stream_get_state() allows user to query information regarding stream state, control ops and remote termination events. Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Change-Id: Ica22a5fe2e63fdece882935b76572142433a4ae1
2021-06-03l4p: add ability to assign user-data to the streamKonstantin Ananyev10-34/+50
Add ability for the user to assign user provided data to the stream. Right now this user provided 64-bit value is passed as a parameter for lookup4/lookup6 callbacks. Another change: change interpretation of lookup4()/lookup6() return value: < 0: error code (existing behaviour). == 0: success, TLDK will update L3 header src/dst addresses based on tldk dev values (existing behaviour). > 0: success, TLDK will not update L3 header src/dst addresses, will rely on user provided values. Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Change-Id: I32521422e0372d79c4b2781dd6fc9740e4ca93ab
2021-05-14l4p/tcp: introduce tle_tcp_stream_rx_bulk() APIKonstantin Ananyev2-0/+105
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-14l4p/tcp: introduce tle_tcp_stream_establish() APIKonstantin Ananyev6-87/+298
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 Ananyev19-266/+275
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
2020-03-09test/memtank: extend with extra statsKonstantin Ananyev1-85/+281
- Add min/max cycles stat for alloc/free - Add stats after cleanup - dynamically calculate max objs based on '-w' and number of lcores - Remove code duplication Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Change-Id: I44748c76abadcb5adc5252fcc5120ccda01e6cd3
2020-03-04l4p/tcp_ofo: Add status on exit to test scriptMariusz Drost1-0/+7
For script usage in Jenkins environment status needs to be passed on exit. Correct status is calculated based on tests outcome. Signed-off-by: Mariusz Drost <mariuszx.drost@intel.com> Change-Id: Iea8ec45688e0f4a18e1dbe3bc0fd7cd83e6137fb
2020-03-03l4p/tcp_ofo: Add usage of --mbuf-numMariusz Drost1-2/+5
Addition of --mbuf-num cmd-line parameter usage in ofo/loss tests. Value is lower that default to meet CI environment capabilities. Additionally fixed issue when test script in tap mode tries to create temporary result file on remote machine. Signed-off-by: Mariusz Drost <mariuszx.drost@intel.com> Change-Id: Iaa87df158ff97b36bb602ee88450de759c257a3f
2020-03-03l4fwd: Add new cmd-line parameter --mbuf-numMariusz Drost5-9/+21
In some cases default value of MPOOL_NB_BUF is too large. Because of that new cmd-line parameter is added (--mbuf-num/-M), so user can define that value directly before running an application. Introduced parameter is optional. Default value of MPOOL_NB_BUF (0x20000) is preserved. Signed-off-by: Mariusz Drost <mariuszx.drost@intel.com> Change-Id: I9517955f313b6e97da1bb20c50b25e761430e0a8
2020-02-04l4p/tcp_ofo: ofo and loss tests mergeMariusz Drost4-166/+315
Addition of tests for packets that are out of order or lost that are executed on a single machine (with use of tap interface). Added tests are merged into existing test suite which runs on local/remote machine. Choice of mode is done with ETH_DEV variable. Signed-off-by: Mariusz Drost <mariuszx.drost@intel.com> Change-Id: I766ebda215310342d9dc1edf71bc3667648fdeff
2020-02-03l4fwd: Change rx offload defaultMariusz Drost1-5/+1
Tap interface does not provide any offload capabilities. To use that interface with l4fwd app, default offload capabilities should be set to 0. Signed-off-by: Mariusz Drost <mariuszx.drost@intel.com> Change-Id: If30f44bb986b87e079be3ec1dfe0ad5341862030
2020-01-31Update INFO.yaml fileVanessa Rene Valderrama1-21/+12
Updating the INFO.yaml to get the job passing and allow for future automation Signed-off-by: Vanessa Rene Valderrama <vvalderrama@linuxfoundation.org> Change-Id: Id537ef98027ffe1b5b3bf76ff8575829362c0c9b
2019-12-31v6: make TCP stream alloc/free to use memtank APIKonstantin Ananyev15-69/+197
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-12-31v6 rework TCP stream allocationKonstantin Ananyev4-94/+115
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
2019-12-31v6: memtank introductionKonstantin Ananyev10-0/+2295
For analogy with mempool, named this structure memtank. Same a s mempool it allows to alloc/free objects of fixed size in a lightweight manner (not as lightweight as mempool, but hopefully close enough). The whole idea is that alloc/free is used at fast-path and don't allocate/free more than *min_free* objects at one call. So for majority of cases our fast-path alloc/free should be lightweight (LIFO enqueue/dequeue operations). Also user will need to call grow/shrink periodically (ideally from the slow-path) to make sure there is enough free objects in the tank. Internally it is just a simple LIFO for up to *max_free* objects plus a list of memory buffers (memchunk) from where these objects were allocated. v1 -> v2 - Added UT - Fixed few bugs v2 -> v3 - extend UT with more parameters v3 -> v4 - add object alignement as parameter for memtank_create - extend UT with more parameters - added memtank dump routine v4 -> v5 - fixed few bugs inside memtank lib - extend UT with: - new test case - new command-line options: '-s <obj_size>', '-m <mem_func>' v5 -> v6 - extend memtank dump to collect/display extra information - make memtank dump routine MT safe - add memtank sanity check function - add proper comments for pubic API Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Change-Id: I8939772577f5d9e293088eaa9a9fe316c3fe8f87
2019-12-19l4p/tcp_ofo: fix killing l4fwd app in testsMariusz Drost1-1/+1
Between test cases l4fwd application is closed with kill command. Default kill signal is SIGTERM which is not supported in l4fwd. To close l4fwd cleanly, signal has been changed to SIGINT. Signed-off-by: Mariusz Drost <mariuszx.drost@intel.com> Change-Id: If083f18cab22766154cc80afa26d45d953277294
2019-12-12l4p/tcp_ofo: Tests for ofo and loss of pktsMariusz Drost5-1/+1101
Tests for packets that are out of order and lost. They validate data send over netcat (TCP) to TLDK/l4fwd app in echo mode. Data is set to be reordered or loss some percentage of packets. Signed-off-by: Mariusz Drost <mariuszx.drost@intel.com> Change-Id: I68f80d1fb75d5e9e5ed6d052ddcdc60588284f78
2019-10-09l4p/tcp: fix SIGSEGV when reading IPv6 addressMariusz Drost1-1/+1
IPv6 address is obtained through pointer to mbuf (part storing IPv6 addr). Structure which then holds that pointer defines it as a pointer to _m128i data type. Because of that, when code is optimized, instruction vmovdqa is used, which requires data to be aligned to 16-bytes. Pointer from mbuf does not have to be aligned in that way, which may cause SIGSEGV. Solution is to add attribute packed and aligned(1) to structure holding IPv6 address. With that, vmovdqu assembly instruction is used, which is the equivalent of vmovdqa, but for unaligned data. Signed-off-by: Mariusz Drost <mariuszx.drost@intel.com> Change-Id: I66e7ce2a317de2cdbc763ec8e31141605b5e5469
2019-08-13l4p/tcp: fix removing overlapped dataJielong Zhou3-6/+106
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-08-13l4p/tcp_ofo: fix handling out-of-order packetsJielong Zhou3-69/+128
Problems are: 1. ofodb could not be assigned directly, as direct assignment does not copy the mbuf pointer area belonging to it. 2. _ofo_insert_new and _ofo_insert_right doesn't remove overlap correctly. 3. _ofo_insert_new insert new db in wrong position. 4. rx_ofo_reduce sets wrong seq, and would insert overlapped data into rx queue. 5. _ofo_compact may miss compacting some ofodbs and doesn't update partly moved ofodb correctly. Change-Id: I03f1065ef5a15ef2abc664f9cc98910aab72d39b Signed-off-by: Jielong Zhou <jielong.zjl@antfin.com>
2019-07-02l4p/udp: enqueue fragmented packets as a wholeJielong Zhou1-4/+7
Send or discard fragments of single IP/UDP packet as a whole, because part of fragments could not be reassembled. Also avoid mbuf leak, for former version would never free part of segments which are not sended. Change-Id: I8cd13e60ced973a8f5d7d24369c3cbee64a38836 Signed-off-by: Jielong Zhou <jielong.zjl@antfin.com>
2019-07-01l4p: refactor rx checksum checkJianfeng Tan6-44/+28
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-06-27dpdk: automate make configJianfeng Tan3-5/+12
Users need two steps to compile DPDK: $ make config -C dpdk $ make -C dpdk We don't see the value for that. Add config as a dependency so that we can compile it with only one step: $ make -C dpdk Change-Id: I78bc728e904d969be9ef7575029eea9fda105bc6 Signed-off-by: Jianfeng Tan <henry.tjf@antfin.com> IT-16521
2019-06-14dpdk: move to v18.11 as default DPDK versionJianfeng Tan7-35/+21
DPDK v18.11 is the latest LTS verison. As of the API/ABI changes introduced in ether at v18.08, we cannot compile l4fwd and nginx with old DPDK versions. Change-Id: I225302d9a257e9bce4aa22ff84d76a57170e7eb7 Signed-off-by: Jianfeng Tan <henry.tjf@antfin.com> Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2019-06-13l4p: fix compile errorJianfeng Tan1-0/+1
Fix below compile error: error: ‘d6’ may be used uninitialized in this function const struct in6_addr *d6; ^~ Change-Id: Ie8c7fb797e5c5d934651973669b3eee791c35ad3 Signed-off-by: Jianfeng Tan <henry.tjf@antfin.com>
2019-05-23l4p/udp: fix errno not setJianfeng Tan1-2/+7
Return EAGAIN as errno properly. Change-Id: I056e34e6eca4955e1938bd00d86965236eef55fd Signed-off-by: Jian Zhang <wuzai.zj@antfin.com> Signed-off-by: Jianfeng Tan <henry.tjf@antfin.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>
2019-05-23fix implicit-fallthrough errorJianfeng Tan1-0/+2
On gcc 7.0+, we could encounter this error. Change-Id: I7399197b91ce0c8b3106c08b573469c15c2075b9 Signed-off-by: Jianfeng Tan <henry.tjf@antfin.com>
2019-05-22test/gtest: fix issue with CIKonstantin Ananyev1-3/+3
New googletest version changed default location of builded libraries. Update gtest Makefile to work with both locations. Change-Id: I4bddb257f1edef875c4675bb669b5d2308f6fe0f Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-08-15Add INFO.yaml fileVanessa Rene Valderrama1-0/+66
Add INFO.yaml to list: - Project description - Properties - Issue Tracking - Contacts - PTL information - Meeting information - Committer information Change-Id: I0599a79858f2bea132182c6d85aa57631e6bcb8d Signed-off-by: Vanessa Rene Valderrama <vvalderrama@linuxfoundation.org>
2018-02-09tldk: introduce versioning, follow DPDK notationv18.02Konstantin Ananyev3-0/+91
Change-Id: I9d83b254fa66ff72dd2faddf366f35ecda13a6ea Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-02-09Merge "at DPDK queue setup take into account device descriptor limits."Konstantin Ananyev2-7/+15