Commit Graph

323 Commits

Author SHA1 Message Date
Aloys Augustin
ba123e152b QUIC multi thread update
* Add support for multiple threads
* Replace quicly buffers with fifos
* Fix cleanup of sessions
* Update quicly release version

Change-Id: I551f936bbec05a15703f043ee85c8e1ba0ab9723
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-05-14 19:52:29 +00:00
Florin Coras
f9d4ab4272 svm: improve fifo segment prealloc support
- track fifo segment free and chunk freelist memory
- improve fifo alloc. If there are enough chunks to satisfy a fifo
  allocation request but not enough free memory, allocate a multi-chunk
  fifo
- add apis to preallocate chunks and fifo headers
- more tests

Change-Id: If18dba7ab856272c9f565d36ac36365139793e0b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-05-14 18:40:20 +00:00
Florin Coras
404b8a36e7 session: segment manager fixes
- fix segment size rounding for 4GB segments
- fix initialization of first segment size
- cleanup fifo segment info retrieval

Change-Id: I5ebf20f71ea797087653e7e76fa2e37b2686ec40
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-05-09 20:36:14 +00:00
Florin Coras
0e573f56dc session: send tx events when data is dequeued
Change-Id: Ib8cb19361c42e38e3f68d7147358378fff161eb1
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-05-08 21:15:38 +00:00
Yu Ping
0b81915af4 add TLS endpoint function
a bit like QUIC, and the added function can get the endpoint info in TLS,
so that the VCL layer can get those info correctly

Change-Id: Ied7aa3077087c1814499364dfa7654a088ad9910
Signed-off-by: Yu Ping <ping.yu@intel.com>
2019-05-07 02:09:58 +00:00
Florin Coras
344ce42778 session/svm: apis for fifo shrinking
Change-Id: Ie519683bb90aae6fb95f2a09e251cded1890ed41
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-05-03 20:27:45 +00:00
Florin Coras
87b15cebda svm: more fifo refactor/cleanup
Change-Id: Ie76c69641c8598164d0d00fd498018037258fd86
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-30 16:59:49 +00:00
Florin Coras
b095a3cd22 svm: fifo segment support for chunk allocation
Change-Id: Ie96706b4d8bcb32d2d5f065bc765f95f4e9369e7
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-26 10:23:38 +00:00
Florin Coras
88001c64e9 session: cleanup segment manager and fifo segment
Change-Id: I984f347fb465c0c405cef668d8690457e81788e2
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-25 18:05:16 +00:00
Florin Coras
09d18c2fee session: use teps in accept/connect notifications
Change-Id: I58e713661a38cecbfdebd4609292d9d12e880cd2
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-25 14:46:26 +00:00
Aloys Augustin
cdb7170ab4 Add get_endpoint in transport vft
This allows QUIC & TLS specific logic to be implemented, and meaningfull
IP/port to be returned when connection is overridden.

Change-Id: Id79c59fe4d7b16d36f0e96ad3e281c4026b5fe65
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2019-04-24 17:54:38 +00:00
Aloys Augustin
502785b65c QUIC: Add multi-stream support to internal test apps
Change-Id: Iab07697ef482529e62c11433cffa1f8f894e5bb7
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-04-24 14:57:32 +00:00
Florin Coras
1219b2d071 session: remove unused fifo allo return value
Change-Id: I50a6bcc127e4b44becc4b694bdd3018ac9bfab5c
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-24 11:31:02 +00:00
Florin Coras
0a84680674 svm: allow indirect fifo data chunks
Fifos can use multiple memory chunks for simple read/write operations.
Adding/removing chunks after assignment not yet supported.

Change-Id: I2aceab6aea78059d74e0d3a9993c40d5196d077b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-18 13:16:18 +00:00
Florin Coras
402377e80c session: fix segment manager init condition
Change-Id: I0ef3115bd29a11538090c582a4eacdbb7cd86d7a
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-17 18:53:37 +00:00
Florin Coras
317b8e0836 vcl/session: tx notifications for cut-thru sessions
Change-Id: I076c753e419bbb177d2d28609190715e9895b398
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-17 18:26:42 +00:00
Sirshak Das
28aa539f7d svm_fifo rework to avoid contention on cursize
Problems Addressed:
- Contention of cursize by producer and consumer.
- Reduce the no of modulo operations.

Changes:
- Synchronization between producer and consumer changed from cursize
  to head and tail indexes
  Implications: reduces the usable size of fifo by 1.
- Using weaker memory ordering C++11 atomics to access head and tail
  based on producer and consumer role.
