2020-01-27 18:04:07 +00:00
|
|
|
load("//tools:defs.bzl", "go_library", "go_test")
|
2018-04-27 17:37:02 +00:00
|
|
|
load("//tools/go_generics:defs.bzl", "go_template_instance")
|
|
|
|
|
2019-10-14 22:20:35 +00:00
|
|
|
package(licenses = ["notice"])
|
|
|
|
|
2018-04-27 17:37:02 +00:00
|
|
|
go_template_instance(
|
|
|
|
name = "tcp_segment_list",
|
|
|
|
out = "tcp_segment_list.go",
|
|
|
|
package = "tcp",
|
|
|
|
prefix = "segment",
|
|
|
|
template = "//pkg/ilist:generic_list",
|
|
|
|
types = {
|
2018-09-04 16:18:00 +00:00
|
|
|
"Element": "*segment",
|
2020-08-25 03:39:26 +00:00
|
|
|
"Linker": "*segment",
|
2018-04-27 17:37:02 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
|
2020-01-14 22:14:17 +00:00
|
|
|
go_template_instance(
|
|
|
|
name = "tcp_endpoint_list",
|
|
|
|
out = "tcp_endpoint_list.go",
|
|
|
|
package = "tcp",
|
|
|
|
prefix = "endpoint",
|
|
|
|
template = "//pkg/ilist:generic_list",
|
|
|
|
types = {
|
|
|
|
"Element": "*endpoint",
|
|
|
|
"Linker": "*endpoint",
|
|
|
|
},
|
|
|
|
)
|
|
|
|
|
2018-04-27 17:37:02 +00:00
|
|
|
go_library(
|
|
|
|
name = "tcp",
|
|
|
|
srcs = [
|
|
|
|
"accept.go",
|
|
|
|
"connect.go",
|
2020-03-05 23:55:40 +00:00
|
|
|
"connect_unsafe.go",
|
2018-08-04 00:53:24 +00:00
|
|
|
"cubic.go",
|
2019-06-12 20:34:47 +00:00
|
|
|
"cubic_state.go",
|
2020-01-14 22:14:17 +00:00
|
|
|
"dispatcher.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"endpoint.go",
|
|
|
|
"endpoint_state.go",
|
|
|
|
"forwarder.go",
|
|
|
|
"protocol.go",
|
2020-08-05 03:57:28 +00:00
|
|
|
"rack.go",
|
|
|
|
"rack_state.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"rcv.go",
|
2019-12-12 01:51:37 +00:00
|
|
|
"rcv_state.go",
|
2018-07-23 22:14:19 +00:00
|
|
|
"reno.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"sack.go",
|
2018-11-09 22:37:42 +00:00
|
|
|
"sack_scoreboard.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"segment.go",
|
|
|
|
"segment_heap.go",
|
|
|
|
"segment_queue.go",
|
2018-07-10 16:22:37 +00:00
|
|
|
"segment_state.go",
|
2020-07-27 22:12:36 +00:00
|
|
|
"segment_unsafe.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"snd.go",
|
2018-07-10 16:22:37 +00:00
|
|
|
"snd_state.go",
|
2020-01-14 22:14:17 +00:00
|
|
|
"tcp_endpoint_list.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"tcp_segment_list.go",
|
|
|
|
"timer.go",
|
|
|
|
],
|
2019-06-13 23:49:09 +00:00
|
|
|
imports = ["gvisor.dev/gvisor/pkg/tcpip/buffer"],
|
2018-04-27 17:37:02 +00:00
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
2020-01-29 23:41:51 +00:00
|
|
|
"//pkg/log",
|
2018-06-15 22:35:09 +00:00
|
|
|
"//pkg/rand",
|
2018-04-27 17:37:02 +00:00
|
|
|
"//pkg/sleep",
|
2020-01-10 06:00:42 +00:00
|
|
|
"//pkg/sync",
|
2018-04-27 17:37:02 +00:00
|
|
|
"//pkg/tcpip",
|
|
|
|
"//pkg/tcpip/buffer",
|
2019-09-30 20:54:03 +00:00
|
|
|
"//pkg/tcpip/hash/jenkins",
|
2018-04-27 17:37:02 +00:00
|
|
|
"//pkg/tcpip/header",
|
2020-09-18 07:46:26 +00:00
|
|
|
"//pkg/tcpip/header/parse",
|
2019-12-09 23:51:24 +00:00
|
|
|
"//pkg/tcpip/ports",
|
2018-04-27 17:37:02 +00:00
|
|
|
"//pkg/tcpip/seqnum",
|
|
|
|
"//pkg/tcpip/stack",
|
2019-05-22 20:44:07 +00:00
|
|
|
"//pkg/tcpip/transport/raw",
|
2018-04-27 17:37:02 +00:00
|
|
|
"//pkg/waiter",
|
2018-11-09 22:37:42 +00:00
|
|
|
"@com_github_google_btree//:go_default_library",
|
2018-04-27 17:37:02 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
go_test(
|
2020-06-18 07:08:55 +00:00
|
|
|
name = "tcp_x_test",
|
2019-11-07 17:45:26 +00:00
|
|
|
size = "medium",
|
2018-04-27 17:37:02 +00:00
|
|
|
srcs = [
|
|
|
|
"dual_stack_test.go",
|
2018-11-09 22:37:42 +00:00
|
|
|
"sack_scoreboard_test.go",
|
2019-05-31 23:18:44 +00:00
|
|
|
"tcp_noracedetector_test.go",
|
2020-08-05 03:57:28 +00:00
|
|
|
"tcp_rack_test.go",
|
2018-04-27 17:37:02 +00:00
|
|
|
"tcp_sack_test.go",
|
|
|
|
"tcp_test.go",
|
|
|
|
"tcp_timestamp_test.go",
|
|
|
|
],
|
2020-07-06 19:09:03 +00:00
|
|
|
shard_count = 10,
|
2018-04-27 17:37:02 +00:00
|
|
|
deps = [
|
|
|
|
":tcp",
|
2020-09-24 14:13:23 +00:00
|
|
|
"//pkg/rand",
|
2020-01-30 19:48:36 +00:00
|
|
|
"//pkg/sync",
|
2018-04-27 17:37:02 +00:00
|
|
|
"//pkg/tcpip",
|
|
|
|
"//pkg/tcpip/buffer",
|
|
|
|
"//pkg/tcpip/checker",
|
|
|
|
"//pkg/tcpip/header",
|
|
|
|
"//pkg/tcpip/link/loopback",
|
|
|
|
"//pkg/tcpip/link/sniffer",
|
|
|
|
"//pkg/tcpip/network/ipv4",
|
2018-09-18 03:42:48 +00:00
|
|
|
"//pkg/tcpip/network/ipv6",
|
|
|
|
"//pkg/tcpip/ports",
|
2018-04-27 17:37:02 +00:00
|
|
|
"//pkg/tcpip/seqnum",
|
|
|
|
"//pkg/tcpip/stack",
|
|
|
|
"//pkg/tcpip/transport/tcp/testing/context",
|
2020-04-23 18:32:08 +00:00
|
|
|
"//pkg/test/testutil",
|
2018-04-27 17:37:02 +00:00
|
|
|
"//pkg/waiter",
|
|
|
|
],
|
|
|
|
)
|
2020-04-20 05:14:53 +00:00
|
|
|
|
|
|
|
go_test(
|
|
|
|
name = "rcv_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = ["rcv_test.go"],
|
|
|
|
deps = [
|
2020-03-27 19:18:45 +00:00
|
|
|
"//pkg/tcpip/header",
|
2020-04-20 05:14:53 +00:00
|
|
|
"//pkg/tcpip/seqnum",
|
|
|
|
],
|
|
|
|
)
|
2020-06-18 07:08:55 +00:00
|
|
|
|
|
|
|
go_test(
|
|
|
|
name = "tcp_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = ["timer_test.go"],
|
|
|
|
library = ":tcp",
|
|
|
|
deps = ["//pkg/sleep"],
|
|
|
|
)
|