- Head and tail indexes are unsigned 32 bit integers. Additions and
  subtraction on them are implicit 32 bit Modulo operation.
- Adding weaker memory ordering variants of max_enq, max_deq, is_empty
  and is_full Using them appropriately in all places.

Perfomance improvement (iperf3 via Hoststack):

iperf3 Server: Marvell ThunderX2(AArch64) - iperf3 Client: Skylake(x86)
   ~6%(256 rxd/txd) - ~11%(2048 rxd/txd)

Change-Id: I1d484e000e437430fdd5a819657d1c6b62443018
Signed-off-by: Sirshak Das <sirshak.das@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
2019-04-16 19:33:21 +00:00
Aloys Augustin
39d0409946 QUIC: Initial multi stream support
To connect a stream, apps should call connect while passing the id of the QUIC
connection in the new transport_opts field in session_endpoint_cfg_t.
Apps are notified of new streams with their accept callback, which is called
each time a peer opens a stream.

Change-Id: I0f82ec344db58008d54641553eddec2973768435
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2019-04-16 17:54:24 +00:00
Aloys Augustin
b3b267cf59 Allow sessions to be allocated in app's RX callbacks
This enables applications to create sessions in their RX callbacks, which can
invalidate the session pointer. This is required for the QUIC protocol
implementation.

Change-Id: I6072c1c368fd9d17a960ec086a788089dd6f54b4
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2019-04-16 16:20:24 +00:00
Florin Coras
bbf923fb52 session: drop lock on segment allocation error
Change-Id: Ib346570daa3e40f4f53100a05e9355ce60d533a4
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-12 13:04:16 -07:00
Florin Coras
bee9768bd4 session: binary api app names as vectors
Change-Id: Iae358365de8ccbc0441b14f21ba6b365cbfec09a
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-10 15:58:27 +00:00
Florin Coras
ed1d872a8c session: fix session flags
Change-Id: I681169b82c661b7f0bf19f09d07d76ac1d3ed173
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-09 23:46:13 +00:00
Jim Thompson
f324dec0a3 fixing typos
Change-Id: I215e1e0208a073db80ec6f87695d734cf40fabe3
Signed-off-by: Jim Thompson <jim@netgate.com>
2019-04-08 21:54:17 +00:00
Florin Coras
fa7512e18d session: fix app name formatting
Change-Id: Iea88ce5f6628e131e507ba45a3dbb2de7e6c1498
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-05 18:35:42 +00:00
Florin Coras
6416e6274d tcp: do not delete session on establish pop
Also:
- force reset if wait close pops in fin-wait-1 with unsent data
- adds more event logging.

Change-Id: I4ddada046214fa71e17514cdec57b3026f84a283
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-05 07:51:41 +00:00
Florin Coras
509028ab5d session: fix cli for sessions in created state
Change-Id: Ie154afdc20000b905ff71e39823154db4d23eea4
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-03 08:19:34 +00:00
Florin Coras
6575a9a5ac session: do not enable pre-input node with 0 workers
Change-Id: I5c9e27b664ff1a8a74a6c1388f98af63571db7a5
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-03 02:10:04 +00:00
Florin Coras
096f2f83f6 session: remove session logic from io rx evt sender
Change-Id: I54fff6986ea6455aff25e0cf1b83117860859e10
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-02 21:13:07 +00:00
Florin Coras
69b68ef1a9 session: use app cb function wrappers
Change-Id: I77ad9eb4d4c7699397aa4be6a973ef37c60db4c5
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-02 21:12:56 +00:00
Florin Coras
f65074e4df tcp: improve rcv process ack processing
- Avoid doing cc in closing states.
- Rest connections closed with unread data

Change-Id: I97d46b0459f03ea5439eeb0f233b6c17d3e06dfd
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-04-02 16:48:39 +00:00
Nathan Skrzypczak
60f3e6547a Integrate first QUIC protocol implementation
Currently supports on single stream exposed through standard internal APIs
Based on libquicly & picotls by h2o

Change-Id: I7bc1ec0e399d1fb02bfd1da91aa7410076d08d14
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-03-29 15:57:30 +00:00
Florin Coras
b38ee66425 session: remove unused tx context field
Change-Id: I4a119937842eb188f5e5a7706cbe70e91ae4def8
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-28 19:32:16 +00:00
Florin Coras
6bc6fd0aeb session: cap max burst to a constant
Change-Id: I1919d3844936486f04f2bfde24dc7e0d9121927a
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-28 17:01:33 +00:00
Aloys Augustin
20ab31e8f6 UDP: Fix session registration in lookup table
This fixes a bug where packets could be sent but not received when opening an UDP connection.

Change-Id: I0993dd806b277374232d551167970ab13a62dbf9
Signed-off-by: Aloys Augustin <aloaugus@cisco.com>
2019-03-25 15:07:22 +00:00
Nathan Skrzypczak
ef71ef0ac3 Fix unformat proto UDPC / UDP conflict
Change-Id: I9161959536c37f6f730650c9c0058a41af8e7001
Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2019-03-25 11:47:09 +00:00
Florin Coras
4b76112dc4 session/fifo: make event unset atomic
Ensures that fifo cursize loads cannot be speculated to before the event
unset.

Change-Id: Ia7c20c510d58f26a8e9b82d3982c6d4143a3a4d6
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-21 13:56:02 -07:00
Florin Coras
d5c604d687 session: add session flags
- use flag instead of enqueue_epoch for enqueueing rx events.
- use flag for proxy sessions

Change-Id: Iec3eee55a68d02536ece6329348a3369c7c7412e
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-18 22:07:37 +00:00
zhanglimao
a04ebb88e5 session rule cli add udp session fail
current session rule cli can not add session rule of proto is udp.
because vnet_session_rule_add_del function's paramter does not include transport_proto element in args struct,
but session rule type on the basis of input args's transport_proto when create session rule with vnet_session_rule_add_del function,
so just add transport_proto element to vnet_session_rule_add_del function's args that to solve this problem

Change-Id: If1a5942b4a0b006d73376e0cb01b97e84c593493
Signed-off-by: zhanglimao <zhanglimao0017@gmail.com>
2019-03-13 22:52:55 +00:00
Florin Coras
bf7ce2cd3c tls: fixes and improvements
- disconnect sessions through session layer apis instead of directly
notifying the app worker.
- improve cli
- increase fifo sizes for tls app

Change-Id: I8a7d2865b3b00724e2a9da29fa4a906ea867da9b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-11 09:15:01 +00:00
Florin Coras
9f1a5432b3 session: fix ct that match global table entries
Change-Id: I42addcd413094a8b6e9b2858ba2a292bd295ec82
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-11 09:14:50 +00:00
Florin Coras
14ed6df900 session/tcp/vcl: fixes and optimizations
Change-Id: Idc7dfe743399dd8dee0f6b3ec83f194f3fca580b
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-08 20:03:31 +00:00
Florin Coras
11e2cf5f1a session: reorganize session fields
Change-Id: I7f3b015ea6750c9773e4285bb63b0d44fa2177b9
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-08 20:03:10 +00:00
Florin Coras
f8d2e86099 session/tls: remove unused t_app_index field
Change-Id: Idbf7f3a57dc399798b8dba9463daeb7d66470ab1
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-07 10:17:24 +00:00
Florin Coras
f940f8a40f session: use transport custom tx for app transports
Change-Id: I675f7090fa6b2ffdfb4ee748df858bfb7e39ce5a
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-07 00:47:42 +00:00
Florin Coras
c0737e962c session: use session index instead of fifo for evt
Avoids derefrencing fifo pointers whose segments could have been
unmapped.

Change-Id: Ifb0b7399e424f145f3f94b769391a6f4e31bb4e6
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-06 18:41:28 +00:00
Florin Coras
653e43f06a session: use vpp to switch io events for ct sessions
Instead of allocating pairs of message queues per cut-thru session and
having the applications map them, this uses vpp as an io event message
switch.

Change-Id: I51db1c7564df479a7d1a3288342394251fd188bb
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-06 17:53:39 +00:00
Florin Coras
19223e03fe session: remove svm_segment_index from session struct
Change-Id: I42ef9ee38f93600a0d6f2699b1b2a0a201fcec9c
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-04 11:16:09 +00:00
Florin Coras
d8402aee29 session: eventfd for mq only for bapi socket transport
Change-Id: I9badb376aa31fc2c7c452a16cc4dc997a8a66d97
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-04 11:15:50 +00:00
Florin Coras
6442401c21 session: remove deprecated binary apis
Change-Id: Ia1a628498fa3b639b6b1508f65c6aea1806f73ec
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-02 15:44:50 -08:00
Florin Coras
a0dbf9e028 session: notify app of segment removal
Change-Id: I3774f7ffd14be73e9bbbf4cdd6d3b22f24fee730
Signed-off-by: Florin Coras <fcoras@cisco.com>
2019-03-02 23:40:53 +00:00