From 65ff71d1637d71f2d283f207b61a2a584af05c0b Mon Sep 17 00:00:00 2001 From: "randomizedcoder dave.seddon.ca@gmail.com" Date: Thu, 12 Nov 2026 19:28:46 -0800 Subject: [PATCH 01/19] feat(xtcp): cap a namespace's dump bytes and records, and the namespaces tracked FP-5 (C1, C2) of the focused hardening plan. What one workload can cost the collector is bounded and counted. - -maxDumpBytes (256 MiB): packets of one namespace's dump past the cap are drained undecoded. Both receivers go through handOff, and the packet is still numbered, so NLMSG_DONE ends the dump and the done signal is unaffected. - -maxRecordsPerNetns (262144): the receiver counts each packet's inet_diag records in the header walk that finds NLMSG_DONE (packetScan) and gives each packet a budget (keep); a packet with none left is drained. Decoders compare a local counter, with no shared atomics. - -maxNetns (4096): reconcile admits new namespaces up to the cap, lowest pid first, xtcp2's own always (admitNamespaces). - xtcp_dump_dropped_total{reason}, xtcp_netns_dropped_total, volume counters in xtcp_counts, and one log line per truncated dump. - 0 turns a cap off. ConfigService.Set keeps the running caps (preserveCaps). - XtcpConfig fields 25, 26 and 42; MAX_DUMP_BYTES, MAX_RECORDS_PER_NETNS and MAX_NETNS. Co-Authored-By: Claude Opus 5.5 --- cmd/xtcp2/testdata/defineflags-golden.txt | 3 + cmd/xtcp2/testdata/printflags-golden.txt | 3 + cmd/xtcp2/xtcp2.go | 59 ++ cmd/xtcp2/xtcp2_flags_helpers_test.go | 6 +- cmd/xtcp2/xtcp2_test.go | 51 + gen/cpp/xtcp_config/v1/xtcp_config.pb.cc | 882 ++++++++++-------- gen/cpp/xtcp_config/v1/xtcp_config.pb.h | 374 +++++--- gen/dart/xtcp_config/v1/xtcp_config.pb.dart | 456 +++++---- .../xtcp_config/v1/xtcp_config.pbjson.dart | 165 ++-- gen/go/xtcp_config/xtcp_config.pb.go | 48 +- gen/go/xtcp_config/xtcp_config_vtproto.pb.go | 87 ++ .../xtcp_config/v1/xtcp_config.swagger.json | 15 + gen/python/xtcp_config/v1/xtcp_config_pb2.py | 34 +- gen/python/xtcp_config/v1/xtcp_config_pb2.pyi | 10 +- pkg/xtcp/caps.go | 54 ++ pkg/xtcp/caps_test.go | 324 +++++++ pkg/xtcp/deserialize.go | 28 + pkg/xtcp/grpc_configService.go | 12 + pkg/xtcp/netlinker.go | 138 ++- pkg/xtcp/netlinker_dump_test.go | 38 +- pkg/xtcp/netlinker_iouring.go | 4 +- pkg/xtcp/netlinker_iouring_test.go | 2 +- pkg/xtcp/ns_reconcile.go | 24 +- pkg/xtcp/prometheus.go | 16 + pkg/xtcp/xtcp.go | 6 + proto/xtcp_config/v1/xtcp_config.proto | 27 + 26 files changed, 2011 insertions(+), 855 deletions(-) create mode 100644 pkg/xtcp/caps.go create mode 100644 pkg/xtcp/caps_test.go diff --git a/cmd/xtcp2/testdata/defineflags-golden.txt b/cmd/xtcp2/testdata/defineflags-golden.txt index 589ae7241..4e8b1d01e 100644 --- a/cmd/xtcp2/testdata/defineflags-golden.txt +++ b/cmd/xtcp2/testdata/defineflags-golden.txt @@ -79,7 +79,10 @@ localityEvents false with -enrichLocality, keep each namespace's locality snapsh localityRefreshInterval 1m0s how often -enrichLocality re-dumps every namespace's addresses/routes on the reconcile path (new namespaces are always dumped on the next reconcile; failed or loopback-only namespaces retry on a 30s-5m backoff); 0 = discover each namespace once, never refresh. Falls back to LOCALITY_REFRESH_INTERVAL env. location deployment grouping/facility this daemon runs in (data center, PoP, region, site, …); stamped on every record's `location`. Falls back to LOCATION env. marshal protobufList Marshaling of the exported data (protobufList, protoJson, protoText, msgpack, jsonl, csv, tsv) +maxDumpBytes 268435456 cap on the bytes of one namespace's inet_diag dump per poll; packets past it are drained undecoded and counted in xtcp_dump_dropped_total{reason="bytes"}. 0 = unlimited. Falls back to MAX_DUMP_BYTES env. maxLoops 0 Maximum number of loops, or zero (0) for forever +maxNetns 4096 cap on the network namespaces tracked, xtcp2's own included; at the cap the lowest pids win and the rest are counted in xtcp_netns_dropped_total. 0 = unlimited. Falls back to MAX_NETNS env. +maxRecordsPerNetns 262144 cap on the records one namespace contributes per poll; the rest are dropped before decode and counted in xtcp_dump_dropped_total{reason="records"}. 0 = unlimited. Falls back to MAX_RECORDS_PER_NETNS env. maxThreads 2000 cap on Go runtime OS threads (debug.SetMaxThreads); 0 = use Go default 10000 modulus 1 modulus. Report every X inetd messages to output netlinkers 2 decoders per socket that parse netlink dump packets (one receiver reads each socket). increase this if you have many flows diff --git a/cmd/xtcp2/testdata/printflags-golden.txt b/cmd/xtcp2/testdata/printflags-golden.txt index 24278353e..3448edf61 100644 --- a/cmd/xtcp2/testdata/printflags-golden.txt +++ b/cmd/xtcp2/testdata/printflags-golden.txt @@ -30,6 +30,9 @@ *s3UploadBackoffCap: 119ms *reconcileFrequency: 120ms *reconcileBeforePoll: false +*maxDumpBytes: 1201 +*maxRecordsPerNetns: 1202 +*maxNetns: 1203 *pyroscopeUrl: pyroscopeUrl-v *pyroscopeAppName: pyroscopeAppName-v *pyroscopeSampleHz: 136 diff --git a/cmd/xtcp2/xtcp2.go b/cmd/xtcp2/xtcp2.go index 4d56205ed..64201c827 100644 --- a/cmd/xtcp2/xtcp2.go +++ b/cmd/xtcp2/xtcp2.go @@ -135,6 +135,14 @@ const ( reconcileFrequencyCst = 6 * time.Hour reconcileBeforePollCst = true + // Caps on what one namespace, or the number of namespaces, can cost the + // collector (-maxDumpBytes, -maxRecordsPerNetns, -maxNetns). Generous + // enough that no healthy host meets them; 0 turns a cap off. Provisional + // until a fleet baseline is measured. + maxDumpBytesCst uint64 = 256 << 20 + maxRecordsPerNetnsCst uint64 = 1 << 18 + maxNetnsCst uint = 4096 + // Pyroscope continuous-profiling defaults. Agent disabled when // pyroscopeUrlCst is empty; flip on via -pyroscopeUrl (or // PYROSCOPE_URL env, see environmentOverride). @@ -290,6 +298,10 @@ type mainFlags struct { reconcileFrequency *time.Duration reconcileBeforePoll *bool + maxDumpBytes *uint64 + maxRecordsPerNetns *uint64 + maxNetns *uint + dest *string destWriteFiles *uint topic *string @@ -476,6 +488,7 @@ func defineFlags() *mainFlags { f.location = flag.String("location", locationCst, "deployment grouping/facility this daemon runs in (data center, PoP, region, site, …); stamped on every record's `location`. Falls back to LOCATION env.") f.hostname = flag.String("hostname", hostnameCst, "hostname stamped on records; defaults to os.Hostname(). Set this in a container, where os.Hostname() returns the container id, not the host. Falls back to XTCP_HOSTNAME env (NOT HOSTNAME).") f.resolveContainerId = flag.Bool("resolveContainerId", resolveContainerIdCst, "resolve each socket's owning container id from its cgroup into container_id/container_runtime; needs /sys/fs/cgroup readable (mount it + --cgroupns=host in a container). Falls back to CONTAINER_ID_RESOLVE env.") + defineCapFlags(f) defineEnrichmentFlags(f) defineLinkMonitorFlags(f) defineListenerFlags(f) @@ -515,6 +528,15 @@ func defineS3Flags(f *mainFlags) { f.s3UploadBackoffCap = flag.Duration("s3UploadBackoffCap", s3UploadBackoffCapCst, "s3parquet: cap on a single upload retry's backoff window (full jitter draws in [0,window]). 0 = derive as clamp(-frequency/10, 1s, 1h).") } +// defineCapFlags registers the three caps on what a tenant can cost the +// collector: the bytes and records of one namespace's dump per poll, and the +// number of namespaces tracked. Paired with printCapFlags. +func defineCapFlags(f *mainFlags) { + f.maxDumpBytes = flag.Uint64("maxDumpBytes", maxDumpBytesCst, "cap on the bytes of one namespace's inet_diag dump per poll; packets past it are drained undecoded and counted in xtcp_dump_dropped_total{reason=\"bytes\"}. 0 = unlimited. Falls back to MAX_DUMP_BYTES env.") + f.maxRecordsPerNetns = flag.Uint64("maxRecordsPerNetns", maxRecordsPerNetnsCst, "cap on the records one namespace contributes per poll; the rest are dropped before decode and counted in xtcp_dump_dropped_total{reason=\"records\"}. 0 = unlimited. Falls back to MAX_RECORDS_PER_NETNS env.") + f.maxNetns = flag.Uint("maxNetns", maxNetnsCst, "cap on the network namespaces tracked, xtcp2's own included; at the cap the lowest pids win and the rest are counted in xtcp_netns_dropped_total. 0 = unlimited. Falls back to MAX_NETNS env.") +} + // defineListenerFlags registers the flags for xtcp2's own inbound listeners: // the two outgoing TTL/hop-limit knobs, the six shared listener-auth flags, the // five gRPC endpoint flags, the five Prometheus endpoint flags, and @@ -642,6 +664,7 @@ func printFlags(f *mainFlags) { fmt.Println("*envelopeFlushRows:", *f.envelopeFlushRows) fmt.Println("*kafkaCompression:", *f.kafkaCompression) printS3Flags(f) + printCapFlags(f) fmt.Println("*pyroscopeUrl:", *f.pyroscopeUrl) fmt.Println("*pyroscopeAppName:", *f.pyroscopeAppName) fmt.Println("*pyroscopeSampleHz:", *f.pyroscopeSampleHz) @@ -693,6 +716,13 @@ func printS3Flags(f *mainFlags) { fmt.Println("*reconcileBeforePoll:", *f.reconcileBeforePoll) } +// printCapFlags prints the three tenant caps; pairs with defineCapFlags. +func printCapFlags(f *mainFlags) { + fmt.Println("*maxDumpBytes:", *f.maxDumpBytes) + fmt.Println("*maxRecordsPerNetns:", *f.maxRecordsPerNetns) + fmt.Println("*maxNetns:", *f.maxNetns) +} + // printListenerAuthFlags prints the shared listener-auth run, listenerAuthMode // through listenerAuthFailureJitterMax. // @@ -807,6 +837,9 @@ func buildConfig(f *mainFlags, des *xtcp_config.EnabledDeserializers) *xtcp_conf S3UploadBackoffCap: durationpb.New(*f.s3UploadBackoffCap), ReconcileFrequency: durationpb.New(*f.reconcileFrequency), ReconcileBeforePoll: *f.reconcileBeforePoll, + MaxDumpBytes: *f.maxDumpBytes, + MaxRecordsPerNetns: *f.maxRecordsPerNetns, + MaxNetns: uint32(*f.maxNetns), PyroscopeUrl: *f.pyroscopeUrl, PyroscopeAppName: *f.pyroscopeAppName, PyroscopeSampleHz: uint32(*f.pyroscopeSampleHz), @@ -1550,6 +1583,7 @@ func environmentOverrideConfig(c *xtcp_config.XtcpConfig, debugLevel uint) { envOverrideNetlinker(c, debugLevel) envOverridePacket(c, debugLevel) envOverrideMarshalAndDest(c, debugLevel) + envOverrideCaps(c, debugLevel) envOverrideKafka(c, debugLevel) envOverrideLabeling(c, debugLevel) envOverrideEnrichment(c, debugLevel) @@ -2162,6 +2196,7 @@ func printConfig(c *xtcp_config.XtcpConfig, comment string) { fmt.Println("c.S3UploadBackoffCap:", c.S3UploadBackoffCap.AsDuration()) fmt.Println("c.ReconcileFrequency:", c.ReconcileFrequency.AsDuration()) fmt.Println("c.ReconcileBeforePoll:", c.ReconcileBeforePoll) + printConfigCaps(c) fmt.Println("c.Dest:", c.Dest) fmt.Println("c.DestWriteFiles:", c.DestWriteFiles) fmt.Println("c.Topic:", c.Topic) @@ -2275,3 +2310,27 @@ func checkNoPositional(args []string) error { } return fmt.Errorf("unexpected argument %q: flags take -name value, and an empty value must be quoted (-name \"\" or -name=)", args[0]) } + +// envOverrideCaps applies MAX_DUMP_BYTES, MAX_RECORDS_PER_NETNS and +// MAX_NETNS; see defineCapFlags. +func envOverrideCaps(c *xtcp_config.XtcpConfig, debugLevel uint) { + if v, ok := envUint64("MAX_DUMP_BYTES"); ok { + c.MaxDumpBytes = v + logEnv("MAX_DUMP_BYTES", fmt.Sprintf("c.MaxDumpBytes:%d", v), debugLevel) + } + if v, ok := envUint64("MAX_RECORDS_PER_NETNS"); ok { + c.MaxRecordsPerNetns = v + logEnv("MAX_RECORDS_PER_NETNS", fmt.Sprintf("c.MaxRecordsPerNetns:%d", v), debugLevel) + } + if v, ok := envUint32("MAX_NETNS"); ok { + c.MaxNetns = v + logEnv("MAX_NETNS", fmt.Sprintf("c.MaxNetns:%d", v), debugLevel) + } +} + +// printConfigCaps prints the three tenant caps for printConfig. +func printConfigCaps(c *xtcp_config.XtcpConfig) { + fmt.Println("c.MaxDumpBytes:", c.MaxDumpBytes) + fmt.Println("c.MaxRecordsPerNetns:", c.MaxRecordsPerNetns) + fmt.Println("c.MaxNetns:", c.MaxNetns) +} diff --git a/cmd/xtcp2/xtcp2_flags_helpers_test.go b/cmd/xtcp2/xtcp2_flags_helpers_test.go index a33f39ccd..c54f4ecee 100644 --- a/cmd/xtcp2/xtcp2_flags_helpers_test.go +++ b/cmd/xtcp2/xtcp2_flags_helpers_test.go @@ -89,7 +89,7 @@ const ( // mainFlags field must be a registered flag and every registered flag must // have a field. A flag added without a field, or a field that stops being // registered, is the drift this file exists to notice. - mainFlagsFieldCountCst = 128 + mainFlagsFieldCountCst = 131 printFlagsGoldenCst = "testdata/printflags-golden.txt" defineFlagsGoldenCst = "testdata/defineflags-golden.txt" @@ -192,6 +192,10 @@ func populatedMainFlags() *mainFlags { reconcileFrequency: ms(120), reconcileBeforePoll: b(false), + maxDumpBytes: u64(1201), + maxRecordsPerNetns: u64(1202), + maxNetns: u(1203), + dest: s("dest-v"), destWriteFiles: u(121), topic: s("topic-v"), diff --git a/cmd/xtcp2/xtcp2_test.go b/cmd/xtcp2/xtcp2_test.go index 7600a785c..ba14adf6a 100644 --- a/cmd/xtcp2/xtcp2_test.go +++ b/cmd/xtcp2/xtcp2_test.go @@ -1050,6 +1050,9 @@ func TestPrintFlags(t *testing.T) { f.s3UploadBackoffCap = &d f.reconcileFrequency = &d f.reconcileBeforePoll = &b + f.maxDumpBytes = &n64 + f.maxRecordsPerNetns = &n64 + f.maxNetns = &n f.pyroscopeUrl = &s f.pyroscopeAppName = &s f.pyroscopeSampleHz = &n @@ -1271,6 +1274,9 @@ func TestBuildConfig(t *testing.T) { s3UploadBackoffCap: &subc, reconcileFrequency: &rf, reconcileBeforePoll: &rbp, + maxDumpBytes: &nl, + maxRecordsPerNetns: &nl, + maxNetns: &wf, pyroscopeUrl: &mar, pyroscopeAppName: &mar, pyroscopeSampleHz: &wf, @@ -1818,3 +1824,48 @@ func TestRunMainRejectsPositional(t *testing.T) { }) } } + +// TestEnvOverrideCaps: MAX_DUMP_BYTES, MAX_RECORDS_PER_NETNS and MAX_NETNS +// override the flag values, 0 included (it turns a cap off); unset or +// unparsable leaves the flag value. +func TestEnvOverrideCaps(t *testing.T) { + flagCfg := func() *xtcp_config.XtcpConfig { + return &xtcp_config.XtcpConfig{ + MaxDumpBytes: maxDumpBytesCst, + MaxRecordsPerNetns: maxRecordsPerNetnsCst, + MaxNetns: uint32(maxNetnsCst), + } + } + tests := []struct { + name string + category string + description string + env map[string]string + expected [3]uint64 + }{ + {name: "flags_env_defaults", category: "P", description: "no env keeps the flag defaults", + expected: [3]uint64{256 << 20, 1 << 18, 4096}}, + {name: "env_set", category: "P", description: "each env var overrides its cap", + env: map[string]string{"MAX_DUMP_BYTES": "1048576", "MAX_RECORDS_PER_NETNS": "1000", "MAX_NETNS": "16"}, + expected: [3]uint64{1 << 20, 1000, 16}}, + {name: "env_zero", category: "B", description: "0 turns every cap off", + env: map[string]string{"MAX_DUMP_BYTES": "0", "MAX_RECORDS_PER_NETNS": "0", "MAX_NETNS": "0"}, + expected: [3]uint64{0, 0, 0}}, + {name: "env_invalid", category: "N", description: "unparsable values leave the flag defaults", + env: map[string]string{"MAX_DUMP_BYTES": "lots", "MAX_RECORDS_PER_NETNS": "-1", "MAX_NETNS": "4294967296"}, + expected: [3]uint64{256 << 20, 1 << 18, 4096}}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + for k, v := range tc.env { + t.Setenv(k, v) + } + c := flagCfg() + envOverrideCaps(c, 0) + got := [3]uint64{c.MaxDumpBytes, c.MaxRecordsPerNetns, uint64(c.MaxNetns)} + if got != tc.expected { + t.Errorf("%s: caps %v, expected %v", tc.description, got, tc.expected) + } + }) + } +} diff --git a/gen/cpp/xtcp_config/v1/xtcp_config.pb.cc b/gen/cpp/xtcp_config/v1/xtcp_config.pb.cc index 78c354c4d..21d788df6 100644 --- a/gen/cpp/xtcp_config/v1/xtcp_config.pb.cc +++ b/gen/cpp/xtcp_config/v1/xtcp_config.pb.cc @@ -2548,9 +2548,9 @@ constexpr XtcpConfig::ParseTableT_ XtcpConfig::InternalGenerateParseTable_(const 0, // no _extensions_ 250, 248, // max_field_number, fast_idx_mask offsetof(ParseTableT_, field_lookup_table), - 4278190591, // skipmap + 4227858943, // skipmap offsetof(ParseTableT_, field_entries), - 83, // num_field_entries + 86, // num_field_entries 15, // num_aux_entries offsetof(ParseTableT_, aux_entries), class_data, @@ -2620,7 +2620,7 @@ constexpr XtcpConfig::ParseTableT_ XtcpConfig::InternalGenerateParseTable_(const PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enabled_deserializers_)}}, // bool io_uring = 22 [json_name = "ioUring", (.buf.validate.field) = { {::_pbi::TcParser::FastV8S2, - {432, 18, 0, + {432, 20, 0, PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.io_uring_)}}, // uint32 io_uring_recv_batch_size = 23 [json_name = "ioUringRecvBatchSize", (.buf.validate.field) = { {::_pbi::TcParser::FastV32S2, @@ -2628,16 +2628,16 @@ constexpr XtcpConfig::ParseTableT_ XtcpConfig::InternalGenerateParseTable_(const PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.io_uring_recv_batch_size_)}}, // uint32 io_uring_cqe_batch_size = 24 [json_name = "ioUringCqeBatchSize", (.buf.validate.field) = { {::_pbi::TcParser::FastV32S2, - {448, 17, 0, + {448, 19, 0, PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.io_uring_cqe_batch_size_)}}, - // bool reconcile_before_poll = 41 [json_name = "reconcileBeforePoll"]; - {::_pbi::TcParser::FastV8S2, - {712, 19, 0, - PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.reconcile_before_poll_)}}, - // bool s3_skip_bucket_probe = 106 [json_name = "s3SkipBucketProbe", (.buf.validate.field) = { - {::_pbi::TcParser::FastV8S2, - {1744, 20, 0, - PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_skip_bucket_probe_)}}, + // uint64 max_dump_bytes = 25 [json_name = "maxDumpBytes", (.buf.validate.field) = { + {::_pbi::TcParser::FastV64S2, + {456, 17, 0, + PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.max_dump_bytes_)}}, + // uint64 max_records_per_netns = 26 [json_name = "maxRecordsPerNetns", (.buf.validate.field) = { + {::_pbi::TcParser::FastV64S2, + {464, 18, 0, + PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.max_records_per_netns_)}}, // bool s3_allow_insecure = 107 [json_name = "s3AllowInsecure", (.buf.validate.field) = { {::_pbi::TcParser::FastV8S2, {1752, 21, 0, @@ -2660,20 +2660,20 @@ constexpr XtcpConfig::ParseTableT_ XtcpConfig::InternalGenerateParseTable_(const PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.xtcp_proto_file_)}}, }}, {{ 40, 0, 14, - 33788, 15, - 64527, 22, - 61695, 28, - 4095, 32, - 61472, 36, - 33791, 47, - 16383, 52, - 63736, 54, - 65475, 60, - 65535, 64, - 58360, 64, - 49039, 70, - 255, 74, - 65531, 82, + 33784, 17, + 64527, 25, + 61695, 31, + 4095, 35, + 61472, 39, + 33791, 50, + 16383, 55, + 63736, 57, + 65475, 63, + 65535, 67, + 58360, 67, + 49039, 73, + 255, 77, + 65531, 85, 65535, 65535 }}, {{ // uint64 nl_timeout_milliseconds = 10 [json_name = "nlTimeoutMilliseconds", (.buf.validate.field) = { @@ -2701,25 +2701,31 @@ constexpr XtcpConfig::ParseTableT_ XtcpConfig::InternalGenerateParseTable_(const // .xtcp_config.v1.EnabledDeserializers enabled_deserializers = 21 [json_name = "enabledDeserializers", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enabled_deserializers_), _Internal::kHasBitsOffset + 6, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // bool io_uring = 22 [json_name = "ioUring", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.io_uring_), _Internal::kHasBitsOffset + 18, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.io_uring_), _Internal::kHasBitsOffset + 20, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // uint32 io_uring_recv_batch_size = 23 [json_name = "ioUringRecvBatchSize", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.io_uring_recv_batch_size_), _Internal::kHasBitsOffset + 16, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // uint32 io_uring_cqe_batch_size = 24 [json_name = "ioUringCqeBatchSize", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.io_uring_cqe_batch_size_), _Internal::kHasBitsOffset + 17, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.io_uring_cqe_batch_size_), _Internal::kHasBitsOffset + 19, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint64 max_dump_bytes = 25 [json_name = "maxDumpBytes", (.buf.validate.field) = { + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.max_dump_bytes_), _Internal::kHasBitsOffset + 17, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // uint64 max_records_per_netns = 26 [json_name = "maxRecordsPerNetns", (.buf.validate.field) = { + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.max_records_per_netns_), _Internal::kHasBitsOffset + 18, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, // .google.protobuf.Duration reconcile_frequency = 40 [json_name = "reconcileFrequency", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.reconcile_frequency_), _Internal::kHasBitsOffset + 48, 3, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // bool reconcile_before_poll = 41 [json_name = "reconcileBeforePoll"]; - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.reconcile_before_poll_), _Internal::kHasBitsOffset + 19, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.reconcile_before_poll_), _Internal::kHasBitsOffset + 65, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + // uint32 max_netns = 42 [json_name = "maxNetns", (.buf.validate.field) = { + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.max_netns_), _Internal::kHasBitsOffset + 59, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // uint32 write_files = 50 [json_name = "writeFiles", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.write_files_), _Internal::kHasBitsOffset + 59, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.write_files_), _Internal::kHasBitsOffset + 60, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // string capture_path = 51 [json_name = "capturePath", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.capture_path_), _Internal::kHasBitsOffset + 24, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // uint32 dest_write_files = 52 [json_name = "destWriteFiles", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.dest_write_files_), _Internal::kHasBitsOffset + 60, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.dest_write_files_), _Internal::kHasBitsOffset + 61, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // uint32 debug_level = 53 [json_name = "debugLevel", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.debug_level_), _Internal::kHasBitsOffset + 61, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.debug_level_), _Internal::kHasBitsOffset + 62, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // bool debug_prometheus = 54 [json_name = "debugPrometheus", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.debug_prometheus_), _Internal::kHasBitsOffset + 71, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.debug_prometheus_), _Internal::kHasBitsOffset + 66, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // string dest = 60 [json_name = "dest", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.dest_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string marshal_to = 61 [json_name = "marshalTo", (.buf.validate.field) = { @@ -2729,9 +2735,9 @@ constexpr XtcpConfig::ParseTableT_ XtcpConfig::InternalGenerateParseTable_(const // string xtcp_proto_file = 63 [json_name = "xtcpProtoFile", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.xtcp_proto_file_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // uint32 envelope_flush_threshold_bytes = 64 [json_name = "envelopeFlushThresholdBytes", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.envelope_flush_threshold_bytes_), _Internal::kHasBitsOffset + 62, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.envelope_flush_threshold_bytes_), _Internal::kHasBitsOffset + 63, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // uint32 envelope_flush_threshold_rows = 65 [json_name = "envelopeFlushThresholdRows", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.envelope_flush_threshold_rows_), _Internal::kHasBitsOffset + 63, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.envelope_flush_threshold_rows_), _Internal::kHasBitsOffset + 64, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // string topic = 80 [json_name = "topic", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.topic_), _Internal::kHasBitsOffset + 25, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string kafka_schema_url = 81 [json_name = "kafkaSchemaUrl", (.buf.validate.field) = { @@ -2753,21 +2759,21 @@ constexpr XtcpConfig::ParseTableT_ XtcpConfig::InternalGenerateParseTable_(const // string s3_secret_key = 105 [json_name = "s3SecretKey", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_secret_key_), _Internal::kHasBitsOffset + 33, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // bool s3_skip_bucket_probe = 106 [json_name = "s3SkipBucketProbe", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_skip_bucket_probe_), _Internal::kHasBitsOffset + 20, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_skip_bucket_probe_), _Internal::kHasBitsOffset + 67, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // bool s3_allow_insecure = 107 [json_name = "s3AllowInsecure", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_allow_insecure_), _Internal::kHasBitsOffset + 21, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // string s3_ca_file = 108 [json_name = "s3CaFile", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_ca_file_), _Internal::kHasBitsOffset + 34, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // uint32 s3_parquet_flush_threshold_bytes = 110 [json_name = "s3ParquetFlushThresholdBytes", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_parquet_flush_threshold_bytes_), _Internal::kHasBitsOffset + 64, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_parquet_flush_threshold_bytes_), _Internal::kHasBitsOffset + 69, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // .google.protobuf.Duration s3_flush_interval = 111 [json_name = "s3FlushInterval", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_flush_interval_), _Internal::kHasBitsOffset + 50, 5, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // uint32 s3_flush_jitter_pct = 112 [json_name = "s3FlushJitterPct", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_flush_jitter_pct_), _Internal::kHasBitsOffset + 65, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_flush_jitter_pct_), _Internal::kHasBitsOffset + 70, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // uint32 s3_flush_threshold_jitter_pct = 113 [json_name = "s3FlushThresholdJitterPct", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_flush_threshold_jitter_pct_), _Internal::kHasBitsOffset + 66, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_flush_threshold_jitter_pct_), _Internal::kHasBitsOffset + 71, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // uint32 s3_upload_max_attempts = 114 [json_name = "s3UploadMaxAttempts", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_upload_max_attempts_), _Internal::kHasBitsOffset + 67, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_upload_max_attempts_), _Internal::kHasBitsOffset + 72, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // .google.protobuf.Duration s3_upload_backoff_cap = 115 [json_name = "s3UploadBackoffCap", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_upload_backoff_cap_), _Internal::kHasBitsOffset + 51, 6, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // string hostname = 130 [json_name = "hostname", (.buf.validate.field) = { @@ -2781,9 +2787,9 @@ constexpr XtcpConfig::ParseTableT_ XtcpConfig::InternalGenerateParseTable_(const // string daemon_version = 134 [json_name = "daemonVersion", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.daemon_version_), _Internal::kHasBitsOffset + 39, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // uint32 ipv4_ttl = 150 [json_name = "ipv4Ttl", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.ipv4_ttl_), _Internal::kHasBitsOffset + 68, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.ipv4_ttl_), _Internal::kHasBitsOffset + 73, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // uint32 ipv6_hop_limit = 151 [json_name = "ipv6HopLimit", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.ipv6_hop_limit_), _Internal::kHasBitsOffset + 69, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.ipv6_hop_limit_), _Internal::kHasBitsOffset + 74, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // .xtcp_config.v1.ListenerAuth listener_auth = 152 [json_name = "listenerAuth", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.listener_auth_), _Internal::kHasBitsOffset + 52, 7, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // .xtcp_config.v1.ListenerEndpoint prometheus_listener = 153 [json_name = "prometheusListener", (.buf.validate.field) = { @@ -2791,7 +2797,7 @@ constexpr XtcpConfig::ParseTableT_ XtcpConfig::InternalGenerateParseTable_(const // .xtcp_config.v1.ListenerAuth admin_listener_auth = 154 [json_name = "adminListenerAuth", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.admin_listener_auth_), _Internal::kHasBitsOffset + 54, 9, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // uint32 grpc_port = 160 [json_name = "grpcPort", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.grpc_port_), _Internal::kHasBitsOffset + 70, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.grpc_port_), _Internal::kHasBitsOffset + 75, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // .xtcp_config.v1.ListenerEndpoint grpc_listener = 161 [json_name = "grpcListener", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.grpc_listener_), _Internal::kHasBitsOffset + 55, 10, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // repeated .xtcp_config.v1.Listener listeners = 162 [json_name = "listeners", (.buf.validate.field) = { @@ -2801,31 +2807,31 @@ constexpr XtcpConfig::ParseTableT_ XtcpConfig::InternalGenerateParseTable_(const // string pyroscope_app_name = 171 [json_name = "pyroscopeAppName", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.pyroscope_app_name_), _Internal::kHasBitsOffset + 41, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // uint32 pyroscope_sample_hz = 172 [json_name = "pyroscopeSampleHz", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.pyroscope_sample_hz_), _Internal::kHasBitsOffset + 75, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.pyroscope_sample_hz_), _Internal::kHasBitsOffset + 76, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // uint32 pyroscope_upload_interval_sec = 173 [json_name = "pyroscopeUploadIntervalSec", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.pyroscope_upload_interval_sec_), _Internal::kHasBitsOffset + 76, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.pyroscope_upload_interval_sec_), _Internal::kHasBitsOffset + 77, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // bool resolve_container_id = 200 [json_name = "resolveContainerId", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.resolve_container_id_), _Internal::kHasBitsOffset + 72, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.resolve_container_id_), _Internal::kHasBitsOffset + 68, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // bool enrich_container_enable = 201 [json_name = "enrichContainerEnable"]; - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enrich_container_enable_), _Internal::kHasBitsOffset + 73, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enrich_container_enable_), _Internal::kHasBitsOffset + 78, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // string docker_socket_path = 202 [json_name = "dockerSocketPath", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.docker_socket_path_), _Internal::kHasBitsOffset + 42, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // bool enrich_lldp_enable = 210 [json_name = "enrichLldpEnable"]; - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enrich_lldp_enable_), _Internal::kHasBitsOffset + 74, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enrich_lldp_enable_), _Internal::kHasBitsOffset + 79, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // string lldpd_socket_path = 211 [json_name = "lldpdSocketPath", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.lldpd_socket_path_), _Internal::kHasBitsOffset + 43, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string lldpd_version_hint = 212 [json_name = "lldpdVersionHint", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.lldpd_version_hint_), _Internal::kHasBitsOffset + 44, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // bool enrich_nic_enable = 220 [json_name = "enrichNicEnable"]; - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enrich_nic_enable_), _Internal::kHasBitsOffset + 78, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enrich_nic_enable_), _Internal::kHasBitsOffset + 80, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // uint32 uplink_count = 221 [json_name = "uplinkCount", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.uplink_count_), _Internal::kHasBitsOffset + 77, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.uplink_count_), _Internal::kHasBitsOffset + 82, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // repeated string uplink_interfaces = 222 [json_name = "uplinkInterfaces", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.uplink_interfaces_), _Internal::kHasBitsOffset + 23, 0, (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)}, // bool populate_nsid = 230 [json_name = "populateNsid"]; - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.populate_nsid_), _Internal::kHasBitsOffset + 79, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.populate_nsid_), _Internal::kHasBitsOffset + 81, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // bool enrich_asn_enable = 240 [json_name = "enrichAsnEnable"]; - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enrich_asn_enable_), _Internal::kHasBitsOffset + 80, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enrich_asn_enable_), _Internal::kHasBitsOffset + 83, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // string asn_db_path = 241 [json_name = "asnDbPath", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.asn_db_path_), _Internal::kHasBitsOffset + 45, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // .google.protobuf.Duration asn_refresh_interval = 242 [json_name = "asnRefreshInterval"]; @@ -2835,11 +2841,11 @@ constexpr XtcpConfig::ParseTableT_ XtcpConfig::InternalGenerateParseTable_(const // string ipmeta_cache_path = 244 [json_name = "ipmetaCachePath", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.ipmeta_cache_path_), _Internal::kHasBitsOffset + 47, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // bool enrich_locality_enable = 245 [json_name = "enrichLocalityEnable"]; - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enrich_locality_enable_), _Internal::kHasBitsOffset + 81, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enrich_locality_enable_), _Internal::kHasBitsOffset + 84, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // .google.protobuf.Duration locality_refresh_interval = 246 [json_name = "localityRefreshInterval"]; {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.locality_refresh_interval_), _Internal::kHasBitsOffset + 57, 13, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // bool locality_events_enable = 247 [json_name = "localityEventsEnable"]; - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.locality_events_enable_), _Internal::kHasBitsOffset + 82, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.locality_events_enable_), _Internal::kHasBitsOffset + 85, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // .xtcp_config.v1.LinkMonitorConfig link_monitor = 250 [json_name = "linkMonitor"]; {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.link_monitor_), _Internal::kHasBitsOffset + 58, 14, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, }}, @@ -2921,7 +2927,7 @@ constexpr XtcpConfig::ParseTableT_ XtcpConfig::InternalGenerateParseTable_(const #endif }}, {{ - "\31\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\14\0\0\0\4\12\13\17\0\0\5\20\0\21\13\11\11\11\15\15\0\0\12\0\0\0\0\0\0\10\10\5\3\16\0\0\0\0\0\0\0\0\15\22\0\0\0\0\22\0\21\22\0\0\21\0\0\13\0\25\21\0\0\0\0\0\0\0\0" + "\31\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\14\0\0\0\4\12\13\17\0\0\5\20\0\21\13\11\11\11\15\15\0\0\12\0\0\0\0\0\0\10\10\5\3\16\0\0\0\0\0\0\0\0\15\22\0\0\0\0\22\0\21\22\0\0\21\0\0\13\0\25\21\0\0\0\0\0" "xtcp_config.v1.XtcpConfig" "capture_path" "dest" @@ -2985,10 +2991,10 @@ inline constexpr XtcpConfig::Impl_::Impl_( modulus_{::uint64_t{0u}}, packet_size_mply_{0u}, io_uring_recv_batch_size_{0u}, + max_dump_bytes_{::uint64_t{0u}}, + max_records_per_netns_{::uint64_t{0u}}, io_uring_cqe_batch_size_{0u}, io_uring_{false}, - reconcile_before_poll_{false}, - s3_skip_bucket_probe_{false}, s3_allow_insecure_{false}, listeners_ { visibility, ::_pbi::InternalMetadataOffset::Build< ::xtcp_config::v1::XtcpConfig, @@ -3083,11 +3089,16 @@ inline constexpr XtcpConfig::Impl_::Impl_( asn_refresh_interval_{nullptr}, locality_refresh_interval_{nullptr}, link_monitor_{nullptr}, + max_netns_{0u}, write_files_{0u}, dest_write_files_{0u}, debug_level_{0u}, envelope_flush_threshold_bytes_{0u}, envelope_flush_threshold_rows_{0u}, + reconcile_before_poll_{false}, + debug_prometheus_{false}, + s3_skip_bucket_probe_{false}, + resolve_container_id_{false}, s3_parquet_flush_threshold_bytes_{0u}, s3_flush_jitter_pct_{0u}, s3_flush_threshold_jitter_pct_{0u}, @@ -3095,15 +3106,13 @@ inline constexpr XtcpConfig::Impl_::Impl_( ipv4_ttl_{0u}, ipv6_hop_limit_{0u}, grpc_port_{0u}, - debug_prometheus_{false}, - resolve_container_id_{false}, - enrich_container_enable_{false}, - enrich_lldp_enable_{false}, pyroscope_sample_hz_{0u}, pyroscope_upload_interval_sec_{0u}, - uplink_count_{0u}, + enrich_container_enable_{false}, + enrich_lldp_enable_{false}, enrich_nic_enable_{false}, populate_nsid_{false}, + uplink_count_{0u}, enrich_asn_enable_{false}, enrich_locality_enable_{false}, locality_events_enable_{false} {} @@ -4263,7 +4272,7 @@ const ::uint32_t 22, 0x081, // bitmap PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_._has_bits_), - 86, // hasbit index offset + 89, // hasbit index offset PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.nl_timeout_milliseconds_), PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.poll_frequency_), PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.poll_timeout_), @@ -4279,8 +4288,11 @@ const ::uint32_t PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.io_uring_), PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.io_uring_recv_batch_size_), PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.io_uring_cqe_batch_size_), + PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.max_dump_bytes_), + PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.max_records_per_netns_), PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.reconcile_frequency_), PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.reconcile_before_poll_), + PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.max_netns_), PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.write_files_), PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.capture_path_), PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.dest_write_files_), @@ -4359,22 +4371,25 @@ const ::uint32_t 15, 14, 6, - 18, + 20, 16, + 19, 17, + 18, 48, - 19, + 65, 59, - 24, 60, + 24, 61, - 71, + 62, + 66, 0, 1, 2, 3, - 62, 63, + 64, 25, 26, 49, @@ -4385,50 +4400,50 @@ const ::uint32_t 31, 32, 33, - 20, + 67, 21, 34, - 64, + 69, 50, - 65, - 66, - 67, + 70, + 71, + 72, 51, 35, 36, 37, 38, 39, - 68, - 69, + 73, + 74, 52, 53, 54, - 70, + 75, 55, 22, 40, 41, - 75, 76, - 72, - 73, + 77, + 68, + 78, 42, - 74, + 79, 43, 44, - 78, - 77, - 23, - 79, 80, + 82, + 23, + 81, + 83, 45, 56, 46, 47, - 81, + 84, 57, - 82, + 85, 58, 0x081, // bitmap PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::EnabledDeserializers_EnabledEntry_DoNotUse, _impl_._has_bits_), @@ -4465,8 +4480,8 @@ static const ::_pbi::MigrationSchema {104, sizeof(::xtcp_config::v1::Listener)}, {117, sizeof(::xtcp_config::v1::LinkMonitorConfig)}, {176, sizeof(::xtcp_config::v1::XtcpConfig)}, - {345, sizeof(::xtcp_config::v1::EnabledDeserializers_EnabledEntry_DoNotUse)}, - {352, sizeof(::xtcp_config::v1::EnabledDeserializers)}, + {351, sizeof(::xtcp_config::v1::EnabledDeserializers_EnabledEntry_DoNotUse)}, + {358, sizeof(::xtcp_config::v1::EnabledDeserializers)}, }; static const ::_pbi::MessageGlobalsBase* PROTOBUF_NONNULL const file_message_globals[] = { @@ -4625,7 +4640,7 @@ const char descriptor_table_protodef_xtcp_5fconfig_2fv1_2fxtcp_5fconfig_2eproto[ "2\031.google.protobuf.DurationB\016\272H\013\252\001\010\"\004\010\200\243" "\0052\000R\rlearnDeadlineB\020\n\016_error_classesB\025\n\023" "_metrics_categoriesB\032\n\030_metrics_interfac" - "e_pathsB\023\n\021_metrics_all_path\"\250&\n\nXtcpCon" + "e_pathsB\023\n\021_metrics_all_path\"\266\'\n\nXtcpCon" "fig\022F\n\027nl_timeout_milliseconds\030\n \001(\004B\016\272H" "\0132\006\030\240\215\006(\000\310\001\001R\025nlTimeoutMilliseconds\022S\n\016p" "oll_frequency\030\013 \001(\0132\031.google.protobuf.Du" @@ -4649,151 +4664,155 @@ const char descriptor_table_protodef_xtcp_5fconfig_2fv1_2fxtcp_5fconfig_2eproto[ "_batch_size\030\027 \001(\rB\r\272H\n*\005\030\200 (\001\310\001\000R\024ioUrin" "gRecvBatchSize\022C\n\027io_uring_cqe_batch_siz" "e\030\030 \001(\rB\r\272H\n*\005\030\200 (\001\310\001\000R\023ioUringCqeBatchS" - "ize\022W\n\023reconcile_frequency\030( \001(\0132\031.googl" - "e.protobuf.DurationB\013\272H\010\252\001\0022\000\310\001\000R\022reconc" - "ileFrequency\0222\n\025reconcile_before_poll\030) " - "\001(\010R\023reconcileBeforePoll\022.\n\013write_files\030" - "2 \001(\rB\r\272H\n*\005\030\350\007(\000\310\001\000R\nwriteFiles\022/\n\014capt" - "ure_path\0303 \001(\tB\014\272H\tr\004\020\001\030P\310\001\000R\013capturePat" - "h\0227\n\020dest_write_files\0304 \001(\rB\r\272H\n*\005\030\350\007(\000\310" - "\001\000R\016destWriteFiles\022.\n\013debug_level\0305 \001(\rB" - "\r\272H\n*\005\030\350\007(\000\310\001\001R\ndebugLevel\0221\n\020debug_prom" - "etheus\0306 \001(\010B\006\272H\003\310\001\000R\017debugPrometheus\022!\n" - "\004dest\030< \001(\tB\r\272H\nr\005\020\004\030\200\004\310\001\001R\004dest\022+\n\nmars" - "hal_to\030= \001(\tB\014\272H\tr\004\020\003\030(\310\001\001R\tmarshalTo\022\'\n" - "\013csv_columns\030> \001(\tB\006\272H\003\310\001\000R\ncsvColumns\0224" - "\n\017xtcp_proto_file\030\? \001(\tB\014\272H\tr\004\020\001\030P\310\001\000R\rx" - "tcpProtoFile\022K\n\036envelope_flush_threshold" - "_bytes\030@ \001(\rB\006\272H\003\310\001\000R\033envelopeFlushThres" - "holdBytes\022I\n\035envelope_flush_threshold_ro" - "ws\030A \001(\rB\006\272H\003\310\001\000R\032envelopeFlushThreshold" - "Rows\022\"\n\005topic\030P \001(\tB\014\272H\tr\004\020\001\030(\310\001\000R\005topic" - "\0226\n\020kafka_schema_url\030Q \001(\tB\014\272H\tr\004\020\001\030<\310\001\000" - "R\016kafkaSchemaUrl\022_\n\025kafka_produce_timeou" - "t\030R \001(\0132\031.google.protobuf.DurationB\020\272H\r\252" - "\001\007\"\003\010\330\0042\000\310\001\000R\023kafkaProduceTimeout\0223\n\021kaf" - "ka_compression\030S \001(\tB\006\272H\003\310\001\000R\020kafkaCompr" - "ession\022\'\n\013s3_endpoint\030d \001(\tB\006\272H\003\310\001\000R\ns3E" - "ndpoint\022#\n\ts3_region\030e \001(\tB\006\272H\003\310\001\000R\010s3Re" - "gion\022#\n\ts3_bucket\030f \001(\tB\006\272H\003\310\001\000R\010s3Bucke" - "t\022#\n\ts3_prefix\030g \001(\tB\006\272H\003\310\001\000R\010s3Prefix\022*" - "\n\rs3_access_key\030h \001(\tB\006\272H\003\310\001\000R\013s3AccessK" - "ey\022*\n\rs3_secret_key\030i \001(\tB\006\272H\003\310\001\000R\013s3Sec" - "retKey\0227\n\024s3_skip_bucket_probe\030j \001(\010B\006\272H" - "\003\310\001\000R\021s3SkipBucketProbe\0222\n\021s3_allow_inse" - "cure\030k \001(\010B\006\272H\003\310\001\000R\017s3AllowInsecure\022)\n\ns" - "3_ca_file\030l \001(\tB\013\272H\010r\003\030\200 \310\001\000R\010s3CaFile\022N" - "\n s3_parquet_flush_threshold_bytes\030n \001(\r" - "B\006\272H\003\310\001\000R\034s3ParquetFlushThresholdBytes\022R" - "\n\021s3_flush_interval\030o \001(\0132\031.google.proto" - "buf.DurationB\013\272H\010\252\001\0022\000\310\001\000R\017s3FlushInterv" - "al\0229\n\023s3_flush_jitter_pct\030p \001(\rB\n\272H\007*\002\030d" - "\310\001\000R\020s3FlushJitterPct\022L\n\035s3_flush_thresh" - "old_jitter_pct\030q \001(\rB\n\272H\007*\002\030d\310\001\000R\031s3Flus" - "hThresholdJitterPct\022A\n\026s3_upload_max_att" - "empts\030r \001(\rB\014\272H\t*\004\030d(\001\310\001\000R\023s3UploadMaxAt" - "tempts\022Y\n\025s3_upload_backoff_cap\030s \001(\0132\031." - "google.protobuf.DurationB\013\272H\010\252\001\0022\000\310\001\000R\022s" - "3UploadBackoffCap\022(\n\010hostname\030\202\001 \001(\tB\013\272H" - "\010r\003\030\375\001\310\001\000R\010hostname\022(\n\010location\030\203\001 \001(\tB\013" - "\272H\010r\003\030\375\001\310\001\000R\010location\022!\n\005label\030\204\001 \001(\tB\n\272" - "H\007r\002\030(\310\001\000R\005label\022\035\n\003tag\030\205\001 \001(\tB\n\272H\007r\002\030(\310" - "\001\000R\003tag\0223\n\016daemon_version\030\206\001 \001(\tB\013\272H\010r\003\030" - "\375\001\310\001\000R\rdaemonVersion\022\'\n\010ipv4_ttl\030\226\001 \001(\rB" - "\013\272H\010*\003\030\377\001\310\001\000R\007ipv4Ttl\0222\n\016ipv6_hop_limit\030" - "\227\001 \001(\rB\013\272H\010*\003\030\377\001\310\001\000R\014ipv6HopLimit\022J\n\rlis" - "tener_auth\030\230\001 \001(\0132\034.xtcp_config.v1.Liste" - "nerAuthB\006\272H\003\310\001\000R\014listenerAuth\022Z\n\023prometh" - "eus_listener\030\231\001 \001(\0132 .xtcp_config.v1.Lis" - "tenerEndpointB\006\272H\003\310\001\000R\022prometheusListene" - "r\022U\n\023admin_listener_auth\030\232\001 \001(\0132\034.xtcp_c" - "onfig.v1.ListenerAuthB\006\272H\003\310\001\000R\021adminList" - "enerAuth\022\'\n\tgrpc_port\030\240\001 \001(\rB\t\272H\006*\004\030\377\377\003R" - "\010grpcPort\022N\n\rgrpc_listener\030\241\001 \001(\0132 .xtcp" - "_config.v1.ListenerEndpointB\006\272H\003\310\001\000R\014grp" - "cListener\022A\n\tlisteners\030\242\001 \003(\0132\030.xtcp_con" - "fig.v1.ListenerB\010\272H\005\222\001\002\020\020R\tlisteners\022,\n\r" - "pyroscope_url\030\252\001 \001(\tB\006\272H\003\310\001\000R\014pyroscopeU" - "rl\0225\n\022pyroscope_app_name\030\253\001 \001(\tB\006\272H\003\310\001\000R" - "\020pyroscopeAppName\0227\n\023pyroscope_sample_hz" - "\030\254\001 \001(\rB\006\272H\003\310\001\000R\021pyroscopeSampleHz\022J\n\035py" - "roscope_upload_interval_sec\030\255\001 \001(\rB\006\272H\003\310" - "\001\000R\032pyroscopeUploadIntervalSec\0229\n\024resolv" - "e_container_id\030\310\001 \001(\010B\006\272H\003\310\001\000R\022resolveCo" - "ntainerId\0227\n\027enrich_container_enable\030\311\001 " - "\001(\010R\025enrichContainerEnable\0227\n\022docker_soc" - "ket_path\030\312\001 \001(\tB\010\272H\005r\003\030\377\001R\020dockerSocketP" - "ath\022-\n\022enrich_lldp_enable\030\322\001 \001(\010R\020enrich" - "LldpEnable\0225\n\021lldpd_socket_path\030\323\001 \001(\tB\010" - "\272H\005r\003\030\377\001R\017lldpdSocketPath\0226\n\022lldpd_versi" - "on_hint\030\324\001 \001(\tB\007\272H\004r\002\030\020R\020lldpdVersionHin" - "t\022+\n\021enrich_nic_enable\030\334\001 \001(\010R\017enrichNic" - "Enable\022+\n\014uplink_count\030\335\001 \001(\rB\007\272H\004*\002\030\002R\013" - "uplinkCount\0226\n\021uplink_interfaces\030\336\001 \003(\tB" - "\010\272H\005\222\001\002\020\002R\020uplinkInterfaces\022$\n\rpopulate_" - "nsid\030\346\001 \001(\010R\014populateNsid\022+\n\021enrich_asn_" - "enable\030\360\001 \001(\010R\017enrichAsnEnable\022)\n\013asn_db" - "_path\030\361\001 \001(\tB\010\272H\005r\003\030\377\001R\tasnDbPath\022L\n\024asn" - "_refresh_interval\030\362\001 \001(\0132\031.google.protob" - "uf.DurationR\022asnRefreshInterval\022=\n\025ipmet" - "a_bootstrap_path\030\363\001 \001(\tB\010\272H\005r\003\030\377\001R\023ipmet" - "aBootstrapPath\0225\n\021ipmeta_cache_path\030\364\001 \001" - "(\tB\010\272H\005r\003\030\377\001R\017ipmetaCachePath\0225\n\026enrich_" - "locality_enable\030\365\001 \001(\010R\024enrichLocalityEn" - "able\022V\n\031locality_refresh_interval\030\366\001 \001(\013" - "2\031.google.protobuf.DurationR\027localityRef" - "reshInterval\0225\n\026locality_events_enable\030\367" - "\001 \001(\010R\024localityEventsEnable\022E\n\014link_moni" - "tor\030\372\001 \001(\0132!.xtcp_config.v1.LinkMonitorC" - "onfigR\013linkMonitor:s\272Hp\032n\n\017XtcpConfig.po" - "ll\0222Poll timeout must be less than poll " - "poll_frequency\032\'this.poll_frequency > th" - "is.poll_timeout\"\237\001\n\024EnabledDeserializers" - "\022K\n\007enabled\030\001 \003(\01321.xtcp_config.v1.Enabl" - "edDeserializers.EnabledEntryR\007enabled\032:\n" - "\014EnabledEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value" - "\030\002 \001(\010R\005value:\0028\001*h\n\017ListenerNetwork\022 \n\034" - "LISTENER_NETWORK_UNSPECIFIED\020\000\022\030\n\024LISTEN" - "ER_NETWORK_TCP\020\001\022\031\n\025LISTENER_NETWORK_UNI" - "X\020\002*\241\001\n\020ListenerAuthMode\022\"\n\036LISTENER_AUT" - "H_MODE_UNSPECIFIED\020\000\022\037\n\033LISTENER_AUTH_MO" - "DE_DISABLED\020\001\022 \n\034LISTENER_AUTH_MODE_RAW_" - "TOKEN\020\002\022&\n\"LISTENER_AUTH_MODE_HMAC_UTC_M" - "INUTE\020\003*\367\001\n\rEndpointClass\022\036\n\032ENDPOINT_CL" - "ASS_UNSPECIFIED\020\000\022\031\n\025ENDPOINT_CLASS_HEAL" - "TH\020\001\022\032\n\026ENDPOINT_CLASS_METRICS\020\002\022!\n\035ENDP" - "OINT_CLASS_METRICS_DETAIL\020\003\022\025\n\021ENDPOINT_" - "CLASS_IP\020\004\022\030\n\024ENDPOINT_CLASS_DEBUG\020\005\022\034\n\030" - "ENDPOINT_CLASS_GRPC_READ\020\006\022\035\n\031ENDPOINT_C" - "LASS_GRPC_ADMIN\020\0072\245\007\n\rConfigService\022a\n\003G" - "et\022\032.xtcp_config.v1.GetRequest\032\033.xtcp_co" - "nfig.v1.GetResponse\"!\310\363\030\001\202\323\344\223\002\027\032\022/Config" - "Service/Get:\001*\022a\n\003Set\022\032.xtcp_config.v1.S" - "etRequest\032\033.xtcp_config.v1.SetResponse\"!" - "\310\363\030\002\202\323\344\223\002\027\032\022/ConfigService/Set:\001*\022\225\001\n\020Se" - "tPollFrequency\022\'.xtcp_config.v1.SetPollF" - "requencyRequest\032(.xtcp_config.v1.SetPoll" - "FrequencyResponse\".\310\363\030\002\202\323\344\223\002$\032\037/ConfigSe" - "rvice/SetPollFrequency:\001*\022\201\001\n\013TriggerPol" - "l\022\".xtcp_config.v1.TriggerPollRequest\032#." - "xtcp_config.v1.TriggerPollResponse\")\310\363\030\002" - "\202\323\344\223\002\037\032\032/ConfigService/TriggerPoll:\001*\022\225\001" - "\n\020TriggerPollBurst\022\'.xtcp_config.v1.Trig" - "gerPollBurstRequest\032(.xtcp_config.v1.Tri" - "ggerPollBurstResponse\".\310\363\030\002\202\323\344\223\002$\032\037/Conf" - "igService/TriggerPollBurst:\001*\022\201\001\n\013SetS3U" - "pload\022\".xtcp_config.v1.SetS3UploadReques" - "t\032#.xtcp_config.v1.SetS3UploadResponse\")" - "\310\363\030\002\202\323\344\223\002\037\032\032/ConfigService/SetS3Upload:\001" - "*\022\225\001\n\020SetEnvelopeFlush\022\'.xtcp_config.v1." - "SetEnvelopeFlushRequest\032(.xtcp_config.v1" - ".SetEnvelopeFlushResponse\".\310\363\030\002\202\323\344\223\002$\032\037/" - "ConfigService/SetEnvelopeFlush:\001*B\257\001\n\022co" - "m.xtcp_config.v1B\017XtcpConfigProtoP\001Z3git" - "hub.com/randomizedcoder/xtcp2/gen/go/xtc" - "p_config\242\002\003XXX\252\002\rXtcpConfig.V1\312\002\rXtcpCon" - "fig\\V1\342\002\031XtcpConfig\\V1\\GPBMetadata\352\002\016Xtc" - "pConfig::V1b\006proto3" + "ize\022,\n\016max_dump_bytes\030\031 \001(\004B\006\272H\003\310\001\000R\014max" + "DumpBytes\0229\n\025max_records_per_netns\030\032 \001(\004" + "B\006\272H\003\310\001\000R\022maxRecordsPerNetns\022W\n\023reconcil" + "e_frequency\030( \001(\0132\031.google.protobuf.Dura" + "tionB\013\272H\010\252\001\0022\000\310\001\000R\022reconcileFrequency\0222\n" + "\025reconcile_before_poll\030) \001(\010R\023reconcileB" + "eforePoll\022#\n\tmax_netns\030* \001(\rB\006\272H\003\310\001\000R\010ma" + "xNetns\022.\n\013write_files\0302 \001(\rB\r\272H\n*\005\030\350\007(\000\310" + "\001\000R\nwriteFiles\022/\n\014capture_path\0303 \001(\tB\014\272H" + "\tr\004\020\001\030P\310\001\000R\013capturePath\0227\n\020dest_write_fi" + "les\0304 \001(\rB\r\272H\n*\005\030\350\007(\000\310\001\000R\016destWriteFiles" + "\022.\n\013debug_level\0305 \001(\rB\r\272H\n*\005\030\350\007(\000\310\001\001R\nde" + "bugLevel\0221\n\020debug_prometheus\0306 \001(\010B\006\272H\003\310" + "\001\000R\017debugPrometheus\022!\n\004dest\030< \001(\tB\r\272H\nr\005" + "\020\004\030\200\004\310\001\001R\004dest\022+\n\nmarshal_to\030= \001(\tB\014\272H\tr" + "\004\020\003\030(\310\001\001R\tmarshalTo\022\'\n\013csv_columns\030> \001(\t" + "B\006\272H\003\310\001\000R\ncsvColumns\0224\n\017xtcp_proto_file\030" + "\? \001(\tB\014\272H\tr\004\020\001\030P\310\001\000R\rxtcpProtoFile\022K\n\036en" + "velope_flush_threshold_bytes\030@ \001(\rB\006\272H\003\310" + "\001\000R\033envelopeFlushThresholdBytes\022I\n\035envel" + "ope_flush_threshold_rows\030A \001(\rB\006\272H\003\310\001\000R\032" + "envelopeFlushThresholdRows\022\"\n\005topic\030P \001(" + "\tB\014\272H\tr\004\020\001\030(\310\001\000R\005topic\0226\n\020kafka_schema_u" + "rl\030Q \001(\tB\014\272H\tr\004\020\001\030<\310\001\000R\016kafkaSchemaUrl\022_" + "\n\025kafka_produce_timeout\030R \001(\0132\031.google.p" + "rotobuf.DurationB\020\272H\r\252\001\007\"\003\010\330\0042\000\310\001\000R\023kafk" + "aProduceTimeout\0223\n\021kafka_compression\030S \001" + "(\tB\006\272H\003\310\001\000R\020kafkaCompression\022\'\n\013s3_endpo" + "int\030d \001(\tB\006\272H\003\310\001\000R\ns3Endpoint\022#\n\ts3_regi" + "on\030e \001(\tB\006\272H\003\310\001\000R\010s3Region\022#\n\ts3_bucket\030" + "f \001(\tB\006\272H\003\310\001\000R\010s3Bucket\022#\n\ts3_prefix\030g \001" + "(\tB\006\272H\003\310\001\000R\010s3Prefix\022*\n\rs3_access_key\030h " + "\001(\tB\006\272H\003\310\001\000R\013s3AccessKey\022*\n\rs3_secret_ke" + "y\030i \001(\tB\006\272H\003\310\001\000R\013s3SecretKey\0227\n\024s3_skip_" + "bucket_probe\030j \001(\010B\006\272H\003\310\001\000R\021s3SkipBucket" + "Probe\0222\n\021s3_allow_insecure\030k \001(\010B\006\272H\003\310\001\000" + "R\017s3AllowInsecure\022)\n\ns3_ca_file\030l \001(\tB\013\272" + "H\010r\003\030\200 \310\001\000R\010s3CaFile\022N\n s3_parquet_flush" + "_threshold_bytes\030n \001(\rB\006\272H\003\310\001\000R\034s3Parque" + "tFlushThresholdBytes\022R\n\021s3_flush_interva" + "l\030o \001(\0132\031.google.protobuf.DurationB\013\272H\010\252" + "\001\0022\000\310\001\000R\017s3FlushInterval\0229\n\023s3_flush_jit" + "ter_pct\030p \001(\rB\n\272H\007*\002\030d\310\001\000R\020s3FlushJitter" + "Pct\022L\n\035s3_flush_threshold_jitter_pct\030q \001" + "(\rB\n\272H\007*\002\030d\310\001\000R\031s3FlushThresholdJitterPc" + "t\022A\n\026s3_upload_max_attempts\030r \001(\rB\014\272H\t*\004" + "\030d(\001\310\001\000R\023s3UploadMaxAttempts\022Y\n\025s3_uploa" + "d_backoff_cap\030s \001(\0132\031.google.protobuf.Du" + "rationB\013\272H\010\252\001\0022\000\310\001\000R\022s3UploadBackoffCap\022" + "(\n\010hostname\030\202\001 \001(\tB\013\272H\010r\003\030\375\001\310\001\000R\010hostnam" + "e\022(\n\010location\030\203\001 \001(\tB\013\272H\010r\003\030\375\001\310\001\000R\010locat" + "ion\022!\n\005label\030\204\001 \001(\tB\n\272H\007r\002\030(\310\001\000R\005label\022\035" + "\n\003tag\030\205\001 \001(\tB\n\272H\007r\002\030(\310\001\000R\003tag\0223\n\016daemon_" + "version\030\206\001 \001(\tB\013\272H\010r\003\030\375\001\310\001\000R\rdaemonVersi" + "on\022\'\n\010ipv4_ttl\030\226\001 \001(\rB\013\272H\010*\003\030\377\001\310\001\000R\007ipv4" + "Ttl\0222\n\016ipv6_hop_limit\030\227\001 \001(\rB\013\272H\010*\003\030\377\001\310\001" + "\000R\014ipv6HopLimit\022J\n\rlistener_auth\030\230\001 \001(\0132" + "\034.xtcp_config.v1.ListenerAuthB\006\272H\003\310\001\000R\014l" + "istenerAuth\022Z\n\023prometheus_listener\030\231\001 \001(" + "\0132 .xtcp_config.v1.ListenerEndpointB\006\272H\003" + "\310\001\000R\022prometheusListener\022U\n\023admin_listene" + "r_auth\030\232\001 \001(\0132\034.xtcp_config.v1.ListenerA" + "uthB\006\272H\003\310\001\000R\021adminListenerAuth\022\'\n\tgrpc_p" + "ort\030\240\001 \001(\rB\t\272H\006*\004\030\377\377\003R\010grpcPort\022N\n\rgrpc_" + "listener\030\241\001 \001(\0132 .xtcp_config.v1.Listene" + "rEndpointB\006\272H\003\310\001\000R\014grpcListener\022A\n\tliste" + "ners\030\242\001 \003(\0132\030.xtcp_config.v1.ListenerB\010\272" + "H\005\222\001\002\020\020R\tlisteners\022,\n\rpyroscope_url\030\252\001 \001" + "(\tB\006\272H\003\310\001\000R\014pyroscopeUrl\0225\n\022pyroscope_ap" + "p_name\030\253\001 \001(\tB\006\272H\003\310\001\000R\020pyroscopeAppName\022" + "7\n\023pyroscope_sample_hz\030\254\001 \001(\rB\006\272H\003\310\001\000R\021p" + "yroscopeSampleHz\022J\n\035pyroscope_upload_int" + "erval_sec\030\255\001 \001(\rB\006\272H\003\310\001\000R\032pyroscopeUploa" + "dIntervalSec\0229\n\024resolve_container_id\030\310\001 " + "\001(\010B\006\272H\003\310\001\000R\022resolveContainerId\0227\n\027enric" + "h_container_enable\030\311\001 \001(\010R\025enrichContain" + "erEnable\0227\n\022docker_socket_path\030\312\001 \001(\tB\010\272" + "H\005r\003\030\377\001R\020dockerSocketPath\022-\n\022enrich_lldp" + "_enable\030\322\001 \001(\010R\020enrichLldpEnable\0225\n\021lldp" + "d_socket_path\030\323\001 \001(\tB\010\272H\005r\003\030\377\001R\017lldpdSoc" + "ketPath\0226\n\022lldpd_version_hint\030\324\001 \001(\tB\007\272H" + "\004r\002\030\020R\020lldpdVersionHint\022+\n\021enrich_nic_en" + "able\030\334\001 \001(\010R\017enrichNicEnable\022+\n\014uplink_c" + "ount\030\335\001 \001(\rB\007\272H\004*\002\030\002R\013uplinkCount\0226\n\021upl" + "ink_interfaces\030\336\001 \003(\tB\010\272H\005\222\001\002\020\002R\020uplinkI" + "nterfaces\022$\n\rpopulate_nsid\030\346\001 \001(\010R\014popul" + "ateNsid\022+\n\021enrich_asn_enable\030\360\001 \001(\010R\017enr" + "ichAsnEnable\022)\n\013asn_db_path\030\361\001 \001(\tB\010\272H\005r" + "\003\030\377\001R\tasnDbPath\022L\n\024asn_refresh_interval\030" + "\362\001 \001(\0132\031.google.protobuf.DurationR\022asnRe" + "freshInterval\022=\n\025ipmeta_bootstrap_path\030\363" + "\001 \001(\tB\010\272H\005r\003\030\377\001R\023ipmetaBootstrapPath\0225\n\021" + "ipmeta_cache_path\030\364\001 \001(\tB\010\272H\005r\003\030\377\001R\017ipme" + "taCachePath\0225\n\026enrich_locality_enable\030\365\001" + " \001(\010R\024enrichLocalityEnable\022V\n\031locality_r" + "efresh_interval\030\366\001 \001(\0132\031.google.protobuf" + ".DurationR\027localityRefreshInterval\0225\n\026lo" + "cality_events_enable\030\367\001 \001(\010R\024localityEve" + "ntsEnable\022E\n\014link_monitor\030\372\001 \001(\0132!.xtcp_" + "config.v1.LinkMonitorConfigR\013linkMonitor" + ":s\272Hp\032n\n\017XtcpConfig.poll\0222Poll timeout m" + "ust be less than poll poll_frequency\032\'th" + "is.poll_frequency > this.poll_timeout\"\237\001" + "\n\024EnabledDeserializers\022K\n\007enabled\030\001 \003(\0132" + "1.xtcp_config.v1.EnabledDeserializers.En" + "abledEntryR\007enabled\032:\n\014EnabledEntry\022\020\n\003k" + "ey\030\001 \001(\tR\003key\022\024\n\005value\030\002 \001(\010R\005value:\0028\001*" + "h\n\017ListenerNetwork\022 \n\034LISTENER_NETWORK_U" + "NSPECIFIED\020\000\022\030\n\024LISTENER_NETWORK_TCP\020\001\022\031" + "\n\025LISTENER_NETWORK_UNIX\020\002*\241\001\n\020ListenerAu" + "thMode\022\"\n\036LISTENER_AUTH_MODE_UNSPECIFIED" + "\020\000\022\037\n\033LISTENER_AUTH_MODE_DISABLED\020\001\022 \n\034L" + "ISTENER_AUTH_MODE_RAW_TOKEN\020\002\022&\n\"LISTENE" + "R_AUTH_MODE_HMAC_UTC_MINUTE\020\003*\367\001\n\rEndpoi" + "ntClass\022\036\n\032ENDPOINT_CLASS_UNSPECIFIED\020\000\022" + "\031\n\025ENDPOINT_CLASS_HEALTH\020\001\022\032\n\026ENDPOINT_C" + "LASS_METRICS\020\002\022!\n\035ENDPOINT_CLASS_METRICS" + "_DETAIL\020\003\022\025\n\021ENDPOINT_CLASS_IP\020\004\022\030\n\024ENDP" + "OINT_CLASS_DEBUG\020\005\022\034\n\030ENDPOINT_CLASS_GRP" + "C_READ\020\006\022\035\n\031ENDPOINT_CLASS_GRPC_ADMIN\020\0072" + "\245\007\n\rConfigService\022a\n\003Get\022\032.xtcp_config.v" + "1.GetRequest\032\033.xtcp_config.v1.GetRespons" + "e\"!\310\363\030\001\202\323\344\223\002\027\032\022/ConfigService/Get:\001*\022a\n\003" + "Set\022\032.xtcp_config.v1.SetRequest\032\033.xtcp_c" + "onfig.v1.SetResponse\"!\310\363\030\002\202\323\344\223\002\027\032\022/Confi" + "gService/Set:\001*\022\225\001\n\020SetPollFrequency\022\'.x" + "tcp_config.v1.SetPollFrequencyRequest\032(." + "xtcp_config.v1.SetPollFrequencyResponse\"" + ".\310\363\030\002\202\323\344\223\002$\032\037/ConfigService/SetPollFrequ" + "ency:\001*\022\201\001\n\013TriggerPoll\022\".xtcp_config.v1" + ".TriggerPollRequest\032#.xtcp_config.v1.Tri" + "ggerPollResponse\")\310\363\030\002\202\323\344\223\002\037\032\032/ConfigSer" + "vice/TriggerPoll:\001*\022\225\001\n\020TriggerPollBurst" + "\022\'.xtcp_config.v1.TriggerPollBurstReques" + "t\032(.xtcp_config.v1.TriggerPollBurstRespo" + "nse\".\310\363\030\002\202\323\344\223\002$\032\037/ConfigService/TriggerP" + "ollBurst:\001*\022\201\001\n\013SetS3Upload\022\".xtcp_confi" + "g.v1.SetS3UploadRequest\032#.xtcp_config.v1" + ".SetS3UploadResponse\")\310\363\030\002\202\323\344\223\002\037\032\032/Confi" + "gService/SetS3Upload:\001*\022\225\001\n\020SetEnvelopeF" + "lush\022\'.xtcp_config.v1.SetEnvelopeFlushRe" + "quest\032(.xtcp_config.v1.SetEnvelopeFlushR" + "esponse\".\310\363\030\002\202\323\344\223\002$\032\037/ConfigService/SetE" + "nvelopeFlush:\001*B\257\001\n\022com.xtcp_config.v1B\017" + "XtcpConfigProtoP\001Z3github.com/randomized" + "coder/xtcp2/gen/go/xtcp_config\242\002\003XXX\252\002\rX" + "tcpConfig.V1\312\002\rXtcpConfig\\V1\342\002\031XtcpConfi" + "g\\V1\\GPBMetadata\352\002\016XtcpConfig::V1b\006proto" + "3" }; static const ::_pbi::DescriptorTable* PROTOBUF_NONNULL const descriptor_table_xtcp_5fconfig_2fv1_2fxtcp_5fconfig_2eproto_deps[4] = { @@ -4806,7 +4825,7 @@ static ::absl::once_flag descriptor_table_xtcp_5fconfig_2fv1_2fxtcp_5fconfig_2ep PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_xtcp_5fconfig_2fv1_2fxtcp_5fconfig_2eproto = { false, false, - 11979, + 12121, descriptor_table_protodef_xtcp_5fconfig_2fv1_2fxtcp_5fconfig_2eproto, "xtcp_config/v1/xtcp_config.proto", &descriptor_table_xtcp_5fconfig_2fv1_2fxtcp_5fconfig_2eproto_once, @@ -9876,11 +9895,11 @@ XtcpConfig::XtcpConfig( ? Super_::CopyConstruct(arena, *from._impl_.link_monitor_) : nullptr; ::memcpy(reinterpret_cast(&_impl_) + - offsetof(Impl_, write_files_), + offsetof(Impl_, max_netns_), reinterpret_cast(&from._impl_) + - offsetof(Impl_, write_files_), + offsetof(Impl_, max_netns_), offsetof(Impl_, locality_events_enable_) - - offsetof(Impl_, write_files_) + + offsetof(Impl_, max_netns_) + sizeof(Impl_::locality_events_enable_)); // @@protoc_insertion_point(copy_constructor:xtcp_config.v1.XtcpConfig) @@ -10206,32 +10225,32 @@ PROTOBUF_NOINLINE void XtcpConfig::Clear() { } } if (BatchCheckHasBit(cached_has_bits, 0xf8000000U)) { - ::memset(&this_._impl_.write_files_, 0, + ::memset(&this_._impl_.max_netns_, 0, static_cast<::size_t>( - reinterpret_cast(&this_._impl_.envelope_flush_threshold_rows_) - - reinterpret_cast(&this_._impl_.write_files_)) + - sizeof(_impl_.envelope_flush_threshold_rows_)); + reinterpret_cast(&this_._impl_.envelope_flush_threshold_bytes_) - + reinterpret_cast(&this_._impl_.max_netns_)) + + sizeof(_impl_.envelope_flush_threshold_bytes_)); } cached_has_bits = this_._impl_._has_bits_[2]; if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { - ::memset(&this_._impl_.s3_parquet_flush_threshold_bytes_, 0, + ::memset(&this_._impl_.envelope_flush_threshold_rows_, 0, static_cast<::size_t>( - reinterpret_cast(&this_._impl_.debug_prometheus_) - - reinterpret_cast(&this_._impl_.s3_parquet_flush_threshold_bytes_)) + - sizeof(_impl_.debug_prometheus_)); + reinterpret_cast(&this_._impl_.s3_flush_threshold_jitter_pct_) - + reinterpret_cast(&this_._impl_.envelope_flush_threshold_rows_)) + + sizeof(_impl_.s3_flush_threshold_jitter_pct_)); } if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { - ::memset(&this_._impl_.resolve_container_id_, 0, + ::memset(&this_._impl_.s3_upload_max_attempts_, 0, static_cast<::size_t>( - reinterpret_cast(&this_._impl_.populate_nsid_) - - reinterpret_cast(&this_._impl_.resolve_container_id_)) + - sizeof(_impl_.populate_nsid_)); + reinterpret_cast(&this_._impl_.enrich_lldp_enable_) - + reinterpret_cast(&this_._impl_.s3_upload_max_attempts_)) + + sizeof(_impl_.enrich_lldp_enable_)); } - if (BatchCheckHasBit(cached_has_bits, 0x00070000U)) { - ::memset(&this_._impl_.enrich_asn_enable_, 0, + if (BatchCheckHasBit(cached_has_bits, 0x003f0000U)) { + ::memset(&this_._impl_.enrich_nic_enable_, 0, static_cast<::size_t>( reinterpret_cast(&this_._impl_.locality_events_enable_) - - reinterpret_cast(&this_._impl_.enrich_asn_enable_)) + + reinterpret_cast(&this_._impl_.enrich_nic_enable_)) + sizeof(_impl_.locality_events_enable_)); } _impl_._has_bits_.Clear(); @@ -10360,7 +10379,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // bool io_uring = 22 [json_name = "ioUring", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00040000U)) { + if (CheckHasBit(cached_has_bits, 0x00100000U)) { if (this_._internal_io_uring() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -10378,7 +10397,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // uint32 io_uring_cqe_batch_size = 24 [json_name = "ioUringCqeBatchSize", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00020000U)) { + if (CheckHasBit(cached_has_bits, 0x00080000U)) { if (this_._internal_io_uring_cqe_batch_size() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10386,6 +10405,24 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } } + // uint64 max_dump_bytes = 25 [json_name = "maxDumpBytes", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x00020000U)) { + if (this_._internal_max_dump_bytes() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 25, this_._internal_max_dump_bytes(), target); + } + } + + // uint64 max_records_per_netns = 26 [json_name = "maxRecordsPerNetns", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x00040000U)) { + if (this_._internal_max_records_per_netns() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 26, this_._internal_max_records_per_netns(), target); + } + } + cached_has_bits = this_._impl_._has_bits_[1]; // .google.protobuf.Duration reconcile_frequency = 40 [json_name = "reconcileFrequency", (.buf.validate.field) = { if (CheckHasBit(cached_has_bits, 0x00010000U)) { @@ -10394,9 +10431,9 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( stream); } - cached_has_bits = this_._impl_._has_bits_[0]; + cached_has_bits = this_._impl_._has_bits_[2]; // bool reconcile_before_poll = 41 [json_name = "reconcileBeforePoll"]; - if (CheckHasBit(cached_has_bits, 0x00080000U)) { + if (CheckHasBit(cached_has_bits, 0x00000002U)) { if (this_._internal_reconcile_before_poll() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -10405,8 +10442,17 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } cached_has_bits = this_._impl_._has_bits_[1]; - // uint32 write_files = 50 [json_name = "writeFiles", (.buf.validate.field) = { + // uint32 max_netns = 42 [json_name = "maxNetns", (.buf.validate.field) = { if (CheckHasBit(cached_has_bits, 0x08000000U)) { + if (this_._internal_max_netns() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 42, this_._internal_max_netns(), target); + } + } + + // uint32 write_files = 50 [json_name = "writeFiles", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x10000000U)) { if (this_._internal_write_files() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10427,7 +10473,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[1]; // uint32 dest_write_files = 52 [json_name = "destWriteFiles", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x10000000U)) { + if (CheckHasBit(cached_has_bits, 0x20000000U)) { if (this_._internal_dest_write_files() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10436,7 +10482,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // uint32 debug_level = 53 [json_name = "debugLevel", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x20000000U)) { + if (CheckHasBit(cached_has_bits, 0x40000000U)) { if (this_._internal_debug_level() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10446,7 +10492,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // bool debug_prometheus = 54 [json_name = "debugPrometheus", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (CheckHasBit(cached_has_bits, 0x00000004U)) { if (this_._internal_debug_prometheus() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -10497,7 +10543,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[1]; // uint32 envelope_flush_threshold_bytes = 64 [json_name = "envelopeFlushThresholdBytes", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x40000000U)) { + if (CheckHasBit(cached_has_bits, 0x80000000U)) { if (this_._internal_envelope_flush_threshold_bytes() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10505,8 +10551,9 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } } + cached_has_bits = this_._impl_._has_bits_[2]; // uint32 envelope_flush_threshold_rows = 65 [json_name = "envelopeFlushThresholdRows", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x80000000U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { if (this_._internal_envelope_flush_threshold_rows() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10615,9 +10662,9 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } } - cached_has_bits = this_._impl_._has_bits_[0]; + cached_has_bits = this_._impl_._has_bits_[2]; // bool s3_skip_bucket_probe = 106 [json_name = "s3SkipBucketProbe", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00100000U)) { + if (CheckHasBit(cached_has_bits, 0x00000008U)) { if (this_._internal_s3_skip_bucket_probe() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -10625,6 +10672,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } } + cached_has_bits = this_._impl_._has_bits_[0]; // bool s3_allow_insecure = 107 [json_name = "s3AllowInsecure", (.buf.validate.field) = { if (CheckHasBit(cached_has_bits, 0x00200000U)) { if (this_._internal_s3_allow_insecure() != 0) { @@ -10647,7 +10695,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // uint32 s3_parquet_flush_threshold_bytes = 110 [json_name = "s3ParquetFlushThresholdBytes", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (CheckHasBit(cached_has_bits, 0x00000020U)) { if (this_._internal_s3_parquet_flush_threshold_bytes() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10665,7 +10713,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // uint32 s3_flush_jitter_pct = 112 [json_name = "s3FlushJitterPct", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (CheckHasBit(cached_has_bits, 0x00000040U)) { if (this_._internal_s3_flush_jitter_pct() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10674,7 +10722,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // uint32 s3_flush_threshold_jitter_pct = 113 [json_name = "s3FlushThresholdJitterPct", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (CheckHasBit(cached_has_bits, 0x00000080U)) { if (this_._internal_s3_flush_threshold_jitter_pct() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10683,7 +10731,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // uint32 s3_upload_max_attempts = 114 [json_name = "s3UploadMaxAttempts", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (CheckHasBit(cached_has_bits, 0x00000100U)) { if (this_._internal_s3_upload_max_attempts() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10751,7 +10799,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // uint32 ipv4_ttl = 150 [json_name = "ipv4Ttl", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (CheckHasBit(cached_has_bits, 0x00000200U)) { if (this_._internal_ipv4_ttl() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10760,7 +10808,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // uint32 ipv6_hop_limit = 151 [json_name = "ipv6HopLimit", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (CheckHasBit(cached_has_bits, 0x00000400U)) { if (this_._internal_ipv6_hop_limit() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10792,7 +10840,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // uint32 grpc_port = 160 [json_name = "grpcPort", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (CheckHasBit(cached_has_bits, 0x00000800U)) { if (this_._internal_grpc_port() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10844,7 +10892,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // uint32 pyroscope_sample_hz = 172 [json_name = "pyroscopeSampleHz", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000800U)) { + if (CheckHasBit(cached_has_bits, 0x00001000U)) { if (this_._internal_pyroscope_sample_hz() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10853,7 +10901,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // uint32 pyroscope_upload_interval_sec = 173 [json_name = "pyroscopeUploadIntervalSec", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00001000U)) { + if (CheckHasBit(cached_has_bits, 0x00002000U)) { if (this_._internal_pyroscope_upload_interval_sec() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10862,7 +10910,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // bool resolve_container_id = 200 [json_name = "resolveContainerId", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000100U)) { + if (CheckHasBit(cached_has_bits, 0x00000010U)) { if (this_._internal_resolve_container_id() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -10871,7 +10919,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // bool enrich_container_enable = 201 [json_name = "enrichContainerEnable"]; - if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (CheckHasBit(cached_has_bits, 0x00004000U)) { if (this_._internal_enrich_container_enable() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -10892,7 +10940,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // bool enrich_lldp_enable = 210 [json_name = "enrichLldpEnable"]; - if (CheckHasBit(cached_has_bits, 0x00000400U)) { + if (CheckHasBit(cached_has_bits, 0x00008000U)) { if (this_._internal_enrich_lldp_enable() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -10923,7 +10971,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // bool enrich_nic_enable = 220 [json_name = "enrichNicEnable"]; - if (CheckHasBit(cached_has_bits, 0x00004000U)) { + if (CheckHasBit(cached_has_bits, 0x00010000U)) { if (this_._internal_enrich_nic_enable() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -10932,7 +10980,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // uint32 uplink_count = 221 [json_name = "uplinkCount", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00002000U)) { + if (CheckHasBit(cached_has_bits, 0x00040000U)) { if (this_._internal_uplink_count() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10953,7 +11001,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // bool populate_nsid = 230 [json_name = "populateNsid"]; - if (CheckHasBit(cached_has_bits, 0x00008000U)) { + if (CheckHasBit(cached_has_bits, 0x00020000U)) { if (this_._internal_populate_nsid() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -10962,7 +11010,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // bool enrich_asn_enable = 240 [json_name = "enrichAsnEnable"]; - if (CheckHasBit(cached_has_bits, 0x00010000U)) { + if (CheckHasBit(cached_has_bits, 0x00080000U)) { if (this_._internal_enrich_asn_enable() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -11010,7 +11058,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // bool enrich_locality_enable = 245 [json_name = "enrichLocalityEnable"]; - if (CheckHasBit(cached_has_bits, 0x00020000U)) { + if (CheckHasBit(cached_has_bits, 0x00100000U)) { if (this_._internal_enrich_locality_enable() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -11028,7 +11076,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // bool locality_events_enable = 247 [json_name = "localityEventsEnable"]; - if (CheckHasBit(cached_has_bits, 0x00040000U)) { + if (CheckHasBit(cached_has_bits, 0x00200000U)) { if (this_._internal_locality_events_enable() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -11185,28 +11233,30 @@ ::size_t XtcpConfig::ByteSizeLong() const { this_._internal_io_uring_recv_batch_size()); } } - // uint32 io_uring_cqe_batch_size = 24 [json_name = "ioUringCqeBatchSize", (.buf.validate.field) = { + // uint64 max_dump_bytes = 25 [json_name = "maxDumpBytes", (.buf.validate.field) = { if (CheckHasBit(cached_has_bits, 0x00020000U)) { - if (this_._internal_io_uring_cqe_batch_size() != 0) { - total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( - this_._internal_io_uring_cqe_batch_size()); + if (this_._internal_max_dump_bytes() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::UInt64Size( + this_._internal_max_dump_bytes()); } } - // bool io_uring = 22 [json_name = "ioUring", (.buf.validate.field) = { + // uint64 max_records_per_netns = 26 [json_name = "maxRecordsPerNetns", (.buf.validate.field) = { if (CheckHasBit(cached_has_bits, 0x00040000U)) { - if (this_._internal_io_uring() != 0) { - total_size += 3; + if (this_._internal_max_records_per_netns() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::UInt64Size( + this_._internal_max_records_per_netns()); } } - // bool reconcile_before_poll = 41 [json_name = "reconcileBeforePoll"]; + // uint32 io_uring_cqe_batch_size = 24 [json_name = "ioUringCqeBatchSize", (.buf.validate.field) = { if (CheckHasBit(cached_has_bits, 0x00080000U)) { - if (this_._internal_reconcile_before_poll() != 0) { - total_size += 3; + if (this_._internal_io_uring_cqe_batch_size() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( + this_._internal_io_uring_cqe_batch_size()); } } - // bool s3_skip_bucket_probe = 106 [json_name = "s3SkipBucketProbe", (.buf.validate.field) = { + // bool io_uring = 22 [json_name = "ioUring", (.buf.validate.field) = { if (CheckHasBit(cached_has_bits, 0x00100000U)) { - if (this_._internal_s3_skip_bucket_probe() != 0) { + if (this_._internal_io_uring() != 0) { total_size += 3; } } @@ -11466,168 +11516,187 @@ ::size_t XtcpConfig::ByteSizeLong() const { total_size += 2 + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.link_monitor_); } - // uint32 write_files = 50 [json_name = "writeFiles", (.buf.validate.field) = { + // uint32 max_netns = 42 [json_name = "maxNetns", (.buf.validate.field) = { if (CheckHasBit(cached_has_bits, 0x08000000U)) { + if (this_._internal_max_netns() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( + this_._internal_max_netns()); + } + } + // uint32 write_files = 50 [json_name = "writeFiles", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x10000000U)) { if (this_._internal_write_files() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_write_files()); } } // uint32 dest_write_files = 52 [json_name = "destWriteFiles", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x10000000U)) { + if (CheckHasBit(cached_has_bits, 0x20000000U)) { if (this_._internal_dest_write_files() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_dest_write_files()); } } // uint32 debug_level = 53 [json_name = "debugLevel", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x20000000U)) { + if (CheckHasBit(cached_has_bits, 0x40000000U)) { if (this_._internal_debug_level() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_debug_level()); } } // uint32 envelope_flush_threshold_bytes = 64 [json_name = "envelopeFlushThresholdBytes", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x40000000U)) { + if (CheckHasBit(cached_has_bits, 0x80000000U)) { if (this_._internal_envelope_flush_threshold_bytes() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_envelope_flush_threshold_bytes()); } } + } + cached_has_bits = this_._impl_._has_bits_[2]; + if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { // uint32 envelope_flush_threshold_rows = 65 [json_name = "envelopeFlushThresholdRows", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x80000000U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { if (this_._internal_envelope_flush_threshold_rows() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_envelope_flush_threshold_rows()); } } - } - cached_has_bits = this_._impl_._has_bits_[2]; - if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { + // bool reconcile_before_poll = 41 [json_name = "reconcileBeforePoll"]; + if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (this_._internal_reconcile_before_poll() != 0) { + total_size += 3; + } + } + // bool debug_prometheus = 54 [json_name = "debugPrometheus", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (this_._internal_debug_prometheus() != 0) { + total_size += 3; + } + } + // bool s3_skip_bucket_probe = 106 [json_name = "s3SkipBucketProbe", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (this_._internal_s3_skip_bucket_probe() != 0) { + total_size += 3; + } + } + // bool resolve_container_id = 200 [json_name = "resolveContainerId", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (this_._internal_resolve_container_id() != 0) { + total_size += 3; + } + } // uint32 s3_parquet_flush_threshold_bytes = 110 [json_name = "s3ParquetFlushThresholdBytes", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (CheckHasBit(cached_has_bits, 0x00000020U)) { if (this_._internal_s3_parquet_flush_threshold_bytes() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_s3_parquet_flush_threshold_bytes()); } } // uint32 s3_flush_jitter_pct = 112 [json_name = "s3FlushJitterPct", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (CheckHasBit(cached_has_bits, 0x00000040U)) { if (this_._internal_s3_flush_jitter_pct() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_s3_flush_jitter_pct()); } } // uint32 s3_flush_threshold_jitter_pct = 113 [json_name = "s3FlushThresholdJitterPct", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (CheckHasBit(cached_has_bits, 0x00000080U)) { if (this_._internal_s3_flush_threshold_jitter_pct() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_s3_flush_threshold_jitter_pct()); } } + } + if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { // uint32 s3_upload_max_attempts = 114 [json_name = "s3UploadMaxAttempts", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (CheckHasBit(cached_has_bits, 0x00000100U)) { if (this_._internal_s3_upload_max_attempts() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_s3_upload_max_attempts()); } } // uint32 ipv4_ttl = 150 [json_name = "ipv4Ttl", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (CheckHasBit(cached_has_bits, 0x00000200U)) { if (this_._internal_ipv4_ttl() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_ipv4_ttl()); } } // uint32 ipv6_hop_limit = 151 [json_name = "ipv6HopLimit", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (CheckHasBit(cached_has_bits, 0x00000400U)) { if (this_._internal_ipv6_hop_limit() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_ipv6_hop_limit()); } } // uint32 grpc_port = 160 [json_name = "grpcPort", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (CheckHasBit(cached_has_bits, 0x00000800U)) { if (this_._internal_grpc_port() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_grpc_port()); } } - // bool debug_prometheus = 54 [json_name = "debugPrometheus", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000080U)) { - if (this_._internal_debug_prometheus() != 0) { - total_size += 3; - } - } - } - if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { - // bool resolve_container_id = 200 [json_name = "resolveContainerId", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000100U)) { - if (this_._internal_resolve_container_id() != 0) { - total_size += 3; - } - } - // bool enrich_container_enable = 201 [json_name = "enrichContainerEnable"]; - if (CheckHasBit(cached_has_bits, 0x00000200U)) { - if (this_._internal_enrich_container_enable() != 0) { - total_size += 3; - } - } - // bool enrich_lldp_enable = 210 [json_name = "enrichLldpEnable"]; - if (CheckHasBit(cached_has_bits, 0x00000400U)) { - if (this_._internal_enrich_lldp_enable() != 0) { - total_size += 3; - } - } // uint32 pyroscope_sample_hz = 172 [json_name = "pyroscopeSampleHz", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000800U)) { + if (CheckHasBit(cached_has_bits, 0x00001000U)) { if (this_._internal_pyroscope_sample_hz() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_pyroscope_sample_hz()); } } // uint32 pyroscope_upload_interval_sec = 173 [json_name = "pyroscopeUploadIntervalSec", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00001000U)) { + if (CheckHasBit(cached_has_bits, 0x00002000U)) { if (this_._internal_pyroscope_upload_interval_sec() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_pyroscope_upload_interval_sec()); } } - // uint32 uplink_count = 221 [json_name = "uplinkCount", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00002000U)) { - if (this_._internal_uplink_count() != 0) { - total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( - this_._internal_uplink_count()); + // bool enrich_container_enable = 201 [json_name = "enrichContainerEnable"]; + if (CheckHasBit(cached_has_bits, 0x00004000U)) { + if (this_._internal_enrich_container_enable() != 0) { + total_size += 3; + } + } + // bool enrich_lldp_enable = 210 [json_name = "enrichLldpEnable"]; + if (CheckHasBit(cached_has_bits, 0x00008000U)) { + if (this_._internal_enrich_lldp_enable() != 0) { + total_size += 3; } } + } + if (BatchCheckHasBit(cached_has_bits, 0x003f0000U)) { // bool enrich_nic_enable = 220 [json_name = "enrichNicEnable"]; - if (CheckHasBit(cached_has_bits, 0x00004000U)) { + if (CheckHasBit(cached_has_bits, 0x00010000U)) { if (this_._internal_enrich_nic_enable() != 0) { total_size += 3; } } // bool populate_nsid = 230 [json_name = "populateNsid"]; - if (CheckHasBit(cached_has_bits, 0x00008000U)) { + if (CheckHasBit(cached_has_bits, 0x00020000U)) { if (this_._internal_populate_nsid() != 0) { total_size += 3; } } - } - if (BatchCheckHasBit(cached_has_bits, 0x00070000U)) { + // uint32 uplink_count = 221 [json_name = "uplinkCount", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x00040000U)) { + if (this_._internal_uplink_count() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( + this_._internal_uplink_count()); + } + } // bool enrich_asn_enable = 240 [json_name = "enrichAsnEnable"]; - if (CheckHasBit(cached_has_bits, 0x00010000U)) { + if (CheckHasBit(cached_has_bits, 0x00080000U)) { if (this_._internal_enrich_asn_enable() != 0) { total_size += 3; } } // bool enrich_locality_enable = 245 [json_name = "enrichLocalityEnable"]; - if (CheckHasBit(cached_has_bits, 0x00020000U)) { + if (CheckHasBit(cached_has_bits, 0x00100000U)) { if (this_._internal_enrich_locality_enable() != 0) { total_size += 3; } } // bool locality_events_enable = 247 [json_name = "localityEventsEnable"]; - if (CheckHasBit(cached_has_bits, 0x00040000U)) { + if (CheckHasBit(cached_has_bits, 0x00200000U)) { if (this_._internal_locality_events_enable() != 0) { total_size += 3; } @@ -11767,23 +11836,23 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } if (CheckHasBit(cached_has_bits, 0x00020000U)) { - if (from._internal_io_uring_cqe_batch_size() != 0) { - _this->_impl_.io_uring_cqe_batch_size_ = from._impl_.io_uring_cqe_batch_size_; + if (from._internal_max_dump_bytes() != 0) { + _this->_impl_.max_dump_bytes_ = from._impl_.max_dump_bytes_; } } if (CheckHasBit(cached_has_bits, 0x00040000U)) { - if (from._internal_io_uring() != 0) { - _this->_impl_.io_uring_ = from._impl_.io_uring_; + if (from._internal_max_records_per_netns() != 0) { + _this->_impl_.max_records_per_netns_ = from._impl_.max_records_per_netns_; } } if (CheckHasBit(cached_has_bits, 0x00080000U)) { - if (from._internal_reconcile_before_poll() != 0) { - _this->_impl_.reconcile_before_poll_ = from._impl_.reconcile_before_poll_; + if (from._internal_io_uring_cqe_batch_size() != 0) { + _this->_impl_.io_uring_cqe_batch_size_ = from._impl_.io_uring_cqe_batch_size_; } } if (CheckHasBit(cached_has_bits, 0x00100000U)) { - if (from._internal_s3_skip_bucket_probe() != 0) { - _this->_impl_.s3_skip_bucket_probe_ = from._impl_.s3_skip_bucket_probe_; + if (from._internal_io_uring() != 0) { + _this->_impl_.io_uring_ = from._impl_.io_uring_; } } if (CheckHasBit(cached_has_bits, 0x00200000U)) { @@ -12117,128 +12186,143 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } if (CheckHasBit(cached_has_bits, 0x08000000U)) { + if (from._internal_max_netns() != 0) { + _this->_impl_.max_netns_ = from._impl_.max_netns_; + } + } + if (CheckHasBit(cached_has_bits, 0x10000000U)) { if (from._internal_write_files() != 0) { _this->_impl_.write_files_ = from._impl_.write_files_; } } - if (CheckHasBit(cached_has_bits, 0x10000000U)) { + if (CheckHasBit(cached_has_bits, 0x20000000U)) { if (from._internal_dest_write_files() != 0) { _this->_impl_.dest_write_files_ = from._impl_.dest_write_files_; } } - if (CheckHasBit(cached_has_bits, 0x20000000U)) { + if (CheckHasBit(cached_has_bits, 0x40000000U)) { if (from._internal_debug_level() != 0) { _this->_impl_.debug_level_ = from._impl_.debug_level_; } } - if (CheckHasBit(cached_has_bits, 0x40000000U)) { + if (CheckHasBit(cached_has_bits, 0x80000000U)) { if (from._internal_envelope_flush_threshold_bytes() != 0) { _this->_impl_.envelope_flush_threshold_bytes_ = from._impl_.envelope_flush_threshold_bytes_; } } - if (CheckHasBit(cached_has_bits, 0x80000000U)) { - if (from._internal_envelope_flush_threshold_rows() != 0) { - _this->_impl_.envelope_flush_threshold_rows_ = from._impl_.envelope_flush_threshold_rows_; - } - } } cached_has_bits = from._impl_._has_bits_[2]; if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { if (CheckHasBit(cached_has_bits, 0x00000001U)) { - if (from._internal_s3_parquet_flush_threshold_bytes() != 0) { - _this->_impl_.s3_parquet_flush_threshold_bytes_ = from._impl_.s3_parquet_flush_threshold_bytes_; + if (from._internal_envelope_flush_threshold_rows() != 0) { + _this->_impl_.envelope_flush_threshold_rows_ = from._impl_.envelope_flush_threshold_rows_; } } if (CheckHasBit(cached_has_bits, 0x00000002U)) { - if (from._internal_s3_flush_jitter_pct() != 0) { - _this->_impl_.s3_flush_jitter_pct_ = from._impl_.s3_flush_jitter_pct_; + if (from._internal_reconcile_before_poll() != 0) { + _this->_impl_.reconcile_before_poll_ = from._impl_.reconcile_before_poll_; } } if (CheckHasBit(cached_has_bits, 0x00000004U)) { - if (from._internal_s3_flush_threshold_jitter_pct() != 0) { - _this->_impl_.s3_flush_threshold_jitter_pct_ = from._impl_.s3_flush_threshold_jitter_pct_; + if (from._internal_debug_prometheus() != 0) { + _this->_impl_.debug_prometheus_ = from._impl_.debug_prometheus_; } } if (CheckHasBit(cached_has_bits, 0x00000008U)) { - if (from._internal_s3_upload_max_attempts() != 0) { - _this->_impl_.s3_upload_max_attempts_ = from._impl_.s3_upload_max_attempts_; + if (from._internal_s3_skip_bucket_probe() != 0) { + _this->_impl_.s3_skip_bucket_probe_ = from._impl_.s3_skip_bucket_probe_; } } if (CheckHasBit(cached_has_bits, 0x00000010U)) { - if (from._internal_ipv4_ttl() != 0) { - _this->_impl_.ipv4_ttl_ = from._impl_.ipv4_ttl_; + if (from._internal_resolve_container_id() != 0) { + _this->_impl_.resolve_container_id_ = from._impl_.resolve_container_id_; } } if (CheckHasBit(cached_has_bits, 0x00000020U)) { - if (from._internal_ipv6_hop_limit() != 0) { - _this->_impl_.ipv6_hop_limit_ = from._impl_.ipv6_hop_limit_; + if (from._internal_s3_parquet_flush_threshold_bytes() != 0) { + _this->_impl_.s3_parquet_flush_threshold_bytes_ = from._impl_.s3_parquet_flush_threshold_bytes_; } } if (CheckHasBit(cached_has_bits, 0x00000040U)) { - if (from._internal_grpc_port() != 0) { - _this->_impl_.grpc_port_ = from._impl_.grpc_port_; + if (from._internal_s3_flush_jitter_pct() != 0) { + _this->_impl_.s3_flush_jitter_pct_ = from._impl_.s3_flush_jitter_pct_; } } if (CheckHasBit(cached_has_bits, 0x00000080U)) { - if (from._internal_debug_prometheus() != 0) { - _this->_impl_.debug_prometheus_ = from._impl_.debug_prometheus_; + if (from._internal_s3_flush_threshold_jitter_pct() != 0) { + _this->_impl_.s3_flush_threshold_jitter_pct_ = from._impl_.s3_flush_threshold_jitter_pct_; } } } if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { if (CheckHasBit(cached_has_bits, 0x00000100U)) { - if (from._internal_resolve_container_id() != 0) { - _this->_impl_.resolve_container_id_ = from._impl_.resolve_container_id_; + if (from._internal_s3_upload_max_attempts() != 0) { + _this->_impl_.s3_upload_max_attempts_ = from._impl_.s3_upload_max_attempts_; } } if (CheckHasBit(cached_has_bits, 0x00000200U)) { - if (from._internal_enrich_container_enable() != 0) { - _this->_impl_.enrich_container_enable_ = from._impl_.enrich_container_enable_; + if (from._internal_ipv4_ttl() != 0) { + _this->_impl_.ipv4_ttl_ = from._impl_.ipv4_ttl_; } } if (CheckHasBit(cached_has_bits, 0x00000400U)) { - if (from._internal_enrich_lldp_enable() != 0) { - _this->_impl_.enrich_lldp_enable_ = from._impl_.enrich_lldp_enable_; + if (from._internal_ipv6_hop_limit() != 0) { + _this->_impl_.ipv6_hop_limit_ = from._impl_.ipv6_hop_limit_; } } if (CheckHasBit(cached_has_bits, 0x00000800U)) { + if (from._internal_grpc_port() != 0) { + _this->_impl_.grpc_port_ = from._impl_.grpc_port_; + } + } + if (CheckHasBit(cached_has_bits, 0x00001000U)) { if (from._internal_pyroscope_sample_hz() != 0) { _this->_impl_.pyroscope_sample_hz_ = from._impl_.pyroscope_sample_hz_; } } - if (CheckHasBit(cached_has_bits, 0x00001000U)) { + if (CheckHasBit(cached_has_bits, 0x00002000U)) { if (from._internal_pyroscope_upload_interval_sec() != 0) { _this->_impl_.pyroscope_upload_interval_sec_ = from._impl_.pyroscope_upload_interval_sec_; } } - if (CheckHasBit(cached_has_bits, 0x00002000U)) { - if (from._internal_uplink_count() != 0) { - _this->_impl_.uplink_count_ = from._impl_.uplink_count_; + if (CheckHasBit(cached_has_bits, 0x00004000U)) { + if (from._internal_enrich_container_enable() != 0) { + _this->_impl_.enrich_container_enable_ = from._impl_.enrich_container_enable_; } } - if (CheckHasBit(cached_has_bits, 0x00004000U)) { + if (CheckHasBit(cached_has_bits, 0x00008000U)) { + if (from._internal_enrich_lldp_enable() != 0) { + _this->_impl_.enrich_lldp_enable_ = from._impl_.enrich_lldp_enable_; + } + } + } + if (BatchCheckHasBit(cached_has_bits, 0x003f0000U)) { + if (CheckHasBit(cached_has_bits, 0x00010000U)) { if (from._internal_enrich_nic_enable() != 0) { _this->_impl_.enrich_nic_enable_ = from._impl_.enrich_nic_enable_; } } - if (CheckHasBit(cached_has_bits, 0x00008000U)) { + if (CheckHasBit(cached_has_bits, 0x00020000U)) { if (from._internal_populate_nsid() != 0) { _this->_impl_.populate_nsid_ = from._impl_.populate_nsid_; } } - } - if (BatchCheckHasBit(cached_has_bits, 0x00070000U)) { - if (CheckHasBit(cached_has_bits, 0x00010000U)) { + if (CheckHasBit(cached_has_bits, 0x00040000U)) { + if (from._internal_uplink_count() != 0) { + _this->_impl_.uplink_count_ = from._impl_.uplink_count_; + } + } + if (CheckHasBit(cached_has_bits, 0x00080000U)) { if (from._internal_enrich_asn_enable() != 0) { _this->_impl_.enrich_asn_enable_ = from._impl_.enrich_asn_enable_; } } - if (CheckHasBit(cached_has_bits, 0x00020000U)) { + if (CheckHasBit(cached_has_bits, 0x00100000U)) { if (from._internal_enrich_locality_enable() != 0) { _this->_impl_.enrich_locality_enable_ = from._impl_.enrich_locality_enable_; } } - if (CheckHasBit(cached_has_bits, 0x00040000U)) { + if (CheckHasBit(cached_has_bits, 0x00200000U)) { if (from._internal_locality_events_enable() != 0) { _this->_impl_.locality_events_enable_ = from._impl_.locality_events_enable_; } diff --git a/gen/cpp/xtcp_config/v1/xtcp_config.pb.h b/gen/cpp/xtcp_config/v1/xtcp_config.pb.h index a72c0064e..a687a1cae 100644 --- a/gen/cpp/xtcp_config/v1/xtcp_config.pb.h +++ b/gen/cpp/xtcp_config/v1/xtcp_config.pb.h @@ -3839,10 +3839,10 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: kModulusFieldNumber = 20, kPacketSizeMplyFieldNumber = 19, kIoUringRecvBatchSizeFieldNumber = 23, + kMaxDumpBytesFieldNumber = 25, + kMaxRecordsPerNetnsFieldNumber = 26, kIoUringCqeBatchSizeFieldNumber = 24, kIoUringFieldNumber = 22, - kReconcileBeforePollFieldNumber = 41, - kS3SkipBucketProbeFieldNumber = 106, kS3AllowInsecureFieldNumber = 107, kListenersFieldNumber = 162, kUplinkInterfacesFieldNumber = 222, @@ -3881,11 +3881,16 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: kAsnRefreshIntervalFieldNumber = 242, kLocalityRefreshIntervalFieldNumber = 246, kLinkMonitorFieldNumber = 250, + kMaxNetnsFieldNumber = 42, kWriteFilesFieldNumber = 50, kDestWriteFilesFieldNumber = 52, kDebugLevelFieldNumber = 53, kEnvelopeFlushThresholdBytesFieldNumber = 64, kEnvelopeFlushThresholdRowsFieldNumber = 65, + kReconcileBeforePollFieldNumber = 41, + kDebugPrometheusFieldNumber = 54, + kS3SkipBucketProbeFieldNumber = 106, + kResolveContainerIdFieldNumber = 200, kS3ParquetFlushThresholdBytesFieldNumber = 110, kS3FlushJitterPctFieldNumber = 112, kS3FlushThresholdJitterPctFieldNumber = 113, @@ -3893,15 +3898,13 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: kIpv4TtlFieldNumber = 150, kIpv6HopLimitFieldNumber = 151, kGrpcPortFieldNumber = 160, - kDebugPrometheusFieldNumber = 54, - kResolveContainerIdFieldNumber = 200, - kEnrichContainerEnableFieldNumber = 201, - kEnrichLldpEnableFieldNumber = 210, kPyroscopeSampleHzFieldNumber = 172, kPyroscopeUploadIntervalSecFieldNumber = 173, - kUplinkCountFieldNumber = 221, + kEnrichContainerEnableFieldNumber = 201, + kEnrichLldpEnableFieldNumber = 210, kEnrichNicEnableFieldNumber = 220, kPopulateNsidFieldNumber = 230, + kUplinkCountFieldNumber = 221, kEnrichAsnEnableFieldNumber = 240, kEnrichLocalityEnableFieldNumber = 245, kLocalityEventsEnableFieldNumber = 247, @@ -4110,6 +4113,26 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: ::uint32_t _internal_io_uring_recv_batch_size() const; void _internal_set_io_uring_recv_batch_size(::uint32_t value); + public: + // uint64 max_dump_bytes = 25 [json_name = "maxDumpBytes", (.buf.validate.field) = { + void clear_max_dump_bytes() ; + [[nodiscard]] ::uint64_t max_dump_bytes() const; + void set_max_dump_bytes(::uint64_t value); + + private: + ::uint64_t _internal_max_dump_bytes() const; + void _internal_set_max_dump_bytes(::uint64_t value); + + public: + // uint64 max_records_per_netns = 26 [json_name = "maxRecordsPerNetns", (.buf.validate.field) = { + void clear_max_records_per_netns() ; + [[nodiscard]] ::uint64_t max_records_per_netns() const; + void set_max_records_per_netns(::uint64_t value); + + private: + ::uint64_t _internal_max_records_per_netns() const; + void _internal_set_max_records_per_netns(::uint64_t value); + public: // uint32 io_uring_cqe_batch_size = 24 [json_name = "ioUringCqeBatchSize", (.buf.validate.field) = { void clear_io_uring_cqe_batch_size() ; @@ -4130,26 +4153,6 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: bool _internal_io_uring() const; void _internal_set_io_uring(bool value); - public: - // bool reconcile_before_poll = 41 [json_name = "reconcileBeforePoll"]; - void clear_reconcile_before_poll() ; - [[nodiscard]] bool reconcile_before_poll() const; - void set_reconcile_before_poll(bool value); - - private: - bool _internal_reconcile_before_poll() const; - void _internal_set_reconcile_before_poll(bool value); - - public: - // bool s3_skip_bucket_probe = 106 [json_name = "s3SkipBucketProbe", (.buf.validate.field) = { - void clear_s3_skip_bucket_probe() ; - [[nodiscard]] bool s3_skip_bucket_probe() const; - void set_s3_skip_bucket_probe(bool value); - - private: - bool _internal_s3_skip_bucket_probe() const; - void _internal_set_s3_skip_bucket_probe(bool value); - public: // bool s3_allow_insecure = 107 [json_name = "s3AllowInsecure", (.buf.validate.field) = { void clear_s3_allow_insecure() ; @@ -4731,6 +4734,16 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: const ::xtcp_config::v1::LinkMonitorConfig& _internal_link_monitor() const; ::xtcp_config::v1::LinkMonitorConfig* PROTOBUF_NONNULL _internal_mutable_link_monitor(); + public: + // uint32 max_netns = 42 [json_name = "maxNetns", (.buf.validate.field) = { + void clear_max_netns() ; + [[nodiscard]] ::uint32_t max_netns() const; + void set_max_netns(::uint32_t value); + + private: + ::uint32_t _internal_max_netns() const; + void _internal_set_max_netns(::uint32_t value); + public: // uint32 write_files = 50 [json_name = "writeFiles", (.buf.validate.field) = { void clear_write_files() ; @@ -4781,6 +4794,46 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: ::uint32_t _internal_envelope_flush_threshold_rows() const; void _internal_set_envelope_flush_threshold_rows(::uint32_t value); + public: + // bool reconcile_before_poll = 41 [json_name = "reconcileBeforePoll"]; + void clear_reconcile_before_poll() ; + [[nodiscard]] bool reconcile_before_poll() const; + void set_reconcile_before_poll(bool value); + + private: + bool _internal_reconcile_before_poll() const; + void _internal_set_reconcile_before_poll(bool value); + + public: + // bool debug_prometheus = 54 [json_name = "debugPrometheus", (.buf.validate.field) = { + void clear_debug_prometheus() ; + [[nodiscard]] bool debug_prometheus() const; + void set_debug_prometheus(bool value); + + private: + bool _internal_debug_prometheus() const; + void _internal_set_debug_prometheus(bool value); + + public: + // bool s3_skip_bucket_probe = 106 [json_name = "s3SkipBucketProbe", (.buf.validate.field) = { + void clear_s3_skip_bucket_probe() ; + [[nodiscard]] bool s3_skip_bucket_probe() const; + void set_s3_skip_bucket_probe(bool value); + + private: + bool _internal_s3_skip_bucket_probe() const; + void _internal_set_s3_skip_bucket_probe(bool value); + + public: + // bool resolve_container_id = 200 [json_name = "resolveContainerId", (.buf.validate.field) = { + void clear_resolve_container_id() ; + [[nodiscard]] bool resolve_container_id() const; + void set_resolve_container_id(bool value); + + private: + bool _internal_resolve_container_id() const; + void _internal_set_resolve_container_id(bool value); + public: // uint32 s3_parquet_flush_threshold_bytes = 110 [json_name = "s3ParquetFlushThresholdBytes", (.buf.validate.field) = { void clear_s3_parquet_flush_threshold_bytes() ; @@ -4852,24 +4905,24 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: void _internal_set_grpc_port(::uint32_t value); public: - // bool debug_prometheus = 54 [json_name = "debugPrometheus", (.buf.validate.field) = { - void clear_debug_prometheus() ; - [[nodiscard]] bool debug_prometheus() const; - void set_debug_prometheus(bool value); + // uint32 pyroscope_sample_hz = 172 [json_name = "pyroscopeSampleHz", (.buf.validate.field) = { + void clear_pyroscope_sample_hz() ; + [[nodiscard]] ::uint32_t pyroscope_sample_hz() const; + void set_pyroscope_sample_hz(::uint32_t value); private: - bool _internal_debug_prometheus() const; - void _internal_set_debug_prometheus(bool value); + ::uint32_t _internal_pyroscope_sample_hz() const; + void _internal_set_pyroscope_sample_hz(::uint32_t value); public: - // bool resolve_container_id = 200 [json_name = "resolveContainerId", (.buf.validate.field) = { - void clear_resolve_container_id() ; - [[nodiscard]] bool resolve_container_id() const; - void set_resolve_container_id(bool value); + // uint32 pyroscope_upload_interval_sec = 173 [json_name = "pyroscopeUploadIntervalSec", (.buf.validate.field) = { + void clear_pyroscope_upload_interval_sec() ; + [[nodiscard]] ::uint32_t pyroscope_upload_interval_sec() const; + void set_pyroscope_upload_interval_sec(::uint32_t value); private: - bool _internal_resolve_container_id() const; - void _internal_set_resolve_container_id(bool value); + ::uint32_t _internal_pyroscope_upload_interval_sec() const; + void _internal_set_pyroscope_upload_interval_sec(::uint32_t value); public: // bool enrich_container_enable = 201 [json_name = "enrichContainerEnable"]; @@ -4891,36 +4944,6 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: bool _internal_enrich_lldp_enable() const; void _internal_set_enrich_lldp_enable(bool value); - public: - // uint32 pyroscope_sample_hz = 172 [json_name = "pyroscopeSampleHz", (.buf.validate.field) = { - void clear_pyroscope_sample_hz() ; - [[nodiscard]] ::uint32_t pyroscope_sample_hz() const; - void set_pyroscope_sample_hz(::uint32_t value); - - private: - ::uint32_t _internal_pyroscope_sample_hz() const; - void _internal_set_pyroscope_sample_hz(::uint32_t value); - - public: - // uint32 pyroscope_upload_interval_sec = 173 [json_name = "pyroscopeUploadIntervalSec", (.buf.validate.field) = { - void clear_pyroscope_upload_interval_sec() ; - [[nodiscard]] ::uint32_t pyroscope_upload_interval_sec() const; - void set_pyroscope_upload_interval_sec(::uint32_t value); - - private: - ::uint32_t _internal_pyroscope_upload_interval_sec() const; - void _internal_set_pyroscope_upload_interval_sec(::uint32_t value); - - public: - // uint32 uplink_count = 221 [json_name = "uplinkCount", (.buf.validate.field) = { - void clear_uplink_count() ; - [[nodiscard]] ::uint32_t uplink_count() const; - void set_uplink_count(::uint32_t value); - - private: - ::uint32_t _internal_uplink_count() const; - void _internal_set_uplink_count(::uint32_t value); - public: // bool enrich_nic_enable = 220 [json_name = "enrichNicEnable"]; void clear_enrich_nic_enable() ; @@ -4941,6 +4964,16 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: bool _internal_populate_nsid() const; void _internal_set_populate_nsid(bool value); + public: + // uint32 uplink_count = 221 [json_name = "uplinkCount", (.buf.validate.field) = { + void clear_uplink_count() ; + [[nodiscard]] ::uint32_t uplink_count() const; + void set_uplink_count(::uint32_t value); + + private: + ::uint32_t _internal_uplink_count() const; + void _internal_set_uplink_count(::uint32_t value); + public: // bool enrich_asn_enable = 240 [json_name = "enrichAsnEnable"]; void clear_enrich_asn_enable() ; @@ -4976,7 +5009,7 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: private: class _Internal; using ParseTableT_ = - ::google::protobuf::internal::TcParseTable<5, 83, + ::google::protobuf::internal::TcParseTable<5, 86, 15, 466, 33>; static constexpr ParseTableT_ InternalGenerateParseTable_( @@ -5022,10 +5055,10 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: ::uint64_t modulus_; ::uint32_t packet_size_mply_; ::uint32_t io_uring_recv_batch_size_; + ::uint64_t max_dump_bytes_; + ::uint64_t max_records_per_netns_; ::uint32_t io_uring_cqe_batch_size_; bool io_uring_; - bool reconcile_before_poll_; - bool s3_skip_bucket_probe_; bool s3_allow_insecure_; ::google::protobuf::RepeatedPtrField< ::xtcp_config::v1::Listener > listeners_; ::google::protobuf::RepeatedPtrField<::std::string> uplink_interfaces_; @@ -5064,11 +5097,16 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: ::google::protobuf::Duration* PROTOBUF_NULLABLE asn_refresh_interval_; ::google::protobuf::Duration* PROTOBUF_NULLABLE locality_refresh_interval_; ::xtcp_config::v1::LinkMonitorConfig* PROTOBUF_NULLABLE link_monitor_; + ::uint32_t max_netns_; ::uint32_t write_files_; ::uint32_t dest_write_files_; ::uint32_t debug_level_; ::uint32_t envelope_flush_threshold_bytes_; ::uint32_t envelope_flush_threshold_rows_; + bool reconcile_before_poll_; + bool debug_prometheus_; + bool s3_skip_bucket_probe_; + bool resolve_container_id_; ::uint32_t s3_parquet_flush_threshold_bytes_; ::uint32_t s3_flush_jitter_pct_; ::uint32_t s3_flush_threshold_jitter_pct_; @@ -5076,15 +5114,13 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: ::uint32_t ipv4_ttl_; ::uint32_t ipv6_hop_limit_; ::uint32_t grpc_port_; - bool debug_prometheus_; - bool resolve_container_id_; - bool enrich_container_enable_; - bool enrich_lldp_enable_; ::uint32_t pyroscope_sample_hz_; ::uint32_t pyroscope_upload_interval_sec_; - ::uint32_t uplink_count_; + bool enrich_container_enable_; + bool enrich_lldp_enable_; bool enrich_nic_enable_; bool populate_nsid_; + ::uint32_t uplink_count_; bool enrich_asn_enable_; bool enrich_locality_enable_; bool locality_events_enable_; @@ -11112,7 +11148,7 @@ inline void XtcpConfig::set_allocated_enabled_deserializers(::xtcp_config::v1::E inline void XtcpConfig::clear_io_uring() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.io_uring_ = false; - ClearHasBit(_impl_._has_bits_[0], 0x00040000U); + ClearHasBit(_impl_._has_bits_[0], 0x00100000U); } inline bool XtcpConfig::io_uring() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.io_uring) @@ -11120,7 +11156,7 @@ inline bool XtcpConfig::io_uring() const { } inline void XtcpConfig::set_io_uring(bool value) { _internal_set_io_uring(value); - SetHasBit(_impl_._has_bits_[0], 0x00040000U); + SetHasBit(_impl_._has_bits_[0], 0x00100000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.io_uring) } inline bool XtcpConfig::_internal_io_uring() const { @@ -11160,7 +11196,7 @@ inline void XtcpConfig::_internal_set_io_uring_recv_batch_size(::uint32_t value) inline void XtcpConfig::clear_io_uring_cqe_batch_size() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.io_uring_cqe_batch_size_ = 0u; - ClearHasBit(_impl_._has_bits_[0], 0x00020000U); + ClearHasBit(_impl_._has_bits_[0], 0x00080000U); } inline ::uint32_t XtcpConfig::io_uring_cqe_batch_size() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.io_uring_cqe_batch_size) @@ -11168,7 +11204,7 @@ inline ::uint32_t XtcpConfig::io_uring_cqe_batch_size() const { } inline void XtcpConfig::set_io_uring_cqe_batch_size(::uint32_t value) { _internal_set_io_uring_cqe_batch_size(value); - SetHasBit(_impl_._has_bits_[0], 0x00020000U); + SetHasBit(_impl_._has_bits_[0], 0x00080000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.io_uring_cqe_batch_size) } inline ::uint32_t XtcpConfig::_internal_io_uring_cqe_batch_size() const { @@ -11180,6 +11216,54 @@ inline void XtcpConfig::_internal_set_io_uring_cqe_batch_size(::uint32_t value) _impl_.io_uring_cqe_batch_size_ = value; } +// uint64 max_dump_bytes = 25 [json_name = "maxDumpBytes", (.buf.validate.field) = { +inline void XtcpConfig::clear_max_dump_bytes() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.max_dump_bytes_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], 0x00020000U); +} +inline ::uint64_t XtcpConfig::max_dump_bytes() const { + // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.max_dump_bytes) + return _internal_max_dump_bytes(); +} +inline void XtcpConfig::set_max_dump_bytes(::uint64_t value) { + _internal_set_max_dump_bytes(value); + SetHasBit(_impl_._has_bits_[0], 0x00020000U); + // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.max_dump_bytes) +} +inline ::uint64_t XtcpConfig::_internal_max_dump_bytes() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.max_dump_bytes_; +} +inline void XtcpConfig::_internal_set_max_dump_bytes(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.max_dump_bytes_ = value; +} + +// uint64 max_records_per_netns = 26 [json_name = "maxRecordsPerNetns", (.buf.validate.field) = { +inline void XtcpConfig::clear_max_records_per_netns() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.max_records_per_netns_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], 0x00040000U); +} +inline ::uint64_t XtcpConfig::max_records_per_netns() const { + // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.max_records_per_netns) + return _internal_max_records_per_netns(); +} +inline void XtcpConfig::set_max_records_per_netns(::uint64_t value) { + _internal_set_max_records_per_netns(value); + SetHasBit(_impl_._has_bits_[0], 0x00040000U); + // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.max_records_per_netns) +} +inline ::uint64_t XtcpConfig::_internal_max_records_per_netns() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.max_records_per_netns_; +} +inline void XtcpConfig::_internal_set_max_records_per_netns(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.max_records_per_netns_ = value; +} + // .google.protobuf.Duration reconcile_frequency = 40 [json_name = "reconcileFrequency", (.buf.validate.field) = { inline bool XtcpConfig::has_reconcile_frequency() const { bool value = CheckHasBit(_impl_._has_bits_[1], 0x00010000U); @@ -11277,7 +11361,7 @@ inline void XtcpConfig::set_allocated_reconcile_frequency(::google::protobuf::Du inline void XtcpConfig::clear_reconcile_before_poll() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.reconcile_before_poll_ = false; - ClearHasBit(_impl_._has_bits_[0], 0x00080000U); + ClearHasBit(_impl_._has_bits_[2], 0x00000002U); } inline bool XtcpConfig::reconcile_before_poll() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.reconcile_before_poll) @@ -11285,7 +11369,7 @@ inline bool XtcpConfig::reconcile_before_poll() const { } inline void XtcpConfig::set_reconcile_before_poll(bool value) { _internal_set_reconcile_before_poll(value); - SetHasBit(_impl_._has_bits_[0], 0x00080000U); + SetHasBit(_impl_._has_bits_[2], 0x00000002U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.reconcile_before_poll) } inline bool XtcpConfig::_internal_reconcile_before_poll() const { @@ -11297,11 +11381,35 @@ inline void XtcpConfig::_internal_set_reconcile_before_poll(bool value) { _impl_.reconcile_before_poll_ = value; } +// uint32 max_netns = 42 [json_name = "maxNetns", (.buf.validate.field) = { +inline void XtcpConfig::clear_max_netns() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.max_netns_ = 0u; + ClearHasBit(_impl_._has_bits_[1], 0x08000000U); +} +inline ::uint32_t XtcpConfig::max_netns() const { + // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.max_netns) + return _internal_max_netns(); +} +inline void XtcpConfig::set_max_netns(::uint32_t value) { + _internal_set_max_netns(value); + SetHasBit(_impl_._has_bits_[1], 0x08000000U); + // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.max_netns) +} +inline ::uint32_t XtcpConfig::_internal_max_netns() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.max_netns_; +} +inline void XtcpConfig::_internal_set_max_netns(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.max_netns_ = value; +} + // uint32 write_files = 50 [json_name = "writeFiles", (.buf.validate.field) = { inline void XtcpConfig::clear_write_files() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.write_files_ = 0u; - ClearHasBit(_impl_._has_bits_[1], 0x08000000U); + ClearHasBit(_impl_._has_bits_[1], 0x10000000U); } inline ::uint32_t XtcpConfig::write_files() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.write_files) @@ -11309,7 +11417,7 @@ inline ::uint32_t XtcpConfig::write_files() const { } inline void XtcpConfig::set_write_files(::uint32_t value) { _internal_set_write_files(value); - SetHasBit(_impl_._has_bits_[1], 0x08000000U); + SetHasBit(_impl_._has_bits_[1], 0x10000000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.write_files) } inline ::uint32_t XtcpConfig::_internal_write_files() const { @@ -11389,7 +11497,7 @@ inline void XtcpConfig::set_allocated_capture_path(::std::string* PROTOBUF_NULLA inline void XtcpConfig::clear_dest_write_files() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.dest_write_files_ = 0u; - ClearHasBit(_impl_._has_bits_[1], 0x10000000U); + ClearHasBit(_impl_._has_bits_[1], 0x20000000U); } inline ::uint32_t XtcpConfig::dest_write_files() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.dest_write_files) @@ -11397,7 +11505,7 @@ inline ::uint32_t XtcpConfig::dest_write_files() const { } inline void XtcpConfig::set_dest_write_files(::uint32_t value) { _internal_set_dest_write_files(value); - SetHasBit(_impl_._has_bits_[1], 0x10000000U); + SetHasBit(_impl_._has_bits_[1], 0x20000000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.dest_write_files) } inline ::uint32_t XtcpConfig::_internal_dest_write_files() const { @@ -11413,7 +11521,7 @@ inline void XtcpConfig::_internal_set_dest_write_files(::uint32_t value) { inline void XtcpConfig::clear_debug_level() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.debug_level_ = 0u; - ClearHasBit(_impl_._has_bits_[1], 0x20000000U); + ClearHasBit(_impl_._has_bits_[1], 0x40000000U); } inline ::uint32_t XtcpConfig::debug_level() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.debug_level) @@ -11421,7 +11529,7 @@ inline ::uint32_t XtcpConfig::debug_level() const { } inline void XtcpConfig::set_debug_level(::uint32_t value) { _internal_set_debug_level(value); - SetHasBit(_impl_._has_bits_[1], 0x20000000U); + SetHasBit(_impl_._has_bits_[1], 0x40000000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.debug_level) } inline ::uint32_t XtcpConfig::_internal_debug_level() const { @@ -11437,7 +11545,7 @@ inline void XtcpConfig::_internal_set_debug_level(::uint32_t value) { inline void XtcpConfig::clear_debug_prometheus() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.debug_prometheus_ = false; - ClearHasBit(_impl_._has_bits_[2], 0x00000080U); + ClearHasBit(_impl_._has_bits_[2], 0x00000004U); } inline bool XtcpConfig::debug_prometheus() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.debug_prometheus) @@ -11445,7 +11553,7 @@ inline bool XtcpConfig::debug_prometheus() const { } inline void XtcpConfig::set_debug_prometheus(bool value) { _internal_set_debug_prometheus(value); - SetHasBit(_impl_._has_bits_[2], 0x00000080U); + SetHasBit(_impl_._has_bits_[2], 0x00000004U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.debug_prometheus) } inline bool XtcpConfig::_internal_debug_prometheus() const { @@ -11717,7 +11825,7 @@ inline void XtcpConfig::set_allocated_xtcp_proto_file(::std::string* PROTOBUF_NU inline void XtcpConfig::clear_envelope_flush_threshold_bytes() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.envelope_flush_threshold_bytes_ = 0u; - ClearHasBit(_impl_._has_bits_[1], 0x40000000U); + ClearHasBit(_impl_._has_bits_[1], 0x80000000U); } inline ::uint32_t XtcpConfig::envelope_flush_threshold_bytes() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.envelope_flush_threshold_bytes) @@ -11725,7 +11833,7 @@ inline ::uint32_t XtcpConfig::envelope_flush_threshold_bytes() const { } inline void XtcpConfig::set_envelope_flush_threshold_bytes(::uint32_t value) { _internal_set_envelope_flush_threshold_bytes(value); - SetHasBit(_impl_._has_bits_[1], 0x40000000U); + SetHasBit(_impl_._has_bits_[1], 0x80000000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.envelope_flush_threshold_bytes) } inline ::uint32_t XtcpConfig::_internal_envelope_flush_threshold_bytes() const { @@ -11741,7 +11849,7 @@ inline void XtcpConfig::_internal_set_envelope_flush_threshold_bytes(::uint32_t inline void XtcpConfig::clear_envelope_flush_threshold_rows() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.envelope_flush_threshold_rows_ = 0u; - ClearHasBit(_impl_._has_bits_[1], 0x80000000U); + ClearHasBit(_impl_._has_bits_[2], 0x00000001U); } inline ::uint32_t XtcpConfig::envelope_flush_threshold_rows() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.envelope_flush_threshold_rows) @@ -11749,7 +11857,7 @@ inline ::uint32_t XtcpConfig::envelope_flush_threshold_rows() const { } inline void XtcpConfig::set_envelope_flush_threshold_rows(::uint32_t value) { _internal_set_envelope_flush_threshold_rows(value); - SetHasBit(_impl_._has_bits_[1], 0x80000000U); + SetHasBit(_impl_._has_bits_[2], 0x00000001U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.envelope_flush_threshold_rows) } inline ::uint32_t XtcpConfig::_internal_envelope_flush_threshold_rows() const { @@ -12434,7 +12542,7 @@ inline void XtcpConfig::set_allocated_s3_secret_key(::std::string* PROTOBUF_NULL inline void XtcpConfig::clear_s3_skip_bucket_probe() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.s3_skip_bucket_probe_ = false; - ClearHasBit(_impl_._has_bits_[0], 0x00100000U); + ClearHasBit(_impl_._has_bits_[2], 0x00000008U); } inline bool XtcpConfig::s3_skip_bucket_probe() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.s3_skip_bucket_probe) @@ -12442,7 +12550,7 @@ inline bool XtcpConfig::s3_skip_bucket_probe() const { } inline void XtcpConfig::set_s3_skip_bucket_probe(bool value) { _internal_set_s3_skip_bucket_probe(value); - SetHasBit(_impl_._has_bits_[0], 0x00100000U); + SetHasBit(_impl_._has_bits_[2], 0x00000008U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.s3_skip_bucket_probe) } inline bool XtcpConfig::_internal_s3_skip_bucket_probe() const { @@ -12546,7 +12654,7 @@ inline void XtcpConfig::set_allocated_s3_ca_file(::std::string* PROTOBUF_NULLABL inline void XtcpConfig::clear_s3_parquet_flush_threshold_bytes() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.s3_parquet_flush_threshold_bytes_ = 0u; - ClearHasBit(_impl_._has_bits_[2], 0x00000001U); + ClearHasBit(_impl_._has_bits_[2], 0x00000020U); } inline ::uint32_t XtcpConfig::s3_parquet_flush_threshold_bytes() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.s3_parquet_flush_threshold_bytes) @@ -12554,7 +12662,7 @@ inline ::uint32_t XtcpConfig::s3_parquet_flush_threshold_bytes() const { } inline void XtcpConfig::set_s3_parquet_flush_threshold_bytes(::uint32_t value) { _internal_set_s3_parquet_flush_threshold_bytes(value); - SetHasBit(_impl_._has_bits_[2], 0x00000001U); + SetHasBit(_impl_._has_bits_[2], 0x00000020U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.s3_parquet_flush_threshold_bytes) } inline ::uint32_t XtcpConfig::_internal_s3_parquet_flush_threshold_bytes() const { @@ -12663,7 +12771,7 @@ inline void XtcpConfig::set_allocated_s3_flush_interval(::google::protobuf::Dura inline void XtcpConfig::clear_s3_flush_jitter_pct() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.s3_flush_jitter_pct_ = 0u; - ClearHasBit(_impl_._has_bits_[2], 0x00000002U); + ClearHasBit(_impl_._has_bits_[2], 0x00000040U); } inline ::uint32_t XtcpConfig::s3_flush_jitter_pct() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.s3_flush_jitter_pct) @@ -12671,7 +12779,7 @@ inline ::uint32_t XtcpConfig::s3_flush_jitter_pct() const { } inline void XtcpConfig::set_s3_flush_jitter_pct(::uint32_t value) { _internal_set_s3_flush_jitter_pct(value); - SetHasBit(_impl_._has_bits_[2], 0x00000002U); + SetHasBit(_impl_._has_bits_[2], 0x00000040U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.s3_flush_jitter_pct) } inline ::uint32_t XtcpConfig::_internal_s3_flush_jitter_pct() const { @@ -12687,7 +12795,7 @@ inline void XtcpConfig::_internal_set_s3_flush_jitter_pct(::uint32_t value) { inline void XtcpConfig::clear_s3_flush_threshold_jitter_pct() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.s3_flush_threshold_jitter_pct_ = 0u; - ClearHasBit(_impl_._has_bits_[2], 0x00000004U); + ClearHasBit(_impl_._has_bits_[2], 0x00000080U); } inline ::uint32_t XtcpConfig::s3_flush_threshold_jitter_pct() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.s3_flush_threshold_jitter_pct) @@ -12695,7 +12803,7 @@ inline ::uint32_t XtcpConfig::s3_flush_threshold_jitter_pct() const { } inline void XtcpConfig::set_s3_flush_threshold_jitter_pct(::uint32_t value) { _internal_set_s3_flush_threshold_jitter_pct(value); - SetHasBit(_impl_._has_bits_[2], 0x00000004U); + SetHasBit(_impl_._has_bits_[2], 0x00000080U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.s3_flush_threshold_jitter_pct) } inline ::uint32_t XtcpConfig::_internal_s3_flush_threshold_jitter_pct() const { @@ -12711,7 +12819,7 @@ inline void XtcpConfig::_internal_set_s3_flush_threshold_jitter_pct(::uint32_t v inline void XtcpConfig::clear_s3_upload_max_attempts() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.s3_upload_max_attempts_ = 0u; - ClearHasBit(_impl_._has_bits_[2], 0x00000008U); + ClearHasBit(_impl_._has_bits_[2], 0x00000100U); } inline ::uint32_t XtcpConfig::s3_upload_max_attempts() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.s3_upload_max_attempts) @@ -12719,7 +12827,7 @@ inline ::uint32_t XtcpConfig::s3_upload_max_attempts() const { } inline void XtcpConfig::set_s3_upload_max_attempts(::uint32_t value) { _internal_set_s3_upload_max_attempts(value); - SetHasBit(_impl_._has_bits_[2], 0x00000008U); + SetHasBit(_impl_._has_bits_[2], 0x00000100U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.s3_upload_max_attempts) } inline ::uint32_t XtcpConfig::_internal_s3_upload_max_attempts() const { @@ -13148,7 +13256,7 @@ inline void XtcpConfig::set_allocated_daemon_version(::std::string* PROTOBUF_NUL inline void XtcpConfig::clear_ipv4_ttl() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.ipv4_ttl_ = 0u; - ClearHasBit(_impl_._has_bits_[2], 0x00000010U); + ClearHasBit(_impl_._has_bits_[2], 0x00000200U); } inline ::uint32_t XtcpConfig::ipv4_ttl() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.ipv4_ttl) @@ -13156,7 +13264,7 @@ inline ::uint32_t XtcpConfig::ipv4_ttl() const { } inline void XtcpConfig::set_ipv4_ttl(::uint32_t value) { _internal_set_ipv4_ttl(value); - SetHasBit(_impl_._has_bits_[2], 0x00000010U); + SetHasBit(_impl_._has_bits_[2], 0x00000200U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.ipv4_ttl) } inline ::uint32_t XtcpConfig::_internal_ipv4_ttl() const { @@ -13172,7 +13280,7 @@ inline void XtcpConfig::_internal_set_ipv4_ttl(::uint32_t value) { inline void XtcpConfig::clear_ipv6_hop_limit() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.ipv6_hop_limit_ = 0u; - ClearHasBit(_impl_._has_bits_[2], 0x00000020U); + ClearHasBit(_impl_._has_bits_[2], 0x00000400U); } inline ::uint32_t XtcpConfig::ipv6_hop_limit() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.ipv6_hop_limit) @@ -13180,7 +13288,7 @@ inline ::uint32_t XtcpConfig::ipv6_hop_limit() const { } inline void XtcpConfig::set_ipv6_hop_limit(::uint32_t value) { _internal_set_ipv6_hop_limit(value); - SetHasBit(_impl_._has_bits_[2], 0x00000020U); + SetHasBit(_impl_._has_bits_[2], 0x00000400U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.ipv6_hop_limit) } inline ::uint32_t XtcpConfig::_internal_ipv6_hop_limit() const { @@ -13490,7 +13598,7 @@ inline void XtcpConfig::set_allocated_admin_listener_auth(::xtcp_config::v1::Lis inline void XtcpConfig::clear_grpc_port() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.grpc_port_ = 0u; - ClearHasBit(_impl_._has_bits_[2], 0x00000040U); + ClearHasBit(_impl_._has_bits_[2], 0x00000800U); } inline ::uint32_t XtcpConfig::grpc_port() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.grpc_port) @@ -13498,7 +13606,7 @@ inline ::uint32_t XtcpConfig::grpc_port() const { } inline void XtcpConfig::set_grpc_port(::uint32_t value) { _internal_set_grpc_port(value); - SetHasBit(_impl_._has_bits_[2], 0x00000040U); + SetHasBit(_impl_._has_bits_[2], 0x00000800U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.grpc_port) } inline ::uint32_t XtcpConfig::_internal_grpc_port() const { @@ -13795,7 +13903,7 @@ inline void XtcpConfig::set_allocated_pyroscope_app_name(::std::string* PROTOBUF inline void XtcpConfig::clear_pyroscope_sample_hz() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.pyroscope_sample_hz_ = 0u; - ClearHasBit(_impl_._has_bits_[2], 0x00000800U); + ClearHasBit(_impl_._has_bits_[2], 0x00001000U); } inline ::uint32_t XtcpConfig::pyroscope_sample_hz() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.pyroscope_sample_hz) @@ -13803,7 +13911,7 @@ inline ::uint32_t XtcpConfig::pyroscope_sample_hz() const { } inline void XtcpConfig::set_pyroscope_sample_hz(::uint32_t value) { _internal_set_pyroscope_sample_hz(value); - SetHasBit(_impl_._has_bits_[2], 0x00000800U); + SetHasBit(_impl_._has_bits_[2], 0x00001000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.pyroscope_sample_hz) } inline ::uint32_t XtcpConfig::_internal_pyroscope_sample_hz() const { @@ -13819,7 +13927,7 @@ inline void XtcpConfig::_internal_set_pyroscope_sample_hz(::uint32_t value) { inline void XtcpConfig::clear_pyroscope_upload_interval_sec() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.pyroscope_upload_interval_sec_ = 0u; - ClearHasBit(_impl_._has_bits_[2], 0x00001000U); + ClearHasBit(_impl_._has_bits_[2], 0x00002000U); } inline ::uint32_t XtcpConfig::pyroscope_upload_interval_sec() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.pyroscope_upload_interval_sec) @@ -13827,7 +13935,7 @@ inline ::uint32_t XtcpConfig::pyroscope_upload_interval_sec() const { } inline void XtcpConfig::set_pyroscope_upload_interval_sec(::uint32_t value) { _internal_set_pyroscope_upload_interval_sec(value); - SetHasBit(_impl_._has_bits_[2], 0x00001000U); + SetHasBit(_impl_._has_bits_[2], 0x00002000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.pyroscope_upload_interval_sec) } inline ::uint32_t XtcpConfig::_internal_pyroscope_upload_interval_sec() const { @@ -13843,7 +13951,7 @@ inline void XtcpConfig::_internal_set_pyroscope_upload_interval_sec(::uint32_t v inline void XtcpConfig::clear_resolve_container_id() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.resolve_container_id_ = false; - ClearHasBit(_impl_._has_bits_[2], 0x00000100U); + ClearHasBit(_impl_._has_bits_[2], 0x00000010U); } inline bool XtcpConfig::resolve_container_id() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.resolve_container_id) @@ -13851,7 +13959,7 @@ inline bool XtcpConfig::resolve_container_id() const { } inline void XtcpConfig::set_resolve_container_id(bool value) { _internal_set_resolve_container_id(value); - SetHasBit(_impl_._has_bits_[2], 0x00000100U); + SetHasBit(_impl_._has_bits_[2], 0x00000010U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.resolve_container_id) } inline bool XtcpConfig::_internal_resolve_container_id() const { @@ -13867,7 +13975,7 @@ inline void XtcpConfig::_internal_set_resolve_container_id(bool value) { inline void XtcpConfig::clear_enrich_container_enable() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.enrich_container_enable_ = false; - ClearHasBit(_impl_._has_bits_[2], 0x00000200U); + ClearHasBit(_impl_._has_bits_[2], 0x00004000U); } inline bool XtcpConfig::enrich_container_enable() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.enrich_container_enable) @@ -13875,7 +13983,7 @@ inline bool XtcpConfig::enrich_container_enable() const { } inline void XtcpConfig::set_enrich_container_enable(bool value) { _internal_set_enrich_container_enable(value); - SetHasBit(_impl_._has_bits_[2], 0x00000200U); + SetHasBit(_impl_._has_bits_[2], 0x00004000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.enrich_container_enable) } inline bool XtcpConfig::_internal_enrich_container_enable() const { @@ -13955,7 +14063,7 @@ inline void XtcpConfig::set_allocated_docker_socket_path(::std::string* PROTOBUF inline void XtcpConfig::clear_enrich_lldp_enable() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.enrich_lldp_enable_ = false; - ClearHasBit(_impl_._has_bits_[2], 0x00000400U); + ClearHasBit(_impl_._has_bits_[2], 0x00008000U); } inline bool XtcpConfig::enrich_lldp_enable() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.enrich_lldp_enable) @@ -13963,7 +14071,7 @@ inline bool XtcpConfig::enrich_lldp_enable() const { } inline void XtcpConfig::set_enrich_lldp_enable(bool value) { _internal_set_enrich_lldp_enable(value); - SetHasBit(_impl_._has_bits_[2], 0x00000400U); + SetHasBit(_impl_._has_bits_[2], 0x00008000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.enrich_lldp_enable) } inline bool XtcpConfig::_internal_enrich_lldp_enable() const { @@ -14107,7 +14215,7 @@ inline void XtcpConfig::set_allocated_lldpd_version_hint(::std::string* PROTOBUF inline void XtcpConfig::clear_enrich_nic_enable() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.enrich_nic_enable_ = false; - ClearHasBit(_impl_._has_bits_[2], 0x00004000U); + ClearHasBit(_impl_._has_bits_[2], 0x00010000U); } inline bool XtcpConfig::enrich_nic_enable() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.enrich_nic_enable) @@ -14115,7 +14223,7 @@ inline bool XtcpConfig::enrich_nic_enable() const { } inline void XtcpConfig::set_enrich_nic_enable(bool value) { _internal_set_enrich_nic_enable(value); - SetHasBit(_impl_._has_bits_[2], 0x00004000U); + SetHasBit(_impl_._has_bits_[2], 0x00010000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.enrich_nic_enable) } inline bool XtcpConfig::_internal_enrich_nic_enable() const { @@ -14131,7 +14239,7 @@ inline void XtcpConfig::_internal_set_enrich_nic_enable(bool value) { inline void XtcpConfig::clear_uplink_count() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.uplink_count_ = 0u; - ClearHasBit(_impl_._has_bits_[2], 0x00002000U); + ClearHasBit(_impl_._has_bits_[2], 0x00040000U); } inline ::uint32_t XtcpConfig::uplink_count() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.uplink_count) @@ -14139,7 +14247,7 @@ inline ::uint32_t XtcpConfig::uplink_count() const { } inline void XtcpConfig::set_uplink_count(::uint32_t value) { _internal_set_uplink_count(value); - SetHasBit(_impl_._has_bits_[2], 0x00002000U); + SetHasBit(_impl_._has_bits_[2], 0x00040000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.uplink_count) } inline ::uint32_t XtcpConfig::_internal_uplink_count() const { @@ -14227,7 +14335,7 @@ XtcpConfig::_internal_mutable_uplink_interfaces() { inline void XtcpConfig::clear_populate_nsid() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.populate_nsid_ = false; - ClearHasBit(_impl_._has_bits_[2], 0x00008000U); + ClearHasBit(_impl_._has_bits_[2], 0x00020000U); } inline bool XtcpConfig::populate_nsid() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.populate_nsid) @@ -14235,7 +14343,7 @@ inline bool XtcpConfig::populate_nsid() const { } inline void XtcpConfig::set_populate_nsid(bool value) { _internal_set_populate_nsid(value); - SetHasBit(_impl_._has_bits_[2], 0x00008000U); + SetHasBit(_impl_._has_bits_[2], 0x00020000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.populate_nsid) } inline bool XtcpConfig::_internal_populate_nsid() const { @@ -14251,7 +14359,7 @@ inline void XtcpConfig::_internal_set_populate_nsid(bool value) { inline void XtcpConfig::clear_enrich_asn_enable() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.enrich_asn_enable_ = false; - ClearHasBit(_impl_._has_bits_[2], 0x00010000U); + ClearHasBit(_impl_._has_bits_[2], 0x00080000U); } inline bool XtcpConfig::enrich_asn_enable() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.enrich_asn_enable) @@ -14259,7 +14367,7 @@ inline bool XtcpConfig::enrich_asn_enable() const { } inline void XtcpConfig::set_enrich_asn_enable(bool value) { _internal_set_enrich_asn_enable(value); - SetHasBit(_impl_._has_bits_[2], 0x00010000U); + SetHasBit(_impl_._has_bits_[2], 0x00080000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.enrich_asn_enable) } inline bool XtcpConfig::_internal_enrich_asn_enable() const { @@ -14560,7 +14668,7 @@ inline void XtcpConfig::set_allocated_ipmeta_cache_path(::std::string* PROTOBUF_ inline void XtcpConfig::clear_enrich_locality_enable() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.enrich_locality_enable_ = false; - ClearHasBit(_impl_._has_bits_[2], 0x00020000U); + ClearHasBit(_impl_._has_bits_[2], 0x00100000U); } inline bool XtcpConfig::enrich_locality_enable() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.enrich_locality_enable) @@ -14568,7 +14676,7 @@ inline bool XtcpConfig::enrich_locality_enable() const { } inline void XtcpConfig::set_enrich_locality_enable(bool value) { _internal_set_enrich_locality_enable(value); - SetHasBit(_impl_._has_bits_[2], 0x00020000U); + SetHasBit(_impl_._has_bits_[2], 0x00100000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.enrich_locality_enable) } inline bool XtcpConfig::_internal_enrich_locality_enable() const { @@ -14677,7 +14785,7 @@ inline void XtcpConfig::set_allocated_locality_refresh_interval(::google::protob inline void XtcpConfig::clear_locality_events_enable() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.locality_events_enable_ = false; - ClearHasBit(_impl_._has_bits_[2], 0x00040000U); + ClearHasBit(_impl_._has_bits_[2], 0x00200000U); } inline bool XtcpConfig::locality_events_enable() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.locality_events_enable) @@ -14685,7 +14793,7 @@ inline bool XtcpConfig::locality_events_enable() const { } inline void XtcpConfig::set_locality_events_enable(bool value) { _internal_set_locality_events_enable(value); - SetHasBit(_impl_._has_bits_[2], 0x00040000U); + SetHasBit(_impl_._has_bits_[2], 0x00200000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.locality_events_enable) } inline bool XtcpConfig::_internal_locality_events_enable() const { diff --git a/gen/dart/xtcp_config/v1/xtcp_config.pb.dart b/gen/dart/xtcp_config/v1/xtcp_config.pb.dart index 690442e0e..a1996558d 100644 --- a/gen/dart/xtcp_config/v1/xtcp_config.pb.dart +++ b/gen/dart/xtcp_config/v1/xtcp_config.pb.dart @@ -1822,8 +1822,11 @@ class XtcpConfig extends $pb.GeneratedMessage { $core.bool? ioUring, $core.int? ioUringRecvBatchSize, $core.int? ioUringCqeBatchSize, + $fixnum.Int64? maxDumpBytes, + $fixnum.Int64? maxRecordsPerNetns, $1.Duration? reconcileFrequency, $core.bool? reconcileBeforePoll, + $core.int? maxNetns, $core.int? writeFiles, $core.String? capturePath, $core.int? destWriteFiles, @@ -1912,10 +1915,14 @@ class XtcpConfig extends $pb.GeneratedMessage { result.ioUringRecvBatchSize = ioUringRecvBatchSize; if (ioUringCqeBatchSize != null) result.ioUringCqeBatchSize = ioUringCqeBatchSize; + if (maxDumpBytes != null) result.maxDumpBytes = maxDumpBytes; + if (maxRecordsPerNetns != null) + result.maxRecordsPerNetns = maxRecordsPerNetns; if (reconcileFrequency != null) result.reconcileFrequency = reconcileFrequency; if (reconcileBeforePoll != null) result.reconcileBeforePoll = reconcileBeforePoll; + if (maxNetns != null) result.maxNetns = maxNetns; if (writeFiles != null) result.writeFiles = writeFiles; if (capturePath != null) result.capturePath = capturePath; if (destWriteFiles != null) result.destWriteFiles = destWriteFiles; @@ -2048,9 +2055,16 @@ class XtcpConfig extends $pb.GeneratedMessage { fieldType: $pb.PbFieldType.OU3) ..aI(24, _omitFieldNames ? '' : 'ioUringCqeBatchSize', fieldType: $pb.PbFieldType.OU3) + ..a<$fixnum.Int64>( + 25, _omitFieldNames ? '' : 'maxDumpBytes', $pb.PbFieldType.OU6, + defaultOrMaker: $fixnum.Int64.ZERO) + ..a<$fixnum.Int64>( + 26, _omitFieldNames ? '' : 'maxRecordsPerNetns', $pb.PbFieldType.OU6, + defaultOrMaker: $fixnum.Int64.ZERO) ..aOM<$1.Duration>(40, _omitFieldNames ? '' : 'reconcileFrequency', subBuilder: $1.Duration.$_createMessage) ..aOB(41, _omitFieldNames ? '' : 'reconcileBeforePoll') + ..aI(42, _omitFieldNames ? '' : 'maxNetns', fieldType: $pb.PbFieldType.OU3) ..aI(50, _omitFieldNames ? '' : 'writeFiles', fieldType: $pb.PbFieldType.OU3) ..aOS(51, _omitFieldNames ? '' : 'capturePath') @@ -2343,6 +2357,33 @@ class XtcpConfig extends $pb.GeneratedMessage { @$pb.TagNumber(24) void clearIoUringCqeBatchSize() => $_clearField(24); + /// Cap on the bytes of one namespace's inet_diag dump per poll. Packets + /// past it are drained from the socket without being decoded, and the + /// dump is counted in xtcp_dump_dropped_total{reason="bytes"}, so a + /// namespace with a huge socket table costs a metric, not the collector. + /// Startup-only. 0 = unlimited. Daemon default 256 MiB. + @$pb.TagNumber(25) + $fixnum.Int64 get maxDumpBytes => $_getI64(15); + @$pb.TagNumber(25) + set maxDumpBytes($fixnum.Int64 value) => $_setInt64(15, value); + @$pb.TagNumber(25) + $core.bool hasMaxDumpBytes() => $_has(15); + @$pb.TagNumber(25) + void clearMaxDumpBytes() => $_clearField(25); + + /// Cap on the records one namespace contributes per poll. Records past it + /// are dropped before attribute decode and enrichment, and the dump is + /// counted in xtcp_dump_dropped_total{reason="records"}. Startup-only. + /// 0 = unlimited. Daemon default 262144. + @$pb.TagNumber(26) + $fixnum.Int64 get maxRecordsPerNetns => $_getI64(16); + @$pb.TagNumber(26) + set maxRecordsPerNetns($fixnum.Int64 value) => $_setInt64(16, value); + @$pb.TagNumber(26) + $core.bool hasMaxRecordsPerNetns() => $_has(16); + @$pb.TagNumber(26) + void clearMaxRecordsPerNetns() => $_clearField(26); + /// Period of the background namespace-reconcile ticker (Method B /proc scan /// that converges the tracked namespace set). With reconcile_before_poll the /// Poller reconciles every cycle and is the real discovery mechanism, so this @@ -2352,15 +2393,15 @@ class XtcpConfig extends $pb.GeneratedMessage { /// matters when the poller is idle or disabled. 0 disables the background /// ticker entirely (the startup reconcile still runs once). @$pb.TagNumber(40) - $1.Duration get reconcileFrequency => $_getN(15); + $1.Duration get reconcileFrequency => $_getN(17); @$pb.TagNumber(40) set reconcileFrequency($1.Duration value) => $_setField(40, value); @$pb.TagNumber(40) - $core.bool hasReconcileFrequency() => $_has(15); + $core.bool hasReconcileFrequency() => $_has(17); @$pb.TagNumber(40) void clearReconcileFrequency() => $_clearField(40); @$pb.TagNumber(40) - $1.Duration ensureReconcileFrequency() => $_ensure(15); + $1.Duration ensureReconcileFrequency() => $_ensure(17); /// Run a namespace reconcile immediately before each poll cycle, so a /// namespace that appeared since the last cycle is entered and gets a socket @@ -2368,33 +2409,48 @@ class XtcpConfig extends $pb.GeneratedMessage { /// discovery cadence to poll cadence; the /proc scan is zero-allocation and /// mutex-serialized with the background reconciler. Default true. @$pb.TagNumber(41) - $core.bool get reconcileBeforePoll => $_getBF(16); + $core.bool get reconcileBeforePoll => $_getBF(18); @$pb.TagNumber(41) - set reconcileBeforePoll($core.bool value) => $_setBool(16, value); + set reconcileBeforePoll($core.bool value) => $_setBool(18, value); @$pb.TagNumber(41) - $core.bool hasReconcileBeforePoll() => $_has(16); + $core.bool hasReconcileBeforePoll() => $_has(18); @$pb.TagNumber(41) void clearReconcileBeforePoll() => $_clearField(41); + /// Cap on the network namespaces tracked, xtcp2's own included. Each costs + /// a netlink socket, a receiver and its decoders. At the cap, reconcile + /// adds no more, preferring the lowest pids (long-running workloads), and + /// counts the rest in xtcp_netns_dropped_total; a slot freed by a deleted + /// namespace is filled on the next reconcile. Startup-only. + /// 0 = unlimited. Daemon default 4096. + @$pb.TagNumber(42) + $core.int get maxNetns => $_getIZ(19); + @$pb.TagNumber(42) + set maxNetns($core.int value) => $_setUnsignedInt32(19, value); + @$pb.TagNumber(42) + $core.bool hasMaxNetns() => $_has(19); + @$pb.TagNumber(42) + void clearMaxNetns() => $_clearField(42); + /// Write netlink packets to writeFiles number of files ( to generate test data ) per netlinker /// xtcp will capture this many Netlink response packets when it starts /// This is PER netlinker @$pb.TagNumber(50) - $core.int get writeFiles => $_getIZ(17); + $core.int get writeFiles => $_getIZ(20); @$pb.TagNumber(50) - set writeFiles($core.int value) => $_setUnsignedInt32(17, value); + set writeFiles($core.int value) => $_setUnsignedInt32(20, value); @$pb.TagNumber(50) - $core.bool hasWriteFiles() => $_has(17); + $core.bool hasWriteFiles() => $_has(20); @$pb.TagNumber(50) void clearWriteFiles() => $_clearField(50); /// Write files path @$pb.TagNumber(51) - $core.String get capturePath => $_getSZ(18); + $core.String get capturePath => $_getSZ(21); @$pb.TagNumber(51) - set capturePath($core.String value) => $_setString(18, value); + set capturePath($core.String value) => $_setString(21, value); @$pb.TagNumber(51) - $core.bool hasCapturePath() => $_has(18); + $core.bool hasCapturePath() => $_has(21); @$pb.TagNumber(51) void clearCapturePath() => $_clearField(51); @@ -2402,21 +2458,21 @@ class XtcpConfig extends $pb.GeneratedMessage { /// xtcp will capture this many examples of the marshalled data /// This is PER poller @$pb.TagNumber(52) - $core.int get destWriteFiles => $_getIZ(19); + $core.int get destWriteFiles => $_getIZ(22); @$pb.TagNumber(52) - set destWriteFiles($core.int value) => $_setUnsignedInt32(19, value); + set destWriteFiles($core.int value) => $_setUnsignedInt32(22, value); @$pb.TagNumber(52) - $core.bool hasDestWriteFiles() => $_has(19); + $core.bool hasDestWriteFiles() => $_has(22); @$pb.TagNumber(52) void clearDestWriteFiles() => $_clearField(52); /// DebugLevel @$pb.TagNumber(53) - $core.int get debugLevel => $_getIZ(20); + $core.int get debugLevel => $_getIZ(23); @$pb.TagNumber(53) - set debugLevel($core.int value) => $_setUnsignedInt32(20, value); + set debugLevel($core.int value) => $_setUnsignedInt32(23, value); @$pb.TagNumber(53) - $core.bool hasDebugLevel() => $_has(20); + $core.bool hasDebugLevel() => $_has(23); @$pb.TagNumber(53) void clearDebugLevel() => $_clearField(53); @@ -2426,11 +2482,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// decode itself. The per-packet and per-dump series are always on. /// Takes effect when the netlinkers start (a restart after a Set). @$pb.TagNumber(54) - $core.bool get debugPrometheus => $_getBF(21); + $core.bool get debugPrometheus => $_getBF(24); @$pb.TagNumber(54) - set debugPrometheus($core.bool value) => $_setBool(21, value); + set debugPrometheus($core.bool value) => $_setBool(24, value); @$pb.TagNumber(54) - $core.bool hasDebugPrometheus() => $_has(21); + $core.bool hasDebugPrometheus() => $_has(24); @$pb.TagNumber(54) void clearDebugPrometheus() => $_clearField(54); @@ -2443,21 +2499,21 @@ class XtcpConfig extends $pb.GeneratedMessage { /// and S3 endpoints the INSERT query + FORMAT + format_schema + auth query /// params routinely run ~150+ chars, which the old 128 cap rejected. @$pb.TagNumber(60) - $core.String get dest => $_getSZ(22); + $core.String get dest => $_getSZ(25); @$pb.TagNumber(60) - set dest($core.String value) => $_setString(22, value); + set dest($core.String value) => $_setString(25, value); @$pb.TagNumber(60) - $core.bool hasDest() => $_has(22); + $core.bool hasDest() => $_has(25); @$pb.TagNumber(60) void clearDest() => $_clearField(60); /// Marshalling of the exported data (protobufList,json,prototext) @$pb.TagNumber(61) - $core.String get marshalTo => $_getSZ(23); + $core.String get marshalTo => $_getSZ(26); @$pb.TagNumber(61) - set marshalTo($core.String value) => $_setString(23, value); + set marshalTo($core.String value) => $_setString(26, value); @$pb.TagNumber(61) - $core.bool hasMarshalTo() => $_has(23); + $core.bool hasMarshalTo() => $_has(26); @$pb.TagNumber(61) void clearMarshalTo() => $_clearField(61); @@ -2466,22 +2522,22 @@ class XtcpConfig extends $pb.GeneratedMessage { /// "hostname,inetDiagMsgSocketSourcePort,inetDiagMsgState,tcpInfoRtt"). /// Empty = all fields. Ignored by non-tabular marshallers. @$pb.TagNumber(62) - $core.String get csvColumns => $_getSZ(24); + $core.String get csvColumns => $_getSZ(27); @$pb.TagNumber(62) - set csvColumns($core.String value) => $_setString(24, value); + set csvColumns($core.String value) => $_setString(27, value); @$pb.TagNumber(62) - $core.bool hasCsvColumns() => $_has(24); + $core.bool hasCsvColumns() => $_has(27); @$pb.TagNumber(62) void clearCsvColumns() => $_clearField(62); /// XtcpProtoFile — path of the xtcp_flat_record.proto the daemon reads at /// startup and POSTs to the Kafka schema registry (kafka_schema_url). @$pb.TagNumber(63) - $core.String get xtcpProtoFile => $_getSZ(25); + $core.String get xtcpProtoFile => $_getSZ(28); @$pb.TagNumber(63) - set xtcpProtoFile($core.String value) => $_setString(25, value); + set xtcpProtoFile($core.String value) => $_setString(28, value); @$pb.TagNumber(63) - $core.bool hasXtcpProtoFile() => $_has(25); + $core.bool hasXtcpProtoFile() => $_has(28); @$pb.TagNumber(63) void clearXtcpProtoFile() => $_clearField(63); @@ -2498,12 +2554,12 @@ class XtcpConfig extends $pb.GeneratedMessage { /// `bytes` fields. For everyday batch sizing, prefer the row-count /// cap (envelope_flush_threshold_rows) below. @$pb.TagNumber(64) - $core.int get envelopeFlushThresholdBytes => $_getIZ(26); + $core.int get envelopeFlushThresholdBytes => $_getIZ(29); @$pb.TagNumber(64) set envelopeFlushThresholdBytes($core.int value) => - $_setUnsignedInt32(26, value); + $_setUnsignedInt32(29, value); @$pb.TagNumber(64) - $core.bool hasEnvelopeFlushThresholdBytes() => $_has(26); + $core.bool hasEnvelopeFlushThresholdBytes() => $_has(29); @$pb.TagNumber(64) void clearEnvelopeFlushThresholdBytes() => $_clearField(64); @@ -2518,32 +2574,32 @@ class XtcpConfig extends $pb.GeneratedMessage { /// with the ClickHouse kafka_max_rows_per_message setting so a /// produced envelope never forces the consumer to split it). @$pb.TagNumber(65) - $core.int get envelopeFlushThresholdRows => $_getIZ(27); + $core.int get envelopeFlushThresholdRows => $_getIZ(30); @$pb.TagNumber(65) set envelopeFlushThresholdRows($core.int value) => - $_setUnsignedInt32(27, value); + $_setUnsignedInt32(30, value); @$pb.TagNumber(65) - $core.bool hasEnvelopeFlushThresholdRows() => $_has(27); + $core.bool hasEnvelopeFlushThresholdRows() => $_has(30); @$pb.TagNumber(65) void clearEnvelopeFlushThresholdRows() => $_clearField(65); /// Kafka or NSQ topic @$pb.TagNumber(80) - $core.String get topic => $_getSZ(28); + $core.String get topic => $_getSZ(31); @$pb.TagNumber(80) - set topic($core.String value) => $_setString(28, value); + set topic($core.String value) => $_setString(31, value); @$pb.TagNumber(80) - $core.bool hasTopic() => $_has(28); + $core.bool hasTopic() => $_has(31); @$pb.TagNumber(80) void clearTopic() => $_clearField(80); /// Kafka schema registry url @$pb.TagNumber(81) - $core.String get kafkaSchemaUrl => $_getSZ(29); + $core.String get kafkaSchemaUrl => $_getSZ(32); @$pb.TagNumber(81) - set kafkaSchemaUrl($core.String value) => $_setString(29, value); + set kafkaSchemaUrl($core.String value) => $_setString(32, value); @$pb.TagNumber(81) - $core.bool hasKafkaSchemaUrl() => $_has(29); + $core.bool hasKafkaSchemaUrl() => $_has(32); @$pb.TagNumber(81) void clearKafkaSchemaUrl() => $_clearField(81); @@ -2551,15 +2607,15 @@ class XtcpConfig extends $pb.GeneratedMessage { /// Recommend a small timeout, like 1-2 seconds /// kgo seems to have a bug, because the timeout is always expired @$pb.TagNumber(82) - $1.Duration get kafkaProduceTimeout => $_getN(30); + $1.Duration get kafkaProduceTimeout => $_getN(33); @$pb.TagNumber(82) set kafkaProduceTimeout($1.Duration value) => $_setField(82, value); @$pb.TagNumber(82) - $core.bool hasKafkaProduceTimeout() => $_has(30); + $core.bool hasKafkaProduceTimeout() => $_has(33); @$pb.TagNumber(82) void clearKafkaProduceTimeout() => $_clearField(82); @$pb.TagNumber(82) - $1.Duration ensureKafkaProduceTimeout() => $_ensure(30); + $1.Duration ensureKafkaProduceTimeout() => $_ensure(33); /// Kafka producer-batch compression codec. franz-go picks one codec /// from the supplied preference list that the broker advertises. @@ -2580,11 +2636,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// Pick "lz4" if xtcp2 is CPU-bound on the producer side; pick /// "zstd" (the default) if Kafka throughput / disk usage matters more. @$pb.TagNumber(83) - $core.String get kafkaCompression => $_getSZ(31); + $core.String get kafkaCompression => $_getSZ(34); @$pb.TagNumber(83) - set kafkaCompression($core.String value) => $_setString(31, value); + set kafkaCompression($core.String value) => $_setString(34, value); @$pb.TagNumber(83) - $core.bool hasKafkaCompression() => $_has(31); + $core.bool hasKafkaCompression() => $_has(34); @$pb.TagNumber(83) void clearKafkaCompression() => $_clearField(83); @@ -2592,33 +2648,33 @@ class XtcpConfig extends $pb.GeneratedMessage { /// "https://s3.amazonaws.com" (AWS). May be empty if -dest carries /// it via the s3parquet: form. @$pb.TagNumber(100) - $core.String get s3Endpoint => $_getSZ(32); + $core.String get s3Endpoint => $_getSZ(35); @$pb.TagNumber(100) - set s3Endpoint($core.String value) => $_setString(32, value); + set s3Endpoint($core.String value) => $_setString(35, value); @$pb.TagNumber(100) - $core.bool hasS3Endpoint() => $_has(32); + $core.bool hasS3Endpoint() => $_has(35); @$pb.TagNumber(100) void clearS3Endpoint() => $_clearField(100); /// S3 region. Required by some S3 implementations even when talking /// to a single-region MinIO. Default "us-east-1" when blank. @$pb.TagNumber(101) - $core.String get s3Region => $_getSZ(33); + $core.String get s3Region => $_getSZ(36); @$pb.TagNumber(101) - set s3Region($core.String value) => $_setString(33, value); + set s3Region($core.String value) => $_setString(36, value); @$pb.TagNumber(101) - $core.bool hasS3Region() => $_has(33); + $core.bool hasS3Region() => $_has(36); @$pb.TagNumber(101) void clearS3Region() => $_clearField(101); /// Required when -dest s3parquet. Bucket must already exist on the /// endpoint; the daemon does not auto-create. @$pb.TagNumber(102) - $core.String get s3Bucket => $_getSZ(34); + $core.String get s3Bucket => $_getSZ(37); @$pb.TagNumber(102) - set s3Bucket($core.String value) => $_setString(34, value); + set s3Bucket($core.String value) => $_setString(37, value); @$pb.TagNumber(102) - $core.bool hasS3Bucket() => $_has(34); + $core.bool hasS3Bucket() => $_has(37); @$pb.TagNumber(102) void clearS3Bucket() => $_clearField(102); @@ -2626,33 +2682,33 @@ class XtcpConfig extends $pb.GeneratedMessage { /// partition segments (host=…/date=…/hour=…/.parquet). Empty /// = files land at the bucket root level. @$pb.TagNumber(103) - $core.String get s3Prefix => $_getSZ(35); + $core.String get s3Prefix => $_getSZ(38); @$pb.TagNumber(103) - set s3Prefix($core.String value) => $_setString(35, value); + set s3Prefix($core.String value) => $_setString(38, value); @$pb.TagNumber(103) - $core.bool hasS3Prefix() => $_has(35); + $core.bool hasS3Prefix() => $_has(38); @$pb.TagNumber(103) void clearS3Prefix() => $_clearField(103); /// Required when -dest s3parquet. Picked up from AWS_ACCESS_KEY_ID /// env if blank. @$pb.TagNumber(104) - $core.String get s3AccessKey => $_getSZ(36); + $core.String get s3AccessKey => $_getSZ(39); @$pb.TagNumber(104) - set s3AccessKey($core.String value) => $_setString(36, value); + set s3AccessKey($core.String value) => $_setString(39, value); @$pb.TagNumber(104) - $core.bool hasS3AccessKey() => $_has(36); + $core.bool hasS3AccessKey() => $_has(39); @$pb.TagNumber(104) void clearS3AccessKey() => $_clearField(104); /// Required when -dest s3parquet. Picked up from AWS_SECRET_ACCESS_KEY /// env if blank. Never logged. @$pb.TagNumber(105) - $core.String get s3SecretKey => $_getSZ(37); + $core.String get s3SecretKey => $_getSZ(40); @$pb.TagNumber(105) - set s3SecretKey($core.String value) => $_setString(37, value); + set s3SecretKey($core.String value) => $_setString(40, value); @$pb.TagNumber(105) - $core.bool hasS3SecretKey() => $_has(37); + $core.bool hasS3SecretKey() => $_has(40); @$pb.TagNumber(105) void clearS3SecretKey() => $_clearField(105); @@ -2663,11 +2719,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// daemon can start without list permission. Default false keeps the /// fail-fast probe for normal deployments. @$pb.TagNumber(106) - $core.bool get s3SkipBucketProbe => $_getBF(38); + $core.bool get s3SkipBucketProbe => $_getBF(41); @$pb.TagNumber(106) - set s3SkipBucketProbe($core.bool value) => $_setBool(38, value); + set s3SkipBucketProbe($core.bool value) => $_setBool(41, value); @$pb.TagNumber(106) - $core.bool hasS3SkipBucketProbe() => $_has(38); + $core.bool hasS3SkipBucketProbe() => $_has(41); @$pb.TagNumber(106) void clearS3SkipBucketProbe() => $_clearField(106); @@ -2676,11 +2732,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// refuses http:// unless this is set; a bare host:port and https:// both /// use TLS. For local test fixtures only. Sets the xtcp2_s3_insecure gauge. @$pb.TagNumber(107) - $core.bool get s3AllowInsecure => $_getBF(39); + $core.bool get s3AllowInsecure => $_getBF(42); @$pb.TagNumber(107) - set s3AllowInsecure($core.bool value) => $_setBool(39, value); + set s3AllowInsecure($core.bool value) => $_setBool(42, value); @$pb.TagNumber(107) - $core.bool hasS3AllowInsecure() => $_has(39); + $core.bool hasS3AllowInsecure() => $_has(42); @$pb.TagNumber(107) void clearS3AllowInsecure() => $_clearField(107); @@ -2688,11 +2744,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// to the system roots. For a private CA in front of an S3-compatible /// store. Empty = system roots only. @$pb.TagNumber(108) - $core.String get s3CaFile => $_getSZ(40); + $core.String get s3CaFile => $_getSZ(43); @$pb.TagNumber(108) - set s3CaFile($core.String value) => $_setString(40, value); + set s3CaFile($core.String value) => $_setString(43, value); @$pb.TagNumber(108) - $core.bool hasS3CaFile() => $_has(40); + $core.bool hasS3CaFile() => $_has(43); @$pb.TagNumber(108) void clearS3CaFile() => $_clearField(108); @@ -2703,12 +2759,12 @@ class XtcpConfig extends $pb.GeneratedMessage { /// smaller per-file query latency) or up for fewer larger files /// (better compression ratio, more memory). @$pb.TagNumber(110) - $core.int get s3ParquetFlushThresholdBytes => $_getIZ(41); + $core.int get s3ParquetFlushThresholdBytes => $_getIZ(44); @$pb.TagNumber(110) set s3ParquetFlushThresholdBytes($core.int value) => - $_setUnsignedInt32(41, value); + $_setUnsignedInt32(44, value); @$pb.TagNumber(110) - $core.bool hasS3ParquetFlushThresholdBytes() => $_has(41); + $core.bool hasS3ParquetFlushThresholdBytes() => $_has(44); @$pb.TagNumber(110) void clearS3ParquetFlushThresholdBytes() => $_clearField(110); @@ -2716,25 +2772,25 @@ class XtcpConfig extends $pb.GeneratedMessage { /// after this long even if it hasn't reached the byte cap, bounding upload /// latency for low-volume hosts. 0 = derive as max(poll_frequency, 30m). @$pb.TagNumber(111) - $1.Duration get s3FlushInterval => $_getN(42); + $1.Duration get s3FlushInterval => $_getN(45); @$pb.TagNumber(111) set s3FlushInterval($1.Duration value) => $_setField(111, value); @$pb.TagNumber(111) - $core.bool hasS3FlushInterval() => $_has(42); + $core.bool hasS3FlushInterval() => $_has(45); @$pb.TagNumber(111) void clearS3FlushInterval() => $_clearField(111); @$pb.TagNumber(111) - $1.Duration ensureS3FlushInterval() => $_ensure(42); + $1.Duration ensureS3FlushInterval() => $_ensure(45); /// Maximum jitter as a percent of s3_flush_interval, applied to the first /// timed flush and each interval so the fleet doesn't ceiling-flush in /// lockstep. 0 disables. Default 20. @$pb.TagNumber(112) - $core.int get s3FlushJitterPct => $_getIZ(43); + $core.int get s3FlushJitterPct => $_getIZ(46); @$pb.TagNumber(112) - set s3FlushJitterPct($core.int value) => $_setUnsignedInt32(43, value); + set s3FlushJitterPct($core.int value) => $_setUnsignedInt32(46, value); @$pb.TagNumber(112) - $core.bool hasS3FlushJitterPct() => $_has(43); + $core.bool hasS3FlushJitterPct() => $_has(46); @$pb.TagNumber(112) void clearS3FlushJitterPct() => $_clearField(112); @@ -2743,23 +2799,23 @@ class XtcpConfig extends $pb.GeneratedMessage { /// size-cap upload path even under uniform load. Downward-only, so an /// object never exceeds the in-memory byte bound. 0 disables. Default 20. @$pb.TagNumber(113) - $core.int get s3FlushThresholdJitterPct => $_getIZ(44); + $core.int get s3FlushThresholdJitterPct => $_getIZ(47); @$pb.TagNumber(113) set s3FlushThresholdJitterPct($core.int value) => - $_setUnsignedInt32(44, value); + $_setUnsignedInt32(47, value); @$pb.TagNumber(113) - $core.bool hasS3FlushThresholdJitterPct() => $_has(44); + $core.bool hasS3FlushThresholdJitterPct() => $_has(47); @$pb.TagNumber(113) void clearS3FlushThresholdJitterPct() => $_clearField(113); /// Maximum S3 upload attempts (original + retries) before dropping the /// object. Retries use full-jitter exponential backoff. Default 10. @$pb.TagNumber(114) - $core.int get s3UploadMaxAttempts => $_getIZ(45); + $core.int get s3UploadMaxAttempts => $_getIZ(48); @$pb.TagNumber(114) - set s3UploadMaxAttempts($core.int value) => $_setUnsignedInt32(45, value); + set s3UploadMaxAttempts($core.int value) => $_setUnsignedInt32(48, value); @$pb.TagNumber(114) - $core.bool hasS3UploadMaxAttempts() => $_has(45); + $core.bool hasS3UploadMaxAttempts() => $_has(48); @$pb.TagNumber(114) void clearS3UploadMaxAttempts() => $_clearField(114); @@ -2767,15 +2823,15 @@ class XtcpConfig extends $pb.GeneratedMessage { /// [0, window], window grows exponentially up to this cap). 0 = derive as /// clamp(poll_frequency/10, 1s, 1h). @$pb.TagNumber(115) - $1.Duration get s3UploadBackoffCap => $_getN(46); + $1.Duration get s3UploadBackoffCap => $_getN(49); @$pb.TagNumber(115) set s3UploadBackoffCap($1.Duration value) => $_setField(115, value); @$pb.TagNumber(115) - $core.bool hasS3UploadBackoffCap() => $_has(46); + $core.bool hasS3UploadBackoffCap() => $_has(49); @$pb.TagNumber(115) void clearS3UploadBackoffCap() => $_clearField(115); @$pb.TagNumber(115) - $1.Duration ensureS3UploadBackoffCap() => $_ensure(46); + $1.Duration ensureS3UploadBackoffCap() => $_ensure(49); /// Hostname override. When empty the daemon uses os.Hostname(); set this to /// stamp an explicit hostname on records — required in containers, where @@ -2783,11 +2839,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// flag or XTCP_HOSTNAME env (NOT HOSTNAME, which Docker sets to the /// container id). @$pb.TagNumber(130) - $core.String get hostname => $_getSZ(47); + $core.String get hostname => $_getSZ(50); @$pb.TagNumber(130) - set hostname($core.String value) => $_setString(47, value); + set hostname($core.String value) => $_setString(50, value); @$pb.TagNumber(130) - $core.bool hasHostname() => $_has(47); + $core.bool hasHostname() => $_has(50); @$pb.TagNumber(130) void clearHostname() => $_clearField(130); @@ -2795,31 +2851,31 @@ class XtcpConfig extends $pb.GeneratedMessage { /// region, site, …). Generic; stamped on every record's `location` field. /// Set via -location flag or LOCATION env. @$pb.TagNumber(131) - $core.String get location => $_getSZ(48); + $core.String get location => $_getSZ(51); @$pb.TagNumber(131) - set location($core.String value) => $_setString(48, value); + set location($core.String value) => $_setString(51, value); @$pb.TagNumber(131) - $core.bool hasLocation() => $_has(48); + $core.bool hasLocation() => $_has(51); @$pb.TagNumber(131) void clearLocation() => $_clearField(131); /// Label applied to the protobuf @$pb.TagNumber(132) - $core.String get label => $_getSZ(49); + $core.String get label => $_getSZ(52); @$pb.TagNumber(132) - set label($core.String value) => $_setString(49, value); + set label($core.String value) => $_setString(52, value); @$pb.TagNumber(132) - $core.bool hasLabel() => $_has(49); + $core.bool hasLabel() => $_has(52); @$pb.TagNumber(132) void clearLabel() => $_clearField(132); /// Tag applied to the protobuf @$pb.TagNumber(133) - $core.String get tag => $_getSZ(50); + $core.String get tag => $_getSZ(53); @$pb.TagNumber(133) - set tag($core.String value) => $_setString(50, value); + set tag($core.String value) => $_setString(53, value); @$pb.TagNumber(133) - $core.bool hasTag() => $_has(50); + $core.bool hasTag() => $_has(53); @$pb.TagNumber(133) void clearTag() => $_clearField(133); @@ -2828,11 +2884,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// vars, not a user flag; informational only (debugging which binary produced a /// row). See XtcpFlatRecord.daemon_version. @$pb.TagNumber(134) - $core.String get daemonVersion => $_getSZ(51); + $core.String get daemonVersion => $_getSZ(54); @$pb.TagNumber(134) - set daemonVersion($core.String value) => $_setString(51, value); + set daemonVersion($core.String value) => $_setString(54, value); @$pb.TagNumber(134) - $core.bool hasDaemonVersion() => $_has(51); + $core.bool hasDaemonVersion() => $_has(54); @$pb.TagNumber(134) void clearDaemonVersion() => $_clearField(134); @@ -2842,22 +2898,22 @@ class XtcpConfig extends $pb.GeneratedMessage { /// analogue of the host nftables TTL clamp. Set via -ipv4Ttl / IPV4_TTL. /// (cf. prometheus/exporter-toolkit#396.) @$pb.TagNumber(150) - $core.int get ipv4Ttl => $_getIZ(52); + $core.int get ipv4Ttl => $_getIZ(55); @$pb.TagNumber(150) - set ipv4Ttl($core.int value) => $_setUnsignedInt32(52, value); + set ipv4Ttl($core.int value) => $_setUnsignedInt32(55, value); @$pb.TagNumber(150) - $core.bool hasIpv4Ttl() => $_has(52); + $core.bool hasIpv4Ttl() => $_has(55); @$pb.TagNumber(150) void clearIpv4Ttl() => $_clearField(150); /// Outgoing IPv6 unicast hop limit for xtcp2's own TCP listeners. 0 = kernel /// default. Same intent as ipv4_ttl. Set via -ipv6HopLimit / IPV6_HOP_LIMIT. @$pb.TagNumber(151) - $core.int get ipv6HopLimit => $_getIZ(53); + $core.int get ipv6HopLimit => $_getIZ(56); @$pb.TagNumber(151) - set ipv6HopLimit($core.int value) => $_setUnsignedInt32(53, value); + set ipv6HopLimit($core.int value) => $_setUnsignedInt32(56, value); @$pb.TagNumber(151) - $core.bool hasIpv6HopLimit() => $_has(53); + $core.bool hasIpv6HopLimit() => $_has(56); @$pb.TagNumber(151) void clearIpv6HopLimit() => $_clearField(151); @@ -2867,28 +2923,28 @@ class XtcpConfig extends $pb.GeneratedMessage { /// the read credential: it reaches only methods marked ACCESS_READ. /// Secrets are redacted from every ConfigService response. @$pb.TagNumber(152) - ListenerAuth get listenerAuth => $_getN(54); + ListenerAuth get listenerAuth => $_getN(57); @$pb.TagNumber(152) set listenerAuth(ListenerAuth value) => $_setField(152, value); @$pb.TagNumber(152) - $core.bool hasListenerAuth() => $_has(54); + $core.bool hasListenerAuth() => $_has(57); @$pb.TagNumber(152) void clearListenerAuth() => $_clearField(152); @$pb.TagNumber(152) - ListenerAuth ensureListenerAuth() => $_ensure(54); + ListenerAuth ensureListenerAuth() => $_ensure(57); /// Prometheus / pprof / health listener endpoint. When unset, the daemon /// keeps the legacy TCP behavior from -promListen / PROM_LISTEN. @$pb.TagNumber(153) - ListenerEndpoint get prometheusListener => $_getN(55); + ListenerEndpoint get prometheusListener => $_getN(58); @$pb.TagNumber(153) set prometheusListener(ListenerEndpoint value) => $_setField(153, value); @$pb.TagNumber(153) - $core.bool hasPrometheusListener() => $_has(55); + $core.bool hasPrometheusListener() => $_has(58); @$pb.TagNumber(153) void clearPrometheusListener() => $_clearField(153); @$pb.TagNumber(153) - ListenerEndpoint ensurePrometheusListener() => $_ensure(55); + ListenerEndpoint ensurePrometheusListener() => $_ensure(58); /// Admin credential. When set, ACCESS_ADMIN methods (ConfigService.Set, the /// runtime triggers, link-monitor rebaseline, /debug/pprof) require it, and @@ -2896,47 +2952,47 @@ class XtcpConfig extends $pb.GeneratedMessage { /// listener_auth behaviour. Secrets are redacted from ConfigService /// responses. @$pb.TagNumber(154) - ListenerAuth get adminListenerAuth => $_getN(56); + ListenerAuth get adminListenerAuth => $_getN(59); @$pb.TagNumber(154) set adminListenerAuth(ListenerAuth value) => $_setField(154, value); @$pb.TagNumber(154) - $core.bool hasAdminListenerAuth() => $_has(56); + $core.bool hasAdminListenerAuth() => $_has(59); @$pb.TagNumber(154) void clearAdminListenerAuth() => $_clearField(154); @$pb.TagNumber(154) - ListenerAuth ensureAdminListenerAuth() => $_ensure(56); + ListenerAuth ensureAdminListenerAuth() => $_ensure(59); /// GRPC listening port /// Legacy: the gRPC port when -grpcPort (or GRPC_PORT) expands into a /// listener. 0 when the listener model configures gRPC. @$pb.TagNumber(160) - $core.int get grpcPort => $_getIZ(57); + $core.int get grpcPort => $_getIZ(60); @$pb.TagNumber(160) - set grpcPort($core.int value) => $_setUnsignedInt32(57, value); + set grpcPort($core.int value) => $_setUnsignedInt32(60, value); @$pb.TagNumber(160) - $core.bool hasGrpcPort() => $_has(57); + $core.bool hasGrpcPort() => $_has(60); @$pb.TagNumber(160) void clearGrpcPort() => $_clearField(160); /// gRPC listener endpoint. When unset, the daemon keeps the legacy TCP /// behavior derived from grpc_port. @$pb.TagNumber(161) - ListenerEndpoint get grpcListener => $_getN(58); + ListenerEndpoint get grpcListener => $_getN(61); @$pb.TagNumber(161) set grpcListener(ListenerEndpoint value) => $_setField(161, value); @$pb.TagNumber(161) - $core.bool hasGrpcListener() => $_has(58); + $core.bool hasGrpcListener() => $_has(61); @$pb.TagNumber(161) void clearGrpcListener() => $_clearField(161); @$pb.TagNumber(161) - ListenerEndpoint ensureGrpcListener() => $_ensure(58); + ListenerEndpoint ensureGrpcListener() => $_ensure(61); /// Every listener the daemon opens (-listener, LISTENERS). Empty means the /// default: one UDS, /run/xtcp2/metrics.sock mode 0600, raw bearer auth, /// serving health, metrics and metrics-detail. The legacy -promListen*, /// -grpc* and -linkMonitorIPListen flags expand into entries here. @$pb.TagNumber(162) - $pb.PbList get listeners => $_getList(59); + $pb.PbList get listeners => $_getList(62); /// Pyroscope continuous-profiling server URL (e.g. /// http://127.0.0.1:4040). When set, the daemon streams CPU, @@ -2946,11 +3002,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// Grafana Cloud Pyroscope) and point xtcp2 at it for live profile /// data without restarts. @$pb.TagNumber(170) - $core.String get pyroscopeUrl => $_getSZ(60); + $core.String get pyroscopeUrl => $_getSZ(63); @$pb.TagNumber(170) - set pyroscopeUrl($core.String value) => $_setString(60, value); + set pyroscopeUrl($core.String value) => $_setString(63, value); @$pb.TagNumber(170) - $core.bool hasPyroscopeUrl() => $_has(60); + $core.bool hasPyroscopeUrl() => $_has(63); @$pb.TagNumber(170) void clearPyroscopeUrl() => $_clearField(170); @@ -2959,34 +3015,34 @@ class XtcpConfig extends $pb.GeneratedMessage { /// Set per fleet/role for multi-host environments /// (e.g. "xtcp2.prod.iad", "xtcp2.staging.fra"). @$pb.TagNumber(171) - $core.String get pyroscopeAppName => $_getSZ(61); + $core.String get pyroscopeAppName => $_getSZ(64); @$pb.TagNumber(171) - set pyroscopeAppName($core.String value) => $_setString(61, value); + set pyroscopeAppName($core.String value) => $_setString(64, value); @$pb.TagNumber(171) - $core.bool hasPyroscopeAppName() => $_has(61); + $core.bool hasPyroscopeAppName() => $_has(64); @$pb.TagNumber(171) void clearPyroscopeAppName() => $_clearField(171); /// CPU profile sampling rate in Hz. Default 100. The Pyroscope /// agent uses this to call runtime.SetCPUProfileRate at startup. @$pb.TagNumber(172) - $core.int get pyroscopeSampleHz => $_getIZ(62); + $core.int get pyroscopeSampleHz => $_getIZ(65); @$pb.TagNumber(172) - set pyroscopeSampleHz($core.int value) => $_setUnsignedInt32(62, value); + set pyroscopeSampleHz($core.int value) => $_setUnsignedInt32(65, value); @$pb.TagNumber(172) - $core.bool hasPyroscopeSampleHz() => $_has(62); + $core.bool hasPyroscopeSampleHz() => $_has(65); @$pb.TagNumber(172) void clearPyroscopeSampleHz() => $_clearField(172); /// Profile upload interval (seconds between batched profile /// pushes). Default 15 s. @$pb.TagNumber(173) - $core.int get pyroscopeUploadIntervalSec => $_getIZ(63); + $core.int get pyroscopeUploadIntervalSec => $_getIZ(66); @$pb.TagNumber(173) set pyroscopeUploadIntervalSec($core.int value) => - $_setUnsignedInt32(63, value); + $_setUnsignedInt32(66, value); @$pb.TagNumber(173) - $core.bool hasPyroscopeUploadIntervalSec() => $_has(63); + $core.bool hasPyroscopeUploadIntervalSec() => $_has(66); @$pb.TagNumber(173) void clearPyroscopeUploadIntervalSec() => $_clearField(173); @@ -2997,11 +3053,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// CONTAINER_ID_RESOLVE env. Needs /sys/fs/cgroup readable (mount it and run /// --cgroupns=host in a container). @$pb.TagNumber(200) - $core.bool get resolveContainerId => $_getBF(64); + $core.bool get resolveContainerId => $_getBF(67); @$pb.TagNumber(200) - set resolveContainerId($core.bool value) => $_setBool(64, value); + set resolveContainerId($core.bool value) => $_setBool(67, value); @$pb.TagNumber(200) - $core.bool hasResolveContainerId() => $_has(64); + $core.bool hasResolveContainerId() => $_has(67); @$pb.TagNumber(200) void clearResolveContainerId() => $_clearField(200); @@ -3009,21 +3065,21 @@ class XtcpConfig extends $pb.GeneratedMessage { /// by joining the socket's owning netns inode against the Docker Engine API /// index over docker_socket_path. Default false. @$pb.TagNumber(201) - $core.bool get enrichContainerEnable => $_getBF(65); + $core.bool get enrichContainerEnable => $_getBF(68); @$pb.TagNumber(201) - set enrichContainerEnable($core.bool value) => $_setBool(65, value); + set enrichContainerEnable($core.bool value) => $_setBool(68, value); @$pb.TagNumber(201) - $core.bool hasEnrichContainerEnable() => $_has(65); + $core.bool hasEnrichContainerEnable() => $_has(68); @$pb.TagNumber(201) void clearEnrichContainerEnable() => $_clearField(201); /// Docker Engine API unix socket. Default "/run/docker.sock". @$pb.TagNumber(202) - $core.String get dockerSocketPath => $_getSZ(66); + $core.String get dockerSocketPath => $_getSZ(69); @$pb.TagNumber(202) - set dockerSocketPath($core.String value) => $_setString(66, value); + set dockerSocketPath($core.String value) => $_setString(69, value); @$pb.TagNumber(202) - $core.bool hasDockerSocketPath() => $_has(66); + $core.bool hasDockerSocketPath() => $_has(69); @$pb.TagNumber(202) void clearDockerSocketPath() => $_clearField(202); @@ -3031,32 +3087,32 @@ class XtcpConfig extends $pb.GeneratedMessage { /// Enrich per-uplink LLDP neighbor labels by reading the lldpd control socket /// (lldpd_socket_path) once at startup. Default false. @$pb.TagNumber(210) - $core.bool get enrichLldpEnable => $_getBF(67); + $core.bool get enrichLldpEnable => $_getBF(70); @$pb.TagNumber(210) - set enrichLldpEnable($core.bool value) => $_setBool(67, value); + set enrichLldpEnable($core.bool value) => $_setBool(70, value); @$pb.TagNumber(210) - $core.bool hasEnrichLldpEnable() => $_has(67); + $core.bool hasEnrichLldpEnable() => $_has(70); @$pb.TagNumber(210) void clearEnrichLldpEnable() => $_clearField(210); /// lldpd control socket. Default "/run/lldpd.socket". @$pb.TagNumber(211) - $core.String get lldpdSocketPath => $_getSZ(68); + $core.String get lldpdSocketPath => $_getSZ(71); @$pb.TagNumber(211) - set lldpdSocketPath($core.String value) => $_setString(68, value); + set lldpdSocketPath($core.String value) => $_setString(71, value); @$pb.TagNumber(211) - $core.bool hasLldpdSocketPath() => $_has(68); + $core.bool hasLldpdSocketPath() => $_has(71); @$pb.TagNumber(211) void clearLldpdSocketPath() => $_clearField(211); /// Optional lldpd version hint ("1.0.13"/"1.0.18") selecting the struct-layout /// descriptor for the wire parser. Empty = auto-detect. Default "". @$pb.TagNumber(212) - $core.String get lldpdVersionHint => $_getSZ(69); + $core.String get lldpdVersionHint => $_getSZ(72); @$pb.TagNumber(212) - set lldpdVersionHint($core.String value) => $_setString(69, value); + set lldpdVersionHint($core.String value) => $_setString(72, value); @$pb.TagNumber(212) - $core.bool hasLldpdVersionHint() => $_has(69); + $core.bool hasLldpdVersionHint() => $_has(72); @$pb.TagNumber(212) void clearLldpdVersionHint() => $_clearField(212); @@ -3064,38 +3120,38 @@ class XtcpConfig extends $pb.GeneratedMessage { /// Enrich per-uplink NIC labels (driver/model/pci/speed/firmware) from sysfs + /// the ethtool ioctl once at startup. Default false. @$pb.TagNumber(220) - $core.bool get enrichNicEnable => $_getBF(70); + $core.bool get enrichNicEnable => $_getBF(73); @$pb.TagNumber(220) - set enrichNicEnable($core.bool value) => $_setBool(70, value); + set enrichNicEnable($core.bool value) => $_setBool(73, value); @$pb.TagNumber(220) - $core.bool hasEnrichNicEnable() => $_has(70); + $core.bool hasEnrichNicEnable() => $_has(73); @$pb.TagNumber(220) void clearEnrichNicEnable() => $_clearField(220); /// Number of host uplink slots to populate (dual-homed hosts = 2). Default 2. @$pb.TagNumber(221) - $core.int get uplinkCount => $_getIZ(71); + $core.int get uplinkCount => $_getIZ(74); @$pb.TagNumber(221) - set uplinkCount($core.int value) => $_setUnsignedInt32(71, value); + set uplinkCount($core.int value) => $_setUnsignedInt32(74, value); @$pb.TagNumber(221) - $core.bool hasUplinkCount() => $_has(71); + $core.bool hasUplinkCount() => $_has(74); @$pb.TagNumber(221) void clearUplinkCount() => $_clearField(221); /// Explicit uplink interface names, slot order. Empty = auto-detect from the /// default IPv4/IPv6 routes. @$pb.TagNumber(222) - $pb.PbList<$core.String> get uplinkInterfaces => $_getList(72); + $pb.PbList<$core.String> get uplinkInterfaces => $_getList(75); /// -- nsid (230-239) /// Populate nsid (record field 32) best-effort via RTM_GETNSID. Usually 0 for /// Docker/containerd namespaces. Default false. @$pb.TagNumber(230) - $core.bool get populateNsid => $_getBF(73); + $core.bool get populateNsid => $_getBF(76); @$pb.TagNumber(230) - set populateNsid($core.bool value) => $_setBool(73, value); + set populateNsid($core.bool value) => $_setBool(76, value); @$pb.TagNumber(230) - $core.bool hasPopulateNsid() => $_has(73); + $core.bool hasPopulateNsid() => $_has(76); @$pb.TagNumber(230) void clearPopulateNsid() => $_clearField(230); @@ -3106,47 +3162,47 @@ class XtcpConfig extends $pb.GeneratedMessage { /// enabled but asn_db_path is missing/unreadable, xtcp2 logs, bumps a counter, /// and leaves both columns empty. Default false. @$pb.TagNumber(240) - $core.bool get enrichAsnEnable => $_getBF(74); + $core.bool get enrichAsnEnable => $_getBF(77); @$pb.TagNumber(240) - set enrichAsnEnable($core.bool value) => $_setBool(74, value); + set enrichAsnEnable($core.bool value) => $_setBool(77, value); @$pb.TagNumber(240) - $core.bool hasEnrichAsnEnable() => $_has(74); + $core.bool hasEnrichAsnEnable() => $_has(77); @$pb.TagNumber(240) void clearEnrichAsnEnable() => $_clearField(240); /// Path to the ipfeed-collector Parquet artifact (prefix -> {asn, /// network_owner}). Default "". @$pb.TagNumber(241) - $core.String get asnDbPath => $_getSZ(75); + $core.String get asnDbPath => $_getSZ(78); @$pb.TagNumber(241) - set asnDbPath($core.String value) => $_setString(75, value); + set asnDbPath($core.String value) => $_setString(78, value); @$pb.TagNumber(241) - $core.bool hasAsnDbPath() => $_has(75); + $core.bool hasAsnDbPath() => $_has(78); @$pb.TagNumber(241) void clearAsnDbPath() => $_clearField(241); /// How often to reload asn_db_path in the background so a refreshed artifact /// is picked up without a restart. 0 = load once at startup, never reload. @$pb.TagNumber(242) - $1.Duration get asnRefreshInterval => $_getN(76); + $1.Duration get asnRefreshInterval => $_getN(79); @$pb.TagNumber(242) set asnRefreshInterval($1.Duration value) => $_setField(242, value); @$pb.TagNumber(242) - $core.bool hasAsnRefreshInterval() => $_has(76); + $core.bool hasAsnRefreshInterval() => $_has(79); @$pb.TagNumber(242) void clearAsnRefreshInterval() => $_clearField(242); @$pb.TagNumber(242) - $1.Duration ensureAsnRefreshInterval() => $_ensure(76); + $1.Duration ensureAsnRefreshInterval() => $_ensure(79); /// Optional zstd-compressed lookup artifact baked into the image and used at /// startup when no fresher writable cache is available. Default is supplied /// by the daemon CLI as /share/xtcp2/ipmeta/bootstrap.lookup.parquet.zst. @$pb.TagNumber(243) - $core.String get ipmetaBootstrapPath => $_getSZ(77); + $core.String get ipmetaBootstrapPath => $_getSZ(80); @$pb.TagNumber(243) - set ipmetaBootstrapPath($core.String value) => $_setString(77, value); + set ipmetaBootstrapPath($core.String value) => $_setString(80, value); @$pb.TagNumber(243) - $core.bool hasIpmetaBootstrapPath() => $_has(77); + $core.bool hasIpmetaBootstrapPath() => $_has(80); @$pb.TagNumber(243) void clearIpmetaBootstrapPath() => $_clearField(243); @@ -3155,11 +3211,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// The companion previous.lookup.parquet.zst in the same directory is kept /// as a recovery fallback. @$pb.TagNumber(244) - $core.String get ipmetaCachePath => $_getSZ(78); + $core.String get ipmetaCachePath => $_getSZ(81); @$pb.TagNumber(244) - set ipmetaCachePath($core.String value) => $_setString(78, value); + set ipmetaCachePath($core.String value) => $_setString(81, value); @$pb.TagNumber(244) - $core.bool hasIpmetaCachePath() => $_has(78); + $core.bool hasIpmetaCachePath() => $_has(81); @$pb.TagNumber(244) void clearIpmetaCachePath() => $_clearField(244); @@ -3172,11 +3228,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// Non-fatal: a per-namespace discovery failure just leaves that namespace's /// sockets unclassified (and is retried with backoff). Default false. @$pb.TagNumber(245) - $core.bool get enrichLocalityEnable => $_getBF(79); + $core.bool get enrichLocalityEnable => $_getBF(82); @$pb.TagNumber(245) - set enrichLocalityEnable($core.bool value) => $_setBool(79, value); + set enrichLocalityEnable($core.bool value) => $_setBool(82, value); @$pb.TagNumber(245) - $core.bool hasEnrichLocalityEnable() => $_has(79); + $core.bool hasEnrichLocalityEnable() => $_has(82); @$pb.TagNumber(245) void clearEnrichLocalityEnable() => $_clearField(245); @@ -3185,15 +3241,15 @@ class XtcpConfig extends $pb.GeneratedMessage { /// namespaces are always snapshotted on the next reconcile regardless. 0 = /// discover once per namespace, never refresh. Daemon default 60s. @$pb.TagNumber(246) - $1.Duration get localityRefreshInterval => $_getN(80); + $1.Duration get localityRefreshInterval => $_getN(83); @$pb.TagNumber(246) set localityRefreshInterval($1.Duration value) => $_setField(246, value); @$pb.TagNumber(246) - $core.bool hasLocalityRefreshInterval() => $_has(80); + $core.bool hasLocalityRefreshInterval() => $_has(83); @$pb.TagNumber(246) void clearLocalityRefreshInterval() => $_clearField(246); @$pb.TagNumber(246) - $1.Duration ensureLocalityRefreshInterval() => $_ensure(80); + $1.Duration ensureLocalityRefreshInterval() => $_ensure(83); /// Keep each namespace's locality snapshot current from rtnetlink /// notifications (link, address and route changes) instead of waiting for @@ -3201,25 +3257,25 @@ class XtcpConfig extends $pb.GeneratedMessage { /// locality_refresh_interval then becomes the backstop, a resync taken /// after that long. Needs enrich_locality_enable. Default false. @$pb.TagNumber(247) - $core.bool get localityEventsEnable => $_getBF(81); + $core.bool get localityEventsEnable => $_getBF(84); @$pb.TagNumber(247) - set localityEventsEnable($core.bool value) => $_setBool(81, value); + set localityEventsEnable($core.bool value) => $_setBool(84, value); @$pb.TagNumber(247) - $core.bool hasLocalityEventsEnable() => $_has(81); + $core.bool hasLocalityEventsEnable() => $_has(84); @$pb.TagNumber(247) void clearLocalityEventsEnable() => $_clearField(247); /// Physical link monitor; see LinkMonitorConfig. @$pb.TagNumber(250) - LinkMonitorConfig get linkMonitor => $_getN(82); + LinkMonitorConfig get linkMonitor => $_getN(85); @$pb.TagNumber(250) set linkMonitor(LinkMonitorConfig value) => $_setField(250, value); @$pb.TagNumber(250) - $core.bool hasLinkMonitor() => $_has(82); + $core.bool hasLinkMonitor() => $_has(85); @$pb.TagNumber(250) void clearLinkMonitor() => $_clearField(250); @$pb.TagNumber(250) - LinkMonitorConfig ensureLinkMonitor() => $_ensure(82); + LinkMonitorConfig ensureLinkMonitor() => $_ensure(85); } class EnabledDeserializers extends $pb.GeneratedMessage { diff --git a/gen/dart/xtcp_config/v1/xtcp_config.pbjson.dart b/gen/dart/xtcp_config/v1/xtcp_config.pbjson.dart index a7ba14630..a3396fabe 100644 --- a/gen/dart/xtcp_config/v1/xtcp_config.pbjson.dart +++ b/gen/dart/xtcp_config/v1/xtcp_config.pbjson.dart @@ -923,6 +923,22 @@ const XtcpConfig$json = { '8': {}, '10': 'ioUringCqeBatchSize' }, + { + '1': 'max_dump_bytes', + '3': 25, + '4': 1, + '5': 4, + '8': {}, + '10': 'maxDumpBytes' + }, + { + '1': 'max_records_per_netns', + '3': 26, + '4': 1, + '5': 4, + '8': {}, + '10': 'maxRecordsPerNetns' + }, { '1': 'reconcile_frequency', '3': 40, @@ -939,6 +955,7 @@ const XtcpConfig$json = { '5': 8, '10': 'reconcileBeforePoll' }, + {'1': 'max_netns', '3': 42, '4': 1, '5': 13, '8': {}, '10': 'maxNetns'}, {'1': 'write_files', '3': 50, '4': 1, '5': 13, '8': {}, '10': 'writeFiles'}, { '1': 'capture_path', @@ -1358,79 +1375,81 @@ final $typed_data.Uint8List xtcpConfigDescriptor = $convert.base64Decode( 'xpemVyc0IGukgDyAEAUhRlbmFibGVkRGVzZXJpYWxpemVycxIhCghpb191cmluZxgWIAEoCEIG' 'ukgDyAEAUgdpb1VyaW5nEkUKGGlvX3VyaW5nX3JlY3ZfYmF0Y2hfc2l6ZRgXIAEoDUINukgKyA' 'EAKgUYgCAoAVIUaW9VcmluZ1JlY3ZCYXRjaFNpemUSQwoXaW9fdXJpbmdfY3FlX2JhdGNoX3Np' - 'emUYGCABKA1CDbpICsgBACoFGIAgKAFSE2lvVXJpbmdDcWVCYXRjaFNpemUSVwoTcmVjb25jaW' - 'xlX2ZyZXF1ZW5jeRgoIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbkILukgIyAEAqgEC' - 'MgBSEnJlY29uY2lsZUZyZXF1ZW5jeRIyChVyZWNvbmNpbGVfYmVmb3JlX3BvbGwYKSABKAhSE3' - 'JlY29uY2lsZUJlZm9yZVBvbGwSLgoLd3JpdGVfZmlsZXMYMiABKA1CDbpICsgBACoFGOgHKABS' - 'CndyaXRlRmlsZXMSLwoMY2FwdHVyZV9wYXRoGDMgASgJQgy6SAnIAQByBBABGFBSC2NhcHR1cm' - 'VQYXRoEjcKEGRlc3Rfd3JpdGVfZmlsZXMYNCABKA1CDbpICsgBACoFGOgHKABSDmRlc3RXcml0' - 'ZUZpbGVzEi4KC2RlYnVnX2xldmVsGDUgASgNQg26SArIAQEqBRjoBygAUgpkZWJ1Z0xldmVsEj' - 'EKEGRlYnVnX3Byb21ldGhldXMYNiABKAhCBrpIA8gBAFIPZGVidWdQcm9tZXRoZXVzEiEKBGRl' - 'c3QYPCABKAlCDbpICsgBAXIFEAQYgARSBGRlc3QSKwoKbWFyc2hhbF90bxg9IAEoCUIMukgJyA' - 'EBcgQQAxgoUgltYXJzaGFsVG8SJwoLY3N2X2NvbHVtbnMYPiABKAlCBrpIA8gBAFIKY3N2Q29s' - 'dW1ucxI0Cg94dGNwX3Byb3RvX2ZpbGUYPyABKAlCDLpICcgBAHIEEAEYUFINeHRjcFByb3RvRm' - 'lsZRJLCh5lbnZlbG9wZV9mbHVzaF90aHJlc2hvbGRfYnl0ZXMYQCABKA1CBrpIA8gBAFIbZW52' - 'ZWxvcGVGbHVzaFRocmVzaG9sZEJ5dGVzEkkKHWVudmVsb3BlX2ZsdXNoX3RocmVzaG9sZF9yb3' - 'dzGEEgASgNQga6SAPIAQBSGmVudmVsb3BlRmx1c2hUaHJlc2hvbGRSb3dzEiIKBXRvcGljGFAg' - 'ASgJQgy6SAnIAQByBBABGChSBXRvcGljEjYKEGthZmthX3NjaGVtYV91cmwYUSABKAlCDLpICc' - 'gBAHIEEAEYPFIOa2Fma2FTY2hlbWFVcmwSXwoVa2Fma2FfcHJvZHVjZV90aW1lb3V0GFIgASgL' - 'MhkuZ29vZ2xlLnByb3RvYnVmLkR1cmF0aW9uQhC6SA3IAQCqAQciAwjYBDIAUhNrYWZrYVByb2' - 'R1Y2VUaW1lb3V0EjMKEWthZmthX2NvbXByZXNzaW9uGFMgASgJQga6SAPIAQBSEGthZmthQ29t' - 'cHJlc3Npb24SJwoLczNfZW5kcG9pbnQYZCABKAlCBrpIA8gBAFIKczNFbmRwb2ludBIjCglzM1' - '9yZWdpb24YZSABKAlCBrpIA8gBAFIIczNSZWdpb24SIwoJczNfYnVja2V0GGYgASgJQga6SAPI' - 'AQBSCHMzQnVja2V0EiMKCXMzX3ByZWZpeBhnIAEoCUIGukgDyAEAUghzM1ByZWZpeBIqCg1zM1' - '9hY2Nlc3Nfa2V5GGggASgJQga6SAPIAQBSC3MzQWNjZXNzS2V5EioKDXMzX3NlY3JldF9rZXkY' - 'aSABKAlCBrpIA8gBAFILczNTZWNyZXRLZXkSNwoUczNfc2tpcF9idWNrZXRfcHJvYmUYaiABKA' - 'hCBrpIA8gBAFIRczNTa2lwQnVja2V0UHJvYmUSMgoRczNfYWxsb3dfaW5zZWN1cmUYayABKAhC' - 'BrpIA8gBAFIPczNBbGxvd0luc2VjdXJlEikKCnMzX2NhX2ZpbGUYbCABKAlCC7pICMgBAHIDGI' - 'AgUghzM0NhRmlsZRJOCiBzM19wYXJxdWV0X2ZsdXNoX3RocmVzaG9sZF9ieXRlcxhuIAEoDUIG' - 'ukgDyAEAUhxzM1BhcnF1ZXRGbHVzaFRocmVzaG9sZEJ5dGVzElIKEXMzX2ZsdXNoX2ludGVydm' - 'FsGG8gASgLMhkuZ29vZ2xlLnByb3RvYnVmLkR1cmF0aW9uQgu6SAjIAQCqAQIyAFIPczNGbHVz' - 'aEludGVydmFsEjkKE3MzX2ZsdXNoX2ppdHRlcl9wY3QYcCABKA1CCrpIB8gBACoCGGRSEHMzRm' - 'x1c2hKaXR0ZXJQY3QSTAodczNfZmx1c2hfdGhyZXNob2xkX2ppdHRlcl9wY3QYcSABKA1CCrpI' - 'B8gBACoCGGRSGXMzRmx1c2hUaHJlc2hvbGRKaXR0ZXJQY3QSQQoWczNfdXBsb2FkX21heF9hdH' - 'RlbXB0cxhyIAEoDUIMukgJyAEAKgQYZCgBUhNzM1VwbG9hZE1heEF0dGVtcHRzElkKFXMzX3Vw' - 'bG9hZF9iYWNrb2ZmX2NhcBhzIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbkILukgIyA' - 'EAqgECMgBSEnMzVXBsb2FkQmFja29mZkNhcBIoCghob3N0bmFtZRiCASABKAlCC7pICMgBAHID' - 'GP0BUghob3N0bmFtZRIoCghsb2NhdGlvbhiDASABKAlCC7pICMgBAHIDGP0BUghsb2NhdGlvbh' - 'IhCgVsYWJlbBiEASABKAlCCrpIB8gBAHICGChSBWxhYmVsEh0KA3RhZxiFASABKAlCCrpIB8gB' - 'AHICGChSA3RhZxIzCg5kYWVtb25fdmVyc2lvbhiGASABKAlCC7pICMgBAHIDGP0BUg1kYWVtb2' - '5WZXJzaW9uEicKCGlwdjRfdHRsGJYBIAEoDUILukgIyAEAKgMY/wFSB2lwdjRUdGwSMgoOaXB2' - 'Nl9ob3BfbGltaXQYlwEgASgNQgu6SAjIAQAqAxj/AVIMaXB2NkhvcExpbWl0EkoKDWxpc3Rlbm' - 'VyX2F1dGgYmAEgASgLMhwueHRjcF9jb25maWcudjEuTGlzdGVuZXJBdXRoQga6SAPIAQBSDGxp' - 'c3RlbmVyQXV0aBJaChNwcm9tZXRoZXVzX2xpc3RlbmVyGJkBIAEoCzIgLnh0Y3BfY29uZmlnLn' - 'YxLkxpc3RlbmVyRW5kcG9pbnRCBrpIA8gBAFIScHJvbWV0aGV1c0xpc3RlbmVyElUKE2FkbWlu' - 'X2xpc3RlbmVyX2F1dGgYmgEgASgLMhwueHRjcF9jb25maWcudjEuTGlzdGVuZXJBdXRoQga6SA' - 'PIAQBSEWFkbWluTGlzdGVuZXJBdXRoEicKCWdycGNfcG9ydBigASABKA1CCbpIBioEGP//A1II' - 'Z3JwY1BvcnQSTgoNZ3JwY19saXN0ZW5lchihASABKAsyIC54dGNwX2NvbmZpZy52MS5MaXN0ZW' - '5lckVuZHBvaW50Qga6SAPIAQBSDGdycGNMaXN0ZW5lchJBCglsaXN0ZW5lcnMYogEgAygLMhgu' - 'eHRjcF9jb25maWcudjEuTGlzdGVuZXJCCLpIBZIBAhAQUglsaXN0ZW5lcnMSLAoNcHlyb3Njb3' - 'BlX3VybBiqASABKAlCBrpIA8gBAFIMcHlyb3Njb3BlVXJsEjUKEnB5cm9zY29wZV9hcHBfbmFt' - 'ZRirASABKAlCBrpIA8gBAFIQcHlyb3Njb3BlQXBwTmFtZRI3ChNweXJvc2NvcGVfc2FtcGxlX2' - 'h6GKwBIAEoDUIGukgDyAEAUhFweXJvc2NvcGVTYW1wbGVIehJKCh1weXJvc2NvcGVfdXBsb2Fk' - 'X2ludGVydmFsX3NlYxitASABKA1CBrpIA8gBAFIacHlyb3Njb3BlVXBsb2FkSW50ZXJ2YWxTZW' - 'MSOQoUcmVzb2x2ZV9jb250YWluZXJfaWQYyAEgASgIQga6SAPIAQBSEnJlc29sdmVDb250YWlu' - 'ZXJJZBI3ChdlbnJpY2hfY29udGFpbmVyX2VuYWJsZRjJASABKAhSFWVucmljaENvbnRhaW5lck' - 'VuYWJsZRI3ChJkb2NrZXJfc29ja2V0X3BhdGgYygEgASgJQgi6SAVyAxj/AVIQZG9ja2VyU29j' - 'a2V0UGF0aBItChJlbnJpY2hfbGxkcF9lbmFibGUY0gEgASgIUhBlbnJpY2hMbGRwRW5hYmxlEj' - 'UKEWxsZHBkX3NvY2tldF9wYXRoGNMBIAEoCUIIukgFcgMY/wFSD2xsZHBkU29ja2V0UGF0aBI2' - 'ChJsbGRwZF92ZXJzaW9uX2hpbnQY1AEgASgJQge6SARyAhgQUhBsbGRwZFZlcnNpb25IaW50Ei' - 'sKEWVucmljaF9uaWNfZW5hYmxlGNwBIAEoCFIPZW5yaWNoTmljRW5hYmxlEisKDHVwbGlua19j' - 'b3VudBjdASABKA1CB7pIBCoCGAJSC3VwbGlua0NvdW50EjYKEXVwbGlua19pbnRlcmZhY2VzGN' - '4BIAMoCUIIukgFkgECEAJSEHVwbGlua0ludGVyZmFjZXMSJAoNcG9wdWxhdGVfbnNpZBjmASAB' - 'KAhSDHBvcHVsYXRlTnNpZBIrChFlbnJpY2hfYXNuX2VuYWJsZRjwASABKAhSD2VucmljaEFzbk' - 'VuYWJsZRIpCgthc25fZGJfcGF0aBjxASABKAlCCLpIBXIDGP8BUglhc25EYlBhdGgSTAoUYXNu' - 'X3JlZnJlc2hfaW50ZXJ2YWwY8gEgASgLMhkuZ29vZ2xlLnByb3RvYnVmLkR1cmF0aW9uUhJhc2' - '5SZWZyZXNoSW50ZXJ2YWwSPQoVaXBtZXRhX2Jvb3RzdHJhcF9wYXRoGPMBIAEoCUIIukgFcgMY' - '/wFSE2lwbWV0YUJvb3RzdHJhcFBhdGgSNQoRaXBtZXRhX2NhY2hlX3BhdGgY9AEgASgJQgi6SA' - 'VyAxj/AVIPaXBtZXRhQ2FjaGVQYXRoEjUKFmVucmljaF9sb2NhbGl0eV9lbmFibGUY9QEgASgI' - 'UhRlbnJpY2hMb2NhbGl0eUVuYWJsZRJWChlsb2NhbGl0eV9yZWZyZXNoX2ludGVydmFsGPYBIA' - 'EoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvblIXbG9jYWxpdHlSZWZyZXNoSW50ZXJ2YWwS' - 'NQoWbG9jYWxpdHlfZXZlbnRzX2VuYWJsZRj3ASABKAhSFGxvY2FsaXR5RXZlbnRzRW5hYmxlEk' - 'UKDGxpbmtfbW9uaXRvchj6ASABKAsyIS54dGNwX2NvbmZpZy52MS5MaW5rTW9uaXRvckNvbmZp' - 'Z1ILbGlua01vbml0b3I6c7pIcBpuCg9YdGNwQ29uZmlnLnBvbGwSMlBvbGwgdGltZW91dCBtdX' - 'N0IGJlIGxlc3MgdGhhbiBwb2xsIHBvbGxfZnJlcXVlbmN5Gid0aGlzLnBvbGxfZnJlcXVlbmN5' - 'ID4gdGhpcy5wb2xsX3RpbWVvdXQ='); + 'emUYGCABKA1CDbpICsgBACoFGIAgKAFSE2lvVXJpbmdDcWVCYXRjaFNpemUSLAoObWF4X2R1bX' + 'BfYnl0ZXMYGSABKARCBrpIA8gBAFIMbWF4RHVtcEJ5dGVzEjkKFW1heF9yZWNvcmRzX3Blcl9u' + 'ZXRucxgaIAEoBEIGukgDyAEAUhJtYXhSZWNvcmRzUGVyTmV0bnMSVwoTcmVjb25jaWxlX2ZyZX' + 'F1ZW5jeRgoIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbkILukgIyAEAqgECMgBSEnJl' + 'Y29uY2lsZUZyZXF1ZW5jeRIyChVyZWNvbmNpbGVfYmVmb3JlX3BvbGwYKSABKAhSE3JlY29uY2' + 'lsZUJlZm9yZVBvbGwSIwoJbWF4X25ldG5zGCogASgNQga6SAPIAQBSCG1heE5ldG5zEi4KC3dy' + 'aXRlX2ZpbGVzGDIgASgNQg26SArIAQAqBRjoBygAUgp3cml0ZUZpbGVzEi8KDGNhcHR1cmVfcG' + 'F0aBgzIAEoCUIMukgJyAEAcgQQARhQUgtjYXB0dXJlUGF0aBI3ChBkZXN0X3dyaXRlX2ZpbGVz' + 'GDQgASgNQg26SArIAQAqBRjoBygAUg5kZXN0V3JpdGVGaWxlcxIuCgtkZWJ1Z19sZXZlbBg1IA' + 'EoDUINukgKyAEBKgUY6AcoAFIKZGVidWdMZXZlbBIxChBkZWJ1Z19wcm9tZXRoZXVzGDYgASgI' + 'Qga6SAPIAQBSD2RlYnVnUHJvbWV0aGV1cxIhCgRkZXN0GDwgASgJQg26SArIAQFyBRAEGIAEUg' + 'RkZXN0EisKCm1hcnNoYWxfdG8YPSABKAlCDLpICcgBAXIEEAMYKFIJbWFyc2hhbFRvEicKC2Nz' + 'dl9jb2x1bW5zGD4gASgJQga6SAPIAQBSCmNzdkNvbHVtbnMSNAoPeHRjcF9wcm90b19maWxlGD' + '8gASgJQgy6SAnIAQByBBABGFBSDXh0Y3BQcm90b0ZpbGUSSwoeZW52ZWxvcGVfZmx1c2hfdGhy' + 'ZXNob2xkX2J5dGVzGEAgASgNQga6SAPIAQBSG2VudmVsb3BlRmx1c2hUaHJlc2hvbGRCeXRlcx' + 'JJCh1lbnZlbG9wZV9mbHVzaF90aHJlc2hvbGRfcm93cxhBIAEoDUIGukgDyAEAUhplbnZlbG9w' + 'ZUZsdXNoVGhyZXNob2xkUm93cxIiCgV0b3BpYxhQIAEoCUIMukgJyAEAcgQQARgoUgV0b3BpYx' + 'I2ChBrYWZrYV9zY2hlbWFfdXJsGFEgASgJQgy6SAnIAQByBBABGDxSDmthZmthU2NoZW1hVXJs' + 'El8KFWthZmthX3Byb2R1Y2VfdGltZW91dBhSIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdG' + 'lvbkIQukgNyAEAqgEHIgMI2AQyAFITa2Fma2FQcm9kdWNlVGltZW91dBIzChFrYWZrYV9jb21w' + 'cmVzc2lvbhhTIAEoCUIGukgDyAEAUhBrYWZrYUNvbXByZXNzaW9uEicKC3MzX2VuZHBvaW50GG' + 'QgASgJQga6SAPIAQBSCnMzRW5kcG9pbnQSIwoJczNfcmVnaW9uGGUgASgJQga6SAPIAQBSCHMz' + 'UmVnaW9uEiMKCXMzX2J1Y2tldBhmIAEoCUIGukgDyAEAUghzM0J1Y2tldBIjCglzM19wcmVmaX' + 'gYZyABKAlCBrpIA8gBAFIIczNQcmVmaXgSKgoNczNfYWNjZXNzX2tleRhoIAEoCUIGukgDyAEA' + 'UgtzM0FjY2Vzc0tleRIqCg1zM19zZWNyZXRfa2V5GGkgASgJQga6SAPIAQBSC3MzU2VjcmV0S2' + 'V5EjcKFHMzX3NraXBfYnVja2V0X3Byb2JlGGogASgIQga6SAPIAQBSEXMzU2tpcEJ1Y2tldFBy' + 'b2JlEjIKEXMzX2FsbG93X2luc2VjdXJlGGsgASgIQga6SAPIAQBSD3MzQWxsb3dJbnNlY3VyZR' + 'IpCgpzM19jYV9maWxlGGwgASgJQgu6SAjIAQByAxiAIFIIczNDYUZpbGUSTgogczNfcGFycXVl' + 'dF9mbHVzaF90aHJlc2hvbGRfYnl0ZXMYbiABKA1CBrpIA8gBAFIcczNQYXJxdWV0Rmx1c2hUaH' + 'Jlc2hvbGRCeXRlcxJSChFzM19mbHVzaF9pbnRlcnZhbBhvIAEoCzIZLmdvb2dsZS5wcm90b2J1' + 'Zi5EdXJhdGlvbkILukgIyAEAqgECMgBSD3MzRmx1c2hJbnRlcnZhbBI5ChNzM19mbHVzaF9qaX' + 'R0ZXJfcGN0GHAgASgNQgq6SAfIAQAqAhhkUhBzM0ZsdXNoSml0dGVyUGN0EkwKHXMzX2ZsdXNo' + 'X3RocmVzaG9sZF9qaXR0ZXJfcGN0GHEgASgNQgq6SAfIAQAqAhhkUhlzM0ZsdXNoVGhyZXNob2' + 'xkSml0dGVyUGN0EkEKFnMzX3VwbG9hZF9tYXhfYXR0ZW1wdHMYciABKA1CDLpICcgBACoEGGQo' + 'AVITczNVcGxvYWRNYXhBdHRlbXB0cxJZChVzM191cGxvYWRfYmFja29mZl9jYXAYcyABKAsyGS' + '5nb29nbGUucHJvdG9idWYuRHVyYXRpb25CC7pICMgBAKoBAjIAUhJzM1VwbG9hZEJhY2tvZmZD' + 'YXASKAoIaG9zdG5hbWUYggEgASgJQgu6SAjIAQByAxj9AVIIaG9zdG5hbWUSKAoIbG9jYXRpb2' + '4YgwEgASgJQgu6SAjIAQByAxj9AVIIbG9jYXRpb24SIQoFbGFiZWwYhAEgASgJQgq6SAfIAQBy' + 'AhgoUgVsYWJlbBIdCgN0YWcYhQEgASgJQgq6SAfIAQByAhgoUgN0YWcSMwoOZGFlbW9uX3Zlcn' + 'Npb24YhgEgASgJQgu6SAjIAQByAxj9AVINZGFlbW9uVmVyc2lvbhInCghpcHY0X3R0bBiWASAB' + 'KA1CC7pICMgBACoDGP8BUgdpcHY0VHRsEjIKDmlwdjZfaG9wX2xpbWl0GJcBIAEoDUILukgIyA' + 'EAKgMY/wFSDGlwdjZIb3BMaW1pdBJKCg1saXN0ZW5lcl9hdXRoGJgBIAEoCzIcLnh0Y3BfY29u' + 'ZmlnLnYxLkxpc3RlbmVyQXV0aEIGukgDyAEAUgxsaXN0ZW5lckF1dGgSWgoTcHJvbWV0aGV1c1' + '9saXN0ZW5lchiZASABKAsyIC54dGNwX2NvbmZpZy52MS5MaXN0ZW5lckVuZHBvaW50Qga6SAPI' + 'AQBSEnByb21ldGhldXNMaXN0ZW5lchJVChNhZG1pbl9saXN0ZW5lcl9hdXRoGJoBIAEoCzIcLn' + 'h0Y3BfY29uZmlnLnYxLkxpc3RlbmVyQXV0aEIGukgDyAEAUhFhZG1pbkxpc3RlbmVyQXV0aBIn' + 'CglncnBjX3BvcnQYoAEgASgNQgm6SAYqBBj//wNSCGdycGNQb3J0Ek4KDWdycGNfbGlzdGVuZX' + 'IYoQEgASgLMiAueHRjcF9jb25maWcudjEuTGlzdGVuZXJFbmRwb2ludEIGukgDyAEAUgxncnBj' + 'TGlzdGVuZXISQQoJbGlzdGVuZXJzGKIBIAMoCzIYLnh0Y3BfY29uZmlnLnYxLkxpc3RlbmVyQg' + 'i6SAWSAQIQEFIJbGlzdGVuZXJzEiwKDXB5cm9zY29wZV91cmwYqgEgASgJQga6SAPIAQBSDHB5' + 'cm9zY29wZVVybBI1ChJweXJvc2NvcGVfYXBwX25hbWUYqwEgASgJQga6SAPIAQBSEHB5cm9zY2' + '9wZUFwcE5hbWUSNwoTcHlyb3Njb3BlX3NhbXBsZV9oehisASABKA1CBrpIA8gBAFIRcHlyb3Nj' + 'b3BlU2FtcGxlSHoSSgodcHlyb3Njb3BlX3VwbG9hZF9pbnRlcnZhbF9zZWMYrQEgASgNQga6SA' + 'PIAQBSGnB5cm9zY29wZVVwbG9hZEludGVydmFsU2VjEjkKFHJlc29sdmVfY29udGFpbmVyX2lk' + 'GMgBIAEoCEIGukgDyAEAUhJyZXNvbHZlQ29udGFpbmVySWQSNwoXZW5yaWNoX2NvbnRhaW5lcl' + '9lbmFibGUYyQEgASgIUhVlbnJpY2hDb250YWluZXJFbmFibGUSNwoSZG9ja2VyX3NvY2tldF9w' + 'YXRoGMoBIAEoCUIIukgFcgMY/wFSEGRvY2tlclNvY2tldFBhdGgSLQoSZW5yaWNoX2xsZHBfZW' + '5hYmxlGNIBIAEoCFIQZW5yaWNoTGxkcEVuYWJsZRI1ChFsbGRwZF9zb2NrZXRfcGF0aBjTASAB' + 'KAlCCLpIBXIDGP8BUg9sbGRwZFNvY2tldFBhdGgSNgoSbGxkcGRfdmVyc2lvbl9oaW50GNQBIA' + 'EoCUIHukgEcgIYEFIQbGxkcGRWZXJzaW9uSGludBIrChFlbnJpY2hfbmljX2VuYWJsZRjcASAB' + 'KAhSD2VucmljaE5pY0VuYWJsZRIrCgx1cGxpbmtfY291bnQY3QEgASgNQge6SAQqAhgCUgt1cG' + 'xpbmtDb3VudBI2ChF1cGxpbmtfaW50ZXJmYWNlcxjeASADKAlCCLpIBZIBAhACUhB1cGxpbmtJ' + 'bnRlcmZhY2VzEiQKDXBvcHVsYXRlX25zaWQY5gEgASgIUgxwb3B1bGF0ZU5zaWQSKwoRZW5yaW' + 'NoX2Fzbl9lbmFibGUY8AEgASgIUg9lbnJpY2hBc25FbmFibGUSKQoLYXNuX2RiX3BhdGgY8QEg' + 'ASgJQgi6SAVyAxj/AVIJYXNuRGJQYXRoEkwKFGFzbl9yZWZyZXNoX2ludGVydmFsGPIBIAEoCz' + 'IZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvblISYXNuUmVmcmVzaEludGVydmFsEj0KFWlwbWV0' + 'YV9ib290c3RyYXBfcGF0aBjzASABKAlCCLpIBXIDGP8BUhNpcG1ldGFCb290c3RyYXBQYXRoEj' + 'UKEWlwbWV0YV9jYWNoZV9wYXRoGPQBIAEoCUIIukgFcgMY/wFSD2lwbWV0YUNhY2hlUGF0aBI1' + 'ChZlbnJpY2hfbG9jYWxpdHlfZW5hYmxlGPUBIAEoCFIUZW5yaWNoTG9jYWxpdHlFbmFibGUSVg' + 'oZbG9jYWxpdHlfcmVmcmVzaF9pbnRlcnZhbBj2ASABKAsyGS5nb29nbGUucHJvdG9idWYuRHVy' + 'YXRpb25SF2xvY2FsaXR5UmVmcmVzaEludGVydmFsEjUKFmxvY2FsaXR5X2V2ZW50c19lbmFibG' + 'UY9wEgASgIUhRsb2NhbGl0eUV2ZW50c0VuYWJsZRJFCgxsaW5rX21vbml0b3IY+gEgASgLMiEu' + 'eHRjcF9jb25maWcudjEuTGlua01vbml0b3JDb25maWdSC2xpbmtNb25pdG9yOnO6SHAabgoPWH' + 'RjcENvbmZpZy5wb2xsEjJQb2xsIHRpbWVvdXQgbXVzdCBiZSBsZXNzIHRoYW4gcG9sbCBwb2xs' + 'X2ZyZXF1ZW5jeRondGhpcy5wb2xsX2ZyZXF1ZW5jeSA+IHRoaXMucG9sbF90aW1lb3V0'); @$core.Deprecated('Use enabledDeserializersDescriptor instead') const EnabledDeserializers$json = { diff --git a/gen/go/xtcp_config/xtcp_config.pb.go b/gen/go/xtcp_config/xtcp_config.pb.go index 690e1a974..cc7064973 100644 --- a/gen/go/xtcp_config/xtcp_config.pb.go +++ b/gen/go/xtcp_config/xtcp_config.pb.go @@ -1543,6 +1543,17 @@ type XtcpConfig struct { // userland loop overhead but increase scheduling latency for the // netlinker goroutine. Ignored unless io_uring=true. Default 128. IoUringCqeBatchSize uint32 `protobuf:"varint,24,opt,name=io_uring_cqe_batch_size,json=ioUringCqeBatchSize,proto3" json:"io_uring_cqe_batch_size,omitempty"` + // Cap on the bytes of one namespace's inet_diag dump per poll. Packets + // past it are drained from the socket without being decoded, and the + // dump is counted in xtcp_dump_dropped_total{reason="bytes"}, so a + // namespace with a huge socket table costs a metric, not the collector. + // Startup-only. 0 = unlimited. Daemon default 256 MiB. + MaxDumpBytes uint64 `protobuf:"varint,25,opt,name=max_dump_bytes,json=maxDumpBytes,proto3" json:"max_dump_bytes,omitempty"` + // Cap on the records one namespace contributes per poll. Records past it + // are dropped before attribute decode and enrichment, and the dump is + // counted in xtcp_dump_dropped_total{reason="records"}. Startup-only. + // 0 = unlimited. Daemon default 262144. + MaxRecordsPerNetns uint64 `protobuf:"varint,26,opt,name=max_records_per_netns,json=maxRecordsPerNetns,proto3" json:"max_records_per_netns,omitempty"` // Period of the background namespace-reconcile ticker (Method B /proc scan // that converges the tracked namespace set). With reconcile_before_poll the // Poller reconciles every cycle and is the real discovery mechanism, so this @@ -1558,6 +1569,13 @@ type XtcpConfig struct { // discovery cadence to poll cadence; the /proc scan is zero-allocation and // mutex-serialized with the background reconciler. Default true. ReconcileBeforePoll bool `protobuf:"varint,41,opt,name=reconcile_before_poll,json=reconcileBeforePoll,proto3" json:"reconcile_before_poll,omitempty"` + // Cap on the network namespaces tracked, xtcp2's own included. Each costs + // a netlink socket, a receiver and its decoders. At the cap, reconcile + // adds no more, preferring the lowest pids (long-running workloads), and + // counts the rest in xtcp_netns_dropped_total; a slot freed by a deleted + // namespace is filled on the next reconcile. Startup-only. + // 0 = unlimited. Daemon default 4096. + MaxNetns uint32 `protobuf:"varint,42,opt,name=max_netns,json=maxNetns,proto3" json:"max_netns,omitempty"` // Write netlink packets to writeFiles number of files ( to generate test data ) per netlinker // xtcp will capture this many Netlink response packets when it starts // This is PER netlinker @@ -2002,6 +2020,20 @@ func (x *XtcpConfig) GetIoUringCqeBatchSize() uint32 { return 0 } +func (x *XtcpConfig) GetMaxDumpBytes() uint64 { + if x != nil { + return x.MaxDumpBytes + } + return 0 +} + +func (x *XtcpConfig) GetMaxRecordsPerNetns() uint64 { + if x != nil { + return x.MaxRecordsPerNetns + } + return 0 +} + func (x *XtcpConfig) GetReconcileFrequency() *durationpb.Duration { if x != nil { return x.ReconcileFrequency @@ -2016,6 +2048,13 @@ func (x *XtcpConfig) GetReconcileBeforePoll() bool { return false } +func (x *XtcpConfig) GetMaxNetns() uint32 { + if x != nil { + return x.MaxNetns + } + return 0 +} + func (x *XtcpConfig) GetWriteFiles() uint32 { if x != nil { return x.WriteFiles @@ -2630,7 +2669,7 @@ const file_xtcp_config_v1_xtcp_config_proto_rawDesc = "" + "\x0e_error_classesB\x15\n" + "\x13_metrics_categoriesB\x1a\n" + "\x18_metrics_interface_pathsB\x13\n" + - "\x11_metrics_all_path\"\xa8&\n" + + "\x11_metrics_all_path\"\xb6'\n" + "\n" + "XtcpConfig\x12F\n" + "\x17nl_timeout_milliseconds\x18\n" + @@ -2656,9 +2695,12 @@ const file_xtcp_config_v1_xtcp_config_proto_rawDesc = "" + "\x18io_uring_recv_batch_size\x18\x17 \x01(\rB\r\xbaH\n" + "\xc8\x01\x00*\x05\x18\x80 (\x01R\x14ioUringRecvBatchSize\x12C\n" + "\x17io_uring_cqe_batch_size\x18\x18 \x01(\rB\r\xbaH\n" + - "\xc8\x01\x00*\x05\x18\x80 (\x01R\x13ioUringCqeBatchSize\x12W\n" + + "\xc8\x01\x00*\x05\x18\x80 (\x01R\x13ioUringCqeBatchSize\x12,\n" + + "\x0emax_dump_bytes\x18\x19 \x01(\x04B\x06\xbaH\x03\xc8\x01\x00R\fmaxDumpBytes\x129\n" + + "\x15max_records_per_netns\x18\x1a \x01(\x04B\x06\xbaH\x03\xc8\x01\x00R\x12maxRecordsPerNetns\x12W\n" + "\x13reconcile_frequency\x18( \x01(\v2\x19.google.protobuf.DurationB\v\xbaH\b\xc8\x01\x00\xaa\x01\x022\x00R\x12reconcileFrequency\x122\n" + - "\x15reconcile_before_poll\x18) \x01(\bR\x13reconcileBeforePoll\x12.\n" + + "\x15reconcile_before_poll\x18) \x01(\bR\x13reconcileBeforePoll\x12#\n" + + "\tmax_netns\x18* \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\bmaxNetns\x12.\n" + "\vwrite_files\x182 \x01(\rB\r\xbaH\n" + "\xc8\x01\x00*\x05\x18\xe8\a(\x00R\n" + "writeFiles\x12/\n" + diff --git a/gen/go/xtcp_config/xtcp_config_vtproto.pb.go b/gen/go/xtcp_config/xtcp_config_vtproto.pb.go index 71b397772..be60767bb 100644 --- a/gen/go/xtcp_config/xtcp_config_vtproto.pb.go +++ b/gen/go/xtcp_config/xtcp_config_vtproto.pb.go @@ -1847,6 +1847,13 @@ func (m *XtcpConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i-- dAtA[i] = 0x90 } + if m.MaxNetns != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MaxNetns)) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0xd0 + } if m.ReconcileBeforePoll { i-- if m.ReconcileBeforePoll { @@ -1871,6 +1878,20 @@ func (m *XtcpConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i-- dAtA[i] = 0xc2 } + if m.MaxRecordsPerNetns != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MaxRecordsPerNetns)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd0 + } + if m.MaxDumpBytes != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MaxDumpBytes)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc8 + } if m.IoUringCqeBatchSize != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.IoUringCqeBatchSize)) i-- @@ -2519,6 +2540,12 @@ func (m *XtcpConfig) SizeVT() (n int) { if m.IoUringCqeBatchSize != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.IoUringCqeBatchSize)) } + if m.MaxDumpBytes != 0 { + n += 2 + protohelpers.SizeOfVarint(uint64(m.MaxDumpBytes)) + } + if m.MaxRecordsPerNetns != 0 { + n += 2 + protohelpers.SizeOfVarint(uint64(m.MaxRecordsPerNetns)) + } if m.ReconcileFrequency != nil { l = (*durationpb.Duration)(m.ReconcileFrequency).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) @@ -2526,6 +2553,9 @@ func (m *XtcpConfig) SizeVT() (n int) { if m.ReconcileBeforePoll { n += 3 } + if m.MaxNetns != 0 { + n += 2 + protohelpers.SizeOfVarint(uint64(m.MaxNetns)) + } if m.WriteFiles != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.WriteFiles)) } @@ -6039,6 +6069,44 @@ func (m *XtcpConfig) UnmarshalVT(dAtA []byte) error { break } } + case 25: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxDumpBytes", wireType) + } + m.MaxDumpBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxDumpBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 26: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxRecordsPerNetns", wireType) + } + m.MaxRecordsPerNetns = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxRecordsPerNetns |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } case 40: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ReconcileFrequency", wireType) @@ -6095,6 +6163,25 @@ func (m *XtcpConfig) UnmarshalVT(dAtA []byte) error { } } m.ReconcileBeforePoll = bool(v != 0) + case 42: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxNetns", wireType) + } + m.MaxNetns = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxNetns |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } case 50: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field WriteFiles", wireType) diff --git a/gen/openapi/xtcp_config/v1/xtcp_config.swagger.json b/gen/openapi/xtcp_config/v1/xtcp_config.swagger.json index 1733cfa54..bebbbd1b6 100644 --- a/gen/openapi/xtcp_config/v1/xtcp_config.swagger.json +++ b/gen/openapi/xtcp_config/v1/xtcp_config.swagger.json @@ -730,6 +730,16 @@ "format": "int64", "description": "Maximum CQEs reaped per PeekBatchCQE call. Larger batches amortise\nuserland loop overhead but increase scheduling latency for the\nnetlinker goroutine. Ignored unless io_uring=true. Default 128." }, + "maxDumpBytes": { + "type": "string", + "format": "uint64", + "description": "Cap on the bytes of one namespace's inet_diag dump per poll. Packets\npast it are drained from the socket without being decoded, and the\ndump is counted in xtcp_dump_dropped_total{reason=\"bytes\"}, so a\nnamespace with a huge socket table costs a metric, not the collector.\nStartup-only. 0 = unlimited. Daemon default 256 MiB." + }, + "maxRecordsPerNetns": { + "type": "string", + "format": "uint64", + "description": "Cap on the records one namespace contributes per poll. Records past it\nare dropped before attribute decode and enrichment, and the dump is\ncounted in xtcp_dump_dropped_total{reason=\"records\"}. Startup-only.\n0 = unlimited. Daemon default 262144." + }, "reconcileFrequency": { "type": "string", "description": "Period of the background namespace-reconcile ticker (Method B /proc scan\nthat converges the tracked namespace set). With reconcile_before_poll the\nPoller reconciles every cycle and is the real discovery mechanism, so this\nbackground pass is an occasional safety-net expected to find nothing\n(mapReconciler dels/stores stay 0) — the default is deliberately long (6h)\nso operators can confirm from the counters that it is redundant. It still\nmatters when the poller is idle or disabled. 0 disables the background\nticker entirely (the startup reconcile still runs once)." @@ -738,6 +748,11 @@ "type": "boolean", "description": "Run a namespace reconcile immediately before each poll cycle, so a\nnamespace that appeared since the last cycle is entered and gets a socket\nwithin ~1 poll interval instead of waiting for the background ticker. Ties\ndiscovery cadence to poll cadence; the /proc scan is zero-allocation and\nmutex-serialized with the background reconciler. Default true." }, + "maxNetns": { + "type": "integer", + "format": "int64", + "description": "Cap on the network namespaces tracked, xtcp2's own included. Each costs\na netlink socket, a receiver and its decoders. At the cap, reconcile\nadds no more, preferring the lowest pids (long-running workloads), and\ncounts the rest in xtcp_netns_dropped_total; a slot freed by a deleted\nnamespace is filled on the next reconcile. Startup-only.\n0 = unlimited. Daemon default 4096." + }, "writeFiles": { "type": "integer", "format": "int64", diff --git a/gen/python/xtcp_config/v1/xtcp_config_pb2.py b/gen/python/xtcp_config/v1/xtcp_config_pb2.py index 652d4af6e..4ff889db8 100644 --- a/gen/python/xtcp_config/v1/xtcp_config_pb2.py +++ b/gen/python/xtcp_config/v1/xtcp_config_pb2.py @@ -28,7 +28,7 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n xtcp_config/v1/xtcp_config.proto\x12\x0extcp_config.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1cxtcp_auth/v1/xtcp_auth.proto\x1a\x1b\x62uf/validate/validate.proto\"\x0c\n\nGetRequest\"A\n\x0bGetResponse\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"@\n\nSetRequest\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"A\n\x0bSetResponse\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"\xb4\x02\n\x17SetPollFrequencyRequest\x12S\n\x0epoll_frequency\x18\x14 \x01(\x0b\x32\x19.google.protobuf.DurationB\x11\xbaH\x0e\xaa\x01\x08\"\x04\x08\x80\xf5$2\x00\xc8\x01\x01R\rpollFrequency\x12O\n\x0cpoll_timeout\x18\x1e \x01(\x0b\x32\x19.google.protobuf.DurationB\x11\xbaH\x0e\xaa\x01\x08\"\x04\x08\x80\xf5$2\x00\xc8\x01\x01R\x0bpollTimeout:s\xbaHp\x1an\n\x0fXtcpConfig.poll\x12\x32Poll timeout must be less than poll poll_frequency\x1a\'this.poll_timeout < this.poll_frequency\"N\n\x18SetPollFrequencyResponse\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"\x14\n\x12TriggerPollRequest\"\x15\n\x13TriggerPollResponse\"\x89\x01\n\x17TriggerPollBurstRequest\x12#\n\x05\x63ount\x18\n \x01(\rB\r\xbaH\n*\x05\x18\xe8\x07(\x01\xc8\x01\x01R\x05\x63ount\x12I\n\x08interval\x18\x14 \x01(\x0b\x32\x19.google.protobuf.DurationB\x12\xbaH\x0f\xaa\x01\t\"\x03\x08\x90\x1c\x32\x02\x08\x01\xc8\x01\x01R\x08interval\"g\n\x18TriggerPollBurstResponse\x12\x14\n\x05\x63ount\x18\n \x01(\rR\x05\x63ount\x12\x35\n\x08interval\x18\x14 \x01(\x0b\x32\x19.google.protobuf.DurationR\x08interval\"\xe3\x02\n\x12SetS3UploadRequest\x12R\n\x11s3_flush_interval\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationB\x0b\xbaH\x08\xaa\x01\x02\x32\x00\xc8\x01\x00R\x0fs3FlushInterval\x12N\n s3_parquet_flush_threshold_bytes\x18\x14 \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1cs3ParquetFlushThresholdBytes:\xa8\x01\xbaH\xa4\x01\x1a\xa1\x01\n\x16SetS3Upload.atLeastOne\x12=set s3_flush_interval and/or s3_parquet_flush_threshold_bytes\x1aHhas(this.s3_flush_interval) || this.s3_parquet_flush_threshold_bytes > 0\"I\n\x13SetS3UploadResponse\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"\xf4\x02\n\x17SetEnvelopeFlushRequest\x12K\n\x1e\x65nvelope_flush_threshold_bytes\x18\n \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1b\x65nvelopeFlushThresholdBytes\x12I\n\x1d\x65nvelope_flush_threshold_rows\x18\x14 \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1a\x65nvelopeFlushThresholdRows:\xc0\x01\xbaH\xbc\x01\x1a\xb9\x01\n\x1bSetEnvelopeFlush.atLeastOne\x12Gset envelope_flush_threshold_bytes and/or envelope_flush_threshold_rows\x1aQthis.envelope_flush_threshold_bytes > 0 || this.envelope_flush_threshold_rows > 0\"N\n\x18SetEnvelopeFlushResponse\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"\x8a\x03\n\x10ListenerEndpoint\x12\x43\n\x07network\x18\x01 \x01(\x0e\x32\x1f.xtcp_config.v1.ListenerNetworkB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x07network\x12\"\n\x07\x61\x64\x64ress\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\x18\x80\x04R\x07\x61\x64\x64ress\x12\x32\n\x10unix_socket_mode\x18\x03 \x01(\rB\x08\xbaH\x05*\x03\x18\xff\x03R\x0eunixSocketMode\x12\x37\n\x18unlink_stale_unix_socket\x18\x04 \x01(\x08R\x15unlinkStaleUnixSocket\x12\x32\n\x0fmax_connections\x18\x05 \x01(\rB\t\xbaH\x06*\x04\x18\xa0\x8d\x06R\x0emaxConnections\x12>\n\x16\x61\x63\x63\x65pt_rate_per_second\x18\x06 \x01(\rB\t\xbaH\x06*\x04\x18\xa0\x8d\x06R\x13\x61\x63\x63\x65ptRatePerSecond\x12,\n\x0c\x61\x63\x63\x65pt_burst\x18\x07 \x01(\rB\t\xbaH\x06*\x04\x18\xa0\x8d\x06R\x0b\x61\x63\x63\x65ptBurst\"\x83\x06\n\x0cListenerAuth\x12>\n\x04mode\x18\x01 \x01(\x0e\x32 .xtcp_config.v1.ListenerAuthModeB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x04mode\x12%\n\traw_token\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x08rawToken\x12\x30\n\x0fhmac_shared_key\x18\x03 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\rhmacSharedKey\x12G\n\x19signed_token_skew_minutes\x18\x04 \x01(\rB\x07\xbaH\x04*\x02\x18\x05H\x00R\x16signedTokenSkewMinutes\x88\x01\x01\x12Q\n\x12\x66\x61ilure_jitter_min\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x08\xbaH\x05\xaa\x01\x02\x32\x00R\x10\x66\x61ilureJitterMin\x12Q\n\x12\x66\x61ilure_jitter_max\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x08\xbaH\x05\xaa\x01\x02\x32\x00R\x10\x66\x61ilureJitterMax\x12.\n\x0eraw_token_file\x18\x07 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x0crawTokenFile\x12\x39\n\x14hmac_shared_key_file\x18\x08 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x11hmacSharedKeyFile:\xe1\x01\xbaH\xdd\x01\x1a\xda\x01\n\x1aListenerAuth.failureJitter\x12\x46\x66\x61ilure_jitter_max must be greater than or equal to failure_jitter_min\x1at!has(this.failure_jitter_min) || !has(this.failure_jitter_max) || this.failure_jitter_max >= this.failure_jitter_minB\x1c\n\x1a_signed_token_skew_minutes\"\xbf\x02\n\x08Listener\x12\x30\n\x04name\x18\x01 \x01(\tB\x1c\xbaH\x19r\x17\x10\x01\x18 2\x11^[a-z][a-z0-9-]*$R\x04name\x12\x44\n\x08\x65ndpoint\x18\x02 \x01(\x0b\x32 .xtcp_config.v1.ListenerEndpointB\x06\xbaH\x03\xc8\x01\x01R\x08\x65ndpoint\x12\x30\n\x04\x61uth\x18\x03 \x01(\x0b\x32\x1c.xtcp_config.v1.ListenerAuthR\x04\x61uth\x12;\n\nadmin_auth\x18\x04 \x01(\x0b\x32\x1c.xtcp_config.v1.ListenerAuthR\tadminAuth\x12L\n\x06serves\x18\x05 \x03(\x0e\x32\x1d.xtcp_config.v1.EndpointClassB\x15\xbaH\x12\x92\x01\x0f\x08\x01\x10\x07\x18\x01\"\x07\x82\x01\x04\x10\x01 \x00R\x06serves\"\x9a\x0e\n\x11LinkMonitorConfig\x12\x16\n\x06\x65nable\x18\x01 \x01(\x08R\x06\x65nable\x12-\n\rbaseline_file\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x0c\x62\x61selineFile\x12\x41\n\x06settle\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05\x32\x00R\x06settle\x12\x41\n\x06resync\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xf5$*\x00R\x06resync\x12P\n\x0estats_interval\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05*\x00R\rstatsInterval\x12-\n\rstats_include\x18\x06 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x0cstatsInclude\x12-\n\rstats_exclude\x18\x07 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x0cstatsExclude\x12/\n\x0enetstat_fields\x18\x08 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\rnetstatFields\x12\x44\n\x14max_speed_exceptions\x18\t \x03(\tB\x12\xbaH\x0f\x92\x01\x0c\x10\x80\x02\"\x07r\x05\x10\x01\x18\x80\x01R\x12maxSpeedExceptions\x12:\n\x14metrics_core_include\x18\n \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x12metricsCoreInclude\x12:\n\x14metrics_core_exclude\x18\x0b \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x12metricsCoreExclude\x12\x1f\n\x0bmetrics_all\x18\x0c \x01(\x08R\nmetricsAll\x12\x41\n\x0f\x63ollection_mode\x18\r \x01(\tB\x18\xbaH\x15r\x13R\x00R\x04pollR\ton-demandR\x0e\x63ollectionMode\x12P\n\x0ewatch_interval\x18\x0e \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05*\x00R\rwatchInterval\x12N\n\rslow_interval\x18\x0f \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05*\x00R\x0cslowInterval\x12M\n\ron_demand_ttl\x18\x10 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05\x32\x00R\x0bonDemandTtl\x12M\n\x0eon_demand_wait\x18\x11 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0c\xbaH\t\xaa\x01\x06\x1a\x02\x08\n*\x00R\x0conDemandWait\x12L\n\x0c\x65rror_window\x18\x12 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xf5$2\x00R\x0b\x65rrorWindow\x12J\n\x0b\x66lap_window\x18\x13 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xf5$2\x00R\nflapWindow\x12\\\n\rerror_classes\x18\x14 \x01(\tB2\xbaH/r-\x18@2)^((link|rdma|drop)(,(link|rdma|drop))*)?$H\x00R\x0c\x65rrorClasses\x88\x01\x01\x12-\n\rerror_exclude\x18\x15 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x0c\x65rrorExclude\x12<\n\x12metrics_categories\x18\x16 \x01(\tB\x08\xbaH\x05r\x03\x18\x80\x02H\x01R\x11metricsCategories\x88\x01\x01\x12;\n\x17metrics_interface_paths\x18\x17 \x01(\x08H\x02R\x15metricsInterfacePaths\x88\x01\x01\x12\x37\n\x10metrics_all_path\x18\x18 \x01(\tB\x08\xbaH\x05r\x03\x18\x80\x02H\x03R\x0emetricsAllPath\x88\x01\x01\x12\x19\n\x08ip_paths\x18\x19 \x01(\x08R\x07ipPaths\x12-\n\x0cip_max_bytes\x18\x1a \x01(\rB\x0b\xbaH\x08*\x06\x18\x80\x80\x80\x80\x04R\nipMaxBytes\x12$\n\tip_listen\x18\x1b \x01(\tB\x07\xbaH\x04r\x02\x18@R\x08ipListen\x12P\n\x0elearn_deadline\x18\x1c \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05\x32\x00R\rlearnDeadlineB\x10\n\x0e_error_classesB\x15\n\x13_metrics_categoriesB\x1a\n\x18_metrics_interface_pathsB\x13\n\x11_metrics_all_path\"\xa8&\n\nXtcpConfig\x12\x46\n\x17nl_timeout_milliseconds\x18\n \x01(\x04\x42\x0e\xbaH\x0b\x32\x06\x18\xa0\x8d\x06(\x00\xc8\x01\x01R\x15nlTimeoutMilliseconds\x12S\n\x0epoll_frequency\x18\x0b \x01(\x0b\x32\x19.google.protobuf.DurationB\x11\xbaH\x0e\xaa\x01\x08\"\x04\x08\x80\xf5$*\x00\xc8\x01\x01R\rpollFrequency\x12O\n\x0cpoll_timeout\x18\x0c \x01(\x0b\x32\x19.google.protobuf.DurationB\x11\xbaH\x0e\xaa\x01\x08\"\x04\x08\x80\xf5$*\x00\xc8\x01\x01R\x0bpollTimeout\x12\x32\n\x0fpoll_jitter_pct\x18\r \x01(\rB\n\xbaH\x07*\x02\x18\x64\xc8\x01\x00R\rpollJitterPct\x12+\n\tmax_loops\x18\x0e \x01(\x04\x42\x0e\xbaH\x0b\x32\x06\x18\xa0\x8d\x06(\x00\xc8\x01\x00R\x08maxLoops\x12,\n\nnetlinkers\x18\x0f \x01(\rB\x0c\xbaH\t*\x04\x18\x64(\x01\xc8\x01\x01R\nnetlinkers\x12H\n\x19netlinkers_done_chan_size\x18\x10 \x01(\rB\r\xbaH\n*\x05\x18\xe8\x07(\x01\xc8\x01\x01R\x16netlinkersDoneChanSize\x12*\n\tnlmsg_seq\x18\x11 \x01(\rB\r\xbaH\n*\x05\x18\x90N(\x00\xc8\x01\x01R\x08nlmsgSeq\x12/\n\x0bpacket_size\x18\x12 \x01(\x04\x42\x0e\xbaH\x0b\x32\x06\x18\xc0\x84=(\x00\xc8\x01\x00R\npacketSize\x12\x36\n\x10packet_size_mply\x18\x13 \x01(\rB\x0c\xbaH\t*\x04\x18\x64(\x00\xc8\x01\x00R\x0epacketSizeMply\x12(\n\x07modulus\x18\x14 \x01(\x04\x42\x0e\xbaH\x0b\x32\x06\x18\xc0\x84=(\x01\xc8\x01\x01R\x07modulus\x12\x61\n\x15\x65nabled_deserializers\x18\x15 \x01(\x0b\x32$.xtcp_config.v1.EnabledDeserializersB\x06\xbaH\x03\xc8\x01\x00R\x14\x65nabledDeserializers\x12!\n\x08io_uring\x18\x16 \x01(\x08\x42\x06\xbaH\x03\xc8\x01\x00R\x07ioUring\x12\x45\n\x18io_uring_recv_batch_size\x18\x17 \x01(\rB\r\xbaH\n*\x05\x18\x80 (\x01\xc8\x01\x00R\x14ioUringRecvBatchSize\x12\x43\n\x17io_uring_cqe_batch_size\x18\x18 \x01(\rB\r\xbaH\n*\x05\x18\x80 (\x01\xc8\x01\x00R\x13ioUringCqeBatchSize\x12W\n\x13reconcile_frequency\x18( \x01(\x0b\x32\x19.google.protobuf.DurationB\x0b\xbaH\x08\xaa\x01\x02\x32\x00\xc8\x01\x00R\x12reconcileFrequency\x12\x32\n\x15reconcile_before_poll\x18) \x01(\x08R\x13reconcileBeforePoll\x12.\n\x0bwrite_files\x18\x32 \x01(\rB\r\xbaH\n*\x05\x18\xe8\x07(\x00\xc8\x01\x00R\nwriteFiles\x12/\n\x0c\x63\x61pture_path\x18\x33 \x01(\tB\x0c\xbaH\tr\x04\x10\x01\x18P\xc8\x01\x00R\x0b\x63\x61pturePath\x12\x37\n\x10\x64\x65st_write_files\x18\x34 \x01(\rB\r\xbaH\n*\x05\x18\xe8\x07(\x00\xc8\x01\x00R\x0e\x64\x65stWriteFiles\x12.\n\x0b\x64\x65\x62ug_level\x18\x35 \x01(\rB\r\xbaH\n*\x05\x18\xe8\x07(\x00\xc8\x01\x01R\ndebugLevel\x12\x31\n\x10\x64\x65\x62ug_prometheus\x18\x36 \x01(\x08\x42\x06\xbaH\x03\xc8\x01\x00R\x0f\x64\x65\x62ugPrometheus\x12!\n\x04\x64\x65st\x18< \x01(\tB\r\xbaH\nr\x05\x10\x04\x18\x80\x04\xc8\x01\x01R\x04\x64\x65st\x12+\n\nmarshal_to\x18= \x01(\tB\x0c\xbaH\tr\x04\x10\x03\x18(\xc8\x01\x01R\tmarshalTo\x12\'\n\x0b\x63sv_columns\x18> \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\ncsvColumns\x12\x34\n\x0fxtcp_proto_file\x18? \x01(\tB\x0c\xbaH\tr\x04\x10\x01\x18P\xc8\x01\x00R\rxtcpProtoFile\x12K\n\x1e\x65nvelope_flush_threshold_bytes\x18@ \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1b\x65nvelopeFlushThresholdBytes\x12I\n\x1d\x65nvelope_flush_threshold_rows\x18\x41 \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1a\x65nvelopeFlushThresholdRows\x12\"\n\x05topic\x18P \x01(\tB\x0c\xbaH\tr\x04\x10\x01\x18(\xc8\x01\x00R\x05topic\x12\x36\n\x10kafka_schema_url\x18Q \x01(\tB\x0c\xbaH\tr\x04\x10\x01\x18<\xc8\x01\x00R\x0ekafkaSchemaUrl\x12_\n\x15kafka_produce_timeout\x18R \x01(\x0b\x32\x19.google.protobuf.DurationB\x10\xbaH\r\xaa\x01\x07\"\x03\x08\xd8\x04\x32\x00\xc8\x01\x00R\x13kafkaProduceTimeout\x12\x33\n\x11kafka_compression\x18S \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x10kafkaCompression\x12\'\n\x0bs3_endpoint\x18\x64 \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\ns3Endpoint\x12#\n\ts3_region\x18\x65 \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x08s3Region\x12#\n\ts3_bucket\x18\x66 \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x08s3Bucket\x12#\n\ts3_prefix\x18g \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x08s3Prefix\x12*\n\rs3_access_key\x18h \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x0bs3AccessKey\x12*\n\rs3_secret_key\x18i \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x0bs3SecretKey\x12\x37\n\x14s3_skip_bucket_probe\x18j \x01(\x08\x42\x06\xbaH\x03\xc8\x01\x00R\x11s3SkipBucketProbe\x12\x32\n\x11s3_allow_insecure\x18k \x01(\x08\x42\x06\xbaH\x03\xc8\x01\x00R\x0fs3AllowInsecure\x12)\n\ns3_ca_file\x18l \x01(\tB\x0b\xbaH\x08r\x03\x18\x80 \xc8\x01\x00R\x08s3CaFile\x12N\n s3_parquet_flush_threshold_bytes\x18n \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1cs3ParquetFlushThresholdBytes\x12R\n\x11s3_flush_interval\x18o \x01(\x0b\x32\x19.google.protobuf.DurationB\x0b\xbaH\x08\xaa\x01\x02\x32\x00\xc8\x01\x00R\x0fs3FlushInterval\x12\x39\n\x13s3_flush_jitter_pct\x18p \x01(\rB\n\xbaH\x07*\x02\x18\x64\xc8\x01\x00R\x10s3FlushJitterPct\x12L\n\x1ds3_flush_threshold_jitter_pct\x18q \x01(\rB\n\xbaH\x07*\x02\x18\x64\xc8\x01\x00R\x19s3FlushThresholdJitterPct\x12\x41\n\x16s3_upload_max_attempts\x18r \x01(\rB\x0c\xbaH\t*\x04\x18\x64(\x01\xc8\x01\x00R\x13s3UploadMaxAttempts\x12Y\n\x15s3_upload_backoff_cap\x18s \x01(\x0b\x32\x19.google.protobuf.DurationB\x0b\xbaH\x08\xaa\x01\x02\x32\x00\xc8\x01\x00R\x12s3UploadBackoffCap\x12(\n\x08hostname\x18\x82\x01 \x01(\tB\x0b\xbaH\x08r\x03\x18\xfd\x01\xc8\x01\x00R\x08hostname\x12(\n\x08location\x18\x83\x01 \x01(\tB\x0b\xbaH\x08r\x03\x18\xfd\x01\xc8\x01\x00R\x08location\x12!\n\x05label\x18\x84\x01 \x01(\tB\n\xbaH\x07r\x02\x18(\xc8\x01\x00R\x05label\x12\x1d\n\x03tag\x18\x85\x01 \x01(\tB\n\xbaH\x07r\x02\x18(\xc8\x01\x00R\x03tag\x12\x33\n\x0e\x64\x61\x65mon_version\x18\x86\x01 \x01(\tB\x0b\xbaH\x08r\x03\x18\xfd\x01\xc8\x01\x00R\rdaemonVersion\x12\'\n\x08ipv4_ttl\x18\x96\x01 \x01(\rB\x0b\xbaH\x08*\x03\x18\xff\x01\xc8\x01\x00R\x07ipv4Ttl\x12\x32\n\x0eipv6_hop_limit\x18\x97\x01 \x01(\rB\x0b\xbaH\x08*\x03\x18\xff\x01\xc8\x01\x00R\x0cipv6HopLimit\x12J\n\rlistener_auth\x18\x98\x01 \x01(\x0b\x32\x1c.xtcp_config.v1.ListenerAuthB\x06\xbaH\x03\xc8\x01\x00R\x0clistenerAuth\x12Z\n\x13prometheus_listener\x18\x99\x01 \x01(\x0b\x32 .xtcp_config.v1.ListenerEndpointB\x06\xbaH\x03\xc8\x01\x00R\x12prometheusListener\x12U\n\x13\x61\x64min_listener_auth\x18\x9a\x01 \x01(\x0b\x32\x1c.xtcp_config.v1.ListenerAuthB\x06\xbaH\x03\xc8\x01\x00R\x11\x61\x64minListenerAuth\x12\'\n\tgrpc_port\x18\xa0\x01 \x01(\rB\t\xbaH\x06*\x04\x18\xff\xff\x03R\x08grpcPort\x12N\n\rgrpc_listener\x18\xa1\x01 \x01(\x0b\x32 .xtcp_config.v1.ListenerEndpointB\x06\xbaH\x03\xc8\x01\x00R\x0cgrpcListener\x12\x41\n\tlisteners\x18\xa2\x01 \x03(\x0b\x32\x18.xtcp_config.v1.ListenerB\x08\xbaH\x05\x92\x01\x02\x10\x10R\tlisteners\x12,\n\rpyroscope_url\x18\xaa\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x0cpyroscopeUrl\x12\x35\n\x12pyroscope_app_name\x18\xab\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x10pyroscopeAppName\x12\x37\n\x13pyroscope_sample_hz\x18\xac\x01 \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x11pyroscopeSampleHz\x12J\n\x1dpyroscope_upload_interval_sec\x18\xad\x01 \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1apyroscopeUploadIntervalSec\x12\x39\n\x14resolve_container_id\x18\xc8\x01 \x01(\x08\x42\x06\xbaH\x03\xc8\x01\x00R\x12resolveContainerId\x12\x37\n\x17\x65nrich_container_enable\x18\xc9\x01 \x01(\x08R\x15\x65nrichContainerEnable\x12\x37\n\x12\x64ocker_socket_path\x18\xca\x01 \x01(\tB\x08\xbaH\x05r\x03\x18\xff\x01R\x10\x64ockerSocketPath\x12-\n\x12\x65nrich_lldp_enable\x18\xd2\x01 \x01(\x08R\x10\x65nrichLldpEnable\x12\x35\n\x11lldpd_socket_path\x18\xd3\x01 \x01(\tB\x08\xbaH\x05r\x03\x18\xff\x01R\x0flldpdSocketPath\x12\x36\n\x12lldpd_version_hint\x18\xd4\x01 \x01(\tB\x07\xbaH\x04r\x02\x18\x10R\x10lldpdVersionHint\x12+\n\x11\x65nrich_nic_enable\x18\xdc\x01 \x01(\x08R\x0f\x65nrichNicEnable\x12+\n\x0cuplink_count\x18\xdd\x01 \x01(\rB\x07\xbaH\x04*\x02\x18\x02R\x0buplinkCount\x12\x36\n\x11uplink_interfaces\x18\xde\x01 \x03(\tB\x08\xbaH\x05\x92\x01\x02\x10\x02R\x10uplinkInterfaces\x12$\n\rpopulate_nsid\x18\xe6\x01 \x01(\x08R\x0cpopulateNsid\x12+\n\x11\x65nrich_asn_enable\x18\xf0\x01 \x01(\x08R\x0f\x65nrichAsnEnable\x12)\n\x0b\x61sn_db_path\x18\xf1\x01 \x01(\tB\x08\xbaH\x05r\x03\x18\xff\x01R\tasnDbPath\x12L\n\x14\x61sn_refresh_interval\x18\xf2\x01 \x01(\x0b\x32\x19.google.protobuf.DurationR\x12\x61snRefreshInterval\x12=\n\x15ipmeta_bootstrap_path\x18\xf3\x01 \x01(\tB\x08\xbaH\x05r\x03\x18\xff\x01R\x13ipmetaBootstrapPath\x12\x35\n\x11ipmeta_cache_path\x18\xf4\x01 \x01(\tB\x08\xbaH\x05r\x03\x18\xff\x01R\x0fipmetaCachePath\x12\x35\n\x16\x65nrich_locality_enable\x18\xf5\x01 \x01(\x08R\x14\x65nrichLocalityEnable\x12V\n\x19locality_refresh_interval\x18\xf6\x01 \x01(\x0b\x32\x19.google.protobuf.DurationR\x17localityRefreshInterval\x12\x35\n\x16locality_events_enable\x18\xf7\x01 \x01(\x08R\x14localityEventsEnable\x12\x45\n\x0clink_monitor\x18\xfa\x01 \x01(\x0b\x32!.xtcp_config.v1.LinkMonitorConfigR\x0blinkMonitor:s\xbaHp\x1an\n\x0fXtcpConfig.poll\x12\x32Poll timeout must be less than poll poll_frequency\x1a\'this.poll_frequency > this.poll_timeout\"\x9f\x01\n\x14\x45nabledDeserializers\x12K\n\x07\x65nabled\x18\x01 \x03(\x0b\x32\x31.xtcp_config.v1.EnabledDeserializers.EnabledEntryR\x07\x65nabled\x1a:\n\x0c\x45nabledEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x08R\x05value:\x02\x38\x01*h\n\x0fListenerNetwork\x12 \n\x1cLISTENER_NETWORK_UNSPECIFIED\x10\x00\x12\x18\n\x14LISTENER_NETWORK_TCP\x10\x01\x12\x19\n\x15LISTENER_NETWORK_UNIX\x10\x02*\xa1\x01\n\x10ListenerAuthMode\x12\"\n\x1eLISTENER_AUTH_MODE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bLISTENER_AUTH_MODE_DISABLED\x10\x01\x12 \n\x1cLISTENER_AUTH_MODE_RAW_TOKEN\x10\x02\x12&\n\"LISTENER_AUTH_MODE_HMAC_UTC_MINUTE\x10\x03*\xf7\x01\n\rEndpointClass\x12\x1e\n\x1a\x45NDPOINT_CLASS_UNSPECIFIED\x10\x00\x12\x19\n\x15\x45NDPOINT_CLASS_HEALTH\x10\x01\x12\x1a\n\x16\x45NDPOINT_CLASS_METRICS\x10\x02\x12!\n\x1d\x45NDPOINT_CLASS_METRICS_DETAIL\x10\x03\x12\x15\n\x11\x45NDPOINT_CLASS_IP\x10\x04\x12\x18\n\x14\x45NDPOINT_CLASS_DEBUG\x10\x05\x12\x1c\n\x18\x45NDPOINT_CLASS_GRPC_READ\x10\x06\x12\x1d\n\x19\x45NDPOINT_CLASS_GRPC_ADMIN\x10\x07\x32\xa5\x07\n\rConfigService\x12\x61\n\x03Get\x12\x1a.xtcp_config.v1.GetRequest\x1a\x1b.xtcp_config.v1.GetResponse\"!\xc8\xf3\x18\x01\x82\xd3\xe4\x93\x02\x17\x1a\x12/ConfigService/Get:\x01*\x12\x61\n\x03Set\x12\x1a.xtcp_config.v1.SetRequest\x1a\x1b.xtcp_config.v1.SetResponse\"!\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02\x17\x1a\x12/ConfigService/Set:\x01*\x12\x95\x01\n\x10SetPollFrequency\x12\'.xtcp_config.v1.SetPollFrequencyRequest\x1a(.xtcp_config.v1.SetPollFrequencyResponse\".\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02$\x1a\x1f/ConfigService/SetPollFrequency:\x01*\x12\x81\x01\n\x0bTriggerPoll\x12\".xtcp_config.v1.TriggerPollRequest\x1a#.xtcp_config.v1.TriggerPollResponse\")\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02\x1f\x1a\x1a/ConfigService/TriggerPoll:\x01*\x12\x95\x01\n\x10TriggerPollBurst\x12\'.xtcp_config.v1.TriggerPollBurstRequest\x1a(.xtcp_config.v1.TriggerPollBurstResponse\".\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02$\x1a\x1f/ConfigService/TriggerPollBurst:\x01*\x12\x81\x01\n\x0bSetS3Upload\x12\".xtcp_config.v1.SetS3UploadRequest\x1a#.xtcp_config.v1.SetS3UploadResponse\")\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02\x1f\x1a\x1a/ConfigService/SetS3Upload:\x01*\x12\x95\x01\n\x10SetEnvelopeFlush\x12\'.xtcp_config.v1.SetEnvelopeFlushRequest\x1a(.xtcp_config.v1.SetEnvelopeFlushResponse\".\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02$\x1a\x1f/ConfigService/SetEnvelopeFlush:\x01*B\xaf\x01\n\x12\x63om.xtcp_config.v1B\x0fXtcpConfigProtoP\x01Z3github.com/randomizedcoder/xtcp2/gen/go/xtcp_config\xa2\x02\x03XXX\xaa\x02\rXtcpConfig.V1\xca\x02\rXtcpConfig\\V1\xe2\x02\x19XtcpConfig\\V1\\GPBMetadata\xea\x02\x0eXtcpConfig::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n xtcp_config/v1/xtcp_config.proto\x12\x0extcp_config.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1cxtcp_auth/v1/xtcp_auth.proto\x1a\x1b\x62uf/validate/validate.proto\"\x0c\n\nGetRequest\"A\n\x0bGetResponse\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"@\n\nSetRequest\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"A\n\x0bSetResponse\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"\xb4\x02\n\x17SetPollFrequencyRequest\x12S\n\x0epoll_frequency\x18\x14 \x01(\x0b\x32\x19.google.protobuf.DurationB\x11\xbaH\x0e\xaa\x01\x08\"\x04\x08\x80\xf5$2\x00\xc8\x01\x01R\rpollFrequency\x12O\n\x0cpoll_timeout\x18\x1e \x01(\x0b\x32\x19.google.protobuf.DurationB\x11\xbaH\x0e\xaa\x01\x08\"\x04\x08\x80\xf5$2\x00\xc8\x01\x01R\x0bpollTimeout:s\xbaHp\x1an\n\x0fXtcpConfig.poll\x12\x32Poll timeout must be less than poll poll_frequency\x1a\'this.poll_timeout < this.poll_frequency\"N\n\x18SetPollFrequencyResponse\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"\x14\n\x12TriggerPollRequest\"\x15\n\x13TriggerPollResponse\"\x89\x01\n\x17TriggerPollBurstRequest\x12#\n\x05\x63ount\x18\n \x01(\rB\r\xbaH\n*\x05\x18\xe8\x07(\x01\xc8\x01\x01R\x05\x63ount\x12I\n\x08interval\x18\x14 \x01(\x0b\x32\x19.google.protobuf.DurationB\x12\xbaH\x0f\xaa\x01\t\"\x03\x08\x90\x1c\x32\x02\x08\x01\xc8\x01\x01R\x08interval\"g\n\x18TriggerPollBurstResponse\x12\x14\n\x05\x63ount\x18\n \x01(\rR\x05\x63ount\x12\x35\n\x08interval\x18\x14 \x01(\x0b\x32\x19.google.protobuf.DurationR\x08interval\"\xe3\x02\n\x12SetS3UploadRequest\x12R\n\x11s3_flush_interval\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationB\x0b\xbaH\x08\xaa\x01\x02\x32\x00\xc8\x01\x00R\x0fs3FlushInterval\x12N\n s3_parquet_flush_threshold_bytes\x18\x14 \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1cs3ParquetFlushThresholdBytes:\xa8\x01\xbaH\xa4\x01\x1a\xa1\x01\n\x16SetS3Upload.atLeastOne\x12=set s3_flush_interval and/or s3_parquet_flush_threshold_bytes\x1aHhas(this.s3_flush_interval) || this.s3_parquet_flush_threshold_bytes > 0\"I\n\x13SetS3UploadResponse\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"\xf4\x02\n\x17SetEnvelopeFlushRequest\x12K\n\x1e\x65nvelope_flush_threshold_bytes\x18\n \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1b\x65nvelopeFlushThresholdBytes\x12I\n\x1d\x65nvelope_flush_threshold_rows\x18\x14 \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1a\x65nvelopeFlushThresholdRows:\xc0\x01\xbaH\xbc\x01\x1a\xb9\x01\n\x1bSetEnvelopeFlush.atLeastOne\x12Gset envelope_flush_threshold_bytes and/or envelope_flush_threshold_rows\x1aQthis.envelope_flush_threshold_bytes > 0 || this.envelope_flush_threshold_rows > 0\"N\n\x18SetEnvelopeFlushResponse\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"\x8a\x03\n\x10ListenerEndpoint\x12\x43\n\x07network\x18\x01 \x01(\x0e\x32\x1f.xtcp_config.v1.ListenerNetworkB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x07network\x12\"\n\x07\x61\x64\x64ress\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\x18\x80\x04R\x07\x61\x64\x64ress\x12\x32\n\x10unix_socket_mode\x18\x03 \x01(\rB\x08\xbaH\x05*\x03\x18\xff\x03R\x0eunixSocketMode\x12\x37\n\x18unlink_stale_unix_socket\x18\x04 \x01(\x08R\x15unlinkStaleUnixSocket\x12\x32\n\x0fmax_connections\x18\x05 \x01(\rB\t\xbaH\x06*\x04\x18\xa0\x8d\x06R\x0emaxConnections\x12>\n\x16\x61\x63\x63\x65pt_rate_per_second\x18\x06 \x01(\rB\t\xbaH\x06*\x04\x18\xa0\x8d\x06R\x13\x61\x63\x63\x65ptRatePerSecond\x12,\n\x0c\x61\x63\x63\x65pt_burst\x18\x07 \x01(\rB\t\xbaH\x06*\x04\x18\xa0\x8d\x06R\x0b\x61\x63\x63\x65ptBurst\"\x83\x06\n\x0cListenerAuth\x12>\n\x04mode\x18\x01 \x01(\x0e\x32 .xtcp_config.v1.ListenerAuthModeB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x04mode\x12%\n\traw_token\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x08rawToken\x12\x30\n\x0fhmac_shared_key\x18\x03 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\rhmacSharedKey\x12G\n\x19signed_token_skew_minutes\x18\x04 \x01(\rB\x07\xbaH\x04*\x02\x18\x05H\x00R\x16signedTokenSkewMinutes\x88\x01\x01\x12Q\n\x12\x66\x61ilure_jitter_min\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x08\xbaH\x05\xaa\x01\x02\x32\x00R\x10\x66\x61ilureJitterMin\x12Q\n\x12\x66\x61ilure_jitter_max\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x08\xbaH\x05\xaa\x01\x02\x32\x00R\x10\x66\x61ilureJitterMax\x12.\n\x0eraw_token_file\x18\x07 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x0crawTokenFile\x12\x39\n\x14hmac_shared_key_file\x18\x08 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x11hmacSharedKeyFile:\xe1\x01\xbaH\xdd\x01\x1a\xda\x01\n\x1aListenerAuth.failureJitter\x12\x46\x66\x61ilure_jitter_max must be greater than or equal to failure_jitter_min\x1at!has(this.failure_jitter_min) || !has(this.failure_jitter_max) || this.failure_jitter_max >= this.failure_jitter_minB\x1c\n\x1a_signed_token_skew_minutes\"\xbf\x02\n\x08Listener\x12\x30\n\x04name\x18\x01 \x01(\tB\x1c\xbaH\x19r\x17\x10\x01\x18 2\x11^[a-z][a-z0-9-]*$R\x04name\x12\x44\n\x08\x65ndpoint\x18\x02 \x01(\x0b\x32 .xtcp_config.v1.ListenerEndpointB\x06\xbaH\x03\xc8\x01\x01R\x08\x65ndpoint\x12\x30\n\x04\x61uth\x18\x03 \x01(\x0b\x32\x1c.xtcp_config.v1.ListenerAuthR\x04\x61uth\x12;\n\nadmin_auth\x18\x04 \x01(\x0b\x32\x1c.xtcp_config.v1.ListenerAuthR\tadminAuth\x12L\n\x06serves\x18\x05 \x03(\x0e\x32\x1d.xtcp_config.v1.EndpointClassB\x15\xbaH\x12\x92\x01\x0f\x08\x01\x10\x07\x18\x01\"\x07\x82\x01\x04\x10\x01 \x00R\x06serves\"\x9a\x0e\n\x11LinkMonitorConfig\x12\x16\n\x06\x65nable\x18\x01 \x01(\x08R\x06\x65nable\x12-\n\rbaseline_file\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x0c\x62\x61selineFile\x12\x41\n\x06settle\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05\x32\x00R\x06settle\x12\x41\n\x06resync\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xf5$*\x00R\x06resync\x12P\n\x0estats_interval\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05*\x00R\rstatsInterval\x12-\n\rstats_include\x18\x06 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x0cstatsInclude\x12-\n\rstats_exclude\x18\x07 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x0cstatsExclude\x12/\n\x0enetstat_fields\x18\x08 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\rnetstatFields\x12\x44\n\x14max_speed_exceptions\x18\t \x03(\tB\x12\xbaH\x0f\x92\x01\x0c\x10\x80\x02\"\x07r\x05\x10\x01\x18\x80\x01R\x12maxSpeedExceptions\x12:\n\x14metrics_core_include\x18\n \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x12metricsCoreInclude\x12:\n\x14metrics_core_exclude\x18\x0b \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x12metricsCoreExclude\x12\x1f\n\x0bmetrics_all\x18\x0c \x01(\x08R\nmetricsAll\x12\x41\n\x0f\x63ollection_mode\x18\r \x01(\tB\x18\xbaH\x15r\x13R\x00R\x04pollR\ton-demandR\x0e\x63ollectionMode\x12P\n\x0ewatch_interval\x18\x0e \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05*\x00R\rwatchInterval\x12N\n\rslow_interval\x18\x0f \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05*\x00R\x0cslowInterval\x12M\n\ron_demand_ttl\x18\x10 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05\x32\x00R\x0bonDemandTtl\x12M\n\x0eon_demand_wait\x18\x11 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0c\xbaH\t\xaa\x01\x06\x1a\x02\x08\n*\x00R\x0conDemandWait\x12L\n\x0c\x65rror_window\x18\x12 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xf5$2\x00R\x0b\x65rrorWindow\x12J\n\x0b\x66lap_window\x18\x13 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xf5$2\x00R\nflapWindow\x12\\\n\rerror_classes\x18\x14 \x01(\tB2\xbaH/r-\x18@2)^((link|rdma|drop)(,(link|rdma|drop))*)?$H\x00R\x0c\x65rrorClasses\x88\x01\x01\x12-\n\rerror_exclude\x18\x15 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x0c\x65rrorExclude\x12<\n\x12metrics_categories\x18\x16 \x01(\tB\x08\xbaH\x05r\x03\x18\x80\x02H\x01R\x11metricsCategories\x88\x01\x01\x12;\n\x17metrics_interface_paths\x18\x17 \x01(\x08H\x02R\x15metricsInterfacePaths\x88\x01\x01\x12\x37\n\x10metrics_all_path\x18\x18 \x01(\tB\x08\xbaH\x05r\x03\x18\x80\x02H\x03R\x0emetricsAllPath\x88\x01\x01\x12\x19\n\x08ip_paths\x18\x19 \x01(\x08R\x07ipPaths\x12-\n\x0cip_max_bytes\x18\x1a \x01(\rB\x0b\xbaH\x08*\x06\x18\x80\x80\x80\x80\x04R\nipMaxBytes\x12$\n\tip_listen\x18\x1b \x01(\tB\x07\xbaH\x04r\x02\x18@R\x08ipListen\x12P\n\x0elearn_deadline\x18\x1c \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05\x32\x00R\rlearnDeadlineB\x10\n\x0e_error_classesB\x15\n\x13_metrics_categoriesB\x1a\n\x18_metrics_interface_pathsB\x13\n\x11_metrics_all_path\"\xb6\'\n\nXtcpConfig\x12\x46\n\x17nl_timeout_milliseconds\x18\n \x01(\x04\x42\x0e\xbaH\x0b\x32\x06\x18\xa0\x8d\x06(\x00\xc8\x01\x01R\x15nlTimeoutMilliseconds\x12S\n\x0epoll_frequency\x18\x0b \x01(\x0b\x32\x19.google.protobuf.DurationB\x11\xbaH\x0e\xaa\x01\x08\"\x04\x08\x80\xf5$*\x00\xc8\x01\x01R\rpollFrequency\x12O\n\x0cpoll_timeout\x18\x0c \x01(\x0b\x32\x19.google.protobuf.DurationB\x11\xbaH\x0e\xaa\x01\x08\"\x04\x08\x80\xf5$*\x00\xc8\x01\x01R\x0bpollTimeout\x12\x32\n\x0fpoll_jitter_pct\x18\r \x01(\rB\n\xbaH\x07*\x02\x18\x64\xc8\x01\x00R\rpollJitterPct\x12+\n\tmax_loops\x18\x0e \x01(\x04\x42\x0e\xbaH\x0b\x32\x06\x18\xa0\x8d\x06(\x00\xc8\x01\x00R\x08maxLoops\x12,\n\nnetlinkers\x18\x0f \x01(\rB\x0c\xbaH\t*\x04\x18\x64(\x01\xc8\x01\x01R\nnetlinkers\x12H\n\x19netlinkers_done_chan_size\x18\x10 \x01(\rB\r\xbaH\n*\x05\x18\xe8\x07(\x01\xc8\x01\x01R\x16netlinkersDoneChanSize\x12*\n\tnlmsg_seq\x18\x11 \x01(\rB\r\xbaH\n*\x05\x18\x90N(\x00\xc8\x01\x01R\x08nlmsgSeq\x12/\n\x0bpacket_size\x18\x12 \x01(\x04\x42\x0e\xbaH\x0b\x32\x06\x18\xc0\x84=(\x00\xc8\x01\x00R\npacketSize\x12\x36\n\x10packet_size_mply\x18\x13 \x01(\rB\x0c\xbaH\t*\x04\x18\x64(\x00\xc8\x01\x00R\x0epacketSizeMply\x12(\n\x07modulus\x18\x14 \x01(\x04\x42\x0e\xbaH\x0b\x32\x06\x18\xc0\x84=(\x01\xc8\x01\x01R\x07modulus\x12\x61\n\x15\x65nabled_deserializers\x18\x15 \x01(\x0b\x32$.xtcp_config.v1.EnabledDeserializersB\x06\xbaH\x03\xc8\x01\x00R\x14\x65nabledDeserializers\x12!\n\x08io_uring\x18\x16 \x01(\x08\x42\x06\xbaH\x03\xc8\x01\x00R\x07ioUring\x12\x45\n\x18io_uring_recv_batch_size\x18\x17 \x01(\rB\r\xbaH\n*\x05\x18\x80 (\x01\xc8\x01\x00R\x14ioUringRecvBatchSize\x12\x43\n\x17io_uring_cqe_batch_size\x18\x18 \x01(\rB\r\xbaH\n*\x05\x18\x80 (\x01\xc8\x01\x00R\x13ioUringCqeBatchSize\x12,\n\x0emax_dump_bytes\x18\x19 \x01(\x04\x42\x06\xbaH\x03\xc8\x01\x00R\x0cmaxDumpBytes\x12\x39\n\x15max_records_per_netns\x18\x1a \x01(\x04\x42\x06\xbaH\x03\xc8\x01\x00R\x12maxRecordsPerNetns\x12W\n\x13reconcile_frequency\x18( \x01(\x0b\x32\x19.google.protobuf.DurationB\x0b\xbaH\x08\xaa\x01\x02\x32\x00\xc8\x01\x00R\x12reconcileFrequency\x12\x32\n\x15reconcile_before_poll\x18) \x01(\x08R\x13reconcileBeforePoll\x12#\n\tmax_netns\x18* \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x08maxNetns\x12.\n\x0bwrite_files\x18\x32 \x01(\rB\r\xbaH\n*\x05\x18\xe8\x07(\x00\xc8\x01\x00R\nwriteFiles\x12/\n\x0c\x63\x61pture_path\x18\x33 \x01(\tB\x0c\xbaH\tr\x04\x10\x01\x18P\xc8\x01\x00R\x0b\x63\x61pturePath\x12\x37\n\x10\x64\x65st_write_files\x18\x34 \x01(\rB\r\xbaH\n*\x05\x18\xe8\x07(\x00\xc8\x01\x00R\x0e\x64\x65stWriteFiles\x12.\n\x0b\x64\x65\x62ug_level\x18\x35 \x01(\rB\r\xbaH\n*\x05\x18\xe8\x07(\x00\xc8\x01\x01R\ndebugLevel\x12\x31\n\x10\x64\x65\x62ug_prometheus\x18\x36 \x01(\x08\x42\x06\xbaH\x03\xc8\x01\x00R\x0f\x64\x65\x62ugPrometheus\x12!\n\x04\x64\x65st\x18< \x01(\tB\r\xbaH\nr\x05\x10\x04\x18\x80\x04\xc8\x01\x01R\x04\x64\x65st\x12+\n\nmarshal_to\x18= \x01(\tB\x0c\xbaH\tr\x04\x10\x03\x18(\xc8\x01\x01R\tmarshalTo\x12\'\n\x0b\x63sv_columns\x18> \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\ncsvColumns\x12\x34\n\x0fxtcp_proto_file\x18? \x01(\tB\x0c\xbaH\tr\x04\x10\x01\x18P\xc8\x01\x00R\rxtcpProtoFile\x12K\n\x1e\x65nvelope_flush_threshold_bytes\x18@ \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1b\x65nvelopeFlushThresholdBytes\x12I\n\x1d\x65nvelope_flush_threshold_rows\x18\x41 \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1a\x65nvelopeFlushThresholdRows\x12\"\n\x05topic\x18P \x01(\tB\x0c\xbaH\tr\x04\x10\x01\x18(\xc8\x01\x00R\x05topic\x12\x36\n\x10kafka_schema_url\x18Q \x01(\tB\x0c\xbaH\tr\x04\x10\x01\x18<\xc8\x01\x00R\x0ekafkaSchemaUrl\x12_\n\x15kafka_produce_timeout\x18R \x01(\x0b\x32\x19.google.protobuf.DurationB\x10\xbaH\r\xaa\x01\x07\"\x03\x08\xd8\x04\x32\x00\xc8\x01\x00R\x13kafkaProduceTimeout\x12\x33\n\x11kafka_compression\x18S \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x10kafkaCompression\x12\'\n\x0bs3_endpoint\x18\x64 \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\ns3Endpoint\x12#\n\ts3_region\x18\x65 \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x08s3Region\x12#\n\ts3_bucket\x18\x66 \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x08s3Bucket\x12#\n\ts3_prefix\x18g \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x08s3Prefix\x12*\n\rs3_access_key\x18h \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x0bs3AccessKey\x12*\n\rs3_secret_key\x18i \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x0bs3SecretKey\x12\x37\n\x14s3_skip_bucket_probe\x18j \x01(\x08\x42\x06\xbaH\x03\xc8\x01\x00R\x11s3SkipBucketProbe\x12\x32\n\x11s3_allow_insecure\x18k \x01(\x08\x42\x06\xbaH\x03\xc8\x01\x00R\x0fs3AllowInsecure\x12)\n\ns3_ca_file\x18l \x01(\tB\x0b\xbaH\x08r\x03\x18\x80 \xc8\x01\x00R\x08s3CaFile\x12N\n s3_parquet_flush_threshold_bytes\x18n \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1cs3ParquetFlushThresholdBytes\x12R\n\x11s3_flush_interval\x18o \x01(\x0b\x32\x19.google.protobuf.DurationB\x0b\xbaH\x08\xaa\x01\x02\x32\x00\xc8\x01\x00R\x0fs3FlushInterval\x12\x39\n\x13s3_flush_jitter_pct\x18p \x01(\rB\n\xbaH\x07*\x02\x18\x64\xc8\x01\x00R\x10s3FlushJitterPct\x12L\n\x1ds3_flush_threshold_jitter_pct\x18q \x01(\rB\n\xbaH\x07*\x02\x18\x64\xc8\x01\x00R\x19s3FlushThresholdJitterPct\x12\x41\n\x16s3_upload_max_attempts\x18r \x01(\rB\x0c\xbaH\t*\x04\x18\x64(\x01\xc8\x01\x00R\x13s3UploadMaxAttempts\x12Y\n\x15s3_upload_backoff_cap\x18s \x01(\x0b\x32\x19.google.protobuf.DurationB\x0b\xbaH\x08\xaa\x01\x02\x32\x00\xc8\x01\x00R\x12s3UploadBackoffCap\x12(\n\x08hostname\x18\x82\x01 \x01(\tB\x0b\xbaH\x08r\x03\x18\xfd\x01\xc8\x01\x00R\x08hostname\x12(\n\x08location\x18\x83\x01 \x01(\tB\x0b\xbaH\x08r\x03\x18\xfd\x01\xc8\x01\x00R\x08location\x12!\n\x05label\x18\x84\x01 \x01(\tB\n\xbaH\x07r\x02\x18(\xc8\x01\x00R\x05label\x12\x1d\n\x03tag\x18\x85\x01 \x01(\tB\n\xbaH\x07r\x02\x18(\xc8\x01\x00R\x03tag\x12\x33\n\x0e\x64\x61\x65mon_version\x18\x86\x01 \x01(\tB\x0b\xbaH\x08r\x03\x18\xfd\x01\xc8\x01\x00R\rdaemonVersion\x12\'\n\x08ipv4_ttl\x18\x96\x01 \x01(\rB\x0b\xbaH\x08*\x03\x18\xff\x01\xc8\x01\x00R\x07ipv4Ttl\x12\x32\n\x0eipv6_hop_limit\x18\x97\x01 \x01(\rB\x0b\xbaH\x08*\x03\x18\xff\x01\xc8\x01\x00R\x0cipv6HopLimit\x12J\n\rlistener_auth\x18\x98\x01 \x01(\x0b\x32\x1c.xtcp_config.v1.ListenerAuthB\x06\xbaH\x03\xc8\x01\x00R\x0clistenerAuth\x12Z\n\x13prometheus_listener\x18\x99\x01 \x01(\x0b\x32 .xtcp_config.v1.ListenerEndpointB\x06\xbaH\x03\xc8\x01\x00R\x12prometheusListener\x12U\n\x13\x61\x64min_listener_auth\x18\x9a\x01 \x01(\x0b\x32\x1c.xtcp_config.v1.ListenerAuthB\x06\xbaH\x03\xc8\x01\x00R\x11\x61\x64minListenerAuth\x12\'\n\tgrpc_port\x18\xa0\x01 \x01(\rB\t\xbaH\x06*\x04\x18\xff\xff\x03R\x08grpcPort\x12N\n\rgrpc_listener\x18\xa1\x01 \x01(\x0b\x32 .xtcp_config.v1.ListenerEndpointB\x06\xbaH\x03\xc8\x01\x00R\x0cgrpcListener\x12\x41\n\tlisteners\x18\xa2\x01 \x03(\x0b\x32\x18.xtcp_config.v1.ListenerB\x08\xbaH\x05\x92\x01\x02\x10\x10R\tlisteners\x12,\n\rpyroscope_url\x18\xaa\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x0cpyroscopeUrl\x12\x35\n\x12pyroscope_app_name\x18\xab\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x10pyroscopeAppName\x12\x37\n\x13pyroscope_sample_hz\x18\xac\x01 \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x11pyroscopeSampleHz\x12J\n\x1dpyroscope_upload_interval_sec\x18\xad\x01 \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1apyroscopeUploadIntervalSec\x12\x39\n\x14resolve_container_id\x18\xc8\x01 \x01(\x08\x42\x06\xbaH\x03\xc8\x01\x00R\x12resolveContainerId\x12\x37\n\x17\x65nrich_container_enable\x18\xc9\x01 \x01(\x08R\x15\x65nrichContainerEnable\x12\x37\n\x12\x64ocker_socket_path\x18\xca\x01 \x01(\tB\x08\xbaH\x05r\x03\x18\xff\x01R\x10\x64ockerSocketPath\x12-\n\x12\x65nrich_lldp_enable\x18\xd2\x01 \x01(\x08R\x10\x65nrichLldpEnable\x12\x35\n\x11lldpd_socket_path\x18\xd3\x01 \x01(\tB\x08\xbaH\x05r\x03\x18\xff\x01R\x0flldpdSocketPath\x12\x36\n\x12lldpd_version_hint\x18\xd4\x01 \x01(\tB\x07\xbaH\x04r\x02\x18\x10R\x10lldpdVersionHint\x12+\n\x11\x65nrich_nic_enable\x18\xdc\x01 \x01(\x08R\x0f\x65nrichNicEnable\x12+\n\x0cuplink_count\x18\xdd\x01 \x01(\rB\x07\xbaH\x04*\x02\x18\x02R\x0buplinkCount\x12\x36\n\x11uplink_interfaces\x18\xde\x01 \x03(\tB\x08\xbaH\x05\x92\x01\x02\x10\x02R\x10uplinkInterfaces\x12$\n\rpopulate_nsid\x18\xe6\x01 \x01(\x08R\x0cpopulateNsid\x12+\n\x11\x65nrich_asn_enable\x18\xf0\x01 \x01(\x08R\x0f\x65nrichAsnEnable\x12)\n\x0b\x61sn_db_path\x18\xf1\x01 \x01(\tB\x08\xbaH\x05r\x03\x18\xff\x01R\tasnDbPath\x12L\n\x14\x61sn_refresh_interval\x18\xf2\x01 \x01(\x0b\x32\x19.google.protobuf.DurationR\x12\x61snRefreshInterval\x12=\n\x15ipmeta_bootstrap_path\x18\xf3\x01 \x01(\tB\x08\xbaH\x05r\x03\x18\xff\x01R\x13ipmetaBootstrapPath\x12\x35\n\x11ipmeta_cache_path\x18\xf4\x01 \x01(\tB\x08\xbaH\x05r\x03\x18\xff\x01R\x0fipmetaCachePath\x12\x35\n\x16\x65nrich_locality_enable\x18\xf5\x01 \x01(\x08R\x14\x65nrichLocalityEnable\x12V\n\x19locality_refresh_interval\x18\xf6\x01 \x01(\x0b\x32\x19.google.protobuf.DurationR\x17localityRefreshInterval\x12\x35\n\x16locality_events_enable\x18\xf7\x01 \x01(\x08R\x14localityEventsEnable\x12\x45\n\x0clink_monitor\x18\xfa\x01 \x01(\x0b\x32!.xtcp_config.v1.LinkMonitorConfigR\x0blinkMonitor:s\xbaHp\x1an\n\x0fXtcpConfig.poll\x12\x32Poll timeout must be less than poll poll_frequency\x1a\'this.poll_frequency > this.poll_timeout\"\x9f\x01\n\x14\x45nabledDeserializers\x12K\n\x07\x65nabled\x18\x01 \x03(\x0b\x32\x31.xtcp_config.v1.EnabledDeserializers.EnabledEntryR\x07\x65nabled\x1a:\n\x0c\x45nabledEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x08R\x05value:\x02\x38\x01*h\n\x0fListenerNetwork\x12 \n\x1cLISTENER_NETWORK_UNSPECIFIED\x10\x00\x12\x18\n\x14LISTENER_NETWORK_TCP\x10\x01\x12\x19\n\x15LISTENER_NETWORK_UNIX\x10\x02*\xa1\x01\n\x10ListenerAuthMode\x12\"\n\x1eLISTENER_AUTH_MODE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bLISTENER_AUTH_MODE_DISABLED\x10\x01\x12 \n\x1cLISTENER_AUTH_MODE_RAW_TOKEN\x10\x02\x12&\n\"LISTENER_AUTH_MODE_HMAC_UTC_MINUTE\x10\x03*\xf7\x01\n\rEndpointClass\x12\x1e\n\x1a\x45NDPOINT_CLASS_UNSPECIFIED\x10\x00\x12\x19\n\x15\x45NDPOINT_CLASS_HEALTH\x10\x01\x12\x1a\n\x16\x45NDPOINT_CLASS_METRICS\x10\x02\x12!\n\x1d\x45NDPOINT_CLASS_METRICS_DETAIL\x10\x03\x12\x15\n\x11\x45NDPOINT_CLASS_IP\x10\x04\x12\x18\n\x14\x45NDPOINT_CLASS_DEBUG\x10\x05\x12\x1c\n\x18\x45NDPOINT_CLASS_GRPC_READ\x10\x06\x12\x1d\n\x19\x45NDPOINT_CLASS_GRPC_ADMIN\x10\x07\x32\xa5\x07\n\rConfigService\x12\x61\n\x03Get\x12\x1a.xtcp_config.v1.GetRequest\x1a\x1b.xtcp_config.v1.GetResponse\"!\xc8\xf3\x18\x01\x82\xd3\xe4\x93\x02\x17\x1a\x12/ConfigService/Get:\x01*\x12\x61\n\x03Set\x12\x1a.xtcp_config.v1.SetRequest\x1a\x1b.xtcp_config.v1.SetResponse\"!\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02\x17\x1a\x12/ConfigService/Set:\x01*\x12\x95\x01\n\x10SetPollFrequency\x12\'.xtcp_config.v1.SetPollFrequencyRequest\x1a(.xtcp_config.v1.SetPollFrequencyResponse\".\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02$\x1a\x1f/ConfigService/SetPollFrequency:\x01*\x12\x81\x01\n\x0bTriggerPoll\x12\".xtcp_config.v1.TriggerPollRequest\x1a#.xtcp_config.v1.TriggerPollResponse\")\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02\x1f\x1a\x1a/ConfigService/TriggerPoll:\x01*\x12\x95\x01\n\x10TriggerPollBurst\x12\'.xtcp_config.v1.TriggerPollBurstRequest\x1a(.xtcp_config.v1.TriggerPollBurstResponse\".\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02$\x1a\x1f/ConfigService/TriggerPollBurst:\x01*\x12\x81\x01\n\x0bSetS3Upload\x12\".xtcp_config.v1.SetS3UploadRequest\x1a#.xtcp_config.v1.SetS3UploadResponse\")\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02\x1f\x1a\x1a/ConfigService/SetS3Upload:\x01*\x12\x95\x01\n\x10SetEnvelopeFlush\x12\'.xtcp_config.v1.SetEnvelopeFlushRequest\x1a(.xtcp_config.v1.SetEnvelopeFlushResponse\".\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02$\x1a\x1f/ConfigService/SetEnvelopeFlush:\x01*B\xaf\x01\n\x12\x63om.xtcp_config.v1B\x0fXtcpConfigProtoP\x01Z3github.com/randomizedcoder/xtcp2/gen/go/xtcp_config\xa2\x02\x03XXX\xaa\x02\rXtcpConfig.V1\xca\x02\rXtcpConfig\\V1\xe2\x02\x19XtcpConfig\\V1\\GPBMetadata\xea\x02\x0eXtcpConfig::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -172,8 +172,14 @@ _globals['_XTCPCONFIG'].fields_by_name['io_uring_recv_batch_size']._serialized_options = b'\272H\n*\005\030\200 (\001\310\001\000' _globals['_XTCPCONFIG'].fields_by_name['io_uring_cqe_batch_size']._loaded_options = None _globals['_XTCPCONFIG'].fields_by_name['io_uring_cqe_batch_size']._serialized_options = b'\272H\n*\005\030\200 (\001\310\001\000' + _globals['_XTCPCONFIG'].fields_by_name['max_dump_bytes']._loaded_options = None + _globals['_XTCPCONFIG'].fields_by_name['max_dump_bytes']._serialized_options = b'\272H\003\310\001\000' + _globals['_XTCPCONFIG'].fields_by_name['max_records_per_netns']._loaded_options = None + _globals['_XTCPCONFIG'].fields_by_name['max_records_per_netns']._serialized_options = b'\272H\003\310\001\000' _globals['_XTCPCONFIG'].fields_by_name['reconcile_frequency']._loaded_options = None _globals['_XTCPCONFIG'].fields_by_name['reconcile_frequency']._serialized_options = b'\272H\010\252\001\0022\000\310\001\000' + _globals['_XTCPCONFIG'].fields_by_name['max_netns']._loaded_options = None + _globals['_XTCPCONFIG'].fields_by_name['max_netns']._serialized_options = b'\272H\003\310\001\000' _globals['_XTCPCONFIG'].fields_by_name['write_files']._loaded_options = None _globals['_XTCPCONFIG'].fields_by_name['write_files']._serialized_options = b'\272H\n*\005\030\350\007(\000\310\001\000' _globals['_XTCPCONFIG'].fields_by_name['capture_path']._loaded_options = None @@ -304,12 +310,12 @@ _globals['_CONFIGSERVICE'].methods_by_name['SetS3Upload']._serialized_options = b'\310\363\030\002\202\323\344\223\002\037\032\032/ConfigService/SetS3Upload:\001*' _globals['_CONFIGSERVICE'].methods_by_name['SetEnvelopeFlush']._loaded_options = None _globals['_CONFIGSERVICE'].methods_by_name['SetEnvelopeFlush']._serialized_options = b'\310\363\030\002\202\323\344\223\002$\032\037/ConfigService/SetEnvelopeFlush:\001*' - _globals['_LISTENERNETWORK']._serialized_start=10339 - _globals['_LISTENERNETWORK']._serialized_end=10443 - _globals['_LISTENERAUTHMODE']._serialized_start=10446 - _globals['_LISTENERAUTHMODE']._serialized_end=10607 - _globals['_ENDPOINTCLASS']._serialized_start=10610 - _globals['_ENDPOINTCLASS']._serialized_end=10857 + _globals['_LISTENERNETWORK']._serialized_start=10481 + _globals['_LISTENERNETWORK']._serialized_end=10585 + _globals['_LISTENERAUTHMODE']._serialized_start=10588 + _globals['_LISTENERAUTHMODE']._serialized_end=10749 + _globals['_ENDPOINTCLASS']._serialized_start=10752 + _globals['_ENDPOINTCLASS']._serialized_end=10999 _globals['_GETREQUEST']._serialized_start=173 _globals['_GETREQUEST']._serialized_end=185 _globals['_GETRESPONSE']._serialized_start=187 @@ -347,11 +353,11 @@ _globals['_LINKMONITORCONFIG']._serialized_start=3450 _globals['_LINKMONITORCONFIG']._serialized_end=5268 _globals['_XTCPCONFIG']._serialized_start=5271 - _globals['_XTCPCONFIG']._serialized_end=10175 - _globals['_ENABLEDDESERIALIZERS']._serialized_start=10178 - _globals['_ENABLEDDESERIALIZERS']._serialized_end=10337 - _globals['_ENABLEDDESERIALIZERS_ENABLEDENTRY']._serialized_start=10279 - _globals['_ENABLEDDESERIALIZERS_ENABLEDENTRY']._serialized_end=10337 - _globals['_CONFIGSERVICE']._serialized_start=10860 - _globals['_CONFIGSERVICE']._serialized_end=11793 + _globals['_XTCPCONFIG']._serialized_end=10317 + _globals['_ENABLEDDESERIALIZERS']._serialized_start=10320 + _globals['_ENABLEDDESERIALIZERS']._serialized_end=10479 + _globals['_ENABLEDDESERIALIZERS_ENABLEDENTRY']._serialized_start=10421 + _globals['_ENABLEDDESERIALIZERS_ENABLEDENTRY']._serialized_end=10479 + _globals['_CONFIGSERVICE']._serialized_start=11002 + _globals['_CONFIGSERVICE']._serialized_end=11935 # @@protoc_insertion_point(module_scope) diff --git a/gen/python/xtcp_config/v1/xtcp_config_pb2.pyi b/gen/python/xtcp_config/v1/xtcp_config_pb2.pyi index 66f9b95e8..7157acb58 100644 --- a/gen/python/xtcp_config/v1/xtcp_config_pb2.pyi +++ b/gen/python/xtcp_config/v1/xtcp_config_pb2.pyi @@ -253,7 +253,7 @@ class LinkMonitorConfig(_message.Message): def __init__(self, enable: _Optional[bool] = ..., baseline_file: _Optional[str] = ..., settle: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., resync: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., stats_interval: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., stats_include: _Optional[str] = ..., stats_exclude: _Optional[str] = ..., netstat_fields: _Optional[str] = ..., max_speed_exceptions: _Optional[_Iterable[str]] = ..., metrics_core_include: _Optional[str] = ..., metrics_core_exclude: _Optional[str] = ..., metrics_all: _Optional[bool] = ..., collection_mode: _Optional[str] = ..., watch_interval: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., slow_interval: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., on_demand_ttl: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., on_demand_wait: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., error_window: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., flap_window: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., error_classes: _Optional[str] = ..., error_exclude: _Optional[str] = ..., metrics_categories: _Optional[str] = ..., metrics_interface_paths: _Optional[bool] = ..., metrics_all_path: _Optional[str] = ..., ip_paths: _Optional[bool] = ..., ip_max_bytes: _Optional[int] = ..., ip_listen: _Optional[str] = ..., learn_deadline: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ...) -> None: ... class XtcpConfig(_message.Message): - __slots__ = ("nl_timeout_milliseconds", "poll_frequency", "poll_timeout", "poll_jitter_pct", "max_loops", "netlinkers", "netlinkers_done_chan_size", "nlmsg_seq", "packet_size", "packet_size_mply", "modulus", "enabled_deserializers", "io_uring", "io_uring_recv_batch_size", "io_uring_cqe_batch_size", "reconcile_frequency", "reconcile_before_poll", "write_files", "capture_path", "dest_write_files", "debug_level", "debug_prometheus", "dest", "marshal_to", "csv_columns", "xtcp_proto_file", "envelope_flush_threshold_bytes", "envelope_flush_threshold_rows", "topic", "kafka_schema_url", "kafka_produce_timeout", "kafka_compression", "s3_endpoint", "s3_region", "s3_bucket", "s3_prefix", "s3_access_key", "s3_secret_key", "s3_skip_bucket_probe", "s3_allow_insecure", "s3_ca_file", "s3_parquet_flush_threshold_bytes", "s3_flush_interval", "s3_flush_jitter_pct", "s3_flush_threshold_jitter_pct", "s3_upload_max_attempts", "s3_upload_backoff_cap", "hostname", "location", "label", "tag", "daemon_version", "ipv4_ttl", "ipv6_hop_limit", "listener_auth", "prometheus_listener", "admin_listener_auth", "grpc_port", "grpc_listener", "listeners", "pyroscope_url", "pyroscope_app_name", "pyroscope_sample_hz", "pyroscope_upload_interval_sec", "resolve_container_id", "enrich_container_enable", "docker_socket_path", "enrich_lldp_enable", "lldpd_socket_path", "lldpd_version_hint", "enrich_nic_enable", "uplink_count", "uplink_interfaces", "populate_nsid", "enrich_asn_enable", "asn_db_path", "asn_refresh_interval", "ipmeta_bootstrap_path", "ipmeta_cache_path", "enrich_locality_enable", "locality_refresh_interval", "locality_events_enable", "link_monitor") + __slots__ = ("nl_timeout_milliseconds", "poll_frequency", "poll_timeout", "poll_jitter_pct", "max_loops", "netlinkers", "netlinkers_done_chan_size", "nlmsg_seq", "packet_size", "packet_size_mply", "modulus", "enabled_deserializers", "io_uring", "io_uring_recv_batch_size", "io_uring_cqe_batch_size", "max_dump_bytes", "max_records_per_netns", "reconcile_frequency", "reconcile_before_poll", "max_netns", "write_files", "capture_path", "dest_write_files", "debug_level", "debug_prometheus", "dest", "marshal_to", "csv_columns", "xtcp_proto_file", "envelope_flush_threshold_bytes", "envelope_flush_threshold_rows", "topic", "kafka_schema_url", "kafka_produce_timeout", "kafka_compression", "s3_endpoint", "s3_region", "s3_bucket", "s3_prefix", "s3_access_key", "s3_secret_key", "s3_skip_bucket_probe", "s3_allow_insecure", "s3_ca_file", "s3_parquet_flush_threshold_bytes", "s3_flush_interval", "s3_flush_jitter_pct", "s3_flush_threshold_jitter_pct", "s3_upload_max_attempts", "s3_upload_backoff_cap", "hostname", "location", "label", "tag", "daemon_version", "ipv4_ttl", "ipv6_hop_limit", "listener_auth", "prometheus_listener", "admin_listener_auth", "grpc_port", "grpc_listener", "listeners", "pyroscope_url", "pyroscope_app_name", "pyroscope_sample_hz", "pyroscope_upload_interval_sec", "resolve_container_id", "enrich_container_enable", "docker_socket_path", "enrich_lldp_enable", "lldpd_socket_path", "lldpd_version_hint", "enrich_nic_enable", "uplink_count", "uplink_interfaces", "populate_nsid", "enrich_asn_enable", "asn_db_path", "asn_refresh_interval", "ipmeta_bootstrap_path", "ipmeta_cache_path", "enrich_locality_enable", "locality_refresh_interval", "locality_events_enable", "link_monitor") NL_TIMEOUT_MILLISECONDS_FIELD_NUMBER: _ClassVar[int] POLL_FREQUENCY_FIELD_NUMBER: _ClassVar[int] POLL_TIMEOUT_FIELD_NUMBER: _ClassVar[int] @@ -269,8 +269,11 @@ class XtcpConfig(_message.Message): IO_URING_FIELD_NUMBER: _ClassVar[int] IO_URING_RECV_BATCH_SIZE_FIELD_NUMBER: _ClassVar[int] IO_URING_CQE_BATCH_SIZE_FIELD_NUMBER: _ClassVar[int] + MAX_DUMP_BYTES_FIELD_NUMBER: _ClassVar[int] + MAX_RECORDS_PER_NETNS_FIELD_NUMBER: _ClassVar[int] RECONCILE_FREQUENCY_FIELD_NUMBER: _ClassVar[int] RECONCILE_BEFORE_POLL_FIELD_NUMBER: _ClassVar[int] + MAX_NETNS_FIELD_NUMBER: _ClassVar[int] WRITE_FILES_FIELD_NUMBER: _ClassVar[int] CAPTURE_PATH_FIELD_NUMBER: _ClassVar[int] DEST_WRITE_FILES_FIELD_NUMBER: _ClassVar[int] @@ -352,8 +355,11 @@ class XtcpConfig(_message.Message): io_uring: bool io_uring_recv_batch_size: int io_uring_cqe_batch_size: int + max_dump_bytes: int + max_records_per_netns: int reconcile_frequency: _duration_pb2.Duration reconcile_before_poll: bool + max_netns: int write_files: int capture_path: str dest_write_files: int @@ -420,7 +426,7 @@ class XtcpConfig(_message.Message): locality_refresh_interval: _duration_pb2.Duration locality_events_enable: bool link_monitor: LinkMonitorConfig - def __init__(self, nl_timeout_milliseconds: _Optional[int] = ..., poll_frequency: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., poll_timeout: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., poll_jitter_pct: _Optional[int] = ..., max_loops: _Optional[int] = ..., netlinkers: _Optional[int] = ..., netlinkers_done_chan_size: _Optional[int] = ..., nlmsg_seq: _Optional[int] = ..., packet_size: _Optional[int] = ..., packet_size_mply: _Optional[int] = ..., modulus: _Optional[int] = ..., enabled_deserializers: _Optional[_Union[EnabledDeserializers, _Mapping]] = ..., io_uring: _Optional[bool] = ..., io_uring_recv_batch_size: _Optional[int] = ..., io_uring_cqe_batch_size: _Optional[int] = ..., reconcile_frequency: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., reconcile_before_poll: _Optional[bool] = ..., write_files: _Optional[int] = ..., capture_path: _Optional[str] = ..., dest_write_files: _Optional[int] = ..., debug_level: _Optional[int] = ..., debug_prometheus: _Optional[bool] = ..., dest: _Optional[str] = ..., marshal_to: _Optional[str] = ..., csv_columns: _Optional[str] = ..., xtcp_proto_file: _Optional[str] = ..., envelope_flush_threshold_bytes: _Optional[int] = ..., envelope_flush_threshold_rows: _Optional[int] = ..., topic: _Optional[str] = ..., kafka_schema_url: _Optional[str] = ..., kafka_produce_timeout: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., kafka_compression: _Optional[str] = ..., s3_endpoint: _Optional[str] = ..., s3_region: _Optional[str] = ..., s3_bucket: _Optional[str] = ..., s3_prefix: _Optional[str] = ..., s3_access_key: _Optional[str] = ..., s3_secret_key: _Optional[str] = ..., s3_skip_bucket_probe: _Optional[bool] = ..., s3_allow_insecure: _Optional[bool] = ..., s3_ca_file: _Optional[str] = ..., s3_parquet_flush_threshold_bytes: _Optional[int] = ..., s3_flush_interval: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., s3_flush_jitter_pct: _Optional[int] = ..., s3_flush_threshold_jitter_pct: _Optional[int] = ..., s3_upload_max_attempts: _Optional[int] = ..., s3_upload_backoff_cap: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., hostname: _Optional[str] = ..., location: _Optional[str] = ..., label: _Optional[str] = ..., tag: _Optional[str] = ..., daemon_version: _Optional[str] = ..., ipv4_ttl: _Optional[int] = ..., ipv6_hop_limit: _Optional[int] = ..., listener_auth: _Optional[_Union[ListenerAuth, _Mapping]] = ..., prometheus_listener: _Optional[_Union[ListenerEndpoint, _Mapping]] = ..., admin_listener_auth: _Optional[_Union[ListenerAuth, _Mapping]] = ..., grpc_port: _Optional[int] = ..., grpc_listener: _Optional[_Union[ListenerEndpoint, _Mapping]] = ..., listeners: _Optional[_Iterable[_Union[Listener, _Mapping]]] = ..., pyroscope_url: _Optional[str] = ..., pyroscope_app_name: _Optional[str] = ..., pyroscope_sample_hz: _Optional[int] = ..., pyroscope_upload_interval_sec: _Optional[int] = ..., resolve_container_id: _Optional[bool] = ..., enrich_container_enable: _Optional[bool] = ..., docker_socket_path: _Optional[str] = ..., enrich_lldp_enable: _Optional[bool] = ..., lldpd_socket_path: _Optional[str] = ..., lldpd_version_hint: _Optional[str] = ..., enrich_nic_enable: _Optional[bool] = ..., uplink_count: _Optional[int] = ..., uplink_interfaces: _Optional[_Iterable[str]] = ..., populate_nsid: _Optional[bool] = ..., enrich_asn_enable: _Optional[bool] = ..., asn_db_path: _Optional[str] = ..., asn_refresh_interval: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., ipmeta_bootstrap_path: _Optional[str] = ..., ipmeta_cache_path: _Optional[str] = ..., enrich_locality_enable: _Optional[bool] = ..., locality_refresh_interval: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., locality_events_enable: _Optional[bool] = ..., link_monitor: _Optional[_Union[LinkMonitorConfig, _Mapping]] = ...) -> None: ... + def __init__(self, nl_timeout_milliseconds: _Optional[int] = ..., poll_frequency: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., poll_timeout: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., poll_jitter_pct: _Optional[int] = ..., max_loops: _Optional[int] = ..., netlinkers: _Optional[int] = ..., netlinkers_done_chan_size: _Optional[int] = ..., nlmsg_seq: _Optional[int] = ..., packet_size: _Optional[int] = ..., packet_size_mply: _Optional[int] = ..., modulus: _Optional[int] = ..., enabled_deserializers: _Optional[_Union[EnabledDeserializers, _Mapping]] = ..., io_uring: _Optional[bool] = ..., io_uring_recv_batch_size: _Optional[int] = ..., io_uring_cqe_batch_size: _Optional[int] = ..., max_dump_bytes: _Optional[int] = ..., max_records_per_netns: _Optional[int] = ..., reconcile_frequency: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., reconcile_before_poll: _Optional[bool] = ..., max_netns: _Optional[int] = ..., write_files: _Optional[int] = ..., capture_path: _Optional[str] = ..., dest_write_files: _Optional[int] = ..., debug_level: _Optional[int] = ..., debug_prometheus: _Optional[bool] = ..., dest: _Optional[str] = ..., marshal_to: _Optional[str] = ..., csv_columns: _Optional[str] = ..., xtcp_proto_file: _Optional[str] = ..., envelope_flush_threshold_bytes: _Optional[int] = ..., envelope_flush_threshold_rows: _Optional[int] = ..., topic: _Optional[str] = ..., kafka_schema_url: _Optional[str] = ..., kafka_produce_timeout: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., kafka_compression: _Optional[str] = ..., s3_endpoint: _Optional[str] = ..., s3_region: _Optional[str] = ..., s3_bucket: _Optional[str] = ..., s3_prefix: _Optional[str] = ..., s3_access_key: _Optional[str] = ..., s3_secret_key: _Optional[str] = ..., s3_skip_bucket_probe: _Optional[bool] = ..., s3_allow_insecure: _Optional[bool] = ..., s3_ca_file: _Optional[str] = ..., s3_parquet_flush_threshold_bytes: _Optional[int] = ..., s3_flush_interval: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., s3_flush_jitter_pct: _Optional[int] = ..., s3_flush_threshold_jitter_pct: _Optional[int] = ..., s3_upload_max_attempts: _Optional[int] = ..., s3_upload_backoff_cap: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., hostname: _Optional[str] = ..., location: _Optional[str] = ..., label: _Optional[str] = ..., tag: _Optional[str] = ..., daemon_version: _Optional[str] = ..., ipv4_ttl: _Optional[int] = ..., ipv6_hop_limit: _Optional[int] = ..., listener_auth: _Optional[_Union[ListenerAuth, _Mapping]] = ..., prometheus_listener: _Optional[_Union[ListenerEndpoint, _Mapping]] = ..., admin_listener_auth: _Optional[_Union[ListenerAuth, _Mapping]] = ..., grpc_port: _Optional[int] = ..., grpc_listener: _Optional[_Union[ListenerEndpoint, _Mapping]] = ..., listeners: _Optional[_Iterable[_Union[Listener, _Mapping]]] = ..., pyroscope_url: _Optional[str] = ..., pyroscope_app_name: _Optional[str] = ..., pyroscope_sample_hz: _Optional[int] = ..., pyroscope_upload_interval_sec: _Optional[int] = ..., resolve_container_id: _Optional[bool] = ..., enrich_container_enable: _Optional[bool] = ..., docker_socket_path: _Optional[str] = ..., enrich_lldp_enable: _Optional[bool] = ..., lldpd_socket_path: _Optional[str] = ..., lldpd_version_hint: _Optional[str] = ..., enrich_nic_enable: _Optional[bool] = ..., uplink_count: _Optional[int] = ..., uplink_interfaces: _Optional[_Iterable[str]] = ..., populate_nsid: _Optional[bool] = ..., enrich_asn_enable: _Optional[bool] = ..., asn_db_path: _Optional[str] = ..., asn_refresh_interval: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., ipmeta_bootstrap_path: _Optional[str] = ..., ipmeta_cache_path: _Optional[str] = ..., enrich_locality_enable: _Optional[bool] = ..., locality_refresh_interval: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., locality_events_enable: _Optional[bool] = ..., link_monitor: _Optional[_Union[LinkMonitorConfig, _Mapping]] = ...) -> None: ... class EnabledDeserializers(_message.Message): __slots__ = ("enabled",) diff --git a/pkg/xtcp/caps.go b/pkg/xtcp/caps.go new file mode 100644 index 000000000..83608f800 --- /dev/null +++ b/pkg/xtcp/caps.go @@ -0,0 +1,54 @@ +package xtcp + +import ( + "cmp" + "log" + "slices" +) + +// The caps on what a tenant can cost the collector: -maxDumpBytes and +// -maxRecordsPerNetns bound one namespace's dump per poll, -maxNetns bounds +// the namespaces tracked. Each drop is counted, so a namespace past a cap +// costs a metric rather than the collector's CPU or memory. 0 turns a cap off. + +// Reasons for xtcp_dump_dropped_total. +const ( + dumpDropBytesCst = "bytes" + dumpDropRecordsCst = "records" +) + +// dumpTruncated counts a dump cut short by the cap named by reason, and logs +// it. Callers make it once per dump, so it is at most one line per +// namespace per poll. +func (x *XTCP) dumpTruncated(reason string, fd int, limit uint64) { + if x.pDumpDropped != nil { + x.pDumpDropped.WithLabelValues(reason).Inc() + } + inode, _ := x.fdToNsMap.Load(fd) + log.Printf("dump truncated: fd:%d inode:%v cap:%s=%d; the rest of this poll's dump is dropped", fd, inode, reason, limit) +} + +// admitNamespaces picks which of the untracked live namespaces reconcile may +// add, given tracked (the namespaces tracked after its deletes) and limit +// (-maxNetns, 0 for no cap). Lower pids go first, so long-running workloads +// keep their slots ahead of a burst of new namespaces, and xtcp2's own +// namespace (self) is always admitted. It returns the admitted identities +// and how many were left out. +func admitNamespaces(candidates []nsIdentity, tracked int, limit uint32, self uint64) (admit []nsIdentity, dropped int) { + if limit == 0 { + return candidates, 0 + } + slices.SortFunc(candidates, func(a, b nsIdentity) int { + return cmp.Or(cmp.Compare(a.pid, b.pid), cmp.Compare(a.inode, b.inode)) + }) + admit = candidates[:0:0] + for _, id := range candidates { + if id.inode == self || tracked < int(limit) { + admit = append(admit, id) + tracked++ + continue + } + dropped++ + } + return admit, dropped +} diff --git a/pkg/xtcp/caps_test.go b/pkg/xtcp/caps_test.go new file mode 100644 index 000000000..1e12c0784 --- /dev/null +++ b/pkg/xtcp/caps_test.go @@ -0,0 +1,324 @@ +package xtcp + +import ( + "encoding/binary" + "slices" + "sync" + "testing" + "time" + + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/testutil" + + "github.com/randomizedcoder/xtcp2/gen/go/xtcp_config" + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" +) + +// TestDumpTracker_byteCap pins assign's byte accounting: which packets of a +// dump are past -maxDumpBytes, which one is the first, and that NLMSG_DONE +// starts the next dump from zero. +func TestDumpTracker_byteCap(t *testing.T) { + done := doneMessage() // 20 bytes + data := func(n int) []byte { return make([]byte, n) } + + type pkt struct { + b []byte + drop bool + first bool + } + tests := []struct { + name string + category string + description string + maxBytes uint64 + packets []pkt + }{ + { + name: "no_cap", category: "P", + description: "cap 0 never drops, however large the dump", + maxBytes: 0, + packets: []pkt{{b: data(1 << 20)}, {b: data(1 << 20)}, {b: done}}, + }, + { + name: "under_caps", category: "P", + description: "a dump smaller than the cap is all kept", + maxBytes: 1000, + packets: []pkt{{b: data(100)}, {b: data(100)}, {b: done}}, + }, + { + name: "exact", category: "B", + description: "bytes equal to the cap are kept; the next byte is not", + maxBytes: 200, + packets: []pkt{{b: data(100)}, {b: data(100)}, {b: done, drop: true, first: true}}, + }, + { + name: "plus_one", category: "B", + description: "the packet that crosses the cap is the first dropped", + maxBytes: 199, + packets: []pkt{{b: data(100)}, {b: data(100), drop: true, first: true}, {b: done, drop: true}}, + }, + { + name: "stays_truncated", category: "C", + description: "after the cap, a packet that would fit is still dropped, so the kept records are a prefix", + maxBytes: 150, + packets: []pkt{{b: data(100)}, {b: data(100), drop: true, first: true}, {b: data(1), drop: true}, {b: done, drop: true}}, + }, + { + name: "single_packet_over", category: "C", + description: "a first packet larger than the cap is dropped", + maxBytes: 10, + packets: []pkt{{b: data(100), drop: true, first: true}, {b: done, drop: true}}, + }, + { + name: "reset_next_dump", category: "C", + description: "NLMSG_DONE in a dropped packet still ends the dump; the next one starts at 0 bytes", + maxBytes: 150, + packets: []pkt{ + {b: data(100)}, {b: data(100), drop: true, first: true}, {b: done, drop: true}, + {b: data(100)}, {b: done}, // 120 bytes: under the cap + }, + }, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + tr := newDumpTracker(tc.maxBytes, 0) + var dumps []*dumpState + for i, p := range tc.packets { + a := tr.assign(p.b) + if a.drop != p.drop || a.bytesCut != p.first { + t.Errorf("%s: packet %d: drop=%v first=%v, expected drop=%v first=%v", + tc.description, i, a.drop, a.bytesCut, p.drop, p.first) + } + if len(dumps) == 0 || dumps[len(dumps)-1] != a.dump { + dumps = append(dumps, a.dump) + } + } + // Every dump ended with done has its total stored. + for i, d := range dumps { + if d.total.Load() == 0 { + t.Errorf("%s: dump %d has no total", tc.description, i) + } + } + }) + } +} + +// diagPacket is a packet of k bare inet_diag message headers, enough for +// packetScan to count; done appends NLMSG_DONE. +func diagPacket(k int, done bool) []byte { + var p []byte + for range k { + h := make([]byte, xtcpnl.NlMsgHdrSizeCst) + binary.LittleEndian.PutUint32(h[0:4], uint32(len(h))) + binary.LittleEndian.PutUint16(h[4:6], xtcpnl.NlMsgHdrTypeInetDiagCst) + p = append(p, h...) + } + if done { + p = append(p, doneMessage()...) + } + return p +} + +// TestDumpTracker_recordCap pins assign's record budget: how many records +// each packet may keep, which packets are drained, the records counted out, +// and that the cap is cut once per dump. +func TestDumpTracker_recordCap(t *testing.T) { + type pkt struct { + k, keep, dropped int + done, drop, cut bool + } + tests := []struct { + name string + category string + description string + maxRecords uint64 + maxBytes uint64 + packets []pkt + }{ + {name: "off", category: "P", description: "cap 0 keeps every record", + packets: []pkt{{k: 1000}, {k: 1000, done: true}}}, + {name: "records_cap_exact", category: "B", description: "records equal to the cap are all kept", + maxRecords: 100, packets: []pkt{{k: 60}, {k: 40}, {k: 0, done: true}}}, + {name: "records_cap_plus_one", category: "N", description: "one record over: the crossing packet keeps all but one", + maxRecords: 99, packets: []pkt{{k: 60}, {k: 40, keep: 39, dropped: 1, cut: true}, {k: 0, done: true, drop: true}}}, + {name: "records_cap_mid_packet", category: "N", description: "the crossing packet keeps its budget, later ones are drained", + maxRecords: 100, packets: []pkt{{k: 60}, {k: 60, keep: 40, dropped: 20, cut: true}, {k: 60, dropped: 60, drop: true}, {k: 0, done: true, drop: true}}}, + {name: "exact_then_more", category: "B", description: "a dump exactly at the cap drains the next record packet whole", + maxRecords: 60, packets: []pkt{{k: 60}, {k: 1, dropped: 1, drop: true, cut: true}, {k: 0, done: true, drop: true}}}, + {name: "cap_reset_next_dump", category: "C", description: "NLMSG_DONE resets the budget", + maxRecords: 50, packets: []pkt{{k: 60, keep: 50, dropped: 10, cut: true, done: true}, {k: 50, done: true}}}, + {name: "bytes_cap_first", category: "C", description: "a packet past the byte cap is drained and not counted against the record cap", + maxRecords: 50, maxBytes: 16 * 40, + packets: []pkt{{k: 40}, {k: 40, drop: true}, {k: 0, done: true, drop: true}}}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + tr := newDumpTracker(tc.maxBytes, tc.maxRecords) + for i, p := range tc.packets { + a := tr.assign(diagPacket(p.k, p.done)) + if a.keep != p.keep || a.recordsDropped != p.dropped || a.drop != p.drop || a.recordsCut != p.cut { + t.Errorf("%s: packet %d: keep=%d dropped=%d drop=%v cut=%v, expected keep=%d dropped=%d drop=%v cut=%v", + tc.description, i, a.keep, a.recordsDropped, a.drop, a.recordsCut, p.keep, p.dropped, p.drop, p.cut) + } + } + }) + } +} + +// newCapsXTCP is newTestDeserializeXTCP with the cap metrics registered. +func newCapsXTCP(tb testing.TB) *XTCP { + tb.Helper() + x := newTestDeserializeXTCP(tb) + x.fdToNsMap = &sync.Map{} + x.pDumpDropped = prometheus.NewCounterVec(prometheus.CounterOpts{Name: "dump_dropped_total"}, []string{"reason"}) + x.pNetnsDropped = prometheus.NewCounter(prometheus.CounterOpts{Name: "netns_dropped_total"}) + return x +} + +// TestNetlinkerDump_caps runs real dumps through both receivers with the +// byte and record caps set: the kept records, the done signal and the drop +// counters. +func TestNetlinkerDump_caps(t *testing.T) { + c := loadDumpCorpus(t) + pkts := c.dump(4) // 4 packets of dumpRecordsPerPkt records, then done + pktBytes := uint64(len(pkts[0])) + all := 4 * dumpRecordsPerPkt + + tests := []struct { + name string + category string + description string + netlinkers uint32 + dumps int + maxBytes uint64 + maxRecords uint64 + expectedRows int // per dump + expectedBytes float64 + expectedRecs float64 + }{ + {name: "under_caps", category: "P", description: "caps above the dump keep every record", + netlinkers: 2, dumps: 1, maxBytes: 1 << 30, maxRecords: 1 << 20, expectedRows: all}, + {name: "caps_zero_unlimited", category: "P", description: "caps 0 keep every record", + netlinkers: 2, dumps: 1, expectedRows: all}, + {name: "dump_bytes_cap", category: "N", description: "a byte cap inside packet 2 keeps packet 1 and drains the rest", + netlinkers: 2, dumps: 1, maxBytes: pktBytes + pktBytes/2, expectedRows: dumpRecordsPerPkt, expectedBytes: 1}, + {name: "dump_bytes_cap_exact", category: "B", description: "a byte cap at two packets keeps both", + netlinkers: 2, dumps: 1, maxBytes: 2 * pktBytes, expectedRows: 2 * dumpRecordsPerPkt, expectedBytes: 1}, + {name: "records_cap_exact", category: "B", description: "a record cap equal to the dump keeps all", + netlinkers: 2, dumps: 1, maxRecords: uint64(all), expectedRows: all}, + {name: "records_cap_plus_one", category: "N", description: "a record cap one under the dump drops one", + netlinkers: 2, dumps: 1, maxRecords: uint64(all - 1), expectedRows: all - 1, expectedRecs: 1}, + {name: "records_cap_parallel", category: "C", description: "four decoders share the cap exactly", + netlinkers: 4, dumps: 1, maxRecords: 100, expectedRows: 100, expectedRecs: 1}, + {name: "cap_reset_next_dump", category: "C", description: "each dump is capped afresh", + netlinkers: 2, dumps: 3, maxBytes: pktBytes, maxRecords: 30, expectedRows: 30, expectedBytes: 3, expectedRecs: 3}, + } + for _, variant := range dumpVariants { + for _, tc := range tests { + t.Run(variant+"/"+tc.name, func(t *testing.T) { + h := newDumpHarnessWith(t, variant, tc.netlinkers, nil, func(x *XTCP) { + x.pDumpDropped = prometheus.NewCounterVec(prometheus.CounterOpts{Name: "d"}, []string{"reason"}) + x.config.MaxDumpBytes = tc.maxBytes + x.config.MaxRecordsPerNetns = tc.maxRecords + }) + + for i := range tc.dumps { + h.startDump() + h.send(t, pkts...) + if !h.waitDone(dumpDoneTimeout) { + t.Fatalf("%s: dump %d: no done signal", tc.description, i) + } + // Every kept record is appended before the done signal. + if rows := h.flush(); rows != tc.expectedRows { + t.Errorf("%s: dump %d: %d rows, expected %d", tc.description, i, rows, tc.expectedRows) + } + } + if h.waitDone(50 * time.Millisecond) { + t.Errorf("%s: a second done signal", tc.description) + } + if got := testutil.ToFloat64(h.x.pDumpDropped.WithLabelValues(dumpDropBytesCst)); got != tc.expectedBytes { + t.Errorf("%s: dump_dropped_total{bytes}=%v, expected %v", tc.description, got, tc.expectedBytes) + } + if got := testutil.ToFloat64(h.x.pDumpDropped.WithLabelValues(dumpDropRecordsCst)); got != tc.expectedRecs { + t.Errorf("%s: dump_dropped_total{records}=%v, expected %v", tc.description, got, tc.expectedRecs) + } + if d := h.drops(); d != 0 { + t.Errorf("%s: %d records dropped after the flush", tc.description, d) + } + }) + } + } +} + +// TestAdmitNamespaces pins -maxNetns: who is admitted at the cap, in what +// order, and how many are counted out. +func TestAdmitNamespaces(t *testing.T) { + const self = 1 + ns := func(pid int, inode uint64) nsIdentity { return nsIdentity{pid: pid, inode: inode} } + + tests := []struct { + name string + category string + description string + candidates []nsIdentity + tracked int + limit uint32 + expected []uint64 // admitted inodes, in order + expectedDropped int + }{ + {name: "netns_cap_zero", category: "P", description: "cap 0 admits all", + candidates: []nsIdentity{ns(9, 90), ns(3, 30)}, tracked: 100, limit: 0, expected: []uint64{90, 30}}, + {name: "under_cap", category: "P", description: "room for every candidate", + candidates: []nsIdentity{ns(9, 90), ns(3, 30)}, tracked: 1, limit: 10, expected: []uint64{30, 90}}, + {name: "netns_cap", category: "N", description: "cap 3 with self tracked: the two lowest pids of five win", + candidates: []nsIdentity{ns(50, 500), ns(20, 200), ns(40, 400), ns(10, 100), ns(30, 300)}, + tracked: 1, limit: 3, expected: []uint64{100, 200}, expectedDropped: 3}, + {name: "netns_cap_slot_frees", category: "B", description: "one slot freed by a delete goes to the lowest-pid candidate", + candidates: []nsIdentity{ns(40, 400), ns(30, 300)}, tracked: 2, limit: 3, expected: []uint64{300}, expectedDropped: 1}, + {name: "at_cap", category: "B", description: "tracked equals the cap: nothing admitted", + candidates: []nsIdentity{ns(5, 50)}, tracked: 3, limit: 3, expectedDropped: 1}, + {name: "self_always", category: "C", description: "xtcp2's own namespace is admitted even at the cap", + candidates: []nsIdentity{ns(7, 70), ns(99, self)}, tracked: 3, limit: 3, expected: []uint64{self}, expectedDropped: 1}, + {name: "pid_tie", category: "C", description: "equal pids (one process, two discovery sources) order by inode", + candidates: []nsIdentity{ns(5, 60), ns(5, 50)}, tracked: 0, limit: 1, expected: []uint64{50}, expectedDropped: 1}, + {name: "no_candidates", category: "C", description: "nothing to add", + tracked: 5, limit: 3}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + admit, dropped := admitNamespaces(slices.Clone(tc.candidates), tc.tracked, tc.limit, self) + var got []uint64 + for _, id := range admit { + got = append(got, id.inode) + } + if !slices.Equal(got, tc.expected) || dropped != tc.expectedDropped { + t.Errorf("%s: admitted %v dropped %d, expected %v dropped %d", + tc.description, got, dropped, tc.expected, tc.expectedDropped) + } + }) + } +} + +// TestSetPreservesCaps: ConfigService.Set cannot change the caps. +func TestSetPreservesCaps(t *testing.T) { + running := &xtcp_config.XtcpConfig{MaxDumpBytes: 100, MaxRecordsPerNetns: 200, MaxNetns: 300} + tests := []struct { + name string + category string + description string + in *xtcp_config.XtcpConfig + }{ + {name: "set_omits_caps", category: "N", description: "a Set without the caps would turn them off", in: &xtcp_config.XtcpConfig{}}, + {name: "set_raises_caps", category: "N", description: "a Set raising the caps", in: &xtcp_config.XtcpConfig{MaxDumpBytes: 1 << 40, MaxRecordsPerNetns: 1 << 40, MaxNetns: 1 << 20}}, + {name: "set_same_caps", category: "P", description: "a Get→Set round trip", in: &xtcp_config.XtcpConfig{MaxDumpBytes: 100, MaxRecordsPerNetns: 200, MaxNetns: 300}}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + preserveCaps(tc.in, running) + if tc.in.MaxDumpBytes != 100 || tc.in.MaxRecordsPerNetns != 200 || tc.in.MaxNetns != 300 { + t.Errorf("%s: caps %d/%d/%d, expected the running 100/200/300", + tc.description, tc.in.MaxDumpBytes, tc.in.MaxRecordsPerNetns, tc.in.MaxNetns) + } + }) + } +} diff --git a/pkg/xtcp/deserialize.go b/pkg/xtcp/deserialize.go index d711d3b10..20e434ae5 100644 --- a/pkg/xtcp/deserialize.go +++ b/pkg/xtcp/deserialize.go @@ -31,6 +31,9 @@ type DeserializeArgs struct { // m holds the decoder's metric handles; nil looks them up per call. m *decodeMetrics id uint32 + // keep is how many inet_diag records of this packet to keep under + // -maxRecordsPerNetns (see dumpTracker.assign); 0 keeps them all. + keep int } func (x *XTCP) Deserialize(ctx context.Context, d DeserializeArgs) (n uint64, err error) { @@ -76,6 +79,7 @@ func (x *XTCP) Deserialize(ctx context.Context, d DeserializeArgs) (n uint64, er log.Printf("Deserialize n:%d, offset:%d, end:%d", n, offset, end) } + kept := 0 for n = 0; offset < end; n++ { d.m.record.msg() @@ -160,6 +164,16 @@ func (x *XTCP) Deserialize(ctx context.Context, d DeserializeArgs) (n uint64, er continue } + if d.keep != 0 && kept == d.keep { + // Past -maxRecordsPerNetns: skip the body undecoded. + var ok bool + if offset, ok = skipRecordBody(&d, xtcpRecord, nlh, offset, end); !ok { + return n, nil + } + continue + } + kept++ + offset = x.processInetDiagRecord(ctx, d, xtcpRecord, nlh, offset, n) d.nlhPool.Put(nlh) d.m.record.done(nlPacketStartTime) @@ -167,6 +181,20 @@ func (x *XTCP) Deserialize(ctx context.Context, d DeserializeArgs) (n uint64, er return n, nil } +// skipRecordBody returns rec and nlh to their pools and the offset past +// nlh's body, for a record dropped by -maxRecordsPerNetns. A length that +// would rewind or overrun reports !ok, ending the packet, as for an unknown +// message. +func skipRecordBody(d *DeserializeArgs, rec *xtcp_flat_record.XtcpFlatRecord, nlh *xtcpnl.NlMsgHdr, offset, end int) (int, bool) { + bodyLen := int(nlh.Len) - xtcpnl.NlMsgHdrSizeCst + d.xtcpRecordPool.Put(rec) + d.nlhPool.Put(nlh) + if bodyLen < 0 || offset+bodyLen > end { + return 0, false + } + return offset + bodyLen, true +} + // processInetDiagRecord parses the InetDiagMsg body + its attributes // into xtcpRecord, fans the populated record out to the gRPC stream // service, and ships it through the configured destination. Returns diff --git a/pkg/xtcp/grpc_configService.go b/pkg/xtcp/grpc_configService.go index 8db3335fa..73390a036 100644 --- a/pkg/xtcp/grpc_configService.go +++ b/pkg/xtcp/grpc_configService.go @@ -200,6 +200,7 @@ func (c *xtcpConfigService) Set( in.Config.S3AccessKey = c.config.S3AccessKey } preserveAuthSecrets(in.Config.ListenerAuth, c.config.ListenerAuth) + preserveCaps(in.Config, c.config) preserveAuthSecrets(in.Config.AdminListenerAuth, c.config.AdminListenerAuth) if _, err := listenerauth.NewPolicy(in.Config.ListenerAuth, in.Config.AdminListenerAuth, nil); err != nil { return nil, status.Error(codes.InvalidArgument, err.Error()) @@ -561,3 +562,14 @@ func (c *xtcpConfigService) SetEnvelopeFlush( } return &xtcp_config.SetEnvelopeFlushResponse{Config: cfg}, nil } + +// preserveCaps keeps the running daemon's tenant caps (-maxDumpBytes, +// -maxRecordsPerNetns, -maxNetns) across a Set. They bound what a workload +// can cost the collector, so they are startup-only: a Set that omitted them +// would otherwise turn them off (0), and one that raised them would undo the +// bound from the admin plane. Change them with flags or env and a restart. +func preserveCaps(in, running *xtcp_config.XtcpConfig) { + in.MaxDumpBytes = running.GetMaxDumpBytes() + in.MaxRecordsPerNetns = running.GetMaxRecordsPerNetns() + in.MaxNetns = running.GetMaxNetns() +} diff --git a/pkg/xtcp/netlinker.go b/pkg/xtcp/netlinker.go index 7c5f2393f..c2ffcd1f4 100644 --- a/pkg/xtcp/netlinker.go +++ b/pkg/xtcp/netlinker.go @@ -179,36 +179,120 @@ type dumpState struct { } // dumpPacket is one received packet on its way from the receiver to a -// decoder. buf comes from packetBufferPool; the decoder returns it. +// decoder. buf comes from packetBufferPool; the decoder returns it. keep is +// how many of its inet_diag records the decoder may keep under +// -maxRecordsPerNetns, 0 for all of them. type dumpPacket struct { buf *[]byte n int dump *dumpState + keep int } // dumpTracker is a receiver's position in the current dump. Only the -// receiver goroutine uses it. +// receiver goroutine uses it, so the caps cost no atomics. maxBytes and +// maxRecords are -maxDumpBytes and -maxRecordsPerNetns, 0 for no cap. One +// socket per namespace and one dump per poll make a dump the namespace's +// share of a poll. type dumpTracker struct { - dump *dumpState - packets uint64 + dump *dumpState + packets uint64 + bytes uint64 + records uint64 + maxBytes uint64 + maxRecords uint64 } -func newDumpTracker() *dumpTracker { - return &dumpTracker{dump: new(dumpState)} +func newDumpTracker(maxBytes, maxRecords uint64) *dumpTracker { + return &dumpTracker{dump: new(dumpState), maxBytes: maxBytes, maxRecords: maxRecords} +} + +// assignment is what assign decided for a packet: its dump; whether to +// drain it undecoded (drop), and which cap that was (overBytes, else the +// record cap); how many records a decoder may keep (keep, 0 for all); the +// records the record cap dropped; and whether the packet is the dump's +// first past either cap (bytesCut, recordsCut). +type assignment struct { + dump *dumpState + drop bool + overBytes bool + keep int + recordsDropped int + bytesCut bool + recordsCut bool } // assign numbers packet b, the next one received, and returns the dump it // belongs to. If b holds NLMSG_DONE it stores the dump's total before // returning, so before b is handed to a decoder, and the next packet starts // a new dump. -func (t *dumpTracker) assign(b []byte) *dumpState { +// +// It also applies the caps, from the same header walk that finds +// NLMSG_DONE. A packet that takes the dump past maxBytes is drained +// undecoded, and so is every later packet of the dump. A packet that takes +// it past maxRecords keeps only the records still in budget; one with none +// left is drained. Either way the kept records are a prefix of the dump, +// and a drained packet is still numbered, so NLMSG_DONE still ends the dump +// and the done signal is unaffected. +func (t *dumpTracker) assign(b []byte) assignment { t.packets++ - d := t.dump - if packetHasDone(b) { - d.total.Store(t.packets) - t.dump, t.packets = new(dumpState), 0 + done, recs := packetScan(b) + a := assignment{dump: t.dump} + if t.maxBytes != 0 { + wasOver := t.bytes > t.maxBytes + t.bytes += uint64(len(b)) + if t.bytes > t.maxBytes { + a.drop, a.overBytes, a.bytesCut = true, true, !wasOver + } } - return d + if t.maxRecords != 0 && !a.drop { + before := t.records + t.records += uint64(recs) + if t.records > t.maxRecords { + room := 0 + if before < t.maxRecords { + room = int(t.maxRecords - before) + } + a.recordsDropped = recs - room + a.recordsCut = before <= t.maxRecords + if room == 0 { + a.drop = true + } else { + a.keep = room + } + } + } + if done { + a.dump.total.Store(t.packets) + t.dump, t.packets, t.bytes, t.records = new(dumpState), 0, 0, 0 + } + return a +} + +// handOff sends a received packet to the decoders, or, past a cap, drains +// it: the buffer goes back to the pool and the packet counts as decoded, so +// the dump's done signal still goes out. Both receivers use it. With the +// caps off, or under them, it is the plain send. +func (x *XTCP) handOff(packetCh chan<- dumpPacket, tracker *dumpTracker, buf *[]byte, n int, fd int) { + a := tracker.assign((*buf)[:n]) + if a.bytesCut { + x.dumpTruncated(dumpDropBytesCst, fd, tracker.maxBytes) + } + if a.recordsCut { + x.dumpTruncated(dumpDropRecordsCst, fd, tracker.maxRecords) + } + if a.recordsDropped > 0 { + x.pC.WithLabelValues("Netlinker", "recordsCap", "drop").Add(float64(a.recordsDropped)) + } + if !a.drop { + packetCh <- dumpPacket{buf: buf, n: n, dump: a.dump, keep: a.keep} + return + } + if a.overBytes { + x.pC.WithLabelValues("Netlinker", "dumpBytesCap", "drop").Inc() + } + x.putPacketBuffer(buf) + x.packetDecoded(a.dump, fd) } // netlinkReceiver reads packets from fd until ctx is canceled, numbering @@ -221,7 +305,7 @@ func (x *XTCP) netlinkReceiver(ctx context.Context, packetCh chan<- dumpPacket, wf := x.config.WriteFiles - tracker := newDumpTracker() + tracker := newDumpTracker(x.config.GetMaxDumpBytes(), x.config.GetMaxRecordsPerNetns()) recvfromCalls := x.pC.WithLabelValues("Netlinker", "RecvfromCalls", "count") packetsCount := x.pC.WithLabelValues("Netlinker", "packets", "count") @@ -253,7 +337,7 @@ func (x *XTCP) netlinkReceiver(ctx context.Context, packetCh chan<- dumpPacket, wf = x.captureToFileIfEnabled(wf, (*packetBuffer)[:n], 0) - packetCh <- dumpPacket{buf: packetBuffer, n: n, dump: tracker.assign((*packetBuffer)[:n])} + x.handOff(packetCh, tracker, packetBuffer, n, fd) x.maybeForceGC(packets) } @@ -292,6 +376,7 @@ func (x *XTCP) netlinkDecoder(ctx context.Context, wg *sync.WaitGroup, packetCh pH: x.pH, m: m, id: id, + keep: p.keep, }) if errD != nil { x.pC.WithLabelValues(label, "ParseNLPacket", "error").Inc() @@ -318,21 +403,32 @@ func (x *XTCP) packetDecoded(d *dumpState, fd int) { } // packetHasDone reports whether a netlink packet contains an NLMSG_DONE -// message, by walking the message headers without decoding the bodies. -// A header whose nlmsg_len is shorter than a header stops the walk, like -// Deserialize, so a malformed packet can't loop forever. +// message; see packetScan. func packetHasDone(b []byte) bool { + done, _ := packetScan(b) + return done +} + +// packetScan walks a netlink packet's message headers without decoding the +// bodies, reporting whether it holds NLMSG_DONE and how many inet_diag +// records come before it. A header whose nlmsg_len is shorter than a header +// stops the walk, like Deserialize, so a malformed packet can't loop +// forever. +func packetScan(b []byte) (done bool, records int) { for off := 0; off+xtcpnl.NlMsgHdrSizeCst <= len(b); { - if binary.LittleEndian.Uint16(b[off+4:off+6]) == xtcpnl.NlMsgHdrTypeDoneCst { - return true + switch binary.LittleEndian.Uint16(b[off+4 : off+6]) { + case xtcpnl.NlMsgHdrTypeDoneCst: + return true, records + case xtcpnl.NlMsgHdrTypeInetDiagCst: + records++ } l := int(binary.LittleEndian.Uint32(b[off : off+4])) if l < xtcpnl.NlMsgHdrSizeCst { - return false + return false, records } off += nlmsgAlign(l) } - return false + return false, records } // nlmsgAlign rounds a netlink message length up to NLMSG_ALIGNTO (4). diff --git a/pkg/xtcp/netlinker_dump_test.go b/pkg/xtcp/netlinker_dump_test.go index 32e398afb..844271740 100644 --- a/pkg/xtcp/netlinker_dump_test.go +++ b/pkg/xtcp/netlinker_dump_test.go @@ -126,6 +126,13 @@ type dumpHarness struct { } func newDumpHarness(t testing.TB, variant string, netlinkers uint32, hook func(fd int, packet []byte)) *dumpHarness { + t.Helper() + return newDumpHarnessWith(t, variant, netlinkers, hook, nil) +} + +// newDumpHarnessWith is newDumpHarness with configure run on the XTCP +// before the netlinkers start, for settings they read once (the caps). +func newDumpHarnessWith(t testing.TB, variant string, netlinkers uint32, hook func(fd int, packet []byte), configure func(*XTCP)) *dumpHarness { t.Helper() if variant == variantIoUring { requireIoUring(t) @@ -151,6 +158,10 @@ func newDumpHarness(t testing.TB, variant string, netlinkers uint32, hook func(f x.netlinkerSyscall(ctx, wg, nsName, inode, fd, netlinkers) } + if configure != nil { + configure(x) + } + readFD, writeFD, _ := makeSocketPair(t) setShortRecvTimeout(t, readFD) x.fdToNsMap.Store(readFD, uint64(1)) @@ -516,15 +527,36 @@ func BenchmarkNetlinkerDump(b *testing.B) { for _, variant := range dumpVariants { for _, netlinkers := range []uint32{1, 2, 4, 8} { b.Run(fmt.Sprintf("%s/netlinkers=%d", variant, netlinkers), func(b *testing.B) { - benchDump(b, variant, netlinkers, pkts, perDump) + benchDump(b, variant, netlinkers, pkts, perDump, nil) }) } } } // benchDump runs BenchmarkNetlinkerDump for one variant and decoder count. -func benchDump(b *testing.B, variant string, netlinkers uint32, pkts [][]byte, perDump int) { - h := newDumpHarness(b, variant, netlinkers, nil) +// BenchmarkNetlinkerDumpCaps is BenchmarkNetlinkerDump with the daemon's +// default -maxDumpBytes and -maxRecordsPerNetns set, which the dump stays +// under: the caps' cost on the hot path when they never trip. +func BenchmarkNetlinkerDumpCaps(b *testing.B) { + const dataPkts = 1700 + c := loadDumpCorpus(b) + pkts := c.dump(dataPkts) + perDump := countRecords(pkts) + + for _, variant := range dumpVariants { + for _, netlinkers := range []uint32{1, 4} { + b.Run(fmt.Sprintf("%s/netlinkers=%d", variant, netlinkers), func(b *testing.B) { + benchDump(b, variant, netlinkers, pkts, perDump, func(x *XTCP) { + x.config.MaxDumpBytes = 256 << 20 + x.config.MaxRecordsPerNetns = 1 << 18 + }) + }) + } + } +} + +func benchDump(b *testing.B, variant string, netlinkers uint32, pkts [][]byte, perDump int, configure func(*XTCP)) { + h := newDumpHarnessWith(b, variant, netlinkers, nil, configure) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { diff --git a/pkg/xtcp/netlinker_iouring.go b/pkg/xtcp/netlinker_iouring.go index 6464c272a..7df0c5f47 100644 --- a/pkg/xtcp/netlinker_iouring.go +++ b/pkg/xtcp/netlinker_iouring.go @@ -222,7 +222,7 @@ func (x *XTCP) netlinkerIoUring(ctx context.Context, nsName *string, fd int, pac // "kernel has no more data" detection share one knob. nlTimeout := iouringResolveTimeout(x.config.NlTimeoutMilliseconds) - tracker := newDumpTracker() + tracker := newDumpTracker(x.config.GetMaxDumpBytes(), x.config.GetMaxRecordsPerNetns()) armed := true packets := uint64(0) for !x.checkDoneNonBlocking(ctx) { @@ -345,7 +345,7 @@ func (x *XTCP) handleRecvCQE(fd int, res xio.Result, packetCh chan<- dumpPacket, buf := x.packetBufferPool.Get() *buf = (*buf)[:cap(*buf)] n = copy(*buf, res.Data) - packetCh <- dumpPacket{buf: buf, n: n, dump: tracker.assign((*buf)[:n])} + x.handOff(packetCh, tracker, buf, n, fd) } // handleSendCQE records the outcome of an io_uring destination write. diff --git a/pkg/xtcp/netlinker_iouring_test.go b/pkg/xtcp/netlinker_iouring_test.go index b02767fd4..6c8013f52 100644 --- a/pkg/xtcp/netlinker_iouring_test.go +++ b/pkg/xtcp/netlinker_iouring_test.go @@ -355,7 +355,7 @@ func TestHandleRecvCQE(t *testing.T) { x := newIouringFixture(t) x.debugLevel = tc.debugLevel packetCh := make(chan dumpPacket, 1) - x.handleRecvCQE(3, tc.res, packetCh, newDumpTracker()) + x.handleRecvCQE(3, tc.res, packetCh, newDumpTracker(0, 0)) close(packetCh) sent := 0 diff --git a/pkg/xtcp/ns_reconcile.go b/pkg/xtcp/ns_reconcile.go index 66bc31a93..ee1d6fe04 100644 --- a/pkg/xtcp/ns_reconcile.go +++ b/pkg/xtcp/ns_reconcile.go @@ -121,13 +121,31 @@ func (x *XTCP) reconcile(ctx context.Context) (dels, stores int) { return true }) - // Add live namespaces not yet tracked. + // Add live namespaces not yet tracked, up to -maxNetns (see + // admitNamespaces). The ones left out stay candidates on every later + // reconcile, so a slot freed by a delete is filled on the next one. + var candidates []nsIdentity for inode, id := range live { if _, tracked := x.nsMap.Load(inode); !tracked { - x.nsAdd(ctx, id) - stores++ + candidates = append(candidates, id) } } + tracked := 0 + if x.config.GetMaxNetns() != 0 && len(candidates) > 0 { + tracked = lenSyncMap(x.nsMap) + } + admit, dropped := admitNamespaces(candidates, tracked, x.config.GetMaxNetns(), x.selfNsInode) + for _, id := range admit { + x.nsAdd(ctx, id) + stores++ + } + if dropped > 0 { + x.pC.WithLabelValues("reconcile", "maxNetns", "drop").Add(float64(dropped)) + if x.pNetnsDropped != nil { + x.pNetnsDropped.Add(float64(dropped)) + } + log.Printf("reconcile: %d namespaces not tracked: -maxNetns=%d reached", dropped, x.config.GetMaxNetns()) + } return dels, stores } diff --git a/pkg/xtcp/prometheus.go b/pkg/xtcp/prometheus.go index 0a7524da5..584c8a453 100644 --- a/pkg/xtcp/prometheus.go +++ b/pkg/xtcp/prometheus.go @@ -90,6 +90,22 @@ func (x *XTCP) InitPromethus(wg *sync.WaitGroup) { promLabels, ) + x.pDumpDropped = factory.NewCounterVec( + prometheus.CounterOpts{ + Subsystem: promSubsystemXTCP, + Name: "dump_dropped_total", + Help: "Namespace dumps cut short by -maxDumpBytes (reason=bytes) or -maxRecordsPerNetns (reason=records), at most one per reason per dump.", + }, + []string{"reason"}, + ) + x.pNetnsDropped = factory.NewCounter( + prometheus.CounterOpts{ + Subsystem: promSubsystemXTCP, + Name: "netns_dropped_total", + Help: "Live namespaces a reconcile left untracked because -maxNetns was reached, counted per reconcile.", + }, + ) + x.publishCompiledInEnrichers() } diff --git a/pkg/xtcp/xtcp.go b/pkg/xtcp/xtcp.go index f6b61e774..0c1a996b3 100644 --- a/pkg/xtcp/xtcp.go +++ b/pkg/xtcp/xtcp.go @@ -224,6 +224,12 @@ type XTCP struct { // hold a locality snapshot / sit in the retry backoff). pGV *prometheus.GaugeVec + // pDumpDropped counts dumps cut short by a cap, by reason ("bytes", + // "records"); pNetnsDropped counts namespaces reconcile left untracked + // at -maxNetns. See caps.go. nil until InitPromethus. + pDumpDropped *prometheus.CounterVec + pNetnsDropped prometheus.Counter + debugLevel uint32 } diff --git a/proto/xtcp_config/v1/xtcp_config.proto b/proto/xtcp_config/v1/xtcp_config.proto index 215497d27..20915f2fa 100644 --- a/proto/xtcp_config/v1/xtcp_config.proto +++ b/proto/xtcp_config/v1/xtcp_config.proto @@ -778,6 +778,23 @@ message XtcpConfig { lte: 4096 }]; + // Cap on the bytes of one namespace's inet_diag dump per poll. Packets + // past it are drained from the socket without being decoded, and the + // dump is counted in xtcp_dump_dropped_total{reason="bytes"}, so a + // namespace with a huge socket table costs a metric, not the collector. + // Startup-only. 0 = unlimited. Daemon default 256 MiB. + uint64 max_dump_bytes = 25 [ + (buf.validate.field).required = false + ]; + + // Cap on the records one namespace contributes per poll. Records past it + // are dropped before attribute decode and enrichment, and the dump is + // counted in xtcp_dump_dropped_total{reason="records"}. Startup-only. + // 0 = unlimited. Daemon default 262144. + uint64 max_records_per_netns = 26 [ + (buf.validate.field).required = false + ]; + // ---- namespace reconcile (40-49) ----------------------------------------- // Period of the background namespace-reconcile ticker (Method B /proc scan @@ -801,6 +818,16 @@ message XtcpConfig { // mutex-serialized with the background reconciler. Default true. bool reconcile_before_poll = 41; + // Cap on the network namespaces tracked, xtcp2's own included. Each costs + // a netlink socket, a receiver and its decoders. At the cap, reconcile + // adds no more, preferring the lowest pids (long-running workloads), and + // counts the rest in xtcp_netns_dropped_total; a slot freed by a deleted + // namespace is filled on the next reconcile. Startup-only. + // 0 = unlimited. Daemon default 4096. + uint32 max_netns = 42 [ + (buf.validate.field).required = false + ]; + // ---- capture / debug (50-59) --------------------------------------------- // Write netlink packets to writeFiles number of files ( to generate test data ) per netlinker From c6469f6d2c2723b328b3882a94494b9c3c942c86 Mon Sep 17 00:00:00 2001 From: "randomizedcoder dave.seddon.ca@gmail.com" Date: Thu, 12 Nov 2026 19:28:46 -0800 Subject: [PATCH 02/19] docs: the per-namespace caps Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 1 + docs/network-namespaces.md | 3 +++ docs/polling-and-batching.md | 11 +++++++++++ 3 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 223629ecd..d07c3bcb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ ### New +- **Per-namespace caps.** `-maxDumpBytes` (default 256 MiB) and `-maxRecordsPerNetns` (default 262144) bound one namespace's dump per poll: packets past the byte cap are drained undecoded, and records past the record cap are dropped before decode. `-maxNetns` (default 4096) bounds the namespaces tracked; at the cap, the lowest pids win. Drops are counted in `xtcp_dump_dropped_total{reason}` and `xtcp_netns_dropped_total`, with one log line per truncated dump or short reconcile. `0` turns a cap off; the matching env vars are `MAX_DUMP_BYTES`, `MAX_RECORDS_PER_NETNS` and `MAX_NETNS`. The caps are startup-only: `ConfigService.Set` keeps the running values. No healthy host should reach the defaults; a host that does now loses that namespace's excess rows, where it used to collect them all ([polling and batching](docs/polling-and-batching.md#per-namespace-caps)). - **Vulnerability check.** `checks.govulncheck` runs govulncheck against a pinned snapshot of the Go vulnerability database, with no tags and with every flavor tag, and fails on a reachable finding not in its accepted list. One is accepted: GO-2026-6859 in `net/http`, fixed in go1.27.4, until the toolchain moves. `nix run .#govulncheck-fresh` checks against the live database and runs `go mod verify`; `nix build .#sbom-` writes a CycloneDX SBOM for any binary package. ## 0.2.1 (2026-11) diff --git a/docs/network-namespaces.md b/docs/network-namespaces.md index 98173ed88..2afdedbea 100644 --- a/docs/network-namespaces.md +++ b/docs/network-namespaces.md @@ -59,6 +59,9 @@ Rapid namespace churn (e.g. Kubernetes pods cycling) is the hard case: each `set | `-reconcileBeforePoll` | `true` | Refresh the namespace set before each poll cycle. | | `-reconcileFrequency` | `6h` | Background reconcile fallback; `0` disables the ticker. | | `-maxThreads` | `2000` | Cap on Go runtime OS threads (`debug.SetMaxThreads`); `0` = Go default (10000). | +| `-maxNetns` | `4096` | Cap on namespaces tracked, xtcp2's own included; `0` = unlimited. `MAX_NETNS`. | + +Each tracked namespace costs a netlink socket, a receiver and its decoders, so `-maxNetns` bounds them. At the cap, reconcile adds no more. It prefers the lowest pids, so long-running workloads keep their slots ahead of a burst of new namespaces. It counts the rest in `xtcp_netns_dropped_total` (once per reconcile) and logs a line. The ones left out stay candidates, and a slot freed by a deleted namespace is filled on the next reconcile. xtcp2's own namespace is always tracked. `ConfigService.Set` keeps the running cap. The per-namespace dump caps are in [polling and batching](polling-and-batching.md#per-namespace-caps). The bind-mount directories (`/run/netns/`, `/run/docker/netns/`) are built in, not flags. diff --git a/docs/polling-and-batching.md b/docs/polling-and-batching.md index 8d8914a83..0338ead6d 100644 --- a/docs/polling-and-batching.md +++ b/docs/polling-and-batching.md @@ -38,6 +38,15 @@ Pairing a row cap with a byte cap keeps batches bounded both in count and in mem Both caps are also tunable at runtime without a restart via `ConfigService.SetEnvelopeFlush` (or `xtcp2ctl set-envelope-flush -threshold-bytes … -threshold-rows …`); the change applies to the next appended record. Raising the byte cap increases peak in-flight memory, so keep it well under the container's memory limit. See [gRPC API](./grpc-api.md). +## Per-namespace caps + +One namespace's dump is bounded per poll, so a workload with a huge socket table costs a metric, not the collector: + +- **Bytes** (`-maxDumpBytes`, default 256 MiB). Packets past the cap are read and drained without being decoded. NLMSG_DONE still ends the dump, so the poll is not held up; the records kept are the dump's first ones. The kernel still builds the rest of the dump. +- **Records** (`-maxRecordsPerNetns`, default 262144). Records past the cap are dropped before their attributes are decoded or enriched. + +Each dump cut short adds 1 to `xtcp_dump_dropped_total{reason="bytes"|"records"}` and logs one line naming the namespace's inode. The packets and records dropped are counted in `xtcp_counts{function="Netlinker",variable="dumpBytesCap"}` and `{function="Netlinker",variable="recordsCap"}`. `0` turns a cap off. The caps are startup-only: `ConfigService.Set` keeps the running values. The defaults are deliberately generous and will be revisited against a measured fleet baseline. The namespace count has its own cap, `-maxNetns` ([network namespaces](network-namespaces.md#configuration)). + ## Timeouts - `-frequency` (default `10s`) is the interval between dumps. @@ -52,6 +61,8 @@ Both caps are also tunable at runtime without a restart via `ConfigService.SetEn | `-envelopeFlushRows` | `0` → 10000 | Primary flush cap: rows per Envelope. | | `-envelopeFlushBytes` | `0` → 768 KiB | Safety-net flush cap: uncompressed Envelope bytes. | | `-maxLoops` | `0` | Maximum cycles, or `0` for forever. | +| `-maxDumpBytes` | 256 MiB | Bytes of one namespace's dump per poll; `0` = unlimited. `MAX_DUMP_BYTES`. | +| `-maxRecordsPerNetns` | 262144 | Records of one namespace per poll; `0` = unlimited. `MAX_RECORDS_PER_NETNS`. | ## See also From 630b117ff31c789a64966925dde9ba0558503d8f Mon Sep 17 00:00:00 2001 From: "randomizedcoder dave.seddon.ca@gmail.com" Date: Thu, 12 Nov 2026 19:40:28 -0800 Subject: [PATCH 03/19] fix(xtcp): at -maxNetns, track the lowest-pid live namespaces Admission was first come, first served across reconciles: a workload that created thousands of namespaces could fill the cap, and every later namespace went unmonitored. admitNamespaces now ranks tracked and untracked live namespaces together (self first, then pid, then inode) and keeps the first -maxNetns. A newer namespace stays out; an older one, or a bind-mounted one (pid 0), displaces the highest-pid tracked namespace. The ranking depends only on the live set, so the tracked set converges instead of churning. trackedLive counts xtcp2's own slot even when the scan misses it. Displaced namespaces count in xtcp_netns_dropped_total; the docs say to alert on it. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 2 +- cmd/xtcp2/testdata/defineflags-golden.txt | 2 +- cmd/xtcp2/xtcp2.go | 2 +- docs/network-namespaces.md | 2 +- gen/dart/xtcp_config/v1/xtcp_config.pb.dart | 9 +- gen/go/xtcp_config/xtcp_config.pb.go | 9 +- .../xtcp_config/v1/xtcp_config.swagger.json | 2 +- pkg/xtcp/caps.go | 66 +++++++---- pkg/xtcp/caps_test.go | 107 ++++++++++++++---- pkg/xtcp/ns_reconcile.go | 47 ++++++-- proto/xtcp_config/v1/xtcp_config.proto | 9 +- 11 files changed, 186 insertions(+), 71 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d07c3bcb1..7dfb438c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ ### New -- **Per-namespace caps.** `-maxDumpBytes` (default 256 MiB) and `-maxRecordsPerNetns` (default 262144) bound one namespace's dump per poll: packets past the byte cap are drained undecoded, and records past the record cap are dropped before decode. `-maxNetns` (default 4096) bounds the namespaces tracked; at the cap, the lowest pids win. Drops are counted in `xtcp_dump_dropped_total{reason}` and `xtcp_netns_dropped_total`, with one log line per truncated dump or short reconcile. `0` turns a cap off; the matching env vars are `MAX_DUMP_BYTES`, `MAX_RECORDS_PER_NETNS` and `MAX_NETNS`. The caps are startup-only: `ConfigService.Set` keeps the running values. No healthy host should reach the defaults; a host that does now loses that namespace's excess rows, where it used to collect them all ([polling and batching](docs/polling-and-batching.md#per-namespace-caps)). +- **Per-namespace caps.** `-maxDumpBytes` (default 256 MiB) and `-maxRecordsPerNetns` (default 262144) bound one namespace's dump per poll: packets past the byte cap are drained undecoded, and records past the record cap are dropped before decode. `-maxNetns` (default 4096) bounds the namespaces tracked. At the cap, the lowest-pid namespaces are tracked, so a burst of new namespaces cannot displace long-running ones. Drops are counted in `xtcp_dump_dropped_total{reason}` and `xtcp_netns_dropped_total`, with one log line per truncated dump or short reconcile. `0` turns a cap off; the matching env vars are `MAX_DUMP_BYTES`, `MAX_RECORDS_PER_NETNS` and `MAX_NETNS`. The caps are startup-only: `ConfigService.Set` keeps the running values. No healthy host should reach the defaults; a host that does now loses that namespace's excess rows, where it used to collect them all ([polling and batching](docs/polling-and-batching.md#per-namespace-caps)). - **Vulnerability check.** `checks.govulncheck` runs govulncheck against a pinned snapshot of the Go vulnerability database, with no tags and with every flavor tag, and fails on a reachable finding not in its accepted list. One is accepted: GO-2026-6859 in `net/http`, fixed in go1.27.4, until the toolchain moves. `nix run .#govulncheck-fresh` checks against the live database and runs `go mod verify`; `nix build .#sbom-` writes a CycloneDX SBOM for any binary package. ## 0.2.1 (2026-11) diff --git a/cmd/xtcp2/testdata/defineflags-golden.txt b/cmd/xtcp2/testdata/defineflags-golden.txt index 4e8b1d01e..fc5a84e37 100644 --- a/cmd/xtcp2/testdata/defineflags-golden.txt +++ b/cmd/xtcp2/testdata/defineflags-golden.txt @@ -81,7 +81,7 @@ location deployment grouping/facility this daemon runs in (data center, PoP, re marshal protobufList Marshaling of the exported data (protobufList, protoJson, protoText, msgpack, jsonl, csv, tsv) maxDumpBytes 268435456 cap on the bytes of one namespace's inet_diag dump per poll; packets past it are drained undecoded and counted in xtcp_dump_dropped_total{reason="bytes"}. 0 = unlimited. Falls back to MAX_DUMP_BYTES env. maxLoops 0 Maximum number of loops, or zero (0) for forever -maxNetns 4096 cap on the network namespaces tracked, xtcp2's own included; at the cap the lowest pids win and the rest are counted in xtcp_netns_dropped_total. 0 = unlimited. Falls back to MAX_NETNS env. +maxNetns 4096 cap on the network namespaces tracked, xtcp2's own included; at the cap the lowest-pid namespaces are tracked (an older one displaces a newer) and the rest are counted in xtcp_netns_dropped_total. 0 = unlimited. Falls back to MAX_NETNS env. maxRecordsPerNetns 262144 cap on the records one namespace contributes per poll; the rest are dropped before decode and counted in xtcp_dump_dropped_total{reason="records"}. 0 = unlimited. Falls back to MAX_RECORDS_PER_NETNS env. maxThreads 2000 cap on Go runtime OS threads (debug.SetMaxThreads); 0 = use Go default 10000 modulus 1 modulus. Report every X inetd messages to output diff --git a/cmd/xtcp2/xtcp2.go b/cmd/xtcp2/xtcp2.go index 64201c827..43dee023d 100644 --- a/cmd/xtcp2/xtcp2.go +++ b/cmd/xtcp2/xtcp2.go @@ -534,7 +534,7 @@ func defineS3Flags(f *mainFlags) { func defineCapFlags(f *mainFlags) { f.maxDumpBytes = flag.Uint64("maxDumpBytes", maxDumpBytesCst, "cap on the bytes of one namespace's inet_diag dump per poll; packets past it are drained undecoded and counted in xtcp_dump_dropped_total{reason=\"bytes\"}. 0 = unlimited. Falls back to MAX_DUMP_BYTES env.") f.maxRecordsPerNetns = flag.Uint64("maxRecordsPerNetns", maxRecordsPerNetnsCst, "cap on the records one namespace contributes per poll; the rest are dropped before decode and counted in xtcp_dump_dropped_total{reason=\"records\"}. 0 = unlimited. Falls back to MAX_RECORDS_PER_NETNS env.") - f.maxNetns = flag.Uint("maxNetns", maxNetnsCst, "cap on the network namespaces tracked, xtcp2's own included; at the cap the lowest pids win and the rest are counted in xtcp_netns_dropped_total. 0 = unlimited. Falls back to MAX_NETNS env.") + f.maxNetns = flag.Uint("maxNetns", maxNetnsCst, "cap on the network namespaces tracked, xtcp2's own included; at the cap the lowest-pid namespaces are tracked (an older one displaces a newer) and the rest are counted in xtcp_netns_dropped_total. 0 = unlimited. Falls back to MAX_NETNS env.") } // defineListenerFlags registers the flags for xtcp2's own inbound listeners: diff --git a/docs/network-namespaces.md b/docs/network-namespaces.md index 2afdedbea..ec5ac8125 100644 --- a/docs/network-namespaces.md +++ b/docs/network-namespaces.md @@ -61,7 +61,7 @@ Rapid namespace churn (e.g. Kubernetes pods cycling) is the hard case: each `set | `-maxThreads` | `2000` | Cap on Go runtime OS threads (`debug.SetMaxThreads`); `0` = Go default (10000). | | `-maxNetns` | `4096` | Cap on namespaces tracked, xtcp2's own included; `0` = unlimited. `MAX_NETNS`. | -Each tracked namespace costs a netlink socket, a receiver and its decoders, so `-maxNetns` bounds them. At the cap, reconcile adds no more. It prefers the lowest pids, so long-running workloads keep their slots ahead of a burst of new namespaces. It counts the rest in `xtcp_netns_dropped_total` (once per reconcile) and logs a line. The ones left out stay candidates, and a slot freed by a deleted namespace is filled on the next reconcile. xtcp2's own namespace is always tracked. `ConfigService.Set` keeps the running cap. The per-namespace dump caps are in [polling and batching](polling-and-batching.md#per-namespace-caps). +Each tracked namespace costs a netlink socket, a receiver and its decoders, so `-maxNetns` bounds them. At the cap, the tracked set is the lowest-pid live namespaces. A new namespace (higher pid) stays out. An older one, or a bind-mounted one (pid 0, created by the host or the container runtime), displaces the highest-pid tracked namespace. So a workload that creates thousands of namespaces cannot push long-running ones out of monitoring. The ranking depends only on the live set, so the tracked set converges rather than churning. xtcp2's own namespace is always tracked. Every namespace left out or displaced counts in `xtcp_netns_dropped_total` (once per reconcile) and logs a line. **Alert on any increase:** it means some namespaces are not monitored. `ConfigService.Set` keeps the running cap. The per-namespace dump caps are in [polling and batching](polling-and-batching.md#per-namespace-caps). The bind-mount directories (`/run/netns/`, `/run/docker/netns/`) are built in, not flags. diff --git a/gen/dart/xtcp_config/v1/xtcp_config.pb.dart b/gen/dart/xtcp_config/v1/xtcp_config.pb.dart index a1996558d..34766d3a6 100644 --- a/gen/dart/xtcp_config/v1/xtcp_config.pb.dart +++ b/gen/dart/xtcp_config/v1/xtcp_config.pb.dart @@ -2418,10 +2418,11 @@ class XtcpConfig extends $pb.GeneratedMessage { void clearReconcileBeforePoll() => $_clearField(41); /// Cap on the network namespaces tracked, xtcp2's own included. Each costs - /// a netlink socket, a receiver and its decoders. At the cap, reconcile - /// adds no more, preferring the lowest pids (long-running workloads), and - /// counts the rest in xtcp_netns_dropped_total; a slot freed by a deleted - /// namespace is filled on the next reconcile. Startup-only. + /// a netlink socket, a receiver and its decoders. At the cap, the tracked + /// set is the lowest-pid live namespaces: a newer namespace stays out, an + /// older one displaces the highest-pid tracked one, and both count in + /// xtcp_netns_dropped_total. A burst of new namespaces cannot push out + /// long-running workloads. Startup-only. /// 0 = unlimited. Daemon default 4096. @$pb.TagNumber(42) $core.int get maxNetns => $_getIZ(19); diff --git a/gen/go/xtcp_config/xtcp_config.pb.go b/gen/go/xtcp_config/xtcp_config.pb.go index cc7064973..3519700ee 100644 --- a/gen/go/xtcp_config/xtcp_config.pb.go +++ b/gen/go/xtcp_config/xtcp_config.pb.go @@ -1570,10 +1570,11 @@ type XtcpConfig struct { // mutex-serialized with the background reconciler. Default true. ReconcileBeforePoll bool `protobuf:"varint,41,opt,name=reconcile_before_poll,json=reconcileBeforePoll,proto3" json:"reconcile_before_poll,omitempty"` // Cap on the network namespaces tracked, xtcp2's own included. Each costs - // a netlink socket, a receiver and its decoders. At the cap, reconcile - // adds no more, preferring the lowest pids (long-running workloads), and - // counts the rest in xtcp_netns_dropped_total; a slot freed by a deleted - // namespace is filled on the next reconcile. Startup-only. + // a netlink socket, a receiver and its decoders. At the cap, the tracked + // set is the lowest-pid live namespaces: a newer namespace stays out, an + // older one displaces the highest-pid tracked one, and both count in + // xtcp_netns_dropped_total. A burst of new namespaces cannot push out + // long-running workloads. Startup-only. // 0 = unlimited. Daemon default 4096. MaxNetns uint32 `protobuf:"varint,42,opt,name=max_netns,json=maxNetns,proto3" json:"max_netns,omitempty"` // Write netlink packets to writeFiles number of files ( to generate test data ) per netlinker diff --git a/gen/openapi/xtcp_config/v1/xtcp_config.swagger.json b/gen/openapi/xtcp_config/v1/xtcp_config.swagger.json index bebbbd1b6..06518ec2b 100644 --- a/gen/openapi/xtcp_config/v1/xtcp_config.swagger.json +++ b/gen/openapi/xtcp_config/v1/xtcp_config.swagger.json @@ -751,7 +751,7 @@ "maxNetns": { "type": "integer", "format": "int64", - "description": "Cap on the network namespaces tracked, xtcp2's own included. Each costs\na netlink socket, a receiver and its decoders. At the cap, reconcile\nadds no more, preferring the lowest pids (long-running workloads), and\ncounts the rest in xtcp_netns_dropped_total; a slot freed by a deleted\nnamespace is filled on the next reconcile. Startup-only.\n0 = unlimited. Daemon default 4096." + "description": "Cap on the network namespaces tracked, xtcp2's own included. Each costs\na netlink socket, a receiver and its decoders. At the cap, the tracked\nset is the lowest-pid live namespaces: a newer namespace stays out, an\nolder one displaces the highest-pid tracked one, and both count in\nxtcp_netns_dropped_total. A burst of new namespaces cannot push out\nlong-running workloads. Startup-only.\n0 = unlimited. Daemon default 4096." }, "writeFiles": { "type": "integer", diff --git a/pkg/xtcp/caps.go b/pkg/xtcp/caps.go index 83608f800..7165a5957 100644 --- a/pkg/xtcp/caps.go +++ b/pkg/xtcp/caps.go @@ -28,27 +28,55 @@ func (x *XTCP) dumpTruncated(reason string, fd int, limit uint64) { log.Printf("dump truncated: fd:%d inode:%v cap:%s=%d; the rest of this poll's dump is dropped", fd, inode, reason, limit) } -// admitNamespaces picks which of the untracked live namespaces reconcile may -// add, given tracked (the namespaces tracked after its deletes) and limit -// (-maxNetns, 0 for no cap). Lower pids go first, so long-running workloads -// keep their slots ahead of a burst of new namespaces, and xtcp2's own -// namespace (self) is always admitted. It returns the admitted identities -// and how many were left out. -func admitNamespaces(candidates []nsIdentity, tracked int, limit uint32, self uint64) (admit []nsIdentity, dropped int) { - if limit == 0 { - return candidates, 0 +// nsRanked is a namespace in admitNamespaces' ranking, and whether it is +// already tracked. +type nsRanked struct { + id nsIdentity + tracked bool +} + +// admitNamespaces applies -maxNetns (limit, 0 for no cap): the namespaces +// tracked are the limit lowest-pid live ones, xtcp2's own (self) always +// among them. Lower pids are older processes, so a burst of new namespaces +// cannot displace long-running workloads; bind-mounted namespaces (pid 0) +// were created by the host or the container runtime and rank first. +// +// candidates are live and untracked; tracked are live and tracked, with +// their current pid. It returns the candidates to add, the tracked +// namespaces to evict because lower-pid ones displace them, and how many +// candidates stay out. The ranking is total and depends only on the live +// set, so an evicted namespace loses the same comparison on every later +// reconcile: the tracked set converges, it does not churn. +func admitNamespaces(candidates, tracked []nsIdentity, limit uint32, self uint64) (admit, evict []nsIdentity, dropped int) { + if limit == 0 || len(candidates) == 0 { + return candidates, nil, 0 + } + all := make([]nsRanked, 0, len(candidates)+len(tracked)) + for _, id := range tracked { + all = append(all, nsRanked{id: id, tracked: true}) } - slices.SortFunc(candidates, func(a, b nsIdentity) int { - return cmp.Or(cmp.Compare(a.pid, b.pid), cmp.Compare(a.inode, b.inode)) - }) - admit = candidates[:0:0] for _, id := range candidates { - if id.inode == self || tracked < int(limit) { - admit = append(admit, id) - tracked++ - continue + all = append(all, nsRanked{id: id}) + } + slices.SortFunc(all, func(a, b nsRanked) int { + if (a.id.inode == self) != (b.id.inode == self) { + if a.id.inode == self { + return -1 + } + return 1 + } + return cmp.Or(cmp.Compare(a.id.pid, b.id.pid), cmp.Compare(a.id.inode, b.id.inode)) + }) + for i, r := range all { + keep := i < int(limit) || r.id.inode == self + switch { + case keep && !r.tracked: + admit = append(admit, r.id) + case !keep && r.tracked: + evict = append(evict, r.id) + case !keep: + dropped++ } - dropped++ } - return admit, dropped + return admit, evict, dropped } diff --git a/pkg/xtcp/caps_test.go b/pkg/xtcp/caps_test.go index 1e12c0784..e34cc0289 100644 --- a/pkg/xtcp/caps_test.go +++ b/pkg/xtcp/caps_test.go @@ -250,50 +250,107 @@ func TestNetlinkerDump_caps(t *testing.T) { } } -// TestAdmitNamespaces pins -maxNetns: who is admitted at the cap, in what -// order, and how many are counted out. +// TestAdmitNamespaces pins -maxNetns: the tracked set converges to the +// lowest-pid live namespaces, xtcp2's own always among them. func TestAdmitNamespaces(t *testing.T) { const self = 1 ns := func(pid int, inode uint64) nsIdentity { return nsIdentity{pid: pid, inode: inode} } + selfNs := ns(0, self) tests := []struct { name string category string description string candidates []nsIdentity - tracked int + tracked []nsIdentity limit uint32 - expected []uint64 // admitted inodes, in order + expectedAdmit []uint64 // inodes, in rank order + expectedEvict []uint64 expectedDropped int }{ - {name: "netns_cap_zero", category: "P", description: "cap 0 admits all", - candidates: []nsIdentity{ns(9, 90), ns(3, 30)}, tracked: 100, limit: 0, expected: []uint64{90, 30}}, + {name: "netns_cap_zero", category: "P", description: "cap 0 admits all, evicts none", + candidates: []nsIdentity{ns(9, 90), ns(3, 30)}, tracked: []nsIdentity{selfNs, ns(5, 50)}, limit: 0, + expectedAdmit: []uint64{90, 30}}, {name: "under_cap", category: "P", description: "room for every candidate", - candidates: []nsIdentity{ns(9, 90), ns(3, 30)}, tracked: 1, limit: 10, expected: []uint64{30, 90}}, + candidates: []nsIdentity{ns(9, 90), ns(3, 30)}, tracked: []nsIdentity{selfNs}, limit: 10, + expectedAdmit: []uint64{30, 90}}, {name: "netns_cap", category: "N", description: "cap 3 with self tracked: the two lowest pids of five win", candidates: []nsIdentity{ns(50, 500), ns(20, 200), ns(40, 400), ns(10, 100), ns(30, 300)}, - tracked: 1, limit: 3, expected: []uint64{100, 200}, expectedDropped: 3}, - {name: "netns_cap_slot_frees", category: "B", description: "one slot freed by a delete goes to the lowest-pid candidate", - candidates: []nsIdentity{ns(40, 400), ns(30, 300)}, tracked: 2, limit: 3, expected: []uint64{300}, expectedDropped: 1}, - {name: "at_cap", category: "B", description: "tracked equals the cap: nothing admitted", - candidates: []nsIdentity{ns(5, 50)}, tracked: 3, limit: 3, expectedDropped: 1}, - {name: "self_always", category: "C", description: "xtcp2's own namespace is admitted even at the cap", - candidates: []nsIdentity{ns(7, 70), ns(99, self)}, tracked: 3, limit: 3, expected: []uint64{self}, expectedDropped: 1}, - {name: "pid_tie", category: "C", description: "equal pids (one process, two discovery sources) order by inode", - candidates: []nsIdentity{ns(5, 60), ns(5, 50)}, tracked: 0, limit: 1, expected: []uint64{50}, expectedDropped: 1}, - {name: "no_candidates", category: "C", description: "nothing to add", - tracked: 5, limit: 3}, + tracked: []nsIdentity{selfNs}, limit: 3, expectedAdmit: []uint64{100, 200}, expectedDropped: 3}, + {name: "netns_cap_slot_frees", category: "B", description: "a slot freed by a delete goes to the lowest-pid candidate", + candidates: []nsIdentity{ns(40, 400), ns(30, 300)}, tracked: []nsIdentity{selfNs, ns(5, 50)}, limit: 3, + expectedAdmit: []uint64{300}, expectedDropped: 1}, + {name: "at_cap_higher_pid", category: "B", description: "at the cap, a newer (higher-pid) candidate stays out", + candidates: []nsIdentity{ns(90, 900)}, tracked: []nsIdentity{selfNs, ns(5, 50), ns(6, 60)}, limit: 3, + expectedDropped: 1}, + {name: "displace_burst", category: "N", description: "a tenant's burst filled the cap; an older workload's namespace displaces the highest-pid one", + candidates: []nsIdentity{ns(7, 70)}, tracked: []nsIdentity{selfNs, ns(1000, 1000), ns(1001, 1001)}, limit: 3, + expectedAdmit: []uint64{70}, expectedEvict: []uint64{1001}}, + {name: "converged_stable", category: "C", description: "the evicted namespace, now a candidate, loses again: no churn", + candidates: []nsIdentity{ns(1001, 1001)}, tracked: []nsIdentity{selfNs, ns(7, 70), ns(1000, 1000)}, limit: 3, + expectedDropped: 1}, + {name: "bind_mount_first", category: "C", description: "a bind-mounted namespace (pid 0) outranks process ones", + candidates: []nsIdentity{ns(0, 77)}, tracked: []nsIdentity{selfNs, ns(5, 50), ns(6, 60)}, limit: 3, + expectedAdmit: []uint64{77}, expectedEvict: []uint64{60}}, + {name: "self_always", category: "C", description: "xtcp2's own namespace is admitted even past the cap", + candidates: []nsIdentity{ns(7, 70), ns(99, self)}, tracked: []nsIdentity{ns(2, 20), ns(3, 30)}, limit: 1, + expectedAdmit: []uint64{self}, expectedEvict: []uint64{20, 30}, expectedDropped: 1}, + {name: "pid_tie", category: "C", description: "equal pids order by inode", + candidates: []nsIdentity{ns(5, 60), ns(5, 50)}, limit: 1, expectedAdmit: []uint64{50}, expectedDropped: 1}, + {name: "no_candidates", category: "C", description: "nothing new: nothing evicted, even at the cap", + tracked: []nsIdentity{selfNs, ns(5, 50), ns(6, 60)}, limit: 2}, + } + inodes := func(ids []nsIdentity) []uint64 { + out := make([]uint64, 0, len(ids)) + for _, id := range ids { + out = append(out, id.inode) + } + return out + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + admit, evict, dropped := admitNamespaces(slices.Clone(tc.candidates), tc.tracked, tc.limit, self) + if got := inodes(admit); !slices.Equal(got, tc.expectedAdmit) { + t.Errorf("%s: admitted %v, expected %v", tc.description, got, tc.expectedAdmit) + } + if got := inodes(evict); !slices.Equal(got, tc.expectedEvict) { + t.Errorf("%s: evicted %v, expected %v", tc.description, got, tc.expectedEvict) + } + if dropped != tc.expectedDropped { + t.Errorf("%s: dropped %d, expected %d", tc.description, dropped, tc.expectedDropped) + } + }) + } +} + +// TestTrackedLive: tracked namespaces still live, with the scan's pid, and +// xtcp2's own even when the scan missed it. +func TestTrackedLive(t *testing.T) { + const self = 1 + tests := []struct { + name string + category string + description string + tracked []uint64 + live map[uint64]nsIdentity + expected []nsIdentity + }{ + {name: "live_current_pid", category: "P", description: "a live tracked namespace carries the scan's pid", + tracked: []uint64{50}, live: map[uint64]nsIdentity{50: {inode: 50, pid: 9}}, + expected: []nsIdentity{{inode: 50, pid: 9}}}, + {name: "gone", category: "N", description: "a tracked namespace no longer live is left out", + tracked: []uint64{50}, live: map[uint64]nsIdentity{}}, + {name: "self_unscanned", category: "C", description: "self holds a slot though the scan missed it", + tracked: []uint64{self}, live: map[uint64]nsIdentity{}, expected: []nsIdentity{{inode: self}}}, } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { - admit, dropped := admitNamespaces(slices.Clone(tc.candidates), tc.tracked, tc.limit, self) - var got []uint64 - for _, id := range admit { - got = append(got, id.inode) + m := &sync.Map{} + for _, inode := range tc.tracked { + m.Store(inode, netNSitem{inode: inode}) } - if !slices.Equal(got, tc.expected) || dropped != tc.expectedDropped { - t.Errorf("%s: admitted %v dropped %d, expected %v dropped %d", - tc.description, got, dropped, tc.expected, tc.expectedDropped) + if got := trackedLive(m, tc.live, self); !slices.Equal(got, tc.expected) { + t.Errorf("%s: %v, expected %v", tc.description, got, tc.expected) } }) } diff --git a/pkg/xtcp/ns_reconcile.go b/pkg/xtcp/ns_reconcile.go index ee1d6fe04..7171d4b54 100644 --- a/pkg/xtcp/ns_reconcile.go +++ b/pkg/xtcp/ns_reconcile.go @@ -121,31 +121,58 @@ func (x *XTCP) reconcile(ctx context.Context) (dels, stores int) { return true }) - // Add live namespaces not yet tracked, up to -maxNetns (see - // admitNamespaces). The ones left out stay candidates on every later - // reconcile, so a slot freed by a delete is filled on the next one. + // Add live namespaces not yet tracked, up to -maxNetns: the lowest-pid + // ones win, displacing higher-pid tracked ones (see admitNamespaces). + // The ones left out stay candidates on every later reconcile. var candidates []nsIdentity for inode, id := range live { if _, tracked := x.nsMap.Load(inode); !tracked { candidates = append(candidates, id) } } - tracked := 0 + var tracked []nsIdentity if x.config.GetMaxNetns() != 0 && len(candidates) > 0 { - tracked = lenSyncMap(x.nsMap) + tracked = trackedLive(x.nsMap, live, x.selfNsInode) + } + admit, evict, dropped := admitNamespaces(candidates, tracked, x.config.GetMaxNetns(), x.selfNsInode) + for _, id := range evict { + x.nsDelete(id.inode) + dels++ } - admit, dropped := admitNamespaces(candidates, tracked, x.config.GetMaxNetns(), x.selfNsInode) for _, id := range admit { x.nsAdd(ctx, id) stores++ } - if dropped > 0 { - x.pC.WithLabelValues("reconcile", "maxNetns", "drop").Add(float64(dropped)) + if len(evict) > 0 || dropped > 0 { + x.pC.WithLabelValues("reconcile", "maxNetns", "evict").Add(float64(len(evict))) + x.pC.WithLabelValues("reconcile", "maxNetns", "drop").Add(float64(dropped + len(evict))) if x.pNetnsDropped != nil { - x.pNetnsDropped.Add(float64(dropped)) + x.pNetnsDropped.Add(float64(dropped + len(evict))) } - log.Printf("reconcile: %d namespaces not tracked: -maxNetns=%d reached", dropped, x.config.GetMaxNetns()) + log.Printf("reconcile: -maxNetns=%d reached: %d namespaces not tracked, %d of them displaced by lower pids", + x.config.GetMaxNetns(), dropped+len(evict), len(evict)) } return dels, stores } + +// trackedLive lists the tracked namespaces that are still live, with their +// current pid from this scan (the pid that discovered one may have exited). +// xtcp2's own namespace (self) is included even when the scan missed it: it +// is never deleted, so it always holds a slot. +func trackedLive(nsMap *sync.Map, live map[uint64]nsIdentity, self uint64) []nsIdentity { + var out []nsIdentity + nsMap.Range(func(key, _ any) bool { + inode, ok := key.(uint64) + if !ok { + return true + } + if id, isLive := live[inode]; isLive { + out = append(out, id) + } else if inode == self { + out = append(out, nsIdentity{inode: self}) + } + return true + }) + return out +} diff --git a/proto/xtcp_config/v1/xtcp_config.proto b/proto/xtcp_config/v1/xtcp_config.proto index 20915f2fa..fe026a432 100644 --- a/proto/xtcp_config/v1/xtcp_config.proto +++ b/proto/xtcp_config/v1/xtcp_config.proto @@ -819,10 +819,11 @@ message XtcpConfig { bool reconcile_before_poll = 41; // Cap on the network namespaces tracked, xtcp2's own included. Each costs - // a netlink socket, a receiver and its decoders. At the cap, reconcile - // adds no more, preferring the lowest pids (long-running workloads), and - // counts the rest in xtcp_netns_dropped_total; a slot freed by a deleted - // namespace is filled on the next reconcile. Startup-only. + // a netlink socket, a receiver and its decoders. At the cap, the tracked + // set is the lowest-pid live namespaces: a newer namespace stays out, an + // older one displaces the highest-pid tracked one, and both count in + // xtcp_netns_dropped_total. A burst of new namespaces cannot push out + // long-running workloads. Startup-only. // 0 = unlimited. Daemon default 4096. uint32 max_netns = 42 [ (buf.validate.field).required = false From 0c0657012a2953d114b0e46b0ebdd61bc995edc0 Mon Sep 17 00:00:00 2001 From: "randomizedcoder dave.seddon.ca@gmail.com" Date: Thu, 12 Nov 2026 19:49:31 -0800 Subject: [PATCH 04/19] fix(xtcp): -maxNetns never evicts; waiting namespaces queue first come Ranking by pid (630b117f) let a tenant evict monitored workloads: pids wrap, so one that burns through pids gets low ones, and a namespace's scanned pid changes when its first process exits. Eviction by any key a tenant can influence is worse than the problem it solved, so a tracked namespace now keeps its slot until it dies. Namespaces past the cap wait in nsWaiting, ordered by the reconcile that first saw them (a sequence xtcp2 assigns), then pid; a freed slot goes to the longest waiter, and a recreated namespace joins at the back. A burst that fills the cap still keeps later namespaces out: that is counted in xtcp_netns_dropped_total, which the docs say to alert on, and per-owner quotas are the follow-up. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 2 +- cmd/xtcp2/testdata/defineflags-golden.txt | 2 +- cmd/xtcp2/xtcp2.go | 2 +- docs/network-namespaces.md | 4 +- gen/dart/xtcp_config/v1/xtcp_config.pb.dart | 9 +- gen/go/xtcp_config/xtcp_config.pb.go | 9 +- .../xtcp_config/v1/xtcp_config.swagger.json | 2 +- pkg/xtcp/caps.go | 99 +++++++----- pkg/xtcp/caps_test.go | 147 ++++++++---------- pkg/xtcp/ns_reconcile.go | 51 ++---- pkg/xtcp/xtcp.go | 7 + proto/xtcp_config/v1/xtcp_config.proto | 9 +- 12 files changed, 165 insertions(+), 178 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7dfb438c3..e9d62c6d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ ### New -- **Per-namespace caps.** `-maxDumpBytes` (default 256 MiB) and `-maxRecordsPerNetns` (default 262144) bound one namespace's dump per poll: packets past the byte cap are drained undecoded, and records past the record cap are dropped before decode. `-maxNetns` (default 4096) bounds the namespaces tracked. At the cap, the lowest-pid namespaces are tracked, so a burst of new namespaces cannot displace long-running ones. Drops are counted in `xtcp_dump_dropped_total{reason}` and `xtcp_netns_dropped_total`, with one log line per truncated dump or short reconcile. `0` turns a cap off; the matching env vars are `MAX_DUMP_BYTES`, `MAX_RECORDS_PER_NETNS` and `MAX_NETNS`. The caps are startup-only: `ConfigService.Set` keeps the running values. No healthy host should reach the defaults; a host that does now loses that namespace's excess rows, where it used to collect them all ([polling and batching](docs/polling-and-batching.md#per-namespace-caps)). +- **Per-namespace caps.** `-maxDumpBytes` (default 256 MiB) and `-maxRecordsPerNetns` (default 262144) bound one namespace's dump per poll: packets past the byte cap are drained undecoded, and records past the record cap are dropped before decode. `-maxNetns` (default 4096) bounds the namespaces tracked. At the cap, tracked namespaces keep their slots, and new ones wait for a freed slot, first come, first served. Alert on `xtcp_netns_dropped_total`. Drops are counted in `xtcp_dump_dropped_total{reason}` and `xtcp_netns_dropped_total`, with one log line per truncated dump or short reconcile. `0` turns a cap off; the matching env vars are `MAX_DUMP_BYTES`, `MAX_RECORDS_PER_NETNS` and `MAX_NETNS`. The caps are startup-only: `ConfigService.Set` keeps the running values. No healthy host should reach the defaults; a host that does now loses that namespace's excess rows, where it used to collect them all ([polling and batching](docs/polling-and-batching.md#per-namespace-caps)). - **Vulnerability check.** `checks.govulncheck` runs govulncheck against a pinned snapshot of the Go vulnerability database, with no tags and with every flavor tag, and fails on a reachable finding not in its accepted list. One is accepted: GO-2026-6859 in `net/http`, fixed in go1.27.4, until the toolchain moves. `nix run .#govulncheck-fresh` checks against the live database and runs `go mod verify`; `nix build .#sbom-` writes a CycloneDX SBOM for any binary package. ## 0.2.1 (2026-11) diff --git a/cmd/xtcp2/testdata/defineflags-golden.txt b/cmd/xtcp2/testdata/defineflags-golden.txt index fc5a84e37..455b7a155 100644 --- a/cmd/xtcp2/testdata/defineflags-golden.txt +++ b/cmd/xtcp2/testdata/defineflags-golden.txt @@ -81,7 +81,7 @@ location deployment grouping/facility this daemon runs in (data center, PoP, re marshal protobufList Marshaling of the exported data (protobufList, protoJson, protoText, msgpack, jsonl, csv, tsv) maxDumpBytes 268435456 cap on the bytes of one namespace's inet_diag dump per poll; packets past it are drained undecoded and counted in xtcp_dump_dropped_total{reason="bytes"}. 0 = unlimited. Falls back to MAX_DUMP_BYTES env. maxLoops 0 Maximum number of loops, or zero (0) for forever -maxNetns 4096 cap on the network namespaces tracked, xtcp2's own included; at the cap the lowest-pid namespaces are tracked (an older one displaces a newer) and the rest are counted in xtcp_netns_dropped_total. 0 = unlimited. Falls back to MAX_NETNS env. +maxNetns 4096 cap on the network namespaces tracked, xtcp2's own included; at the cap new namespaces wait for a freed slot, first come first served, and are counted in xtcp_netns_dropped_total. 0 = unlimited. Falls back to MAX_NETNS env. maxRecordsPerNetns 262144 cap on the records one namespace contributes per poll; the rest are dropped before decode and counted in xtcp_dump_dropped_total{reason="records"}. 0 = unlimited. Falls back to MAX_RECORDS_PER_NETNS env. maxThreads 2000 cap on Go runtime OS threads (debug.SetMaxThreads); 0 = use Go default 10000 modulus 1 modulus. Report every X inetd messages to output diff --git a/cmd/xtcp2/xtcp2.go b/cmd/xtcp2/xtcp2.go index 43dee023d..23c5e3462 100644 --- a/cmd/xtcp2/xtcp2.go +++ b/cmd/xtcp2/xtcp2.go @@ -534,7 +534,7 @@ func defineS3Flags(f *mainFlags) { func defineCapFlags(f *mainFlags) { f.maxDumpBytes = flag.Uint64("maxDumpBytes", maxDumpBytesCst, "cap on the bytes of one namespace's inet_diag dump per poll; packets past it are drained undecoded and counted in xtcp_dump_dropped_total{reason=\"bytes\"}. 0 = unlimited. Falls back to MAX_DUMP_BYTES env.") f.maxRecordsPerNetns = flag.Uint64("maxRecordsPerNetns", maxRecordsPerNetnsCst, "cap on the records one namespace contributes per poll; the rest are dropped before decode and counted in xtcp_dump_dropped_total{reason=\"records\"}. 0 = unlimited. Falls back to MAX_RECORDS_PER_NETNS env.") - f.maxNetns = flag.Uint("maxNetns", maxNetnsCst, "cap on the network namespaces tracked, xtcp2's own included; at the cap the lowest-pid namespaces are tracked (an older one displaces a newer) and the rest are counted in xtcp_netns_dropped_total. 0 = unlimited. Falls back to MAX_NETNS env.") + f.maxNetns = flag.Uint("maxNetns", maxNetnsCst, "cap on the network namespaces tracked, xtcp2's own included; at the cap new namespaces wait for a freed slot, first come first served, and are counted in xtcp_netns_dropped_total. 0 = unlimited. Falls back to MAX_NETNS env.") } // defineListenerFlags registers the flags for xtcp2's own inbound listeners: diff --git a/docs/network-namespaces.md b/docs/network-namespaces.md index ec5ac8125..8b1e6efd8 100644 --- a/docs/network-namespaces.md +++ b/docs/network-namespaces.md @@ -61,7 +61,9 @@ Rapid namespace churn (e.g. Kubernetes pods cycling) is the hard case: each `set | `-maxThreads` | `2000` | Cap on Go runtime OS threads (`debug.SetMaxThreads`); `0` = Go default (10000). | | `-maxNetns` | `4096` | Cap on namespaces tracked, xtcp2's own included; `0` = unlimited. `MAX_NETNS`. | -Each tracked namespace costs a netlink socket, a receiver and its decoders, so `-maxNetns` bounds them. At the cap, the tracked set is the lowest-pid live namespaces. A new namespace (higher pid) stays out. An older one, or a bind-mounted one (pid 0, created by the host or the container runtime), displaces the highest-pid tracked namespace. So a workload that creates thousands of namespaces cannot push long-running ones out of monitoring. The ranking depends only on the live set, so the tracked set converges rather than churning. xtcp2's own namespace is always tracked. Every namespace left out or displaced counts in `xtcp_netns_dropped_total` (once per reconcile) and logs a line. **Alert on any increase:** it means some namespaces are not monitored. `ConfigService.Set` keeps the running cap. The per-namespace dump caps are in [polling and batching](polling-and-batching.md#per-namespace-caps). +Each tracked namespace costs a netlink socket, a receiver and its decoders, so `-maxNetns` bounds them. At the cap, a tracked namespace keeps its slot until it is deleted; nothing is evicted, because any ranking a tenant can influence (a pid wraps) would let it push monitored workloads out. New namespaces wait. When a slot frees, they get it in the order xtcp2 first saw them, so recreating a namespace does not jump the queue. xtcp2's own namespace is always tracked. Each waiting namespace counts in `xtcp_netns_dropped_total` once per reconcile and logs a line. + +**Alert on any increase:** it means some namespaces are not monitored. A workload that can create namespaces faster than others can fill the cap. The container's pids limit bounds how many namespaces it can hold open (each needs a process), and a per-owner quota is planned. `ConfigService.Set` keeps the running cap. The per-namespace dump caps are in [polling and batching](polling-and-batching.md#per-namespace-caps). The bind-mount directories (`/run/netns/`, `/run/docker/netns/`) are built in, not flags. diff --git a/gen/dart/xtcp_config/v1/xtcp_config.pb.dart b/gen/dart/xtcp_config/v1/xtcp_config.pb.dart index 34766d3a6..d695485b3 100644 --- a/gen/dart/xtcp_config/v1/xtcp_config.pb.dart +++ b/gen/dart/xtcp_config/v1/xtcp_config.pb.dart @@ -2418,11 +2418,10 @@ class XtcpConfig extends $pb.GeneratedMessage { void clearReconcileBeforePoll() => $_clearField(41); /// Cap on the network namespaces tracked, xtcp2's own included. Each costs - /// a netlink socket, a receiver and its decoders. At the cap, the tracked - /// set is the lowest-pid live namespaces: a newer namespace stays out, an - /// older one displaces the highest-pid tracked one, and both count in - /// xtcp_netns_dropped_total. A burst of new namespaces cannot push out - /// long-running workloads. Startup-only. + /// a netlink socket, a receiver and its decoders. At the cap, tracked + /// namespaces keep their slots until they die; the rest wait, are counted + /// in xtcp_netns_dropped_total each reconcile, and get freed slots in the + /// order xtcp2 first saw them. Startup-only. /// 0 = unlimited. Daemon default 4096. @$pb.TagNumber(42) $core.int get maxNetns => $_getIZ(19); diff --git a/gen/go/xtcp_config/xtcp_config.pb.go b/gen/go/xtcp_config/xtcp_config.pb.go index 3519700ee..c629e1e36 100644 --- a/gen/go/xtcp_config/xtcp_config.pb.go +++ b/gen/go/xtcp_config/xtcp_config.pb.go @@ -1570,11 +1570,10 @@ type XtcpConfig struct { // mutex-serialized with the background reconciler. Default true. ReconcileBeforePoll bool `protobuf:"varint,41,opt,name=reconcile_before_poll,json=reconcileBeforePoll,proto3" json:"reconcile_before_poll,omitempty"` // Cap on the network namespaces tracked, xtcp2's own included. Each costs - // a netlink socket, a receiver and its decoders. At the cap, the tracked - // set is the lowest-pid live namespaces: a newer namespace stays out, an - // older one displaces the highest-pid tracked one, and both count in - // xtcp_netns_dropped_total. A burst of new namespaces cannot push out - // long-running workloads. Startup-only. + // a netlink socket, a receiver and its decoders. At the cap, tracked + // namespaces keep their slots until they die; the rest wait, are counted + // in xtcp_netns_dropped_total each reconcile, and get freed slots in the + // order xtcp2 first saw them. Startup-only. // 0 = unlimited. Daemon default 4096. MaxNetns uint32 `protobuf:"varint,42,opt,name=max_netns,json=maxNetns,proto3" json:"max_netns,omitempty"` // Write netlink packets to writeFiles number of files ( to generate test data ) per netlinker diff --git a/gen/openapi/xtcp_config/v1/xtcp_config.swagger.json b/gen/openapi/xtcp_config/v1/xtcp_config.swagger.json index 06518ec2b..c489d7f6e 100644 --- a/gen/openapi/xtcp_config/v1/xtcp_config.swagger.json +++ b/gen/openapi/xtcp_config/v1/xtcp_config.swagger.json @@ -751,7 +751,7 @@ "maxNetns": { "type": "integer", "format": "int64", - "description": "Cap on the network namespaces tracked, xtcp2's own included. Each costs\na netlink socket, a receiver and its decoders. At the cap, the tracked\nset is the lowest-pid live namespaces: a newer namespace stays out, an\nolder one displaces the highest-pid tracked one, and both count in\nxtcp_netns_dropped_total. A burst of new namespaces cannot push out\nlong-running workloads. Startup-only.\n0 = unlimited. Daemon default 4096." + "description": "Cap on the network namespaces tracked, xtcp2's own included. Each costs\na netlink socket, a receiver and its decoders. At the cap, tracked\nnamespaces keep their slots until they die; the rest wait, are counted\nin xtcp_netns_dropped_total each reconcile, and get freed slots in the\norder xtcp2 first saw them. Startup-only.\n0 = unlimited. Daemon default 4096." }, "writeFiles": { "type": "integer", diff --git a/pkg/xtcp/caps.go b/pkg/xtcp/caps.go index 7165a5957..b602d7709 100644 --- a/pkg/xtcp/caps.go +++ b/pkg/xtcp/caps.go @@ -3,6 +3,7 @@ package xtcp import ( "cmp" "log" + "math" "slices" ) @@ -28,55 +29,67 @@ func (x *XTCP) dumpTruncated(reason string, fd int, limit uint64) { log.Printf("dump truncated: fd:%d inode:%v cap:%s=%d; the rest of this poll's dump is dropped", fd, inode, reason, limit) } -// nsRanked is a namespace in admitNamespaces' ranking, and whether it is -// already tracked. -type nsRanked struct { - id nsIdentity - tracked bool +// admitNamespaces applies -maxNetns (limit, 0 for no cap) to the live, +// untracked candidates, given tracked namespaces already holding slots. A +// tracked namespace keeps its slot until it dies: evicting by any key a +// tenant can influence (a pid wraps; a namespace's scanned pid changes) +// would let it push monitored workloads out. Waiting candidates are +// admitted in the order reconcile first saw them (waiting, maintained by +// queueWaiting), then by pid and inode, and xtcp2's own namespace (self) +// always. It returns the candidates to add and how many stay out. +func admitNamespaces(candidates []nsIdentity, tracked int, limit uint32, self uint64, waiting map[uint64]uint64) (admit []nsIdentity, dropped int) { + if limit == 0 { + return candidates, 0 + } + // A candidate not yet queued arrived this reconcile: behind every + // waiting one. + place := func(inode uint64) uint64 { + if s, ok := waiting[inode]; ok { + return s + } + return math.MaxUint64 + } + slices.SortFunc(candidates, func(a, b nsIdentity) int { + return cmp.Or(cmp.Compare(place(a.inode), place(b.inode)), + cmp.Compare(a.pid, b.pid), cmp.Compare(a.inode, b.inode)) + }) + admit = candidates[:0:0] + for _, id := range candidates { + if id.inode == self || tracked < int(limit) { + admit = append(admit, id) + tracked++ + continue + } + dropped++ + } + return admit, dropped } -// admitNamespaces applies -maxNetns (limit, 0 for no cap): the namespaces -// tracked are the limit lowest-pid live ones, xtcp2's own (self) always -// among them. Lower pids are older processes, so a burst of new namespaces -// cannot displace long-running workloads; bind-mounted namespaces (pid 0) -// were created by the host or the container runtime and rank first. -// -// candidates are live and untracked; tracked are live and tracked, with -// their current pid. It returns the candidates to add, the tracked -// namespaces to evict because lower-pid ones displace them, and how many -// candidates stay out. The ranking is total and depends only on the live -// set, so an evicted namespace loses the same comparison on every later -// reconcile: the tracked set converges, it does not churn. -func admitNamespaces(candidates, tracked []nsIdentity, limit uint32, self uint64) (admit, evict []nsIdentity, dropped int) { - if limit == 0 || len(candidates) == 0 { - return candidates, nil, 0 +// queueWaiting updates the -maxNetns queue after a reconcile: a candidate +// left out keeps its place, or joins at the back with the next sequence; +// one admitted or gone leaves the queue. Candidates first seen in the same +// reconcile share a sequence and are ordered by pid. It returns the queue +// and the sequence counter, both owned by reconcile. +func queueWaiting(waiting map[uint64]uint64, seq uint64, candidates, admit []nsIdentity) (map[uint64]uint64, uint64) { + if len(candidates) == len(admit) { + clear(waiting) + return waiting, seq } - all := make([]nsRanked, 0, len(candidates)+len(tracked)) - for _, id := range tracked { - all = append(all, nsRanked{id: id, tracked: true}) + admitted := make(map[uint64]struct{}, len(admit)) + for _, id := range admit { + admitted[id.inode] = struct{}{} } + next := make(map[uint64]uint64, len(candidates)-len(admit)) + seq++ for _, id := range candidates { - all = append(all, nsRanked{id: id}) - } - slices.SortFunc(all, func(a, b nsRanked) int { - if (a.id.inode == self) != (b.id.inode == self) { - if a.id.inode == self { - return -1 - } - return 1 + if _, in := admitted[id.inode]; in { + continue } - return cmp.Or(cmp.Compare(a.id.pid, b.id.pid), cmp.Compare(a.id.inode, b.id.inode)) - }) - for i, r := range all { - keep := i < int(limit) || r.id.inode == self - switch { - case keep && !r.tracked: - admit = append(admit, r.id) - case !keep && r.tracked: - evict = append(evict, r.id) - case !keep: - dropped++ + if s, ok := waiting[id.inode]; ok { + next[id.inode] = s + } else { + next[id.inode] = seq } } - return admit, evict, dropped + return next, seq } diff --git a/pkg/xtcp/caps_test.go b/pkg/xtcp/caps_test.go index e34cc0289..b4827ef03 100644 --- a/pkg/xtcp/caps_test.go +++ b/pkg/xtcp/caps_test.go @@ -250,109 +250,100 @@ func TestNetlinkerDump_caps(t *testing.T) { } } -// TestAdmitNamespaces pins -maxNetns: the tracked set converges to the -// lowest-pid live namespaces, xtcp2's own always among them. +// TestAdmitNamespaces pins -maxNetns for one reconcile: tracked namespaces +// keep their slots, waiting candidates go in queue order, xtcp2's own +// always. func TestAdmitNamespaces(t *testing.T) { const self = 1 ns := func(pid int, inode uint64) nsIdentity { return nsIdentity{pid: pid, inode: inode} } - selfNs := ns(0, self) tests := []struct { name string category string description string candidates []nsIdentity - tracked []nsIdentity + tracked int limit uint32 - expectedAdmit []uint64 // inodes, in rank order - expectedEvict []uint64 + waiting map[uint64]uint64 + expected []uint64 // admitted inodes, in order expectedDropped int }{ - {name: "netns_cap_zero", category: "P", description: "cap 0 admits all, evicts none", - candidates: []nsIdentity{ns(9, 90), ns(3, 30)}, tracked: []nsIdentity{selfNs, ns(5, 50)}, limit: 0, - expectedAdmit: []uint64{90, 30}}, + {name: "netns_cap_zero", category: "P", description: "cap 0 admits all", + candidates: []nsIdentity{ns(9, 90), ns(3, 30)}, tracked: 100, limit: 0, expected: []uint64{90, 30}}, {name: "under_cap", category: "P", description: "room for every candidate", - candidates: []nsIdentity{ns(9, 90), ns(3, 30)}, tracked: []nsIdentity{selfNs}, limit: 10, - expectedAdmit: []uint64{30, 90}}, - {name: "netns_cap", category: "N", description: "cap 3 with self tracked: the two lowest pids of five win", + candidates: []nsIdentity{ns(9, 90), ns(3, 30)}, tracked: 1, limit: 10, expected: []uint64{30, 90}}, + {name: "netns_cap", category: "N", description: "cap 3 with self tracked: two of five new ones, lowest pid first", candidates: []nsIdentity{ns(50, 500), ns(20, 200), ns(40, 400), ns(10, 100), ns(30, 300)}, - tracked: []nsIdentity{selfNs}, limit: 3, expectedAdmit: []uint64{100, 200}, expectedDropped: 3}, - {name: "netns_cap_slot_frees", category: "B", description: "a slot freed by a delete goes to the lowest-pid candidate", - candidates: []nsIdentity{ns(40, 400), ns(30, 300)}, tracked: []nsIdentity{selfNs, ns(5, 50)}, limit: 3, - expectedAdmit: []uint64{300}, expectedDropped: 1}, - {name: "at_cap_higher_pid", category: "B", description: "at the cap, a newer (higher-pid) candidate stays out", - candidates: []nsIdentity{ns(90, 900)}, tracked: []nsIdentity{selfNs, ns(5, 50), ns(6, 60)}, limit: 3, - expectedDropped: 1}, - {name: "displace_burst", category: "N", description: "a tenant's burst filled the cap; an older workload's namespace displaces the highest-pid one", - candidates: []nsIdentity{ns(7, 70)}, tracked: []nsIdentity{selfNs, ns(1000, 1000), ns(1001, 1001)}, limit: 3, - expectedAdmit: []uint64{70}, expectedEvict: []uint64{1001}}, - {name: "converged_stable", category: "C", description: "the evicted namespace, now a candidate, loses again: no churn", - candidates: []nsIdentity{ns(1001, 1001)}, tracked: []nsIdentity{selfNs, ns(7, 70), ns(1000, 1000)}, limit: 3, - expectedDropped: 1}, - {name: "bind_mount_first", category: "C", description: "a bind-mounted namespace (pid 0) outranks process ones", - candidates: []nsIdentity{ns(0, 77)}, tracked: []nsIdentity{selfNs, ns(5, 50), ns(6, 60)}, limit: 3, - expectedAdmit: []uint64{77}, expectedEvict: []uint64{60}}, - {name: "self_always", category: "C", description: "xtcp2's own namespace is admitted even past the cap", - candidates: []nsIdentity{ns(7, 70), ns(99, self)}, tracked: []nsIdentity{ns(2, 20), ns(3, 30)}, limit: 1, - expectedAdmit: []uint64{self}, expectedEvict: []uint64{20, 30}, expectedDropped: 1}, - {name: "pid_tie", category: "C", description: "equal pids order by inode", - candidates: []nsIdentity{ns(5, 60), ns(5, 50)}, limit: 1, expectedAdmit: []uint64{50}, expectedDropped: 1}, - {name: "no_candidates", category: "C", description: "nothing new: nothing evicted, even at the cap", - tracked: []nsIdentity{selfNs, ns(5, 50), ns(6, 60)}, limit: 2}, - } - inodes := func(ids []nsIdentity) []uint64 { - out := make([]uint64, 0, len(ids)) - for _, id := range ids { - out = append(out, id.inode) - } - return out + tracked: 1, limit: 3, expected: []uint64{100, 200}, expectedDropped: 3}, + {name: "at_cap_no_eviction", category: "N", description: "at the cap even a lower-pid candidate waits; tracked ones are never evicted", + candidates: []nsIdentity{ns(2, 20)}, tracked: 3, limit: 3, expectedDropped: 1}, + {name: "netns_cap_slot_frees", category: "B", description: "a freed slot goes to the longest-waiting candidate, not the lowest pid", + candidates: []nsIdentity{ns(2, 20), ns(90, 900)}, tracked: 2, limit: 3, + waiting: map[uint64]uint64{900: 1, 20: 5}, expected: []uint64{900}, expectedDropped: 1}, + {name: "new_behind_queue", category: "C", description: "a candidate first seen now (unqueued) is behind every waiting one, whatever its pid", + candidates: []nsIdentity{ns(1, 10), ns(90, 900)}, tracked: 2, limit: 3, + waiting: map[uint64]uint64{900: 7}, expected: []uint64{900}, expectedDropped: 1}, + {name: "self_always", category: "C", description: "xtcp2's own namespace is admitted even at the cap", + candidates: []nsIdentity{ns(7, 70), ns(99, self)}, tracked: 3, limit: 3, expected: []uint64{self}, expectedDropped: 1}, + {name: "pid_tie", category: "C", description: "same queue place and pid: order by inode", + candidates: []nsIdentity{ns(5, 60), ns(5, 50)}, tracked: 0, limit: 1, expected: []uint64{50}, expectedDropped: 1}, + {name: "no_candidates", category: "C", description: "nothing to add", tracked: 5, limit: 3}, } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { - admit, evict, dropped := admitNamespaces(slices.Clone(tc.candidates), tc.tracked, tc.limit, self) - if got := inodes(admit); !slices.Equal(got, tc.expectedAdmit) { - t.Errorf("%s: admitted %v, expected %v", tc.description, got, tc.expectedAdmit) - } - if got := inodes(evict); !slices.Equal(got, tc.expectedEvict) { - t.Errorf("%s: evicted %v, expected %v", tc.description, got, tc.expectedEvict) + admit, dropped := admitNamespaces(slices.Clone(tc.candidates), tc.tracked, tc.limit, self, tc.waiting) + got := make([]uint64, 0, len(admit)) + for _, id := range admit { + got = append(got, id.inode) } - if dropped != tc.expectedDropped { - t.Errorf("%s: dropped %d, expected %d", tc.description, dropped, tc.expectedDropped) + if !slices.Equal(got, tc.expected) || dropped != tc.expectedDropped { + t.Errorf("%s: admitted %v dropped %d, expected %v dropped %d", + tc.description, got, dropped, tc.expected, tc.expectedDropped) } }) } } -// TestTrackedLive: tracked namespaces still live, with the scan's pid, and -// xtcp2's own even when the scan missed it. -func TestTrackedLive(t *testing.T) { - const self = 1 - tests := []struct { - name string - category string +// TestNetnsCapQueue runs several reconciles' worth of admitNamespaces and +// queueWaiting: a burst that fills the cap keeps its slots, a later +// namespace waits, and freed slots go first come, first served, so +// recreating namespaces cannot jump the queue. +func TestNetnsCapQueue(t *testing.T) { + const self, limit = 1, 3 + ns := func(pid int, inode uint64) nsIdentity { return nsIdentity{pid: pid, inode: inode} } + + type step struct { description string - tracked []uint64 - live map[uint64]nsIdentity - expected []nsIdentity - }{ - {name: "live_current_pid", category: "P", description: "a live tracked namespace carries the scan's pid", - tracked: []uint64{50}, live: map[uint64]nsIdentity{50: {inode: 50, pid: 9}}, - expected: []nsIdentity{{inode: 50, pid: 9}}}, - {name: "gone", category: "N", description: "a tracked namespace no longer live is left out", - tracked: []uint64{50}, live: map[uint64]nsIdentity{}}, - {name: "self_unscanned", category: "C", description: "self holds a slot though the scan missed it", - tracked: []uint64{self}, live: map[uint64]nsIdentity{}, expected: []nsIdentity{{inode: self}}}, + tracked int + candidates []nsIdentity + expected []uint64 } - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - m := &sync.Map{} - for _, inode := range tc.tracked { - m.Store(inode, netNSitem{inode: inode}) - } - if got := trackedLive(m, tc.live, self); !slices.Equal(got, tc.expected) { - t.Errorf("%s: %v, expected %v", tc.description, got, tc.expected) - } - }) + steps := []step{ + {"self plus a burst of four: two admitted, two wait", 1, + []nsIdentity{ns(100, 100), ns(101, 101), ns(102, 102), ns(103, 103)}, []uint64{100, 101}}, + {"a workload namespace with a wrapped (low) pid arrives: it queues behind the burst", 3, + []nsIdentity{ns(102, 102), ns(103, 103), ns(5, 5)}, nil}, + {"one slot frees: the longest waiter (102) gets it", 2, + []nsIdentity{ns(102, 102), ns(103, 103), ns(5, 5)}, []uint64{102}}, + {"103 dies and is recreated as 104: the new one queues behind 5", 2, + []nsIdentity{ns(5, 5), ns(104, 104)}, []uint64{5}}, + {"next slot: 104", 2, []nsIdentity{ns(104, 104)}, []uint64{104}}, + } + var waiting map[uint64]uint64 + var seq uint64 + for i, st := range steps { + admit, _ := admitNamespaces(slices.Clone(st.candidates), st.tracked, limit, self, waiting) + waiting, seq = queueWaiting(waiting, seq, st.candidates, admit) + got := make([]uint64, 0, len(admit)) + for _, id := range admit { + got = append(got, id.inode) + } + if !slices.Equal(got, st.expected) { + t.Errorf("step %d (%s): admitted %v, expected %v", i, st.description, got, st.expected) + } + } + if len(waiting) != 0 { + t.Errorf("queue not empty at the end: %v", waiting) } } diff --git a/pkg/xtcp/ns_reconcile.go b/pkg/xtcp/ns_reconcile.go index 7171d4b54..419875a41 100644 --- a/pkg/xtcp/ns_reconcile.go +++ b/pkg/xtcp/ns_reconcile.go @@ -121,58 +121,35 @@ func (x *XTCP) reconcile(ctx context.Context) (dels, stores int) { return true }) - // Add live namespaces not yet tracked, up to -maxNetns: the lowest-pid - // ones win, displacing higher-pid tracked ones (see admitNamespaces). - // The ones left out stay candidates on every later reconcile. + // Add live namespaces not yet tracked, up to -maxNetns. Tracked ones + // keep their slots; the rest wait in the order first seen (see + // admitNamespaces) and stay candidates on every later reconcile. var candidates []nsIdentity for inode, id := range live { if _, tracked := x.nsMap.Load(inode); !tracked { candidates = append(candidates, id) } } - var tracked []nsIdentity - if x.config.GetMaxNetns() != 0 && len(candidates) > 0 { - tracked = trackedLive(x.nsMap, live, x.selfNsInode) + limit := x.config.GetMaxNetns() + tracked := 0 + if limit != 0 && len(candidates) > 0 { + tracked = lenSyncMap(x.nsMap) } - admit, evict, dropped := admitNamespaces(candidates, tracked, x.config.GetMaxNetns(), x.selfNsInode) - for _, id := range evict { - x.nsDelete(id.inode) - dels++ + admit, dropped := admitNamespaces(candidates, tracked, limit, x.selfNsInode, x.nsWaiting) + if limit != 0 { + x.nsWaiting, x.nsWaitingSeq = queueWaiting(x.nsWaiting, x.nsWaitingSeq, candidates, admit) } for _, id := range admit { x.nsAdd(ctx, id) stores++ } - if len(evict) > 0 || dropped > 0 { - x.pC.WithLabelValues("reconcile", "maxNetns", "evict").Add(float64(len(evict))) - x.pC.WithLabelValues("reconcile", "maxNetns", "drop").Add(float64(dropped + len(evict))) + if dropped > 0 { + x.pC.WithLabelValues("reconcile", "maxNetns", "drop").Add(float64(dropped)) if x.pNetnsDropped != nil { - x.pNetnsDropped.Add(float64(dropped + len(evict))) + x.pNetnsDropped.Add(float64(dropped)) } - log.Printf("reconcile: -maxNetns=%d reached: %d namespaces not tracked, %d of them displaced by lower pids", - x.config.GetMaxNetns(), dropped+len(evict), len(evict)) + log.Printf("reconcile: %d namespaces not tracked: -maxNetns=%d reached", dropped, limit) } return dels, stores } - -// trackedLive lists the tracked namespaces that are still live, with their -// current pid from this scan (the pid that discovered one may have exited). -// xtcp2's own namespace (self) is included even when the scan missed it: it -// is never deleted, so it always holds a slot. -func trackedLive(nsMap *sync.Map, live map[uint64]nsIdentity, self uint64) []nsIdentity { - var out []nsIdentity - nsMap.Range(func(key, _ any) bool { - inode, ok := key.(uint64) - if !ok { - return true - } - if id, isLive := live[inode]; isLive { - out = append(out, id) - } else if inode == self { - out = append(out, nsIdentity{inode: self}) - } - return true - }) - return out -} diff --git a/pkg/xtcp/xtcp.go b/pkg/xtcp/xtcp.go index 0c1a996b3..cfc964b8d 100644 --- a/pkg/xtcp/xtcp.go +++ b/pkg/xtcp/xtcp.go @@ -69,6 +69,13 @@ type XTCP struct { // access as well as a coherent nsMap diff. reconcileMu sync.Mutex + // nsWaiting queues the live namespaces -maxNetns keeps out: inode → + // the reconcile sequence that first saw it waiting. Admission is in + // that order, so a namespace cannot jump the queue. Owned by reconcile + // (under reconcileMu); empty unless the cap is reached. + nsWaiting map[uint64]uint64 + nsWaitingSeq uint64 + packetBufferPool xsync.Pool[*[]byte] xtcpEnvelopePool xsync.Pool[*xtcp_flat_record.Envelope] xtcpRecordPool xsync.Pool[*xtcp_flat_record.XtcpFlatRecord] diff --git a/proto/xtcp_config/v1/xtcp_config.proto b/proto/xtcp_config/v1/xtcp_config.proto index fe026a432..fec8f3b3d 100644 --- a/proto/xtcp_config/v1/xtcp_config.proto +++ b/proto/xtcp_config/v1/xtcp_config.proto @@ -819,11 +819,10 @@ message XtcpConfig { bool reconcile_before_poll = 41; // Cap on the network namespaces tracked, xtcp2's own included. Each costs - // a netlink socket, a receiver and its decoders. At the cap, the tracked - // set is the lowest-pid live namespaces: a newer namespace stays out, an - // older one displaces the highest-pid tracked one, and both count in - // xtcp_netns_dropped_total. A burst of new namespaces cannot push out - // long-running workloads. Startup-only. + // a netlink socket, a receiver and its decoders. At the cap, tracked + // namespaces keep their slots until they die; the rest wait, are counted + // in xtcp_netns_dropped_total each reconcile, and get freed slots in the + // order xtcp2 first saw them. Startup-only. // 0 = unlimited. Daemon default 4096. uint32 max_netns = 42 [ (buf.validate.field).required = false From c1ce90d9cffcdac524b12d73621c4808fd930fb9 Mon Sep 17 00:00:00 2001 From: "randomizedcoder dave.seddon.ca@gmail.com" Date: Fri, 13 Nov 2026 09:27:12 -0800 Subject: [PATCH 05/19] feat(config): flags for the socket-count gate, reconcile limits and owner quota -maxRecordsPerPoll, -ioUringSockstatBatchSize, -ioUringSockstatWorkers, -reconcileTimeout, -maxNetnsPerOwner, -maxNetnsAddsPerReconcile (+ env). Startup-only: preserveCaps carries them across ConfigService.Set. Co-Authored-By: Claude Opus 5.5 --- cmd/xtcp2/testdata/defineflags-golden.txt | 6 + cmd/xtcp2/testdata/printflags-golden.txt | 6 + cmd/xtcp2/xtcp2.go | 74 + cmd/xtcp2/xtcp2_flags_helpers_test.go | 9 +- cmd/xtcp2/xtcp2_test.go | 69 + gen/cpp/xtcp_config/v1/xtcp_config.pb.cc | 1776 +++++++++-------- gen/cpp/xtcp_config/v1/xtcp_config.pb.h | 1224 +++++++----- gen/dart/xtcp_config/v1/xtcp_config.pb.dart | 520 +++-- .../xtcp_config/v1/xtcp_config.pbjson.dart | 203 +- gen/go/xtcp_config/xtcp_config.pb.go | 152 +- gen/go/xtcp_config/xtcp_config_vtproto.pb.go | 197 ++ .../xtcp_config/v1/xtcp_config.swagger.json | 29 + gen/python/xtcp_config/v1/xtcp_config_pb2.py | 40 +- gen/python/xtcp_config/v1/xtcp_config_pb2.pyi | 16 +- pkg/xtcp/caps_test.go | 39 +- pkg/xtcp/grpc_configService.go | 20 +- proto/xtcp_config/v1/xtcp_config.proto | 56 + 17 files changed, 2841 insertions(+), 1595 deletions(-) diff --git a/cmd/xtcp2/testdata/defineflags-golden.txt b/cmd/xtcp2/testdata/defineflags-golden.txt index 455b7a155..e500b42f0 100644 --- a/cmd/xtcp2/testdata/defineflags-golden.txt +++ b/cmd/xtcp2/testdata/defineflags-golden.txt @@ -28,6 +28,8 @@ hostname hostname stamped on records; defaults to os.Hostname(). Set this in a ioUring false Opt in to io_uring for netlink reads, one multishot recv per socket (Linux 6.1+). Destination writes stay syscalls ioUringCqeBatch 128 io_uring max CQEs reaped per PeekBatchCQE call (1-4096) ioUringRecvBatch 64 io_uring receive buffers per socket, rounded up to a power of two (1-4096). Each holds one packet; with all in use, receiving pauses until they are recycled. +ioUringSockstatBatchSize 64 io_uring: sockstat reads per submit (1-1024). Ignored unless -ioUring. Falls back to IO_URING_SOCKSTAT_BATCH_SIZE env. +ioUringSockstatWorkers 4 io_uring: cap on kernel io-wq workers for sockstat reads (1-64). Ignored unless -ioUring. Falls back to IO_URING_SOCKSTAT_WORKERS env. ipmetaBootstrapPath /share/xtcp2/ipmeta/bootstrap.lookup.parquet.zst optional zstd-compressed lookup artifact baked into the image and used by -enrichAsn before live refresh. Falls back to IPMETA_BOOTSTRAP_PATH env. ipmetaCachePath /var/lib/xtcp2/ipmeta/current.lookup.parquet.zst optional writable zstd-compressed lookup artifact used by -enrichAsn before the image bootstrap and refreshed after successful live reloads. Falls back to IPMETA_CACHE_PATH env. ipv4Ttl 3 outgoing IPv4 TTL for xtcp2's TCP listeners (Prometheus + gRPC); 0 = kernel default. The low default keeps replies from traveling far if the host is internet-exposed; raise it for a distant scraper. Falls back to IPV4_TTL env. @@ -82,7 +84,10 @@ marshal protobufList Marshaling of the exported data (protobufList, protoJson, p maxDumpBytes 268435456 cap on the bytes of one namespace's inet_diag dump per poll; packets past it are drained undecoded and counted in xtcp_dump_dropped_total{reason="bytes"}. 0 = unlimited. Falls back to MAX_DUMP_BYTES env. maxLoops 0 Maximum number of loops, or zero (0) for forever maxNetns 4096 cap on the network namespaces tracked, xtcp2's own included; at the cap new namespaces wait for a freed slot, first come first served, and are counted in xtcp_netns_dropped_total. 0 = unlimited. Falls back to MAX_NETNS env. +maxNetnsAddsPerReconcile 256 cap on namespaces added per reconcile; the rest wait their turn (xtcp_netns_dropped_total{reason="add_rate"}). 0 = no limit. Falls back to MAX_NETNS_ADDS_PER_RECONCILE env. +maxNetnsPerOwner 64 cap on the namespaces one owner (outermost container id) may have tracked; bind-mounted namespaces with no process are exempt (xtcp_netns_dropped_total{reason="owner_quota"}). 0 = no limit. Falls back to MAX_NETNS_PER_OWNER env. maxRecordsPerNetns 262144 cap on the records one namespace contributes per poll; the rest are dropped before decode and counted in xtcp_dump_dropped_total{reason="records"}. 0 = unlimited. Falls back to MAX_RECORDS_PER_NETNS env. +maxRecordsPerPoll 1048576 budget on the records all namespaces contribute per poll, checked before the dump from each namespace's sockstat count; over it, namespaces above their fair share stop asking for TIME_WAIT/SYN_RECV, then are sampled by port range across polls (xtcp_poll_degraded_total). 0 = off. Falls back to MAX_RECORDS_PER_POLL env. maxThreads 2000 cap on Go runtime OS threads (debug.SetMaxThreads); 0 = use Go default 10000 modulus 1 modulus. Report every X inetd messages to output netlinkers 2 decoders per socket that parse netlink dump packets (one receiver reads each socket). increase this if you have many flows @@ -105,6 +110,7 @@ pyroscopeUploadSec 15 Seconds between batched profile uploads to Pyroscope. pyroscopeUrl Pyroscope server URL (e.g. http://127.0.0.1:4040). Empty disables the agent. Falls back to PYROSCOPE_URL env. reconcileBeforePoll true Reconcile namespaces immediately before each poll cycle, so a newly-appeared namespace is entered within ~1 poll interval. Ties discovery cadence to poll cadence. reconcileFrequency 6h0m0s Period of the background namespace-reconcile ticker (Method B /proc scan). With -reconcileBeforePoll carrying discovery this is a rare safety-net expected to find nothing (watch mapReconciler dels/stores in Prometheus); default is long (6h). 0 disables it (startup reconcile still runs once). +reconcileTimeout 1s time budget for one reconcile's namespace scan; a scan cut short adds what it found but deletes nothing (xtcp_reconcile_incomplete_total). 0 = no limit. Falls back to RECONCILE_TIMEOUT env. resolveContainerId false resolve each socket's owning container id from its cgroup into container_id/container_runtime; needs /sys/fs/cgroup readable (mount it + --cgroupns=host in a container). Falls back to CONTAINER_ID_RESOLVE env. s3AccessKey s3parquet: S3 access key. Prefer S3_ACCESS_KEY_FILE (path to a file, mode 0400, holding the key): a flag value shows in ps and docker inspect, warns, and is refused by production builds. Never logged. s3AllowInsecure false s3parquet: allow a plaintext http:// endpoint. The credential and every object cross the network unencrypted; for local test fixtures only. A bare host:port and https:// use TLS. Falls back to S3_ALLOW_INSECURE env. diff --git a/cmd/xtcp2/testdata/printflags-golden.txt b/cmd/xtcp2/testdata/printflags-golden.txt index 3448edf61..360ac781d 100644 --- a/cmd/xtcp2/testdata/printflags-golden.txt +++ b/cmd/xtcp2/testdata/printflags-golden.txt @@ -33,6 +33,12 @@ *maxDumpBytes: 1201 *maxRecordsPerNetns: 1202 *maxNetns: 1203 +*maxRecordsPerPoll: 1204 +*ioUringSockstatBatchSize: 1205 +*ioUringSockstatWorkers: 1206 +*reconcileTimeout: 1.207s +*maxNetnsPerOwner: 1208 +*maxNetnsAddsPerReconcile: 1209 *pyroscopeUrl: pyroscopeUrl-v *pyroscopeAppName: pyroscopeAppName-v *pyroscopeSampleHz: 136 diff --git a/cmd/xtcp2/xtcp2.go b/cmd/xtcp2/xtcp2.go index 23c5e3462..d3a7d63c8 100644 --- a/cmd/xtcp2/xtcp2.go +++ b/cmd/xtcp2/xtcp2.go @@ -143,6 +143,19 @@ const ( maxRecordsPerNetnsCst uint64 = 1 << 18 maxNetnsCst uint = 4096 + // Per-poll record budget across all namespaces (-maxRecordsPerPoll), + // enforced before the dump from each namespace's sockstat count; and the + // io_uring batch / io-wq worker cap for those reads. + maxRecordsPerPollCst uint64 = 1 << 20 + ioUringSockstatBatchSizeCst uint = 64 + ioUringSockstatWorkersCst uint = 4 + + // Reconcile limits: a time budget on the namespace scan, a per-owner + // namespace quota and a cap on adds per reconcile. + reconcileTimeoutCst = 1 * time.Second + maxNetnsPerOwnerCst uint = 64 + maxNetnsAddsPerReconcileCst uint = 256 + // Pyroscope continuous-profiling defaults. Agent disabled when // pyroscopeUrlCst is empty; flip on via -pyroscopeUrl (or // PYROSCOPE_URL env, see environmentOverride). @@ -302,6 +315,13 @@ type mainFlags struct { maxRecordsPerNetns *uint64 maxNetns *uint + maxRecordsPerPoll *uint64 + ioUringSockstatBatchSize *uint + ioUringSockstatWorkers *uint + reconcileTimeout *time.Duration + maxNetnsPerOwner *uint + maxNetnsAddsPerReconcile *uint + dest *string destWriteFiles *uint topic *string @@ -535,6 +555,12 @@ func defineCapFlags(f *mainFlags) { f.maxDumpBytes = flag.Uint64("maxDumpBytes", maxDumpBytesCst, "cap on the bytes of one namespace's inet_diag dump per poll; packets past it are drained undecoded and counted in xtcp_dump_dropped_total{reason=\"bytes\"}. 0 = unlimited. Falls back to MAX_DUMP_BYTES env.") f.maxRecordsPerNetns = flag.Uint64("maxRecordsPerNetns", maxRecordsPerNetnsCst, "cap on the records one namespace contributes per poll; the rest are dropped before decode and counted in xtcp_dump_dropped_total{reason=\"records\"}. 0 = unlimited. Falls back to MAX_RECORDS_PER_NETNS env.") f.maxNetns = flag.Uint("maxNetns", maxNetnsCst, "cap on the network namespaces tracked, xtcp2's own included; at the cap new namespaces wait for a freed slot, first come first served, and are counted in xtcp_netns_dropped_total. 0 = unlimited. Falls back to MAX_NETNS env.") + f.maxRecordsPerPoll = flag.Uint64("maxRecordsPerPoll", maxRecordsPerPollCst, "budget on the records all namespaces contribute per poll, checked before the dump from each namespace's sockstat count; over it, namespaces above their fair share stop asking for TIME_WAIT/SYN_RECV, then are sampled by port range across polls (xtcp_poll_degraded_total). 0 = off. Falls back to MAX_RECORDS_PER_POLL env.") + f.ioUringSockstatBatchSize = flag.Uint("ioUringSockstatBatchSize", ioUringSockstatBatchSizeCst, "io_uring: sockstat reads per submit (1-1024). Ignored unless -ioUring. Falls back to IO_URING_SOCKSTAT_BATCH_SIZE env.") + f.ioUringSockstatWorkers = flag.Uint("ioUringSockstatWorkers", ioUringSockstatWorkersCst, "io_uring: cap on kernel io-wq workers for sockstat reads (1-64). Ignored unless -ioUring. Falls back to IO_URING_SOCKSTAT_WORKERS env.") + f.reconcileTimeout = flag.Duration("reconcileTimeout", reconcileTimeoutCst, "time budget for one reconcile's namespace scan; a scan cut short adds what it found but deletes nothing (xtcp_reconcile_incomplete_total). 0 = no limit. Falls back to RECONCILE_TIMEOUT env.") + f.maxNetnsPerOwner = flag.Uint("maxNetnsPerOwner", maxNetnsPerOwnerCst, "cap on the namespaces one owner (outermost container id) may have tracked; bind-mounted namespaces with no process are exempt (xtcp_netns_dropped_total{reason=\"owner_quota\"}). 0 = no limit. Falls back to MAX_NETNS_PER_OWNER env.") + f.maxNetnsAddsPerReconcile = flag.Uint("maxNetnsAddsPerReconcile", maxNetnsAddsPerReconcileCst, "cap on namespaces added per reconcile; the rest wait their turn (xtcp_netns_dropped_total{reason=\"add_rate\"}). 0 = no limit. Falls back to MAX_NETNS_ADDS_PER_RECONCILE env.") } // defineListenerFlags registers the flags for xtcp2's own inbound listeners: @@ -721,6 +747,12 @@ func printCapFlags(f *mainFlags) { fmt.Println("*maxDumpBytes:", *f.maxDumpBytes) fmt.Println("*maxRecordsPerNetns:", *f.maxRecordsPerNetns) fmt.Println("*maxNetns:", *f.maxNetns) + fmt.Println("*maxRecordsPerPoll:", *f.maxRecordsPerPoll) + fmt.Println("*ioUringSockstatBatchSize:", *f.ioUringSockstatBatchSize) + fmt.Println("*ioUringSockstatWorkers:", *f.ioUringSockstatWorkers) + fmt.Println("*reconcileTimeout:", *f.reconcileTimeout) + fmt.Println("*maxNetnsPerOwner:", *f.maxNetnsPerOwner) + fmt.Println("*maxNetnsAddsPerReconcile:", *f.maxNetnsAddsPerReconcile) } // printListenerAuthFlags prints the shared listener-auth run, listenerAuthMode @@ -840,6 +872,12 @@ func buildConfig(f *mainFlags, des *xtcp_config.EnabledDeserializers) *xtcp_conf MaxDumpBytes: *f.maxDumpBytes, MaxRecordsPerNetns: *f.maxRecordsPerNetns, MaxNetns: uint32(*f.maxNetns), + MaxRecordsPerPoll: *f.maxRecordsPerPoll, + IoUringSockstatBatchSize: uint32(*f.ioUringSockstatBatchSize), + IoUringSockstatWorkers: uint32(*f.ioUringSockstatWorkers), + ReconcileTimeout: durationpb.New(*f.reconcileTimeout), + MaxNetnsPerOwner: uint32(*f.maxNetnsPerOwner), + MaxNetnsAddsPerReconcile: uint32(*f.maxNetnsAddsPerReconcile), PyroscopeUrl: *f.pyroscopeUrl, PyroscopeAppName: *f.pyroscopeAppName, PyroscopeSampleHz: uint32(*f.pyroscopeSampleHz), @@ -2326,6 +2364,36 @@ func envOverrideCaps(c *xtcp_config.XtcpConfig, debugLevel uint) { c.MaxNetns = v logEnv("MAX_NETNS", fmt.Sprintf("c.MaxNetns:%d", v), debugLevel) } + if v, ok := envUint64("MAX_RECORDS_PER_POLL"); ok { + c.MaxRecordsPerPoll = v + logEnv("MAX_RECORDS_PER_POLL", fmt.Sprintf("c.MaxRecordsPerPoll:%d", v), debugLevel) + } + envOverrideReconcileLimits(c, debugLevel) +} + +// envOverrideReconcileLimits applies the sockstat io_uring knobs and the +// reconcile limits; split from envOverrideCaps for funlen. +func envOverrideReconcileLimits(c *xtcp_config.XtcpConfig, debugLevel uint) { + if v, ok := envUint32("IO_URING_SOCKSTAT_BATCH_SIZE"); ok { + c.IoUringSockstatBatchSize = v + logEnv("IO_URING_SOCKSTAT_BATCH_SIZE", fmt.Sprintf("c.IoUringSockstatBatchSize:%d", v), debugLevel) + } + if v, ok := envUint32("IO_URING_SOCKSTAT_WORKERS"); ok { + c.IoUringSockstatWorkers = v + logEnv("IO_URING_SOCKSTAT_WORKERS", fmt.Sprintf("c.IoUringSockstatWorkers:%d", v), debugLevel) + } + if d, ok := envDuration("RECONCILE_TIMEOUT"); ok { + c.ReconcileTimeout = durationpb.New(d) + logEnv("RECONCILE_TIMEOUT", fmt.Sprintf("c.ReconcileTimeout:%s", d), debugLevel) + } + if v, ok := envUint32("MAX_NETNS_PER_OWNER"); ok { + c.MaxNetnsPerOwner = v + logEnv("MAX_NETNS_PER_OWNER", fmt.Sprintf("c.MaxNetnsPerOwner:%d", v), debugLevel) + } + if v, ok := envUint32("MAX_NETNS_ADDS_PER_RECONCILE"); ok { + c.MaxNetnsAddsPerReconcile = v + logEnv("MAX_NETNS_ADDS_PER_RECONCILE", fmt.Sprintf("c.MaxNetnsAddsPerReconcile:%d", v), debugLevel) + } } // printConfigCaps prints the three tenant caps for printConfig. @@ -2333,4 +2401,10 @@ func printConfigCaps(c *xtcp_config.XtcpConfig) { fmt.Println("c.MaxDumpBytes:", c.MaxDumpBytes) fmt.Println("c.MaxRecordsPerNetns:", c.MaxRecordsPerNetns) fmt.Println("c.MaxNetns:", c.MaxNetns) + fmt.Println("c.MaxRecordsPerPoll:", c.MaxRecordsPerPoll) + fmt.Println("c.IoUringSockstatBatchSize:", c.IoUringSockstatBatchSize) + fmt.Println("c.IoUringSockstatWorkers:", c.IoUringSockstatWorkers) + fmt.Println("c.ReconcileTimeout:", c.ReconcileTimeout.AsDuration()) + fmt.Println("c.MaxNetnsPerOwner:", c.MaxNetnsPerOwner) + fmt.Println("c.MaxNetnsAddsPerReconcile:", c.MaxNetnsAddsPerReconcile) } diff --git a/cmd/xtcp2/xtcp2_flags_helpers_test.go b/cmd/xtcp2/xtcp2_flags_helpers_test.go index c54f4ecee..5f9f21e89 100644 --- a/cmd/xtcp2/xtcp2_flags_helpers_test.go +++ b/cmd/xtcp2/xtcp2_flags_helpers_test.go @@ -89,7 +89,7 @@ const ( // mainFlags field must be a registered flag and every registered flag must // have a field. A flag added without a field, or a field that stops being // registered, is the drift this file exists to notice. - mainFlagsFieldCountCst = 131 + mainFlagsFieldCountCst = 137 printFlagsGoldenCst = "testdata/printflags-golden.txt" defineFlagsGoldenCst = "testdata/defineflags-golden.txt" @@ -196,6 +196,13 @@ func populatedMainFlags() *mainFlags { maxRecordsPerNetns: u64(1202), maxNetns: u(1203), + maxRecordsPerPoll: u64(1204), + ioUringSockstatBatchSize: u(1205), + ioUringSockstatWorkers: u(1206), + reconcileTimeout: ms(1207), + maxNetnsPerOwner: u(1208), + maxNetnsAddsPerReconcile: u(1209), + dest: s("dest-v"), destWriteFiles: u(121), topic: s("topic-v"), diff --git a/cmd/xtcp2/xtcp2_test.go b/cmd/xtcp2/xtcp2_test.go index ba14adf6a..43dbbcd34 100644 --- a/cmd/xtcp2/xtcp2_test.go +++ b/cmd/xtcp2/xtcp2_test.go @@ -1053,6 +1053,12 @@ func TestPrintFlags(t *testing.T) { f.maxDumpBytes = &n64 f.maxRecordsPerNetns = &n64 f.maxNetns = &n + f.maxRecordsPerPoll = &n64 + f.ioUringSockstatBatchSize = &n + f.ioUringSockstatWorkers = &n + f.reconcileTimeout = &d + f.maxNetnsPerOwner = &n + f.maxNetnsAddsPerReconcile = &n f.pyroscopeUrl = &s f.pyroscopeAppName = &s f.pyroscopeSampleHz = &n @@ -1277,6 +1283,12 @@ func TestBuildConfig(t *testing.T) { maxDumpBytes: &nl, maxRecordsPerNetns: &nl, maxNetns: &wf, + maxRecordsPerPoll: &nl, + ioUringSockstatBatchSize: &wf, + ioUringSockstatWorkers: &wf, + reconcileTimeout: &rf, + maxNetnsPerOwner: &wf, + maxNetnsAddsPerReconcile: &wf, pyroscopeUrl: &mar, pyroscopeAppName: &mar, pyroscopeSampleHz: &wf, @@ -1825,6 +1837,63 @@ func TestRunMainRejectsPositional(t *testing.T) { } } +// TestEnvOverrideReconcileLimits: the FP-5 gate and reconcile-limit env vars +// override their flags (0 included); unset or unparsable keeps the flag value. +func TestEnvOverrideReconcileLimits(t *testing.T) { + type got struct { + perPoll uint64 + batch, workers, owner, adds uint32 + timeout time.Duration + } + flagCfg := func() *xtcp_config.XtcpConfig { + return &xtcp_config.XtcpConfig{ + MaxRecordsPerPoll: maxRecordsPerPollCst, + IoUringSockstatBatchSize: uint32(ioUringSockstatBatchSizeCst), + IoUringSockstatWorkers: uint32(ioUringSockstatWorkersCst), + ReconcileTimeout: durationpb.New(reconcileTimeoutCst), + MaxNetnsPerOwner: uint32(maxNetnsPerOwnerCst), + MaxNetnsAddsPerReconcile: uint32(maxNetnsAddsPerReconcileCst), + } + } + defaults := got{1 << 20, 64, 4, 64, 256, time.Second} + tests := []struct { + name string + category string + description string + env map[string]string + expected got + }{ + {name: "defaults", category: "P", description: "no env keeps the flag defaults", expected: defaults}, + {name: "env_set", category: "P", description: "each env var overrides its flag", + env: map[string]string{"MAX_RECORDS_PER_POLL": "200000", "IO_URING_SOCKSTAT_BATCH_SIZE": "128", + "IO_URING_SOCKSTAT_WORKERS": "8", "MAX_NETNS_PER_OWNER": "10", "MAX_NETNS_ADDS_PER_RECONCILE": "32", + "RECONCILE_TIMEOUT": "250ms"}, + expected: got{200000, 128, 8, 10, 32, 250 * time.Millisecond}}, + {name: "env_zero", category: "B", description: "0 turns the gate, quota, add rate and timeout off", + env: map[string]string{"MAX_RECORDS_PER_POLL": "0", "MAX_NETNS_PER_OWNER": "0", + "MAX_NETNS_ADDS_PER_RECONCILE": "0", "RECONCILE_TIMEOUT": "0s"}, + expected: got{0, 64, 4, 0, 0, 0}}, + {name: "env_invalid", category: "N", description: "unparsable values keep the flag defaults", + env: map[string]string{"MAX_RECORDS_PER_POLL": "lots", "IO_URING_SOCKSTAT_BATCH_SIZE": "-1", + "MAX_NETNS_PER_OWNER": "4294967296", "RECONCILE_TIMEOUT": "soon"}, + expected: defaults}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + for k, v := range tc.env { + t.Setenv(k, v) + } + c := flagCfg() + envOverrideCaps(c, 0) + g := got{c.MaxRecordsPerPoll, c.IoUringSockstatBatchSize, c.IoUringSockstatWorkers, + c.MaxNetnsPerOwner, c.MaxNetnsAddsPerReconcile, c.ReconcileTimeout.AsDuration()} + if g != tc.expected { + t.Errorf("%s: got %+v, expected %+v", tc.description, g, tc.expected) + } + }) + } +} + // TestEnvOverrideCaps: MAX_DUMP_BYTES, MAX_RECORDS_PER_NETNS and MAX_NETNS // override the flag values, 0 included (it turns a cap off); unset or // unparsable leaves the flag value. diff --git a/gen/cpp/xtcp_config/v1/xtcp_config.pb.cc b/gen/cpp/xtcp_config/v1/xtcp_config.pb.cc index 21d788df6..a6c10608b 100644 --- a/gen/cpp/xtcp_config/v1/xtcp_config.pb.cc +++ b/gen/cpp/xtcp_config/v1/xtcp_config.pb.cc @@ -2548,10 +2548,10 @@ constexpr XtcpConfig::ParseTableT_ XtcpConfig::InternalGenerateParseTable_(const 0, // no _extensions_ 250, 248, // max_field_number, fast_idx_mask offsetof(ParseTableT_, field_lookup_table), - 4227858943, // skipmap + 3758096895, // skipmap offsetof(ParseTableT_, field_entries), - 86, // num_field_entries - 15, // num_aux_entries + 92, // num_field_entries + 16, // num_aux_entries offsetof(ParseTableT_, aux_entries), class_data, nullptr, // post_loop_handler @@ -2571,64 +2571,64 @@ constexpr XtcpConfig::ParseTableT_ XtcpConfig::InternalGenerateParseTable_(const {::_pbi::TcParser::MiniParse, {}}, {::_pbi::TcParser::MiniParse, {}}, // uint64 nl_timeout_milliseconds = 10 [json_name = "nlTimeoutMilliseconds", (.buf.validate.field) = { - {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(XtcpConfig, _impl_.nl_timeout_milliseconds_), 7>(), - {80, 7, 0, + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(XtcpConfig, _impl_.nl_timeout_milliseconds_), 5>(), + {80, 5, 0, PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.nl_timeout_milliseconds_)}}, // .google.protobuf.Duration poll_frequency = 11 [json_name = "pollFrequency", (.buf.validate.field) = { {::_pbi::TcParser::FastMtS1, - {90, 4, 0, + {90, 2, 0, PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.poll_frequency_)}}, // .google.protobuf.Duration poll_timeout = 12 [json_name = "pollTimeout", (.buf.validate.field) = { {::_pbi::TcParser::FastMtS1, - {98, 5, 1, + {98, 3, 1, PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.poll_timeout_)}}, // uint32 poll_jitter_pct = 13 [json_name = "pollJitterPct", (.buf.validate.field) = { - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(XtcpConfig, _impl_.poll_jitter_pct_), 9>(), - {104, 9, 0, + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(XtcpConfig, _impl_.poll_jitter_pct_), 7>(), + {104, 7, 0, PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.poll_jitter_pct_)}}, // uint64 max_loops = 14 [json_name = "maxLoops", (.buf.validate.field) = { - {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(XtcpConfig, _impl_.max_loops_), 8>(), - {112, 8, 0, + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(XtcpConfig, _impl_.max_loops_), 6>(), + {112, 6, 0, PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.max_loops_)}}, // uint32 netlinkers = 15 [json_name = "netlinkers", (.buf.validate.field) = { - {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(XtcpConfig, _impl_.netlinkers_), 10>(), - {120, 10, 0, + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(XtcpConfig, _impl_.netlinkers_), 8>(), + {120, 8, 0, PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.netlinkers_)}}, // uint32 netlinkers_done_chan_size = 16 [json_name = "netlinkersDoneChanSize", (.buf.validate.field) = { {::_pbi::TcParser::FastV32S2, - {384, 11, 0, + {384, 9, 0, PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.netlinkers_done_chan_size_)}}, // uint32 nlmsg_seq = 17 [json_name = "nlmsgSeq", (.buf.validate.field) = { {::_pbi::TcParser::FastV32S2, - {392, 12, 0, + {392, 10, 0, PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.nlmsg_seq_)}}, // uint64 packet_size = 18 [json_name = "packetSize", (.buf.validate.field) = { {::_pbi::TcParser::FastV64S2, - {400, 13, 0, + {400, 11, 0, PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.packet_size_)}}, // uint32 packet_size_mply = 19 [json_name = "packetSizeMply", (.buf.validate.field) = { {::_pbi::TcParser::FastV32S2, - {408, 15, 0, + {408, 13, 0, PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.packet_size_mply_)}}, // uint64 modulus = 20 [json_name = "modulus", (.buf.validate.field) = { {::_pbi::TcParser::FastV64S2, - {416, 14, 0, + {416, 12, 0, PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.modulus_)}}, // .xtcp_config.v1.EnabledDeserializers enabled_deserializers = 21 [json_name = "enabledDeserializers", (.buf.validate.field) = { {::_pbi::TcParser::FastMtS2, - {426, 6, 2, + {426, 4, 2, PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enabled_deserializers_)}}, // bool io_uring = 22 [json_name = "ioUring", (.buf.validate.field) = { {::_pbi::TcParser::FastV8S2, - {432, 20, 0, + {432, 14, 0, PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.io_uring_)}}, // uint32 io_uring_recv_batch_size = 23 [json_name = "ioUringRecvBatchSize", (.buf.validate.field) = { {::_pbi::TcParser::FastV32S2, - {440, 16, 0, + {440, 15, 0, PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.io_uring_recv_batch_size_)}}, // uint32 io_uring_cqe_batch_size = 24 [json_name = "ioUringCqeBatchSize", (.buf.validate.field) = { {::_pbi::TcParser::FastV32S2, - {448, 19, 0, + {448, 16, 0, PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.io_uring_cqe_batch_size_)}}, // uint64 max_dump_bytes = 25 [json_name = "maxDumpBytes", (.buf.validate.field) = { {::_pbi::TcParser::FastV64S2, @@ -2638,216 +2638,228 @@ constexpr XtcpConfig::ParseTableT_ XtcpConfig::InternalGenerateParseTable_(const {::_pbi::TcParser::FastV64S2, {464, 18, 0, PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.max_records_per_netns_)}}, - // bool s3_allow_insecure = 107 [json_name = "s3AllowInsecure", (.buf.validate.field) = { - {::_pbi::TcParser::FastV8S2, - {1752, 21, 0, - PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_allow_insecure_)}}, - // string dest = 60 [json_name = "dest", (.buf.validate.field) = { - {::_pbi::TcParser::FastUS2, - {994, 0, 0, - PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.dest_)}}, - // string marshal_to = 61 [json_name = "marshalTo", (.buf.validate.field) = { - {::_pbi::TcParser::FastUS2, - {1002, 1, 0, - PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.marshal_to_)}}, + // uint64 max_records_per_poll = 27 [json_name = "maxRecordsPerPoll", (.buf.validate.field) = { + {::_pbi::TcParser::FastV64S2, + {472, 19, 0, + PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.max_records_per_poll_)}}, + // uint32 io_uring_sockstat_batch_size = 28 [json_name = "ioUringSockstatBatchSize", (.buf.validate.field) = { + {::_pbi::TcParser::FastV32S2, + {480, 20, 0, + PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.io_uring_sockstat_batch_size_)}}, + // uint32 io_uring_sockstat_workers = 29 [json_name = "ioUringSockstatWorkers", (.buf.validate.field) = { + {::_pbi::TcParser::FastV32S2, + {488, 21, 0, + PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.io_uring_sockstat_workers_)}}, // string csv_columns = 62 [json_name = "csvColumns", (.buf.validate.field) = { {::_pbi::TcParser::FastUS2, - {1010, 2, 0, + {1010, 0, 0, PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.csv_columns_)}}, // string xtcp_proto_file = 63 [json_name = "xtcpProtoFile", (.buf.validate.field) = { {::_pbi::TcParser::FastUS2, - {1018, 3, 0, + {1018, 1, 0, PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.xtcp_proto_file_)}}, }}, {{ 40, 0, 14, - 33784, 17, - 64527, 25, - 61695, 31, - 4095, 35, - 61472, 39, - 33791, 50, - 16383, 55, - 63736, 57, - 65475, 63, - 65535, 67, - 58360, 67, - 49039, 73, - 255, 77, - 65531, 85, + 33728, 20, + 64527, 31, + 61695, 37, + 4095, 41, + 61472, 45, + 33791, 56, + 16383, 61, + 63736, 63, + 65475, 69, + 65535, 73, + 58360, 73, + 49039, 79, + 255, 83, + 65531, 91, 65535, 65535 }}, {{ // uint64 nl_timeout_milliseconds = 10 [json_name = "nlTimeoutMilliseconds", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.nl_timeout_milliseconds_), _Internal::kHasBitsOffset + 7, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.nl_timeout_milliseconds_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, // .google.protobuf.Duration poll_frequency = 11 [json_name = "pollFrequency", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.poll_frequency_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.poll_frequency_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // .google.protobuf.Duration poll_timeout = 12 [json_name = "pollTimeout", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.poll_timeout_), _Internal::kHasBitsOffset + 5, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.poll_timeout_), _Internal::kHasBitsOffset + 3, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // uint32 poll_jitter_pct = 13 [json_name = "pollJitterPct", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.poll_jitter_pct_), _Internal::kHasBitsOffset + 9, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.poll_jitter_pct_), _Internal::kHasBitsOffset + 7, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // uint64 max_loops = 14 [json_name = "maxLoops", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.max_loops_), _Internal::kHasBitsOffset + 8, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.max_loops_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, // uint32 netlinkers = 15 [json_name = "netlinkers", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.netlinkers_), _Internal::kHasBitsOffset + 10, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.netlinkers_), _Internal::kHasBitsOffset + 8, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // uint32 netlinkers_done_chan_size = 16 [json_name = "netlinkersDoneChanSize", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.netlinkers_done_chan_size_), _Internal::kHasBitsOffset + 11, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.netlinkers_done_chan_size_), _Internal::kHasBitsOffset + 9, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // uint32 nlmsg_seq = 17 [json_name = "nlmsgSeq", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.nlmsg_seq_), _Internal::kHasBitsOffset + 12, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.nlmsg_seq_), _Internal::kHasBitsOffset + 10, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // uint64 packet_size = 18 [json_name = "packetSize", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.packet_size_), _Internal::kHasBitsOffset + 13, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.packet_size_), _Internal::kHasBitsOffset + 11, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, // uint32 packet_size_mply = 19 [json_name = "packetSizeMply", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.packet_size_mply_), _Internal::kHasBitsOffset + 15, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.packet_size_mply_), _Internal::kHasBitsOffset + 13, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // uint64 modulus = 20 [json_name = "modulus", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.modulus_), _Internal::kHasBitsOffset + 14, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.modulus_), _Internal::kHasBitsOffset + 12, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, // .xtcp_config.v1.EnabledDeserializers enabled_deserializers = 21 [json_name = "enabledDeserializers", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enabled_deserializers_), _Internal::kHasBitsOffset + 6, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enabled_deserializers_), _Internal::kHasBitsOffset + 4, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // bool io_uring = 22 [json_name = "ioUring", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.io_uring_), _Internal::kHasBitsOffset + 20, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.io_uring_), _Internal::kHasBitsOffset + 14, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // uint32 io_uring_recv_batch_size = 23 [json_name = "ioUringRecvBatchSize", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.io_uring_recv_batch_size_), _Internal::kHasBitsOffset + 16, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.io_uring_recv_batch_size_), _Internal::kHasBitsOffset + 15, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // uint32 io_uring_cqe_batch_size = 24 [json_name = "ioUringCqeBatchSize", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.io_uring_cqe_batch_size_), _Internal::kHasBitsOffset + 19, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.io_uring_cqe_batch_size_), _Internal::kHasBitsOffset + 16, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // uint64 max_dump_bytes = 25 [json_name = "maxDumpBytes", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.max_dump_bytes_), _Internal::kHasBitsOffset + 17, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, // uint64 max_records_per_netns = 26 [json_name = "maxRecordsPerNetns", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.max_records_per_netns_), _Internal::kHasBitsOffset + 18, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // uint64 max_records_per_poll = 27 [json_name = "maxRecordsPerPoll", (.buf.validate.field) = { + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.max_records_per_poll_), _Internal::kHasBitsOffset + 19, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt64)}, + // uint32 io_uring_sockstat_batch_size = 28 [json_name = "ioUringSockstatBatchSize", (.buf.validate.field) = { + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.io_uring_sockstat_batch_size_), _Internal::kHasBitsOffset + 20, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 io_uring_sockstat_workers = 29 [json_name = "ioUringSockstatWorkers", (.buf.validate.field) = { + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.io_uring_sockstat_workers_), _Internal::kHasBitsOffset + 21, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // .google.protobuf.Duration reconcile_frequency = 40 [json_name = "reconcileFrequency", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.reconcile_frequency_), _Internal::kHasBitsOffset + 48, 3, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.reconcile_frequency_), _Internal::kHasBitsOffset + 50, 3, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // bool reconcile_before_poll = 41 [json_name = "reconcileBeforePoll"]; - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.reconcile_before_poll_), _Internal::kHasBitsOffset + 65, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.reconcile_before_poll_), _Internal::kHasBitsOffset + 70, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // uint32 max_netns = 42 [json_name = "maxNetns", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.max_netns_), _Internal::kHasBitsOffset + 59, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.max_netns_), _Internal::kHasBitsOffset + 62, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // .google.protobuf.Duration reconcile_timeout = 43 [json_name = "reconcileTimeout", (.buf.validate.field) = { + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.reconcile_timeout_), _Internal::kHasBitsOffset + 51, 4, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // uint32 max_netns_per_owner = 44 [json_name = "maxNetnsPerOwner", (.buf.validate.field) = { + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.max_netns_per_owner_), _Internal::kHasBitsOffset + 63, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + // uint32 max_netns_adds_per_reconcile = 45 [json_name = "maxNetnsAddsPerReconcile", (.buf.validate.field) = { + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.max_netns_adds_per_reconcile_), _Internal::kHasBitsOffset + 64, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // uint32 write_files = 50 [json_name = "writeFiles", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.write_files_), _Internal::kHasBitsOffset + 60, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.write_files_), _Internal::kHasBitsOffset + 65, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // string capture_path = 51 [json_name = "capturePath", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.capture_path_), _Internal::kHasBitsOffset + 24, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // uint32 dest_write_files = 52 [json_name = "destWriteFiles", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.dest_write_files_), _Internal::kHasBitsOffset + 61, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.dest_write_files_), _Internal::kHasBitsOffset + 66, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // uint32 debug_level = 53 [json_name = "debugLevel", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.debug_level_), _Internal::kHasBitsOffset + 62, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.debug_level_), _Internal::kHasBitsOffset + 67, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // bool debug_prometheus = 54 [json_name = "debugPrometheus", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.debug_prometheus_), _Internal::kHasBitsOffset + 66, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.debug_prometheus_), _Internal::kHasBitsOffset + 71, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // string dest = 60 [json_name = "dest", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.dest_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.dest_), _Internal::kHasBitsOffset + 25, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string marshal_to = 61 [json_name = "marshalTo", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.marshal_to_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.marshal_to_), _Internal::kHasBitsOffset + 26, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string csv_columns = 62 [json_name = "csvColumns", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.csv_columns_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.csv_columns_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string xtcp_proto_file = 63 [json_name = "xtcpProtoFile", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.xtcp_proto_file_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.xtcp_proto_file_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // uint32 envelope_flush_threshold_bytes = 64 [json_name = "envelopeFlushThresholdBytes", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.envelope_flush_threshold_bytes_), _Internal::kHasBitsOffset + 63, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.envelope_flush_threshold_bytes_), _Internal::kHasBitsOffset + 68, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // uint32 envelope_flush_threshold_rows = 65 [json_name = "envelopeFlushThresholdRows", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.envelope_flush_threshold_rows_), _Internal::kHasBitsOffset + 64, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.envelope_flush_threshold_rows_), _Internal::kHasBitsOffset + 69, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // string topic = 80 [json_name = "topic", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.topic_), _Internal::kHasBitsOffset + 25, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.topic_), _Internal::kHasBitsOffset + 27, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string kafka_schema_url = 81 [json_name = "kafkaSchemaUrl", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.kafka_schema_url_), _Internal::kHasBitsOffset + 26, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.kafka_schema_url_), _Internal::kHasBitsOffset + 28, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // .google.protobuf.Duration kafka_produce_timeout = 82 [json_name = "kafkaProduceTimeout", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.kafka_produce_timeout_), _Internal::kHasBitsOffset + 49, 4, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.kafka_produce_timeout_), _Internal::kHasBitsOffset + 52, 5, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // string kafka_compression = 83 [json_name = "kafkaCompression", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.kafka_compression_), _Internal::kHasBitsOffset + 27, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.kafka_compression_), _Internal::kHasBitsOffset + 29, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string s3_endpoint = 100 [json_name = "s3Endpoint", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_endpoint_), _Internal::kHasBitsOffset + 28, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_endpoint_), _Internal::kHasBitsOffset + 30, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string s3_region = 101 [json_name = "s3Region", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_region_), _Internal::kHasBitsOffset + 29, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_region_), _Internal::kHasBitsOffset + 31, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string s3_bucket = 102 [json_name = "s3Bucket", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_bucket_), _Internal::kHasBitsOffset + 30, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_bucket_), _Internal::kHasBitsOffset + 32, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string s3_prefix = 103 [json_name = "s3Prefix", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_prefix_), _Internal::kHasBitsOffset + 31, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_prefix_), _Internal::kHasBitsOffset + 33, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string s3_access_key = 104 [json_name = "s3AccessKey", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_access_key_), _Internal::kHasBitsOffset + 32, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_access_key_), _Internal::kHasBitsOffset + 34, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string s3_secret_key = 105 [json_name = "s3SecretKey", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_secret_key_), _Internal::kHasBitsOffset + 33, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_secret_key_), _Internal::kHasBitsOffset + 35, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // bool s3_skip_bucket_probe = 106 [json_name = "s3SkipBucketProbe", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_skip_bucket_probe_), _Internal::kHasBitsOffset + 67, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_skip_bucket_probe_), _Internal::kHasBitsOffset + 72, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // bool s3_allow_insecure = 107 [json_name = "s3AllowInsecure", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_allow_insecure_), _Internal::kHasBitsOffset + 21, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_allow_insecure_), _Internal::kHasBitsOffset + 73, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // string s3_ca_file = 108 [json_name = "s3CaFile", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_ca_file_), _Internal::kHasBitsOffset + 34, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_ca_file_), _Internal::kHasBitsOffset + 36, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // uint32 s3_parquet_flush_threshold_bytes = 110 [json_name = "s3ParquetFlushThresholdBytes", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_parquet_flush_threshold_bytes_), _Internal::kHasBitsOffset + 69, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_parquet_flush_threshold_bytes_), _Internal::kHasBitsOffset + 74, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // .google.protobuf.Duration s3_flush_interval = 111 [json_name = "s3FlushInterval", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_flush_interval_), _Internal::kHasBitsOffset + 50, 5, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_flush_interval_), _Internal::kHasBitsOffset + 53, 6, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // uint32 s3_flush_jitter_pct = 112 [json_name = "s3FlushJitterPct", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_flush_jitter_pct_), _Internal::kHasBitsOffset + 70, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_flush_jitter_pct_), _Internal::kHasBitsOffset + 75, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // uint32 s3_flush_threshold_jitter_pct = 113 [json_name = "s3FlushThresholdJitterPct", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_flush_threshold_jitter_pct_), _Internal::kHasBitsOffset + 71, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_flush_threshold_jitter_pct_), _Internal::kHasBitsOffset + 76, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // uint32 s3_upload_max_attempts = 114 [json_name = "s3UploadMaxAttempts", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_upload_max_attempts_), _Internal::kHasBitsOffset + 72, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_upload_max_attempts_), _Internal::kHasBitsOffset + 77, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // .google.protobuf.Duration s3_upload_backoff_cap = 115 [json_name = "s3UploadBackoffCap", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_upload_backoff_cap_), _Internal::kHasBitsOffset + 51, 6, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_upload_backoff_cap_), _Internal::kHasBitsOffset + 54, 7, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // string hostname = 130 [json_name = "hostname", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.hostname_), _Internal::kHasBitsOffset + 35, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.hostname_), _Internal::kHasBitsOffset + 37, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string location = 131 [json_name = "location", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.location_), _Internal::kHasBitsOffset + 36, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.location_), _Internal::kHasBitsOffset + 38, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string label = 132 [json_name = "label", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.label_), _Internal::kHasBitsOffset + 37, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.label_), _Internal::kHasBitsOffset + 39, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string tag = 133 [json_name = "tag", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.tag_), _Internal::kHasBitsOffset + 38, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.tag_), _Internal::kHasBitsOffset + 40, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string daemon_version = 134 [json_name = "daemonVersion", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.daemon_version_), _Internal::kHasBitsOffset + 39, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.daemon_version_), _Internal::kHasBitsOffset + 41, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // uint32 ipv4_ttl = 150 [json_name = "ipv4Ttl", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.ipv4_ttl_), _Internal::kHasBitsOffset + 73, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.ipv4_ttl_), _Internal::kHasBitsOffset + 78, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // uint32 ipv6_hop_limit = 151 [json_name = "ipv6HopLimit", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.ipv6_hop_limit_), _Internal::kHasBitsOffset + 74, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.ipv6_hop_limit_), _Internal::kHasBitsOffset + 79, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // .xtcp_config.v1.ListenerAuth listener_auth = 152 [json_name = "listenerAuth", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.listener_auth_), _Internal::kHasBitsOffset + 52, 7, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.listener_auth_), _Internal::kHasBitsOffset + 55, 8, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // .xtcp_config.v1.ListenerEndpoint prometheus_listener = 153 [json_name = "prometheusListener", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.prometheus_listener_), _Internal::kHasBitsOffset + 53, 8, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.prometheus_listener_), _Internal::kHasBitsOffset + 56, 9, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // .xtcp_config.v1.ListenerAuth admin_listener_auth = 154 [json_name = "adminListenerAuth", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.admin_listener_auth_), _Internal::kHasBitsOffset + 54, 9, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.admin_listener_auth_), _Internal::kHasBitsOffset + 57, 10, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // uint32 grpc_port = 160 [json_name = "grpcPort", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.grpc_port_), _Internal::kHasBitsOffset + 75, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.grpc_port_), _Internal::kHasBitsOffset + 80, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // .xtcp_config.v1.ListenerEndpoint grpc_listener = 161 [json_name = "grpcListener", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.grpc_listener_), _Internal::kHasBitsOffset + 55, 10, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.grpc_listener_), _Internal::kHasBitsOffset + 58, 11, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // repeated .xtcp_config.v1.Listener listeners = 162 [json_name = "listeners", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.listeners_), _Internal::kHasBitsOffset + 22, 11, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.listeners_), _Internal::kHasBitsOffset + 22, 12, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, // string pyroscope_url = 170 [json_name = "pyroscopeUrl", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.pyroscope_url_), _Internal::kHasBitsOffset + 40, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.pyroscope_url_), _Internal::kHasBitsOffset + 42, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string pyroscope_app_name = 171 [json_name = "pyroscopeAppName", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.pyroscope_app_name_), _Internal::kHasBitsOffset + 41, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.pyroscope_app_name_), _Internal::kHasBitsOffset + 43, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // uint32 pyroscope_sample_hz = 172 [json_name = "pyroscopeSampleHz", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.pyroscope_sample_hz_), _Internal::kHasBitsOffset + 76, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.pyroscope_sample_hz_), _Internal::kHasBitsOffset + 81, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // uint32 pyroscope_upload_interval_sec = 173 [json_name = "pyroscopeUploadIntervalSec", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.pyroscope_upload_interval_sec_), _Internal::kHasBitsOffset + 77, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.pyroscope_upload_interval_sec_), _Internal::kHasBitsOffset + 82, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // bool resolve_container_id = 200 [json_name = "resolveContainerId", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.resolve_container_id_), _Internal::kHasBitsOffset + 68, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.resolve_container_id_), _Internal::kHasBitsOffset + 83, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // bool enrich_container_enable = 201 [json_name = "enrichContainerEnable"]; - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enrich_container_enable_), _Internal::kHasBitsOffset + 78, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enrich_container_enable_), _Internal::kHasBitsOffset + 84, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // string docker_socket_path = 202 [json_name = "dockerSocketPath", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.docker_socket_path_), _Internal::kHasBitsOffset + 42, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.docker_socket_path_), _Internal::kHasBitsOffset + 44, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // bool enrich_lldp_enable = 210 [json_name = "enrichLldpEnable"]; - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enrich_lldp_enable_), _Internal::kHasBitsOffset + 79, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enrich_lldp_enable_), _Internal::kHasBitsOffset + 85, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // string lldpd_socket_path = 211 [json_name = "lldpdSocketPath", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.lldpd_socket_path_), _Internal::kHasBitsOffset + 43, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.lldpd_socket_path_), _Internal::kHasBitsOffset + 45, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string lldpd_version_hint = 212 [json_name = "lldpdVersionHint", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.lldpd_version_hint_), _Internal::kHasBitsOffset + 44, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.lldpd_version_hint_), _Internal::kHasBitsOffset + 46, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // bool enrich_nic_enable = 220 [json_name = "enrichNicEnable"]; - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enrich_nic_enable_), _Internal::kHasBitsOffset + 80, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enrich_nic_enable_), _Internal::kHasBitsOffset + 86, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // uint32 uplink_count = 221 [json_name = "uplinkCount", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.uplink_count_), _Internal::kHasBitsOffset + 82, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.uplink_count_), _Internal::kHasBitsOffset + 87, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)}, // repeated string uplink_interfaces = 222 [json_name = "uplinkInterfaces", (.buf.validate.field) = { {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.uplink_interfaces_), _Internal::kHasBitsOffset + 23, 0, (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)}, // bool populate_nsid = 230 [json_name = "populateNsid"]; - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.populate_nsid_), _Internal::kHasBitsOffset + 81, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.populate_nsid_), _Internal::kHasBitsOffset + 88, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // bool enrich_asn_enable = 240 [json_name = "enrichAsnEnable"]; - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enrich_asn_enable_), _Internal::kHasBitsOffset + 83, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enrich_asn_enable_), _Internal::kHasBitsOffset + 89, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // string asn_db_path = 241 [json_name = "asnDbPath", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.asn_db_path_), _Internal::kHasBitsOffset + 45, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.asn_db_path_), _Internal::kHasBitsOffset + 47, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // .google.protobuf.Duration asn_refresh_interval = 242 [json_name = "asnRefreshInterval"]; - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.asn_refresh_interval_), _Internal::kHasBitsOffset + 56, 12, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.asn_refresh_interval_), _Internal::kHasBitsOffset + 59, 13, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // string ipmeta_bootstrap_path = 243 [json_name = "ipmetaBootstrapPath", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.ipmeta_bootstrap_path_), _Internal::kHasBitsOffset + 46, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.ipmeta_bootstrap_path_), _Internal::kHasBitsOffset + 48, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // string ipmeta_cache_path = 244 [json_name = "ipmetaCachePath", (.buf.validate.field) = { - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.ipmeta_cache_path_), _Internal::kHasBitsOffset + 47, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.ipmeta_cache_path_), _Internal::kHasBitsOffset + 49, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, // bool enrich_locality_enable = 245 [json_name = "enrichLocalityEnable"]; - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enrich_locality_enable_), _Internal::kHasBitsOffset + 84, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.enrich_locality_enable_), _Internal::kHasBitsOffset + 90, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // .google.protobuf.Duration locality_refresh_interval = 246 [json_name = "localityRefreshInterval"]; - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.locality_refresh_interval_), _Internal::kHasBitsOffset + 57, 13, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.locality_refresh_interval_), _Internal::kHasBitsOffset + 60, 14, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, // bool locality_events_enable = 247 [json_name = "localityEventsEnable"]; - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.locality_events_enable_), _Internal::kHasBitsOffset + 85, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.locality_events_enable_), _Internal::kHasBitsOffset + 91, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)}, // .xtcp_config.v1.LinkMonitorConfig link_monitor = 250 [json_name = "linkMonitor"]; - {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.link_monitor_), _Internal::kHasBitsOffset + 58, 14, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + {PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.link_monitor_), _Internal::kHasBitsOffset + 61, 15, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, }}, {{ #ifndef PROTOBUF_MESSAGE_GLOBALS @@ -2886,6 +2898,11 @@ constexpr XtcpConfig::ParseTableT_ XtcpConfig::InternalGenerateParseTable_(const {::_pbi::FieldAuxMessageGlobals(), &::google::protobuf::Duration_globals_}, #endif #ifndef PROTOBUF_MESSAGE_GLOBALS + {::_pbi::TcParser::GetTable<::google::protobuf::Duration>()}, + #else + {::_pbi::FieldAuxMessageGlobals(), &::google::protobuf::Duration_globals_}, + #endif + #ifndef PROTOBUF_MESSAGE_GLOBALS {::_pbi::TcParser::GetTable<::xtcp_config::v1::ListenerAuth>()}, #else {::_pbi::FieldAuxMessageGlobals(), &::xtcp_config::v1::ListenerAuth_globals_}, @@ -2927,7 +2944,7 @@ constexpr XtcpConfig::ParseTableT_ XtcpConfig::InternalGenerateParseTable_(const #endif }}, {{ - "\31\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\14\0\0\0\4\12\13\17\0\0\5\20\0\21\13\11\11\11\15\15\0\0\12\0\0\0\0\0\0\10\10\5\3\16\0\0\0\0\0\0\0\0\15\22\0\0\0\0\22\0\21\22\0\0\21\0\0\13\0\25\21\0\0\0\0\0" + "\31\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\14\0\0\0\4\12\13\17\0\0\5\20\0\21\13\11\11\11\15\15\0\0\12\0\0\0\0\0\0\10\10\5\3\16\0\0\0\0\0\0\0\0\15\22\0\0\0\0\22\0\21\22\0\0\21\0\0\13\0\25\21\0\0\0\0\0\0\0" "xtcp_config.v1.XtcpConfig" "capture_path" "dest" @@ -2966,13 +2983,7 @@ constexpr XtcpConfig::ParseTableT_ XtcpConfig::InternalGenerateParseTable_(const inline constexpr XtcpConfig::Impl_::Impl_( [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, ::_pbi::ConstantInitialized) noexcept - : dest_( - &::google::protobuf::internal::fixed_address_empty_string, - ::_pbi::ConstantInitialized()), - marshal_to_( - &::google::protobuf::internal::fixed_address_empty_string, - ::_pbi::ConstantInitialized()), - csv_columns_( + : csv_columns_( &::google::protobuf::internal::fixed_address_empty_string, ::_pbi::ConstantInitialized()), xtcp_proto_file_( @@ -2990,12 +3001,14 @@ inline constexpr XtcpConfig::Impl_::Impl_( packet_size_{::uint64_t{0u}}, modulus_{::uint64_t{0u}}, packet_size_mply_{0u}, + io_uring_{false}, io_uring_recv_batch_size_{0u}, + io_uring_cqe_batch_size_{0u}, max_dump_bytes_{::uint64_t{0u}}, max_records_per_netns_{::uint64_t{0u}}, - io_uring_cqe_batch_size_{0u}, - io_uring_{false}, - s3_allow_insecure_{false}, + max_records_per_poll_{::uint64_t{0u}}, + io_uring_sockstat_batch_size_{0u}, + io_uring_sockstat_workers_{0u}, listeners_ { visibility, ::_pbi::InternalMetadataOffset::Build< ::xtcp_config::v1::XtcpConfig, PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.listeners_)>() @@ -3009,6 +3022,12 @@ inline constexpr XtcpConfig::Impl_::Impl_( capture_path_( &::google::protobuf::internal::fixed_address_empty_string, ::_pbi::ConstantInitialized()), + dest_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + marshal_to_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), topic_( &::google::protobuf::internal::fixed_address_empty_string, ::_pbi::ConstantInitialized()), @@ -3079,6 +3098,7 @@ inline constexpr XtcpConfig::Impl_::Impl_( &::google::protobuf::internal::fixed_address_empty_string, ::_pbi::ConstantInitialized()), reconcile_frequency_{nullptr}, + reconcile_timeout_{nullptr}, kafka_produce_timeout_{nullptr}, s3_flush_interval_{nullptr}, s3_upload_backoff_cap_{nullptr}, @@ -3090,6 +3110,8 @@ inline constexpr XtcpConfig::Impl_::Impl_( locality_refresh_interval_{nullptr}, link_monitor_{nullptr}, max_netns_{0u}, + max_netns_per_owner_{0u}, + max_netns_adds_per_reconcile_{0u}, write_files_{0u}, dest_write_files_{0u}, debug_level_{0u}, @@ -3098,7 +3120,7 @@ inline constexpr XtcpConfig::Impl_::Impl_( reconcile_before_poll_{false}, debug_prometheus_{false}, s3_skip_bucket_probe_{false}, - resolve_container_id_{false}, + s3_allow_insecure_{false}, s3_parquet_flush_threshold_bytes_{0u}, s3_flush_jitter_pct_{0u}, s3_flush_threshold_jitter_pct_{0u}, @@ -3108,11 +3130,12 @@ inline constexpr XtcpConfig::Impl_::Impl_( grpc_port_{0u}, pyroscope_sample_hz_{0u}, pyroscope_upload_interval_sec_{0u}, + resolve_container_id_{false}, enrich_container_enable_{false}, enrich_lldp_enable_{false}, enrich_nic_enable_{false}, - populate_nsid_{false}, uplink_count_{0u}, + populate_nsid_{false}, enrich_asn_enable_{false}, enrich_locality_enable_{false}, locality_events_enable_{false} {} @@ -4272,7 +4295,7 @@ const ::uint32_t 22, 0x081, // bitmap PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_._has_bits_), - 89, // hasbit index offset + 95, // hasbit index offset PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.nl_timeout_milliseconds_), PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.poll_frequency_), PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.poll_timeout_), @@ -4290,9 +4313,15 @@ const ::uint32_t PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.io_uring_cqe_batch_size_), PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.max_dump_bytes_), PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.max_records_per_netns_), + PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.max_records_per_poll_), + PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.io_uring_sockstat_batch_size_), + PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.io_uring_sockstat_workers_), PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.reconcile_frequency_), PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.reconcile_before_poll_), PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.max_netns_), + PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.reconcile_timeout_), + PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.max_netns_per_owner_), + PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.max_netns_adds_per_reconcile_), PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.write_files_), PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.capture_path_), PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.dest_write_files_), @@ -4359,92 +4388,98 @@ const ::uint32_t PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.locality_refresh_interval_), PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.locality_events_enable_), PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::XtcpConfig, _impl_.link_monitor_), - 7, - 4, 5, - 9, + 2, + 3, + 7, + 6, 8, + 9, 10, 11, - 12, 13, - 15, + 12, + 4, 14, - 6, - 20, + 15, 16, - 19, 17, 18, - 48, - 65, - 59, - 60, - 24, - 61, + 19, + 20, + 21, + 50, + 70, 62, - 66, - 0, - 1, - 2, - 3, + 51, 63, 64, + 65, + 24, + 66, + 67, + 71, 25, 26, - 49, + 0, + 1, + 68, + 69, 27, 28, + 52, 29, 30, 31, 32, 33, - 67, - 21, 34, - 69, - 50, - 70, - 71, - 72, - 51, 35, - 36, - 37, - 38, - 39, + 72, 73, + 36, 74, - 52, 53, - 54, 75, - 55, - 22, - 40, - 41, 76, 77, - 68, + 54, + 37, + 38, + 39, + 40, + 41, 78, - 42, 79, - 43, - 44, + 55, + 56, + 57, 80, - 82, - 23, + 58, + 22, + 42, + 43, 81, + 82, 83, + 84, + 44, + 85, 45, - 56, 46, + 86, + 87, + 23, + 88, + 89, 47, - 84, - 57, - 85, - 58, + 59, + 48, + 49, + 90, + 60, + 91, + 61, 0x081, // bitmap PROTOBUF_FIELD_OFFSET(::xtcp_config::v1::EnabledDeserializers_EnabledEntry_DoNotUse, _impl_._has_bits_), 5, // hasbit index offset @@ -4480,8 +4515,8 @@ static const ::_pbi::MigrationSchema {104, sizeof(::xtcp_config::v1::Listener)}, {117, sizeof(::xtcp_config::v1::LinkMonitorConfig)}, {176, sizeof(::xtcp_config::v1::XtcpConfig)}, - {351, sizeof(::xtcp_config::v1::EnabledDeserializers_EnabledEntry_DoNotUse)}, - {358, sizeof(::xtcp_config::v1::EnabledDeserializers)}, + {363, sizeof(::xtcp_config::v1::EnabledDeserializers_EnabledEntry_DoNotUse)}, + {370, sizeof(::xtcp_config::v1::EnabledDeserializers)}, }; static const ::_pbi::MessageGlobalsBase* PROTOBUF_NONNULL const file_message_globals[] = { @@ -4640,7 +4675,7 @@ const char descriptor_table_protodef_xtcp_5fconfig_2fv1_2fxtcp_5fconfig_2eproto[ "2\031.google.protobuf.DurationB\016\272H\013\252\001\010\"\004\010\200\243" "\0052\000R\rlearnDeadlineB\020\n\016_error_classesB\025\n\023" "_metrics_categoriesB\032\n\030_metrics_interfac" - "e_pathsB\023\n\021_metrics_all_path\"\266\'\n\nXtcpCon" + "e_pathsB\023\n\021_metrics_all_path\"\327*\n\nXtcpCon" "fig\022F\n\027nl_timeout_milliseconds\030\n \001(\004B\016\272H" "\0132\006\030\240\215\006(\000\310\001\001R\025nlTimeoutMilliseconds\022S\n\016p" "oll_frequency\030\013 \001(\0132\031.google.protobuf.Du" @@ -4666,153 +4701,163 @@ const char descriptor_table_protodef_xtcp_5fconfig_2fv1_2fxtcp_5fconfig_2eproto[ "e\030\030 \001(\rB\r\272H\n*\005\030\200 (\001\310\001\000R\023ioUringCqeBatchS" "ize\022,\n\016max_dump_bytes\030\031 \001(\004B\006\272H\003\310\001\000R\014max" "DumpBytes\0229\n\025max_records_per_netns\030\032 \001(\004" - "B\006\272H\003\310\001\000R\022maxRecordsPerNetns\022W\n\023reconcil" - "e_frequency\030( \001(\0132\031.google.protobuf.Dura" - "tionB\013\272H\010\252\001\0022\000\310\001\000R\022reconcileFrequency\0222\n" - "\025reconcile_before_poll\030) \001(\010R\023reconcileB" - "eforePoll\022#\n\tmax_netns\030* \001(\rB\006\272H\003\310\001\000R\010ma" - "xNetns\022.\n\013write_files\0302 \001(\rB\r\272H\n*\005\030\350\007(\000\310" - "\001\000R\nwriteFiles\022/\n\014capture_path\0303 \001(\tB\014\272H" - "\tr\004\020\001\030P\310\001\000R\013capturePath\0227\n\020dest_write_fi" - "les\0304 \001(\rB\r\272H\n*\005\030\350\007(\000\310\001\000R\016destWriteFiles" - "\022.\n\013debug_level\0305 \001(\rB\r\272H\n*\005\030\350\007(\000\310\001\001R\nde" - "bugLevel\0221\n\020debug_prometheus\0306 \001(\010B\006\272H\003\310" - "\001\000R\017debugPrometheus\022!\n\004dest\030< \001(\tB\r\272H\nr\005" - "\020\004\030\200\004\310\001\001R\004dest\022+\n\nmarshal_to\030= \001(\tB\014\272H\tr" - "\004\020\003\030(\310\001\001R\tmarshalTo\022\'\n\013csv_columns\030> \001(\t" - "B\006\272H\003\310\001\000R\ncsvColumns\0224\n\017xtcp_proto_file\030" - "\? \001(\tB\014\272H\tr\004\020\001\030P\310\001\000R\rxtcpProtoFile\022K\n\036en" - "velope_flush_threshold_bytes\030@ \001(\rB\006\272H\003\310" - "\001\000R\033envelopeFlushThresholdBytes\022I\n\035envel" - "ope_flush_threshold_rows\030A \001(\rB\006\272H\003\310\001\000R\032" - "envelopeFlushThresholdRows\022\"\n\005topic\030P \001(" - "\tB\014\272H\tr\004\020\001\030(\310\001\000R\005topic\0226\n\020kafka_schema_u" - "rl\030Q \001(\tB\014\272H\tr\004\020\001\030<\310\001\000R\016kafkaSchemaUrl\022_" - "\n\025kafka_produce_timeout\030R \001(\0132\031.google.p" - "rotobuf.DurationB\020\272H\r\252\001\007\"\003\010\330\0042\000\310\001\000R\023kafk" - "aProduceTimeout\0223\n\021kafka_compression\030S \001" - "(\tB\006\272H\003\310\001\000R\020kafkaCompression\022\'\n\013s3_endpo" - "int\030d \001(\tB\006\272H\003\310\001\000R\ns3Endpoint\022#\n\ts3_regi" - "on\030e \001(\tB\006\272H\003\310\001\000R\010s3Region\022#\n\ts3_bucket\030" - "f \001(\tB\006\272H\003\310\001\000R\010s3Bucket\022#\n\ts3_prefix\030g \001" - "(\tB\006\272H\003\310\001\000R\010s3Prefix\022*\n\rs3_access_key\030h " - "\001(\tB\006\272H\003\310\001\000R\013s3AccessKey\022*\n\rs3_secret_ke" - "y\030i \001(\tB\006\272H\003\310\001\000R\013s3SecretKey\0227\n\024s3_skip_" - "bucket_probe\030j \001(\010B\006\272H\003\310\001\000R\021s3SkipBucket" - "Probe\0222\n\021s3_allow_insecure\030k \001(\010B\006\272H\003\310\001\000" - "R\017s3AllowInsecure\022)\n\ns3_ca_file\030l \001(\tB\013\272" - "H\010r\003\030\200 \310\001\000R\010s3CaFile\022N\n s3_parquet_flush" - "_threshold_bytes\030n \001(\rB\006\272H\003\310\001\000R\034s3Parque" - "tFlushThresholdBytes\022R\n\021s3_flush_interva" - "l\030o \001(\0132\031.google.protobuf.DurationB\013\272H\010\252" - "\001\0022\000\310\001\000R\017s3FlushInterval\0229\n\023s3_flush_jit" - "ter_pct\030p \001(\rB\n\272H\007*\002\030d\310\001\000R\020s3FlushJitter" - "Pct\022L\n\035s3_flush_threshold_jitter_pct\030q \001" - "(\rB\n\272H\007*\002\030d\310\001\000R\031s3FlushThresholdJitterPc" - "t\022A\n\026s3_upload_max_attempts\030r \001(\rB\014\272H\t*\004" - "\030d(\001\310\001\000R\023s3UploadMaxAttempts\022Y\n\025s3_uploa" - "d_backoff_cap\030s \001(\0132\031.google.protobuf.Du" - "rationB\013\272H\010\252\001\0022\000\310\001\000R\022s3UploadBackoffCap\022" - "(\n\010hostname\030\202\001 \001(\tB\013\272H\010r\003\030\375\001\310\001\000R\010hostnam" - "e\022(\n\010location\030\203\001 \001(\tB\013\272H\010r\003\030\375\001\310\001\000R\010locat" - "ion\022!\n\005label\030\204\001 \001(\tB\n\272H\007r\002\030(\310\001\000R\005label\022\035" - "\n\003tag\030\205\001 \001(\tB\n\272H\007r\002\030(\310\001\000R\003tag\0223\n\016daemon_" - "version\030\206\001 \001(\tB\013\272H\010r\003\030\375\001\310\001\000R\rdaemonVersi" - "on\022\'\n\010ipv4_ttl\030\226\001 \001(\rB\013\272H\010*\003\030\377\001\310\001\000R\007ipv4" - "Ttl\0222\n\016ipv6_hop_limit\030\227\001 \001(\rB\013\272H\010*\003\030\377\001\310\001" - "\000R\014ipv6HopLimit\022J\n\rlistener_auth\030\230\001 \001(\0132" - "\034.xtcp_config.v1.ListenerAuthB\006\272H\003\310\001\000R\014l" - "istenerAuth\022Z\n\023prometheus_listener\030\231\001 \001(" - "\0132 .xtcp_config.v1.ListenerEndpointB\006\272H\003" - "\310\001\000R\022prometheusListener\022U\n\023admin_listene" - "r_auth\030\232\001 \001(\0132\034.xtcp_config.v1.ListenerA" - "uthB\006\272H\003\310\001\000R\021adminListenerAuth\022\'\n\tgrpc_p" - "ort\030\240\001 \001(\rB\t\272H\006*\004\030\377\377\003R\010grpcPort\022N\n\rgrpc_" - "listener\030\241\001 \001(\0132 .xtcp_config.v1.Listene" - "rEndpointB\006\272H\003\310\001\000R\014grpcListener\022A\n\tliste" - "ners\030\242\001 \003(\0132\030.xtcp_config.v1.ListenerB\010\272" - "H\005\222\001\002\020\020R\tlisteners\022,\n\rpyroscope_url\030\252\001 \001" - "(\tB\006\272H\003\310\001\000R\014pyroscopeUrl\0225\n\022pyroscope_ap" - "p_name\030\253\001 \001(\tB\006\272H\003\310\001\000R\020pyroscopeAppName\022" - "7\n\023pyroscope_sample_hz\030\254\001 \001(\rB\006\272H\003\310\001\000R\021p" - "yroscopeSampleHz\022J\n\035pyroscope_upload_int" - "erval_sec\030\255\001 \001(\rB\006\272H\003\310\001\000R\032pyroscopeUploa" - "dIntervalSec\0229\n\024resolve_container_id\030\310\001 " - "\001(\010B\006\272H\003\310\001\000R\022resolveContainerId\0227\n\027enric" - "h_container_enable\030\311\001 \001(\010R\025enrichContain" - "erEnable\0227\n\022docker_socket_path\030\312\001 \001(\tB\010\272" - "H\005r\003\030\377\001R\020dockerSocketPath\022-\n\022enrich_lldp" - "_enable\030\322\001 \001(\010R\020enrichLldpEnable\0225\n\021lldp" - "d_socket_path\030\323\001 \001(\tB\010\272H\005r\003\030\377\001R\017lldpdSoc" - "ketPath\0226\n\022lldpd_version_hint\030\324\001 \001(\tB\007\272H" - "\004r\002\030\020R\020lldpdVersionHint\022+\n\021enrich_nic_en" - "able\030\334\001 \001(\010R\017enrichNicEnable\022+\n\014uplink_c" - "ount\030\335\001 \001(\rB\007\272H\004*\002\030\002R\013uplinkCount\0226\n\021upl" - "ink_interfaces\030\336\001 \003(\tB\010\272H\005\222\001\002\020\002R\020uplinkI" - "nterfaces\022$\n\rpopulate_nsid\030\346\001 \001(\010R\014popul" - "ateNsid\022+\n\021enrich_asn_enable\030\360\001 \001(\010R\017enr" - "ichAsnEnable\022)\n\013asn_db_path\030\361\001 \001(\tB\010\272H\005r" - "\003\030\377\001R\tasnDbPath\022L\n\024asn_refresh_interval\030" - "\362\001 \001(\0132\031.google.protobuf.DurationR\022asnRe" - "freshInterval\022=\n\025ipmeta_bootstrap_path\030\363" - "\001 \001(\tB\010\272H\005r\003\030\377\001R\023ipmetaBootstrapPath\0225\n\021" - "ipmeta_cache_path\030\364\001 \001(\tB\010\272H\005r\003\030\377\001R\017ipme" - "taCachePath\0225\n\026enrich_locality_enable\030\365\001" - " \001(\010R\024enrichLocalityEnable\022V\n\031locality_r" - "efresh_interval\030\366\001 \001(\0132\031.google.protobuf" - ".DurationR\027localityRefreshInterval\0225\n\026lo" - "cality_events_enable\030\367\001 \001(\010R\024localityEve" - "ntsEnable\022E\n\014link_monitor\030\372\001 \001(\0132!.xtcp_" - "config.v1.LinkMonitorConfigR\013linkMonitor" - ":s\272Hp\032n\n\017XtcpConfig.poll\0222Poll timeout m" - "ust be less than poll poll_frequency\032\'th" - "is.poll_frequency > this.poll_timeout\"\237\001" - "\n\024EnabledDeserializers\022K\n\007enabled\030\001 \003(\0132" - "1.xtcp_config.v1.EnabledDeserializers.En" - "abledEntryR\007enabled\032:\n\014EnabledEntry\022\020\n\003k" - "ey\030\001 \001(\tR\003key\022\024\n\005value\030\002 \001(\010R\005value:\0028\001*" - "h\n\017ListenerNetwork\022 \n\034LISTENER_NETWORK_U" - "NSPECIFIED\020\000\022\030\n\024LISTENER_NETWORK_TCP\020\001\022\031" - "\n\025LISTENER_NETWORK_UNIX\020\002*\241\001\n\020ListenerAu" - "thMode\022\"\n\036LISTENER_AUTH_MODE_UNSPECIFIED" - "\020\000\022\037\n\033LISTENER_AUTH_MODE_DISABLED\020\001\022 \n\034L" - "ISTENER_AUTH_MODE_RAW_TOKEN\020\002\022&\n\"LISTENE" - "R_AUTH_MODE_HMAC_UTC_MINUTE\020\003*\367\001\n\rEndpoi" - "ntClass\022\036\n\032ENDPOINT_CLASS_UNSPECIFIED\020\000\022" - "\031\n\025ENDPOINT_CLASS_HEALTH\020\001\022\032\n\026ENDPOINT_C" - "LASS_METRICS\020\002\022!\n\035ENDPOINT_CLASS_METRICS" - "_DETAIL\020\003\022\025\n\021ENDPOINT_CLASS_IP\020\004\022\030\n\024ENDP" - "OINT_CLASS_DEBUG\020\005\022\034\n\030ENDPOINT_CLASS_GRP" - "C_READ\020\006\022\035\n\031ENDPOINT_CLASS_GRPC_ADMIN\020\0072" - "\245\007\n\rConfigService\022a\n\003Get\022\032.xtcp_config.v" - "1.GetRequest\032\033.xtcp_config.v1.GetRespons" - "e\"!\310\363\030\001\202\323\344\223\002\027\032\022/ConfigService/Get:\001*\022a\n\003" - "Set\022\032.xtcp_config.v1.SetRequest\032\033.xtcp_c" - "onfig.v1.SetResponse\"!\310\363\030\002\202\323\344\223\002\027\032\022/Confi" - "gService/Set:\001*\022\225\001\n\020SetPollFrequency\022\'.x" - "tcp_config.v1.SetPollFrequencyRequest\032(." - "xtcp_config.v1.SetPollFrequencyResponse\"" - ".\310\363\030\002\202\323\344\223\002$\032\037/ConfigService/SetPollFrequ" - "ency:\001*\022\201\001\n\013TriggerPoll\022\".xtcp_config.v1" - ".TriggerPollRequest\032#.xtcp_config.v1.Tri" - "ggerPollResponse\")\310\363\030\002\202\323\344\223\002\037\032\032/ConfigSer" - "vice/TriggerPoll:\001*\022\225\001\n\020TriggerPollBurst" - "\022\'.xtcp_config.v1.TriggerPollBurstReques" - "t\032(.xtcp_config.v1.TriggerPollBurstRespo" - "nse\".\310\363\030\002\202\323\344\223\002$\032\037/ConfigService/TriggerP" - "ollBurst:\001*\022\201\001\n\013SetS3Upload\022\".xtcp_confi" - "g.v1.SetS3UploadRequest\032#.xtcp_config.v1" - ".SetS3UploadResponse\")\310\363\030\002\202\323\344\223\002\037\032\032/Confi" - "gService/SetS3Upload:\001*\022\225\001\n\020SetEnvelopeF" - "lush\022\'.xtcp_config.v1.SetEnvelopeFlushRe" - "quest\032(.xtcp_config.v1.SetEnvelopeFlushR" - "esponse\".\310\363\030\002\202\323\344\223\002$\032\037/ConfigService/SetE" - "nvelopeFlush:\001*B\257\001\n\022com.xtcp_config.v1B\017" - "XtcpConfigProtoP\001Z3github.com/randomized" - "coder/xtcp2/gen/go/xtcp_config\242\002\003XXX\252\002\rX" - "tcpConfig.V1\312\002\rXtcpConfig\\V1\342\002\031XtcpConfi" - "g\\V1\\GPBMetadata\352\002\016XtcpConfig::V1b\006proto" - "3" + "B\006\272H\003\310\001\000R\022maxRecordsPerNetns\0227\n\024max_reco" + "rds_per_poll\030\033 \001(\004B\006\272H\003\310\001\000R\021maxRecordsPe" + "rPoll\022K\n\034io_uring_sockstat_batch_size\030\034 " + "\001(\rB\013\272H\010*\003\030\200\010\310\001\000R\030ioUringSockstatBatchSi" + "ze\022E\n\031io_uring_sockstat_workers\030\035 \001(\rB\n\272" + "H\007*\002\030@\310\001\000R\026ioUringSockstatWorkers\022W\n\023rec" + "oncile_frequency\030( \001(\0132\031.google.protobuf" + ".DurationB\013\272H\010\252\001\0022\000\310\001\000R\022reconcileFrequen" + "cy\0222\n\025reconcile_before_poll\030) \001(\010R\023recon" + "cileBeforePoll\022#\n\tmax_netns\030* \001(\rB\006\272H\003\310\001" + "\000R\010maxNetns\022S\n\021reconcile_timeout\030+ \001(\0132\031" + ".google.protobuf.DurationB\013\272H\010\252\001\0022\000\310\001\000R\020" + "reconcileTimeout\0225\n\023max_netns_per_owner\030" + ", \001(\rB\006\272H\003\310\001\000R\020maxNetnsPerOwner\022F\n\034max_n" + "etns_adds_per_reconcile\030- \001(\rB\006\272H\003\310\001\000R\030m" + "axNetnsAddsPerReconcile\022.\n\013write_files\0302" + " \001(\rB\r\272H\n*\005\030\350\007(\000\310\001\000R\nwriteFiles\022/\n\014captu" + "re_path\0303 \001(\tB\014\272H\tr\004\020\001\030P\310\001\000R\013capturePath" + "\0227\n\020dest_write_files\0304 \001(\rB\r\272H\n*\005\030\350\007(\000\310\001" + "\000R\016destWriteFiles\022.\n\013debug_level\0305 \001(\rB\r" + "\272H\n*\005\030\350\007(\000\310\001\001R\ndebugLevel\0221\n\020debug_prome" + "theus\0306 \001(\010B\006\272H\003\310\001\000R\017debugPrometheus\022!\n\004" + "dest\030< \001(\tB\r\272H\nr\005\020\004\030\200\004\310\001\001R\004dest\022+\n\nmarsh" + "al_to\030= \001(\tB\014\272H\tr\004\020\003\030(\310\001\001R\tmarshalTo\022\'\n\013" + "csv_columns\030> \001(\tB\006\272H\003\310\001\000R\ncsvColumns\0224\n" + "\017xtcp_proto_file\030\? \001(\tB\014\272H\tr\004\020\001\030P\310\001\000R\rxt" + "cpProtoFile\022K\n\036envelope_flush_threshold_" + "bytes\030@ \001(\rB\006\272H\003\310\001\000R\033envelopeFlushThresh" + "oldBytes\022I\n\035envelope_flush_threshold_row" + "s\030A \001(\rB\006\272H\003\310\001\000R\032envelopeFlushThresholdR" + "ows\022\"\n\005topic\030P \001(\tB\014\272H\tr\004\020\001\030(\310\001\000R\005topic\022" + "6\n\020kafka_schema_url\030Q \001(\tB\014\272H\tr\004\020\001\030<\310\001\000R" + "\016kafkaSchemaUrl\022_\n\025kafka_produce_timeout" + "\030R \001(\0132\031.google.protobuf.DurationB\020\272H\r\252\001" + "\007\"\003\010\330\0042\000\310\001\000R\023kafkaProduceTimeout\0223\n\021kafk" + "a_compression\030S \001(\tB\006\272H\003\310\001\000R\020kafkaCompre" + "ssion\022\'\n\013s3_endpoint\030d \001(\tB\006\272H\003\310\001\000R\ns3En" + "dpoint\022#\n\ts3_region\030e \001(\tB\006\272H\003\310\001\000R\010s3Reg" + "ion\022#\n\ts3_bucket\030f \001(\tB\006\272H\003\310\001\000R\010s3Bucket" + "\022#\n\ts3_prefix\030g \001(\tB\006\272H\003\310\001\000R\010s3Prefix\022*\n" + "\rs3_access_key\030h \001(\tB\006\272H\003\310\001\000R\013s3AccessKe" + "y\022*\n\rs3_secret_key\030i \001(\tB\006\272H\003\310\001\000R\013s3Secr" + "etKey\0227\n\024s3_skip_bucket_probe\030j \001(\010B\006\272H\003" + "\310\001\000R\021s3SkipBucketProbe\0222\n\021s3_allow_insec" + "ure\030k \001(\010B\006\272H\003\310\001\000R\017s3AllowInsecure\022)\n\ns3" + "_ca_file\030l \001(\tB\013\272H\010r\003\030\200 \310\001\000R\010s3CaFile\022N\n" + " s3_parquet_flush_threshold_bytes\030n \001(\rB" + "\006\272H\003\310\001\000R\034s3ParquetFlushThresholdBytes\022R\n" + "\021s3_flush_interval\030o \001(\0132\031.google.protob" + "uf.DurationB\013\272H\010\252\001\0022\000\310\001\000R\017s3FlushInterva" + "l\0229\n\023s3_flush_jitter_pct\030p \001(\rB\n\272H\007*\002\030d\310" + "\001\000R\020s3FlushJitterPct\022L\n\035s3_flush_thresho" + "ld_jitter_pct\030q \001(\rB\n\272H\007*\002\030d\310\001\000R\031s3Flush" + "ThresholdJitterPct\022A\n\026s3_upload_max_atte" + "mpts\030r \001(\rB\014\272H\t*\004\030d(\001\310\001\000R\023s3UploadMaxAtt" + "empts\022Y\n\025s3_upload_backoff_cap\030s \001(\0132\031.g" + "oogle.protobuf.DurationB\013\272H\010\252\001\0022\000\310\001\000R\022s3" + "UploadBackoffCap\022(\n\010hostname\030\202\001 \001(\tB\013\272H\010" + "r\003\030\375\001\310\001\000R\010hostname\022(\n\010location\030\203\001 \001(\tB\013\272" + "H\010r\003\030\375\001\310\001\000R\010location\022!\n\005label\030\204\001 \001(\tB\n\272H" + "\007r\002\030(\310\001\000R\005label\022\035\n\003tag\030\205\001 \001(\tB\n\272H\007r\002\030(\310\001" + "\000R\003tag\0223\n\016daemon_version\030\206\001 \001(\tB\013\272H\010r\003\030\375" + "\001\310\001\000R\rdaemonVersion\022\'\n\010ipv4_ttl\030\226\001 \001(\rB\013" + "\272H\010*\003\030\377\001\310\001\000R\007ipv4Ttl\0222\n\016ipv6_hop_limit\030\227" + "\001 \001(\rB\013\272H\010*\003\030\377\001\310\001\000R\014ipv6HopLimit\022J\n\rlist" + "ener_auth\030\230\001 \001(\0132\034.xtcp_config.v1.Listen" + "erAuthB\006\272H\003\310\001\000R\014listenerAuth\022Z\n\023promethe" + "us_listener\030\231\001 \001(\0132 .xtcp_config.v1.List" + "enerEndpointB\006\272H\003\310\001\000R\022prometheusListener" + "\022U\n\023admin_listener_auth\030\232\001 \001(\0132\034.xtcp_co" + "nfig.v1.ListenerAuthB\006\272H\003\310\001\000R\021adminListe" + "nerAuth\022\'\n\tgrpc_port\030\240\001 \001(\rB\t\272H\006*\004\030\377\377\003R\010" + "grpcPort\022N\n\rgrpc_listener\030\241\001 \001(\0132 .xtcp_" + "config.v1.ListenerEndpointB\006\272H\003\310\001\000R\014grpc" + "Listener\022A\n\tlisteners\030\242\001 \003(\0132\030.xtcp_conf" + "ig.v1.ListenerB\010\272H\005\222\001\002\020\020R\tlisteners\022,\n\rp" + "yroscope_url\030\252\001 \001(\tB\006\272H\003\310\001\000R\014pyroscopeUr" + "l\0225\n\022pyroscope_app_name\030\253\001 \001(\tB\006\272H\003\310\001\000R\020" + "pyroscopeAppName\0227\n\023pyroscope_sample_hz\030" + "\254\001 \001(\rB\006\272H\003\310\001\000R\021pyroscopeSampleHz\022J\n\035pyr" + "oscope_upload_interval_sec\030\255\001 \001(\rB\006\272H\003\310\001" + "\000R\032pyroscopeUploadIntervalSec\0229\n\024resolve" + "_container_id\030\310\001 \001(\010B\006\272H\003\310\001\000R\022resolveCon" + "tainerId\0227\n\027enrich_container_enable\030\311\001 \001" + "(\010R\025enrichContainerEnable\0227\n\022docker_sock" + "et_path\030\312\001 \001(\tB\010\272H\005r\003\030\377\001R\020dockerSocketPa" + "th\022-\n\022enrich_lldp_enable\030\322\001 \001(\010R\020enrichL" + "ldpEnable\0225\n\021lldpd_socket_path\030\323\001 \001(\tB\010\272" + "H\005r\003\030\377\001R\017lldpdSocketPath\0226\n\022lldpd_versio" + "n_hint\030\324\001 \001(\tB\007\272H\004r\002\030\020R\020lldpdVersionHint" + "\022+\n\021enrich_nic_enable\030\334\001 \001(\010R\017enrichNicE" + "nable\022+\n\014uplink_count\030\335\001 \001(\rB\007\272H\004*\002\030\002R\013u" + "plinkCount\0226\n\021uplink_interfaces\030\336\001 \003(\tB\010" + "\272H\005\222\001\002\020\002R\020uplinkInterfaces\022$\n\rpopulate_n" + "sid\030\346\001 \001(\010R\014populateNsid\022+\n\021enrich_asn_e" + "nable\030\360\001 \001(\010R\017enrichAsnEnable\022)\n\013asn_db_" + "path\030\361\001 \001(\tB\010\272H\005r\003\030\377\001R\tasnDbPath\022L\n\024asn_" + "refresh_interval\030\362\001 \001(\0132\031.google.protobu" + "f.DurationR\022asnRefreshInterval\022=\n\025ipmeta" + "_bootstrap_path\030\363\001 \001(\tB\010\272H\005r\003\030\377\001R\023ipmeta" + "BootstrapPath\0225\n\021ipmeta_cache_path\030\364\001 \001(" + "\tB\010\272H\005r\003\030\377\001R\017ipmetaCachePath\0225\n\026enrich_l" + "ocality_enable\030\365\001 \001(\010R\024enrichLocalityEna" + "ble\022V\n\031locality_refresh_interval\030\366\001 \001(\0132" + "\031.google.protobuf.DurationR\027localityRefr" + "eshInterval\0225\n\026locality_events_enable\030\367\001" + " \001(\010R\024localityEventsEnable\022E\n\014link_monit" + "or\030\372\001 \001(\0132!.xtcp_config.v1.LinkMonitorCo" + "nfigR\013linkMonitor:s\272Hp\032n\n\017XtcpConfig.pol" + "l\0222Poll timeout must be less than poll p" + "oll_frequency\032\'this.poll_frequency > thi" + "s.poll_timeout\"\237\001\n\024EnabledDeserializers\022" + "K\n\007enabled\030\001 \003(\01321.xtcp_config.v1.Enable" + "dDeserializers.EnabledEntryR\007enabled\032:\n\014" + "EnabledEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030" + "\002 \001(\010R\005value:\0028\001*h\n\017ListenerNetwork\022 \n\034L" + "ISTENER_NETWORK_UNSPECIFIED\020\000\022\030\n\024LISTENE" + "R_NETWORK_TCP\020\001\022\031\n\025LISTENER_NETWORK_UNIX" + "\020\002*\241\001\n\020ListenerAuthMode\022\"\n\036LISTENER_AUTH" + "_MODE_UNSPECIFIED\020\000\022\037\n\033LISTENER_AUTH_MOD" + "E_DISABLED\020\001\022 \n\034LISTENER_AUTH_MODE_RAW_T" + "OKEN\020\002\022&\n\"LISTENER_AUTH_MODE_HMAC_UTC_MI" + "NUTE\020\003*\367\001\n\rEndpointClass\022\036\n\032ENDPOINT_CLA" + "SS_UNSPECIFIED\020\000\022\031\n\025ENDPOINT_CLASS_HEALT" + "H\020\001\022\032\n\026ENDPOINT_CLASS_METRICS\020\002\022!\n\035ENDPO" + "INT_CLASS_METRICS_DETAIL\020\003\022\025\n\021ENDPOINT_C" + "LASS_IP\020\004\022\030\n\024ENDPOINT_CLASS_DEBUG\020\005\022\034\n\030E" + "NDPOINT_CLASS_GRPC_READ\020\006\022\035\n\031ENDPOINT_CL" + "ASS_GRPC_ADMIN\020\0072\245\007\n\rConfigService\022a\n\003Ge" + "t\022\032.xtcp_config.v1.GetRequest\032\033.xtcp_con" + "fig.v1.GetResponse\"!\310\363\030\001\202\323\344\223\002\027\032\022/ConfigS" + "ervice/Get:\001*\022a\n\003Set\022\032.xtcp_config.v1.Se" + "tRequest\032\033.xtcp_config.v1.SetResponse\"!\310" + "\363\030\002\202\323\344\223\002\027\032\022/ConfigService/Set:\001*\022\225\001\n\020Set" + "PollFrequency\022\'.xtcp_config.v1.SetPollFr" + "equencyRequest\032(.xtcp_config.v1.SetPollF" + "requencyResponse\".\310\363\030\002\202\323\344\223\002$\032\037/ConfigSer" + "vice/SetPollFrequency:\001*\022\201\001\n\013TriggerPoll" + "\022\".xtcp_config.v1.TriggerPollRequest\032#.x" + "tcp_config.v1.TriggerPollResponse\")\310\363\030\002\202" + "\323\344\223\002\037\032\032/ConfigService/TriggerPoll:\001*\022\225\001\n" + "\020TriggerPollBurst\022\'.xtcp_config.v1.Trigg" + "erPollBurstRequest\032(.xtcp_config.v1.Trig" + "gerPollBurstResponse\".\310\363\030\002\202\323\344\223\002$\032\037/Confi" + "gService/TriggerPollBurst:\001*\022\201\001\n\013SetS3Up" + "load\022\".xtcp_config.v1.SetS3UploadRequest" + "\032#.xtcp_config.v1.SetS3UploadResponse\")\310" + "\363\030\002\202\323\344\223\002\037\032\032/ConfigService/SetS3Upload:\001*" + "\022\225\001\n\020SetEnvelopeFlush\022\'.xtcp_config.v1.S" + "etEnvelopeFlushRequest\032(.xtcp_config.v1." + "SetEnvelopeFlushResponse\".\310\363\030\002\202\323\344\223\002$\032\037/C" + "onfigService/SetEnvelopeFlush:\001*B\257\001\n\022com" + ".xtcp_config.v1B\017XtcpConfigProtoP\001Z3gith" + "ub.com/randomizedcoder/xtcp2/gen/go/xtcp" + "_config\242\002\003XXX\252\002\rXtcpConfig.V1\312\002\rXtcpConf" + "ig\\V1\342\002\031XtcpConfig\\V1\\GPBMetadata\352\002\016Xtcp" + "Config::V1b\006proto3" }; static const ::_pbi::DescriptorTable* PROTOBUF_NONNULL const descriptor_table_xtcp_5fconfig_2fv1_2fxtcp_5fconfig_2eproto_deps[4] = { @@ -4825,7 +4870,7 @@ static ::absl::once_flag descriptor_table_xtcp_5fconfig_2fv1_2fxtcp_5fconfig_2ep PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_xtcp_5fconfig_2fv1_2fxtcp_5fconfig_2eproto = { false, false, - 12121, + 12538, descriptor_table_protodef_xtcp_5fconfig_2fv1_2fxtcp_5fconfig_2eproto, "xtcp_config/v1/xtcp_config.proto", &descriptor_table_xtcp_5fconfig_2fv1_2fxtcp_5fconfig_2eproto_once, @@ -9735,42 +9780,47 @@ ::google::protobuf::Metadata LinkMonitorConfig::GetMetadata() const { void XtcpConfig::clear_poll_frequency() { ::google::protobuf::internal::TSanWrite(&_impl_); if (_impl_.poll_frequency_ != nullptr) _impl_.poll_frequency_->Clear(); - ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); } void XtcpConfig::clear_poll_timeout() { ::google::protobuf::internal::TSanWrite(&_impl_); if (_impl_.poll_timeout_ != nullptr) _impl_.poll_timeout_->Clear(); - ClearHasBit(_impl_._has_bits_[0], 0x00000020U); + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); } void XtcpConfig::clear_reconcile_frequency() { ::google::protobuf::internal::TSanWrite(&_impl_); if (_impl_.reconcile_frequency_ != nullptr) _impl_.reconcile_frequency_->Clear(); - ClearHasBit(_impl_._has_bits_[1], 0x00010000U); + ClearHasBit(_impl_._has_bits_[1], 0x00040000U); +} +void XtcpConfig::clear_reconcile_timeout() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.reconcile_timeout_ != nullptr) _impl_.reconcile_timeout_->Clear(); + ClearHasBit(_impl_._has_bits_[1], 0x00080000U); } void XtcpConfig::clear_kafka_produce_timeout() { ::google::protobuf::internal::TSanWrite(&_impl_); if (_impl_.kafka_produce_timeout_ != nullptr) _impl_.kafka_produce_timeout_->Clear(); - ClearHasBit(_impl_._has_bits_[1], 0x00020000U); + ClearHasBit(_impl_._has_bits_[1], 0x00100000U); } void XtcpConfig::clear_s3_flush_interval() { ::google::protobuf::internal::TSanWrite(&_impl_); if (_impl_.s3_flush_interval_ != nullptr) _impl_.s3_flush_interval_->Clear(); - ClearHasBit(_impl_._has_bits_[1], 0x00040000U); + ClearHasBit(_impl_._has_bits_[1], 0x00200000U); } void XtcpConfig::clear_s3_upload_backoff_cap() { ::google::protobuf::internal::TSanWrite(&_impl_); if (_impl_.s3_upload_backoff_cap_ != nullptr) _impl_.s3_upload_backoff_cap_->Clear(); - ClearHasBit(_impl_._has_bits_[1], 0x00080000U); + ClearHasBit(_impl_._has_bits_[1], 0x00400000U); } void XtcpConfig::clear_asn_refresh_interval() { ::google::protobuf::internal::TSanWrite(&_impl_); if (_impl_.asn_refresh_interval_ != nullptr) _impl_.asn_refresh_interval_->Clear(); - ClearHasBit(_impl_._has_bits_[1], 0x01000000U); + ClearHasBit(_impl_._has_bits_[1], 0x08000000U); } void XtcpConfig::clear_locality_refresh_interval() { ::google::protobuf::internal::TSanWrite(&_impl_); if (_impl_.locality_refresh_interval_ != nullptr) _impl_.locality_refresh_interval_->Clear(); - ClearHasBit(_impl_._has_bits_[1], 0x02000000U); + ClearHasBit(_impl_._has_bits_[1], 0x10000000U); } XtcpConfig::XtcpConfig(::google::protobuf::Arena* PROTOBUF_NULLABLE arena) #if defined(PROTOBUF_CUSTOM_VTABLE) @@ -9786,8 +9836,6 @@ PROTOBUF_NDEBUG_INLINE XtcpConfig::Impl_::Impl_( [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from, [[maybe_unused]] const ::xtcp_config::v1::XtcpConfig& from_msg) : _has_bits_{from._has_bits_}, - dest_(arena, from.dest_), - marshal_to_(arena, from.marshal_to_), csv_columns_(arena, from.csv_columns_), xtcp_proto_file_(arena, from.xtcp_proto_file_), listeners_ { @@ -9805,6 +9853,8 @@ PROTOBUF_NDEBUG_INLINE XtcpConfig::Impl_::Impl_( } , capture_path_(arena, from.capture_path_), + dest_(arena, from.dest_), + marshal_to_(arena, from.marshal_to_), topic_(arena, from.topic_), kafka_schema_url_(arena, from.kafka_schema_url_), kafka_compression_(arena, from.kafka_compression_), @@ -9844,54 +9894,57 @@ XtcpConfig::XtcpConfig( from._internal_metadata_); new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; - _impl_.poll_frequency_ = (CheckHasBit(cached_has_bits, 0x00000010U)) + _impl_.poll_frequency_ = (CheckHasBit(cached_has_bits, 0x00000004U)) ? Super_::CopyConstruct(arena, *from._impl_.poll_frequency_) : nullptr; - _impl_.poll_timeout_ = (CheckHasBit(cached_has_bits, 0x00000020U)) + _impl_.poll_timeout_ = (CheckHasBit(cached_has_bits, 0x00000008U)) ? Super_::CopyConstruct(arena, *from._impl_.poll_timeout_) : nullptr; - _impl_.enabled_deserializers_ = (CheckHasBit(cached_has_bits, 0x00000040U)) + _impl_.enabled_deserializers_ = (CheckHasBit(cached_has_bits, 0x00000010U)) ? Super_::CopyConstruct(arena, *from._impl_.enabled_deserializers_) : nullptr; ::memcpy(reinterpret_cast(&_impl_) + offsetof(Impl_, nl_timeout_milliseconds_), reinterpret_cast(&from._impl_) + offsetof(Impl_, nl_timeout_milliseconds_), - offsetof(Impl_, s3_allow_insecure_) - + offsetof(Impl_, io_uring_sockstat_workers_) - offsetof(Impl_, nl_timeout_milliseconds_) + - sizeof(Impl_::s3_allow_insecure_)); + sizeof(Impl_::io_uring_sockstat_workers_)); cached_has_bits = _impl_._has_bits_[1]; - _impl_.reconcile_frequency_ = (CheckHasBit(cached_has_bits, 0x00010000U)) + _impl_.reconcile_frequency_ = (CheckHasBit(cached_has_bits, 0x00040000U)) ? Super_::CopyConstruct(arena, *from._impl_.reconcile_frequency_) : nullptr; - _impl_.kafka_produce_timeout_ = (CheckHasBit(cached_has_bits, 0x00020000U)) + _impl_.reconcile_timeout_ = (CheckHasBit(cached_has_bits, 0x00080000U)) + ? Super_::CopyConstruct(arena, *from._impl_.reconcile_timeout_) + : nullptr; + _impl_.kafka_produce_timeout_ = (CheckHasBit(cached_has_bits, 0x00100000U)) ? Super_::CopyConstruct(arena, *from._impl_.kafka_produce_timeout_) : nullptr; - _impl_.s3_flush_interval_ = (CheckHasBit(cached_has_bits, 0x00040000U)) + _impl_.s3_flush_interval_ = (CheckHasBit(cached_has_bits, 0x00200000U)) ? Super_::CopyConstruct(arena, *from._impl_.s3_flush_interval_) : nullptr; - _impl_.s3_upload_backoff_cap_ = (CheckHasBit(cached_has_bits, 0x00080000U)) + _impl_.s3_upload_backoff_cap_ = (CheckHasBit(cached_has_bits, 0x00400000U)) ? Super_::CopyConstruct(arena, *from._impl_.s3_upload_backoff_cap_) : nullptr; - _impl_.listener_auth_ = (CheckHasBit(cached_has_bits, 0x00100000U)) + _impl_.listener_auth_ = (CheckHasBit(cached_has_bits, 0x00800000U)) ? Super_::CopyConstruct(arena, *from._impl_.listener_auth_) : nullptr; - _impl_.prometheus_listener_ = (CheckHasBit(cached_has_bits, 0x00200000U)) + _impl_.prometheus_listener_ = (CheckHasBit(cached_has_bits, 0x01000000U)) ? Super_::CopyConstruct(arena, *from._impl_.prometheus_listener_) : nullptr; - _impl_.admin_listener_auth_ = (CheckHasBit(cached_has_bits, 0x00400000U)) + _impl_.admin_listener_auth_ = (CheckHasBit(cached_has_bits, 0x02000000U)) ? Super_::CopyConstruct(arena, *from._impl_.admin_listener_auth_) : nullptr; - _impl_.grpc_listener_ = (CheckHasBit(cached_has_bits, 0x00800000U)) + _impl_.grpc_listener_ = (CheckHasBit(cached_has_bits, 0x04000000U)) ? Super_::CopyConstruct(arena, *from._impl_.grpc_listener_) : nullptr; - _impl_.asn_refresh_interval_ = (CheckHasBit(cached_has_bits, 0x01000000U)) + _impl_.asn_refresh_interval_ = (CheckHasBit(cached_has_bits, 0x08000000U)) ? Super_::CopyConstruct(arena, *from._impl_.asn_refresh_interval_) : nullptr; - _impl_.locality_refresh_interval_ = (CheckHasBit(cached_has_bits, 0x02000000U)) + _impl_.locality_refresh_interval_ = (CheckHasBit(cached_has_bits, 0x10000000U)) ? Super_::CopyConstruct(arena, *from._impl_.locality_refresh_interval_) : nullptr; - _impl_.link_monitor_ = (CheckHasBit(cached_has_bits, 0x04000000U)) + _impl_.link_monitor_ = (CheckHasBit(cached_has_bits, 0x20000000U)) ? Super_::CopyConstruct(arena, *from._impl_.link_monitor_) : nullptr; ::memcpy(reinterpret_cast(&_impl_) + @@ -9907,9 +9960,7 @@ XtcpConfig::XtcpConfig( PROTOBUF_NDEBUG_INLINE XtcpConfig::Impl_::Impl_( [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility, [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) - : dest_(arena), - marshal_to_(arena), - csv_columns_(arena), + : csv_columns_(arena), xtcp_proto_file_(arena), listeners_ { visibility, ::_pbi::InternalMetadataOffset::Build< ::xtcp_config::v1::XtcpConfig, @@ -9922,6 +9973,8 @@ PROTOBUF_NDEBUG_INLINE XtcpConfig::Impl_::Impl_( } , capture_path_(arena), + dest_(arena), + marshal_to_(arena), topic_(arena), kafka_schema_url_(arena), kafka_compression_(arena), @@ -9951,9 +10004,9 @@ inline void XtcpConfig::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) { ::memset(reinterpret_cast(&_impl_) + offsetof(Impl_, poll_frequency_), 0, - offsetof(Impl_, s3_allow_insecure_) - + offsetof(Impl_, io_uring_sockstat_workers_) - offsetof(Impl_, poll_frequency_) + - sizeof(Impl_::s3_allow_insecure_)); + sizeof(Impl_::io_uring_sockstat_workers_)); ::memset(reinterpret_cast(&_impl_) + offsetof(Impl_, reconcile_frequency_), 0, @@ -9972,14 +10025,14 @@ inline void XtcpConfig::SharedDtor(MessageLite& self) { } this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); ABSL_DCHECK(this_.GetArena() == nullptr); - this_._impl_.dest_.Destroy(); - this_._impl_.marshal_to_.Destroy(); this_._impl_.csv_columns_.Destroy(); this_._impl_.xtcp_proto_file_.Destroy(); delete this_._impl_.poll_frequency_; delete this_._impl_.poll_timeout_; delete this_._impl_.enabled_deserializers_; this_._impl_.capture_path_.Destroy(); + this_._impl_.dest_.Destroy(); + this_._impl_.marshal_to_.Destroy(); this_._impl_.topic_.Destroy(); this_._impl_.kafka_schema_url_.Destroy(); this_._impl_.kafka_compression_.Destroy(); @@ -10004,6 +10057,7 @@ inline void XtcpConfig::SharedDtor(MessageLite& self) { this_._impl_.ipmeta_bootstrap_path_.Destroy(); this_._impl_.ipmeta_cache_path_.Destroy(); delete this_._impl_.reconcile_frequency_; + delete this_._impl_.reconcile_timeout_; delete this_._impl_.kafka_produce_timeout_; delete this_._impl_.s3_flush_interval_; delete this_._impl_.s3_upload_backoff_cap_; @@ -10050,46 +10104,46 @@ PROTOBUF_NOINLINE void XtcpConfig::Clear() { ::uint32_t cached_has_bits [[maybe_unused]] = 0; cached_has_bits = this_._impl_._has_bits_[0]; - if (BatchCheckHasBit(cached_has_bits, 0x0000007fU)) { + if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) { if (CheckHasBit(cached_has_bits, 0x00000001U)) { - this_._impl_.dest_.ClearNonDefaultToEmpty(); - } - if (CheckHasBit(cached_has_bits, 0x00000002U)) { - this_._impl_.marshal_to_.ClearNonDefaultToEmpty(); - } - if (CheckHasBit(cached_has_bits, 0x00000004U)) { this_._impl_.csv_columns_.ClearNonDefaultToEmpty(); } - if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (CheckHasBit(cached_has_bits, 0x00000002U)) { this_._impl_.xtcp_proto_file_.ClearNonDefaultToEmpty(); } - if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (CheckHasBit(cached_has_bits, 0x00000004U)) { ABSL_DCHECK(this_._impl_.poll_frequency_ != nullptr); this_._impl_.poll_frequency_->Clear(); } - if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (CheckHasBit(cached_has_bits, 0x00000008U)) { ABSL_DCHECK(this_._impl_.poll_timeout_ != nullptr); this_._impl_.poll_timeout_->Clear(); } - if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (CheckHasBit(cached_has_bits, 0x00000010U)) { ABSL_DCHECK(this_._impl_.enabled_deserializers_ != nullptr); this_._impl_.enabled_deserializers_->Clear(); } } - this_._impl_.nl_timeout_milliseconds_ = ::uint64_t{0u}; + if (BatchCheckHasBit(cached_has_bits, 0x000000e0U)) { + ::memset(&this_._impl_.nl_timeout_milliseconds_, 0, + static_cast<::size_t>( + reinterpret_cast(&this_._impl_.poll_jitter_pct_) - + reinterpret_cast(&this_._impl_.nl_timeout_milliseconds_)) + + sizeof(_impl_.poll_jitter_pct_)); + } if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { - ::memset(&this_._impl_.max_loops_, 0, + ::memset(&this_._impl_.netlinkers_, 0, static_cast<::size_t>( - reinterpret_cast(&this_._impl_.packet_size_mply_) - - reinterpret_cast(&this_._impl_.max_loops_)) + - sizeof(_impl_.packet_size_mply_)); + reinterpret_cast(&this_._impl_.io_uring_recv_batch_size_) - + reinterpret_cast(&this_._impl_.netlinkers_)) + + sizeof(_impl_.io_uring_recv_batch_size_)); } if (BatchCheckHasBit(cached_has_bits, 0x00ff0000U)) { - ::memset(&this_._impl_.io_uring_recv_batch_size_, 0, + ::memset(&this_._impl_.io_uring_cqe_batch_size_, 0, static_cast<::size_t>( - reinterpret_cast(&this_._impl_.s3_allow_insecure_) - - reinterpret_cast(&this_._impl_.io_uring_recv_batch_size_)) + - sizeof(_impl_.s3_allow_insecure_)); + reinterpret_cast(&this_._impl_.io_uring_sockstat_workers_) - + reinterpret_cast(&this_._impl_.io_uring_cqe_batch_size_)) + + sizeof(_impl_.io_uring_sockstat_workers_)); if (CheckHasBit(cached_has_bits, 0x00400000U)) { _impl_.listeners_.Clear(); } @@ -10102,155 +10156,172 @@ PROTOBUF_NOINLINE void XtcpConfig::Clear() { this_._impl_.capture_path_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x02000000U)) { - this_._impl_.topic_.ClearNonDefaultToEmpty(); + this_._impl_.dest_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x04000000U)) { - this_._impl_.kafka_schema_url_.ClearNonDefaultToEmpty(); + this_._impl_.marshal_to_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x08000000U)) { - this_._impl_.kafka_compression_.ClearNonDefaultToEmpty(); + this_._impl_.topic_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x10000000U)) { - this_._impl_.s3_endpoint_.ClearNonDefaultToEmpty(); + this_._impl_.kafka_schema_url_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x20000000U)) { - this_._impl_.s3_region_.ClearNonDefaultToEmpty(); + this_._impl_.kafka_compression_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x40000000U)) { - this_._impl_.s3_bucket_.ClearNonDefaultToEmpty(); + this_._impl_.s3_endpoint_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x80000000U)) { - this_._impl_.s3_prefix_.ClearNonDefaultToEmpty(); + this_._impl_.s3_region_.ClearNonDefaultToEmpty(); } } cached_has_bits = this_._impl_._has_bits_[1]; if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { if (CheckHasBit(cached_has_bits, 0x00000001U)) { - this_._impl_.s3_access_key_.ClearNonDefaultToEmpty(); + this_._impl_.s3_bucket_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x00000002U)) { - this_._impl_.s3_secret_key_.ClearNonDefaultToEmpty(); + this_._impl_.s3_prefix_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x00000004U)) { - this_._impl_.s3_ca_file_.ClearNonDefaultToEmpty(); + this_._impl_.s3_access_key_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x00000008U)) { - this_._impl_.hostname_.ClearNonDefaultToEmpty(); + this_._impl_.s3_secret_key_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x00000010U)) { - this_._impl_.location_.ClearNonDefaultToEmpty(); + this_._impl_.s3_ca_file_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x00000020U)) { - this_._impl_.label_.ClearNonDefaultToEmpty(); + this_._impl_.hostname_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x00000040U)) { - this_._impl_.tag_.ClearNonDefaultToEmpty(); + this_._impl_.location_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x00000080U)) { - this_._impl_.daemon_version_.ClearNonDefaultToEmpty(); + this_._impl_.label_.ClearNonDefaultToEmpty(); } } if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { if (CheckHasBit(cached_has_bits, 0x00000100U)) { - this_._impl_.pyroscope_url_.ClearNonDefaultToEmpty(); + this_._impl_.tag_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x00000200U)) { - this_._impl_.pyroscope_app_name_.ClearNonDefaultToEmpty(); + this_._impl_.daemon_version_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x00000400U)) { - this_._impl_.docker_socket_path_.ClearNonDefaultToEmpty(); + this_._impl_.pyroscope_url_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x00000800U)) { - this_._impl_.lldpd_socket_path_.ClearNonDefaultToEmpty(); + this_._impl_.pyroscope_app_name_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x00001000U)) { - this_._impl_.lldpd_version_hint_.ClearNonDefaultToEmpty(); + this_._impl_.docker_socket_path_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x00002000U)) { - this_._impl_.asn_db_path_.ClearNonDefaultToEmpty(); + this_._impl_.lldpd_socket_path_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x00004000U)) { - this_._impl_.ipmeta_bootstrap_path_.ClearNonDefaultToEmpty(); + this_._impl_.lldpd_version_hint_.ClearNonDefaultToEmpty(); } if (CheckHasBit(cached_has_bits, 0x00008000U)) { - this_._impl_.ipmeta_cache_path_.ClearNonDefaultToEmpty(); + this_._impl_.asn_db_path_.ClearNonDefaultToEmpty(); } } if (BatchCheckHasBit(cached_has_bits, 0x00ff0000U)) { if (CheckHasBit(cached_has_bits, 0x00010000U)) { + this_._impl_.ipmeta_bootstrap_path_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00020000U)) { + this_._impl_.ipmeta_cache_path_.ClearNonDefaultToEmpty(); + } + if (CheckHasBit(cached_has_bits, 0x00040000U)) { ABSL_DCHECK(this_._impl_.reconcile_frequency_ != nullptr); this_._impl_.reconcile_frequency_->Clear(); } - if (CheckHasBit(cached_has_bits, 0x00020000U)) { + if (CheckHasBit(cached_has_bits, 0x00080000U)) { + ABSL_DCHECK(this_._impl_.reconcile_timeout_ != nullptr); + this_._impl_.reconcile_timeout_->Clear(); + } + if (CheckHasBit(cached_has_bits, 0x00100000U)) { ABSL_DCHECK(this_._impl_.kafka_produce_timeout_ != nullptr); this_._impl_.kafka_produce_timeout_->Clear(); } - if (CheckHasBit(cached_has_bits, 0x00040000U)) { + if (CheckHasBit(cached_has_bits, 0x00200000U)) { ABSL_DCHECK(this_._impl_.s3_flush_interval_ != nullptr); this_._impl_.s3_flush_interval_->Clear(); } - if (CheckHasBit(cached_has_bits, 0x00080000U)) { + if (CheckHasBit(cached_has_bits, 0x00400000U)) { ABSL_DCHECK(this_._impl_.s3_upload_backoff_cap_ != nullptr); this_._impl_.s3_upload_backoff_cap_->Clear(); } - if (CheckHasBit(cached_has_bits, 0x00100000U)) { + if (CheckHasBit(cached_has_bits, 0x00800000U)) { ABSL_DCHECK(this_._impl_.listener_auth_ != nullptr); this_._impl_.listener_auth_->Clear(); } - if (CheckHasBit(cached_has_bits, 0x00200000U)) { + } + if (BatchCheckHasBit(cached_has_bits, 0x3f000000U)) { + if (CheckHasBit(cached_has_bits, 0x01000000U)) { ABSL_DCHECK(this_._impl_.prometheus_listener_ != nullptr); this_._impl_.prometheus_listener_->Clear(); } - if (CheckHasBit(cached_has_bits, 0x00400000U)) { + if (CheckHasBit(cached_has_bits, 0x02000000U)) { ABSL_DCHECK(this_._impl_.admin_listener_auth_ != nullptr); this_._impl_.admin_listener_auth_->Clear(); } - if (CheckHasBit(cached_has_bits, 0x00800000U)) { + if (CheckHasBit(cached_has_bits, 0x04000000U)) { ABSL_DCHECK(this_._impl_.grpc_listener_ != nullptr); this_._impl_.grpc_listener_->Clear(); } - } - if (BatchCheckHasBit(cached_has_bits, 0x07000000U)) { - if (CheckHasBit(cached_has_bits, 0x01000000U)) { + if (CheckHasBit(cached_has_bits, 0x08000000U)) { ABSL_DCHECK(this_._impl_.asn_refresh_interval_ != nullptr); this_._impl_.asn_refresh_interval_->Clear(); } - if (CheckHasBit(cached_has_bits, 0x02000000U)) { + if (CheckHasBit(cached_has_bits, 0x10000000U)) { ABSL_DCHECK(this_._impl_.locality_refresh_interval_ != nullptr); this_._impl_.locality_refresh_interval_->Clear(); } - if (CheckHasBit(cached_has_bits, 0x04000000U)) { + if (CheckHasBit(cached_has_bits, 0x20000000U)) { ABSL_DCHECK(this_._impl_.link_monitor_ != nullptr); this_._impl_.link_monitor_->Clear(); } } - if (BatchCheckHasBit(cached_has_bits, 0xf8000000U)) { + if (BatchCheckHasBit(cached_has_bits, 0xc0000000U)) { ::memset(&this_._impl_.max_netns_, 0, static_cast<::size_t>( - reinterpret_cast(&this_._impl_.envelope_flush_threshold_bytes_) - + reinterpret_cast(&this_._impl_.max_netns_per_owner_) - reinterpret_cast(&this_._impl_.max_netns_)) + - sizeof(_impl_.envelope_flush_threshold_bytes_)); + sizeof(_impl_.max_netns_per_owner_)); } cached_has_bits = this_._impl_._has_bits_[2]; if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { - ::memset(&this_._impl_.envelope_flush_threshold_rows_, 0, + ::memset(&this_._impl_.max_netns_adds_per_reconcile_, 0, static_cast<::size_t>( - reinterpret_cast(&this_._impl_.s3_flush_threshold_jitter_pct_) - - reinterpret_cast(&this_._impl_.envelope_flush_threshold_rows_)) + - sizeof(_impl_.s3_flush_threshold_jitter_pct_)); + reinterpret_cast(&this_._impl_.debug_prometheus_) - + reinterpret_cast(&this_._impl_.max_netns_adds_per_reconcile_)) + + sizeof(_impl_.debug_prometheus_)); } if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { - ::memset(&this_._impl_.s3_upload_max_attempts_, 0, + ::memset(&this_._impl_.s3_skip_bucket_probe_, 0, + static_cast<::size_t>( + reinterpret_cast(&this_._impl_.ipv6_hop_limit_) - + reinterpret_cast(&this_._impl_.s3_skip_bucket_probe_)) + + sizeof(_impl_.ipv6_hop_limit_)); + } + if (BatchCheckHasBit(cached_has_bits, 0x00ff0000U)) { + ::memset(&this_._impl_.grpc_port_, 0, static_cast<::size_t>( - reinterpret_cast(&this_._impl_.enrich_lldp_enable_) - - reinterpret_cast(&this_._impl_.s3_upload_max_attempts_)) + - sizeof(_impl_.enrich_lldp_enable_)); + reinterpret_cast(&this_._impl_.uplink_count_) - + reinterpret_cast(&this_._impl_.grpc_port_)) + + sizeof(_impl_.uplink_count_)); } - if (BatchCheckHasBit(cached_has_bits, 0x003f0000U)) { - ::memset(&this_._impl_.enrich_nic_enable_, 0, + if (BatchCheckHasBit(cached_has_bits, 0x0f000000U)) { + ::memset(&this_._impl_.populate_nsid_, 0, static_cast<::size_t>( reinterpret_cast(&this_._impl_.locality_events_enable_) - - reinterpret_cast(&this_._impl_.enrich_nic_enable_)) + + reinterpret_cast(&this_._impl_.populate_nsid_)) + sizeof(_impl_.locality_events_enable_)); } _impl_._has_bits_.Clear(); @@ -10277,7 +10348,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[0]; // uint64 nl_timeout_milliseconds = 10 [json_name = "nlTimeoutMilliseconds", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (CheckHasBit(cached_has_bits, 0x00000020U)) { if (this_._internal_nl_timeout_milliseconds() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt64ToArray( @@ -10286,21 +10357,21 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // .google.protobuf.Duration poll_frequency = 11 [json_name = "pollFrequency", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (CheckHasBit(cached_has_bits, 0x00000004U)) { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 11, *this_._impl_.poll_frequency_, this_._impl_.poll_frequency_->GetCachedSize(), target, stream); } // .google.protobuf.Duration poll_timeout = 12 [json_name = "pollTimeout", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (CheckHasBit(cached_has_bits, 0x00000008U)) { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 12, *this_._impl_.poll_timeout_, this_._impl_.poll_timeout_->GetCachedSize(), target, stream); } // uint32 poll_jitter_pct = 13 [json_name = "pollJitterPct", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (CheckHasBit(cached_has_bits, 0x00000080U)) { if (this_._internal_poll_jitter_pct() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10309,7 +10380,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // uint64 max_loops = 14 [json_name = "maxLoops", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000100U)) { + if (CheckHasBit(cached_has_bits, 0x00000040U)) { if (this_._internal_max_loops() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt64ToArray( @@ -10318,7 +10389,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // uint32 netlinkers = 15 [json_name = "netlinkers", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000400U)) { + if (CheckHasBit(cached_has_bits, 0x00000100U)) { if (this_._internal_netlinkers() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10327,7 +10398,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // uint32 netlinkers_done_chan_size = 16 [json_name = "netlinkersDoneChanSize", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000800U)) { + if (CheckHasBit(cached_has_bits, 0x00000200U)) { if (this_._internal_netlinkers_done_chan_size() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10336,7 +10407,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // uint32 nlmsg_seq = 17 [json_name = "nlmsgSeq", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00001000U)) { + if (CheckHasBit(cached_has_bits, 0x00000400U)) { if (this_._internal_nlmsg_seq() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10345,7 +10416,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // uint64 packet_size = 18 [json_name = "packetSize", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00002000U)) { + if (CheckHasBit(cached_has_bits, 0x00000800U)) { if (this_._internal_packet_size() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt64ToArray( @@ -10354,7 +10425,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // uint32 packet_size_mply = 19 [json_name = "packetSizeMply", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00008000U)) { + if (CheckHasBit(cached_has_bits, 0x00002000U)) { if (this_._internal_packet_size_mply() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10363,7 +10434,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // uint64 modulus = 20 [json_name = "modulus", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00004000U)) { + if (CheckHasBit(cached_has_bits, 0x00001000U)) { if (this_._internal_modulus() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt64ToArray( @@ -10372,14 +10443,14 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // .xtcp_config.v1.EnabledDeserializers enabled_deserializers = 21 [json_name = "enabledDeserializers", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (CheckHasBit(cached_has_bits, 0x00000010U)) { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 21, *this_._impl_.enabled_deserializers_, this_._impl_.enabled_deserializers_->GetCachedSize(), target, stream); } // bool io_uring = 22 [json_name = "ioUring", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00100000U)) { + if (CheckHasBit(cached_has_bits, 0x00004000U)) { if (this_._internal_io_uring() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -10388,7 +10459,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // uint32 io_uring_recv_batch_size = 23 [json_name = "ioUringRecvBatchSize", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00010000U)) { + if (CheckHasBit(cached_has_bits, 0x00008000U)) { if (this_._internal_io_uring_recv_batch_size() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10397,7 +10468,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // uint32 io_uring_cqe_batch_size = 24 [json_name = "ioUringCqeBatchSize", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00080000U)) { + if (CheckHasBit(cached_has_bits, 0x00010000U)) { if (this_._internal_io_uring_cqe_batch_size() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10423,9 +10494,36 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } } + // uint64 max_records_per_poll = 27 [json_name = "maxRecordsPerPoll", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x00080000U)) { + if (this_._internal_max_records_per_poll() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 27, this_._internal_max_records_per_poll(), target); + } + } + + // uint32 io_uring_sockstat_batch_size = 28 [json_name = "ioUringSockstatBatchSize", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x00100000U)) { + if (this_._internal_io_uring_sockstat_batch_size() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 28, this_._internal_io_uring_sockstat_batch_size(), target); + } + } + + // uint32 io_uring_sockstat_workers = 29 [json_name = "ioUringSockstatWorkers", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x00200000U)) { + if (this_._internal_io_uring_sockstat_workers() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 29, this_._internal_io_uring_sockstat_workers(), target); + } + } + cached_has_bits = this_._impl_._has_bits_[1]; // .google.protobuf.Duration reconcile_frequency = 40 [json_name = "reconcileFrequency", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00010000U)) { + if (CheckHasBit(cached_has_bits, 0x00040000U)) { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 40, *this_._impl_.reconcile_frequency_, this_._impl_.reconcile_frequency_->GetCachedSize(), target, stream); @@ -10433,7 +10531,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // bool reconcile_before_poll = 41 [json_name = "reconcileBeforePoll"]; - if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (CheckHasBit(cached_has_bits, 0x00000040U)) { if (this_._internal_reconcile_before_poll() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -10443,7 +10541,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[1]; // uint32 max_netns = 42 [json_name = "maxNetns", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x08000000U)) { + if (CheckHasBit(cached_has_bits, 0x40000000U)) { if (this_._internal_max_netns() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10451,8 +10549,34 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } } + // .google.protobuf.Duration reconcile_timeout = 43 [json_name = "reconcileTimeout", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x00080000U)) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 43, *this_._impl_.reconcile_timeout_, this_._impl_.reconcile_timeout_->GetCachedSize(), target, + stream); + } + + // uint32 max_netns_per_owner = 44 [json_name = "maxNetnsPerOwner", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x80000000U)) { + if (this_._internal_max_netns_per_owner() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 44, this_._internal_max_netns_per_owner(), target); + } + } + + cached_has_bits = this_._impl_._has_bits_[2]; + // uint32 max_netns_adds_per_reconcile = 45 [json_name = "maxNetnsAddsPerReconcile", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (this_._internal_max_netns_adds_per_reconcile() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray( + 45, this_._internal_max_netns_adds_per_reconcile(), target); + } + } + // uint32 write_files = 50 [json_name = "writeFiles", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x10000000U)) { + if (CheckHasBit(cached_has_bits, 0x00000002U)) { if (this_._internal_write_files() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10471,9 +10595,9 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } } - cached_has_bits = this_._impl_._has_bits_[1]; + cached_has_bits = this_._impl_._has_bits_[2]; // uint32 dest_write_files = 52 [json_name = "destWriteFiles", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x20000000U)) { + if (CheckHasBit(cached_has_bits, 0x00000004U)) { if (this_._internal_dest_write_files() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10482,7 +10606,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // uint32 debug_level = 53 [json_name = "debugLevel", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x40000000U)) { + if (CheckHasBit(cached_has_bits, 0x00000008U)) { if (this_._internal_debug_level() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10490,9 +10614,8 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } } - cached_has_bits = this_._impl_._has_bits_[2]; // bool debug_prometheus = 54 [json_name = "debugPrometheus", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (CheckHasBit(cached_has_bits, 0x00000080U)) { if (this_._internal_debug_prometheus() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -10502,7 +10625,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[0]; // string dest = 60 [json_name = "dest", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (CheckHasBit(cached_has_bits, 0x02000000U)) { if (!this_._internal_dest().empty()) { const ::std::string& _s = this_._internal_dest(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10512,7 +10635,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // string marshal_to = 61 [json_name = "marshalTo", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (CheckHasBit(cached_has_bits, 0x04000000U)) { if (!this_._internal_marshal_to().empty()) { const ::std::string& _s = this_._internal_marshal_to(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10522,7 +10645,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // string csv_columns = 62 [json_name = "csvColumns", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { if (!this_._internal_csv_columns().empty()) { const ::std::string& _s = this_._internal_csv_columns(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10532,7 +10655,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // string xtcp_proto_file = 63 [json_name = "xtcpProtoFile", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (CheckHasBit(cached_has_bits, 0x00000002U)) { if (!this_._internal_xtcp_proto_file().empty()) { const ::std::string& _s = this_._internal_xtcp_proto_file(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10541,9 +10664,9 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } } - cached_has_bits = this_._impl_._has_bits_[1]; + cached_has_bits = this_._impl_._has_bits_[2]; // uint32 envelope_flush_threshold_bytes = 64 [json_name = "envelopeFlushThresholdBytes", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x80000000U)) { + if (CheckHasBit(cached_has_bits, 0x00000010U)) { if (this_._internal_envelope_flush_threshold_bytes() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10551,9 +10674,8 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } } - cached_has_bits = this_._impl_._has_bits_[2]; // uint32 envelope_flush_threshold_rows = 65 [json_name = "envelopeFlushThresholdRows", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (CheckHasBit(cached_has_bits, 0x00000020U)) { if (this_._internal_envelope_flush_threshold_rows() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10563,7 +10685,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[0]; // string topic = 80 [json_name = "topic", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x02000000U)) { + if (CheckHasBit(cached_has_bits, 0x08000000U)) { if (!this_._internal_topic().empty()) { const ::std::string& _s = this_._internal_topic(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10573,7 +10695,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // string kafka_schema_url = 81 [json_name = "kafkaSchemaUrl", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x04000000U)) { + if (CheckHasBit(cached_has_bits, 0x10000000U)) { if (!this_._internal_kafka_schema_url().empty()) { const ::std::string& _s = this_._internal_kafka_schema_url(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10584,7 +10706,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[1]; // .google.protobuf.Duration kafka_produce_timeout = 82 [json_name = "kafkaProduceTimeout", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00020000U)) { + if (CheckHasBit(cached_has_bits, 0x00100000U)) { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 82, *this_._impl_.kafka_produce_timeout_, this_._impl_.kafka_produce_timeout_->GetCachedSize(), target, stream); @@ -10592,7 +10714,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[0]; // string kafka_compression = 83 [json_name = "kafkaCompression", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x08000000U)) { + if (CheckHasBit(cached_has_bits, 0x20000000U)) { if (!this_._internal_kafka_compression().empty()) { const ::std::string& _s = this_._internal_kafka_compression(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10602,7 +10724,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // string s3_endpoint = 100 [json_name = "s3Endpoint", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x10000000U)) { + if (CheckHasBit(cached_has_bits, 0x40000000U)) { if (!this_._internal_s3_endpoint().empty()) { const ::std::string& _s = this_._internal_s3_endpoint(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10612,7 +10734,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // string s3_region = 101 [json_name = "s3Region", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x20000000U)) { + if (CheckHasBit(cached_has_bits, 0x80000000U)) { if (!this_._internal_s3_region().empty()) { const ::std::string& _s = this_._internal_s3_region(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10621,8 +10743,9 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } } + cached_has_bits = this_._impl_._has_bits_[1]; // string s3_bucket = 102 [json_name = "s3Bucket", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x40000000U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { if (!this_._internal_s3_bucket().empty()) { const ::std::string& _s = this_._internal_s3_bucket(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10632,7 +10755,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // string s3_prefix = 103 [json_name = "s3Prefix", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x80000000U)) { + if (CheckHasBit(cached_has_bits, 0x00000002U)) { if (!this_._internal_s3_prefix().empty()) { const ::std::string& _s = this_._internal_s3_prefix(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10641,9 +10764,8 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } } - cached_has_bits = this_._impl_._has_bits_[1]; // string s3_access_key = 104 [json_name = "s3AccessKey", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (CheckHasBit(cached_has_bits, 0x00000004U)) { if (!this_._internal_s3_access_key().empty()) { const ::std::string& _s = this_._internal_s3_access_key(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10653,7 +10775,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // string s3_secret_key = 105 [json_name = "s3SecretKey", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (CheckHasBit(cached_has_bits, 0x00000008U)) { if (!this_._internal_s3_secret_key().empty()) { const ::std::string& _s = this_._internal_s3_secret_key(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10664,7 +10786,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // bool s3_skip_bucket_probe = 106 [json_name = "s3SkipBucketProbe", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (CheckHasBit(cached_has_bits, 0x00000100U)) { if (this_._internal_s3_skip_bucket_probe() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -10672,9 +10794,8 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } } - cached_has_bits = this_._impl_._has_bits_[0]; // bool s3_allow_insecure = 107 [json_name = "s3AllowInsecure", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00200000U)) { + if (CheckHasBit(cached_has_bits, 0x00000200U)) { if (this_._internal_s3_allow_insecure() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -10684,7 +10805,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[1]; // string s3_ca_file = 108 [json_name = "s3CaFile", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (CheckHasBit(cached_has_bits, 0x00000010U)) { if (!this_._internal_s3_ca_file().empty()) { const ::std::string& _s = this_._internal_s3_ca_file(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10695,7 +10816,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // uint32 s3_parquet_flush_threshold_bytes = 110 [json_name = "s3ParquetFlushThresholdBytes", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (CheckHasBit(cached_has_bits, 0x00000400U)) { if (this_._internal_s3_parquet_flush_threshold_bytes() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10705,7 +10826,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[1]; // .google.protobuf.Duration s3_flush_interval = 111 [json_name = "s3FlushInterval", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00040000U)) { + if (CheckHasBit(cached_has_bits, 0x00200000U)) { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 111, *this_._impl_.s3_flush_interval_, this_._impl_.s3_flush_interval_->GetCachedSize(), target, stream); @@ -10713,7 +10834,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // uint32 s3_flush_jitter_pct = 112 [json_name = "s3FlushJitterPct", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (CheckHasBit(cached_has_bits, 0x00000800U)) { if (this_._internal_s3_flush_jitter_pct() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10722,7 +10843,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // uint32 s3_flush_threshold_jitter_pct = 113 [json_name = "s3FlushThresholdJitterPct", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (CheckHasBit(cached_has_bits, 0x00001000U)) { if (this_._internal_s3_flush_threshold_jitter_pct() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10731,7 +10852,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // uint32 s3_upload_max_attempts = 114 [json_name = "s3UploadMaxAttempts", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000100U)) { + if (CheckHasBit(cached_has_bits, 0x00002000U)) { if (this_._internal_s3_upload_max_attempts() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10741,14 +10862,14 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[1]; // .google.protobuf.Duration s3_upload_backoff_cap = 115 [json_name = "s3UploadBackoffCap", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00080000U)) { + if (CheckHasBit(cached_has_bits, 0x00400000U)) { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 115, *this_._impl_.s3_upload_backoff_cap_, this_._impl_.s3_upload_backoff_cap_->GetCachedSize(), target, stream); } // string hostname = 130 [json_name = "hostname", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (CheckHasBit(cached_has_bits, 0x00000020U)) { if (!this_._internal_hostname().empty()) { const ::std::string& _s = this_._internal_hostname(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10758,7 +10879,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // string location = 131 [json_name = "location", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (CheckHasBit(cached_has_bits, 0x00000040U)) { if (!this_._internal_location().empty()) { const ::std::string& _s = this_._internal_location(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10768,7 +10889,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // string label = 132 [json_name = "label", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (CheckHasBit(cached_has_bits, 0x00000080U)) { if (!this_._internal_label().empty()) { const ::std::string& _s = this_._internal_label(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10778,7 +10899,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // string tag = 133 [json_name = "tag", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (CheckHasBit(cached_has_bits, 0x00000100U)) { if (!this_._internal_tag().empty()) { const ::std::string& _s = this_._internal_tag(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10788,7 +10909,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // string daemon_version = 134 [json_name = "daemonVersion", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (CheckHasBit(cached_has_bits, 0x00000200U)) { if (!this_._internal_daemon_version().empty()) { const ::std::string& _s = this_._internal_daemon_version(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10799,7 +10920,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // uint32 ipv4_ttl = 150 [json_name = "ipv4Ttl", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (CheckHasBit(cached_has_bits, 0x00004000U)) { if (this_._internal_ipv4_ttl() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10808,7 +10929,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // uint32 ipv6_hop_limit = 151 [json_name = "ipv6HopLimit", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000400U)) { + if (CheckHasBit(cached_has_bits, 0x00008000U)) { if (this_._internal_ipv6_hop_limit() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10818,21 +10939,21 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[1]; // .xtcp_config.v1.ListenerAuth listener_auth = 152 [json_name = "listenerAuth", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00100000U)) { + if (CheckHasBit(cached_has_bits, 0x00800000U)) { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 152, *this_._impl_.listener_auth_, this_._impl_.listener_auth_->GetCachedSize(), target, stream); } // .xtcp_config.v1.ListenerEndpoint prometheus_listener = 153 [json_name = "prometheusListener", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00200000U)) { + if (CheckHasBit(cached_has_bits, 0x01000000U)) { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 153, *this_._impl_.prometheus_listener_, this_._impl_.prometheus_listener_->GetCachedSize(), target, stream); } // .xtcp_config.v1.ListenerAuth admin_listener_auth = 154 [json_name = "adminListenerAuth", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00400000U)) { + if (CheckHasBit(cached_has_bits, 0x02000000U)) { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 154, *this_._impl_.admin_listener_auth_, this_._impl_.admin_listener_auth_->GetCachedSize(), target, stream); @@ -10840,7 +10961,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // uint32 grpc_port = 160 [json_name = "grpcPort", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000800U)) { + if (CheckHasBit(cached_has_bits, 0x00010000U)) { if (this_._internal_grpc_port() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10850,7 +10971,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[1]; // .xtcp_config.v1.ListenerEndpoint grpc_listener = 161 [json_name = "grpcListener", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00800000U)) { + if (CheckHasBit(cached_has_bits, 0x04000000U)) { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 161, *this_._impl_.grpc_listener_, this_._impl_.grpc_listener_->GetCachedSize(), target, stream); @@ -10871,7 +10992,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[1]; // string pyroscope_url = 170 [json_name = "pyroscopeUrl", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000100U)) { + if (CheckHasBit(cached_has_bits, 0x00000400U)) { if (!this_._internal_pyroscope_url().empty()) { const ::std::string& _s = this_._internal_pyroscope_url(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10881,7 +11002,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // string pyroscope_app_name = 171 [json_name = "pyroscopeAppName", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (CheckHasBit(cached_has_bits, 0x00000800U)) { if (!this_._internal_pyroscope_app_name().empty()) { const ::std::string& _s = this_._internal_pyroscope_app_name(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10892,7 +11013,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // uint32 pyroscope_sample_hz = 172 [json_name = "pyroscopeSampleHz", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00001000U)) { + if (CheckHasBit(cached_has_bits, 0x00020000U)) { if (this_._internal_pyroscope_sample_hz() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10901,7 +11022,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // uint32 pyroscope_upload_interval_sec = 173 [json_name = "pyroscopeUploadIntervalSec", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00002000U)) { + if (CheckHasBit(cached_has_bits, 0x00040000U)) { if (this_._internal_pyroscope_upload_interval_sec() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -10910,7 +11031,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // bool resolve_container_id = 200 [json_name = "resolveContainerId", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (CheckHasBit(cached_has_bits, 0x00080000U)) { if (this_._internal_resolve_container_id() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -10919,7 +11040,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // bool enrich_container_enable = 201 [json_name = "enrichContainerEnable"]; - if (CheckHasBit(cached_has_bits, 0x00004000U)) { + if (CheckHasBit(cached_has_bits, 0x00100000U)) { if (this_._internal_enrich_container_enable() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -10929,7 +11050,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[1]; // string docker_socket_path = 202 [json_name = "dockerSocketPath", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000400U)) { + if (CheckHasBit(cached_has_bits, 0x00001000U)) { if (!this_._internal_docker_socket_path().empty()) { const ::std::string& _s = this_._internal_docker_socket_path(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10940,7 +11061,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // bool enrich_lldp_enable = 210 [json_name = "enrichLldpEnable"]; - if (CheckHasBit(cached_has_bits, 0x00008000U)) { + if (CheckHasBit(cached_has_bits, 0x00200000U)) { if (this_._internal_enrich_lldp_enable() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -10950,7 +11071,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[1]; // string lldpd_socket_path = 211 [json_name = "lldpdSocketPath", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000800U)) { + if (CheckHasBit(cached_has_bits, 0x00002000U)) { if (!this_._internal_lldpd_socket_path().empty()) { const ::std::string& _s = this_._internal_lldpd_socket_path(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10960,7 +11081,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // string lldpd_version_hint = 212 [json_name = "lldpdVersionHint", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00001000U)) { + if (CheckHasBit(cached_has_bits, 0x00004000U)) { if (!this_._internal_lldpd_version_hint().empty()) { const ::std::string& _s = this_._internal_lldpd_version_hint(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -10971,7 +11092,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // bool enrich_nic_enable = 220 [json_name = "enrichNicEnable"]; - if (CheckHasBit(cached_has_bits, 0x00010000U)) { + if (CheckHasBit(cached_has_bits, 0x00400000U)) { if (this_._internal_enrich_nic_enable() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -10980,7 +11101,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // uint32 uplink_count = 221 [json_name = "uplinkCount", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00040000U)) { + if (CheckHasBit(cached_has_bits, 0x00800000U)) { if (this_._internal_uplink_count() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt32ToArray( @@ -11001,7 +11122,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // bool populate_nsid = 230 [json_name = "populateNsid"]; - if (CheckHasBit(cached_has_bits, 0x00020000U)) { + if (CheckHasBit(cached_has_bits, 0x01000000U)) { if (this_._internal_populate_nsid() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -11010,7 +11131,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // bool enrich_asn_enable = 240 [json_name = "enrichAsnEnable"]; - if (CheckHasBit(cached_has_bits, 0x00080000U)) { + if (CheckHasBit(cached_has_bits, 0x02000000U)) { if (this_._internal_enrich_asn_enable() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -11020,7 +11141,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[1]; // string asn_db_path = 241 [json_name = "asnDbPath", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00002000U)) { + if (CheckHasBit(cached_has_bits, 0x00008000U)) { if (!this_._internal_asn_db_path().empty()) { const ::std::string& _s = this_._internal_asn_db_path(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -11030,14 +11151,14 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // .google.protobuf.Duration asn_refresh_interval = 242 [json_name = "asnRefreshInterval"]; - if (CheckHasBit(cached_has_bits, 0x01000000U)) { + if (CheckHasBit(cached_has_bits, 0x08000000U)) { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 242, *this_._impl_.asn_refresh_interval_, this_._impl_.asn_refresh_interval_->GetCachedSize(), target, stream); } // string ipmeta_bootstrap_path = 243 [json_name = "ipmetaBootstrapPath", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00004000U)) { + if (CheckHasBit(cached_has_bits, 0x00010000U)) { if (!this_._internal_ipmeta_bootstrap_path().empty()) { const ::std::string& _s = this_._internal_ipmeta_bootstrap_path(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -11047,7 +11168,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( } // string ipmeta_cache_path = 244 [json_name = "ipmetaCachePath", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00008000U)) { + if (CheckHasBit(cached_has_bits, 0x00020000U)) { if (!this_._internal_ipmeta_cache_path().empty()) { const ::std::string& _s = this_._internal_ipmeta_cache_path(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -11058,7 +11179,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // bool enrich_locality_enable = 245 [json_name = "enrichLocalityEnable"]; - if (CheckHasBit(cached_has_bits, 0x00100000U)) { + if (CheckHasBit(cached_has_bits, 0x04000000U)) { if (this_._internal_enrich_locality_enable() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -11068,7 +11189,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[1]; // .google.protobuf.Duration locality_refresh_interval = 246 [json_name = "localityRefreshInterval"]; - if (CheckHasBit(cached_has_bits, 0x02000000U)) { + if (CheckHasBit(cached_has_bits, 0x10000000U)) { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 246, *this_._impl_.locality_refresh_interval_, this_._impl_.locality_refresh_interval_->GetCachedSize(), target, stream); @@ -11076,7 +11197,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[2]; // bool locality_events_enable = 247 [json_name = "localityEventsEnable"]; - if (CheckHasBit(cached_has_bits, 0x00200000U)) { + if (CheckHasBit(cached_has_bits, 0x08000000U)) { if (this_._internal_locality_events_enable() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( @@ -11086,7 +11207,7 @@ ::uint8_t* PROTOBUF_NONNULL XtcpConfig::_InternalSerialize( cached_has_bits = this_._impl_._has_bits_[1]; // .xtcp_config.v1.LinkMonitorConfig link_monitor = 250 [json_name = "linkMonitor"]; - if (CheckHasBit(cached_has_bits, 0x04000000U)) { + if (CheckHasBit(cached_has_bits, 0x20000000U)) { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 250, *this_._impl_.link_monitor_, this_._impl_.link_monitor_->GetCachedSize(), target, stream); @@ -11116,123 +11237,122 @@ ::size_t XtcpConfig::ByteSizeLong() const { ::_pbi::Prefetch5LinesFrom7Lines(&this_); cached_has_bits = this_._impl_._has_bits_[0]; if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { - // string dest = 60 [json_name = "dest", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000001U)) { - if (!this_._internal_dest().empty()) { - total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_dest()); - } - } - // string marshal_to = 61 [json_name = "marshalTo", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000002U)) { - if (!this_._internal_marshal_to().empty()) { - total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( - this_._internal_marshal_to()); - } - } // string csv_columns = 62 [json_name = "csvColumns", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { if (!this_._internal_csv_columns().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_csv_columns()); } } // string xtcp_proto_file = 63 [json_name = "xtcpProtoFile", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (CheckHasBit(cached_has_bits, 0x00000002U)) { if (!this_._internal_xtcp_proto_file().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_xtcp_proto_file()); } } // .google.protobuf.Duration poll_frequency = 11 [json_name = "pollFrequency", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (CheckHasBit(cached_has_bits, 0x00000004U)) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.poll_frequency_); } // .google.protobuf.Duration poll_timeout = 12 [json_name = "pollTimeout", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (CheckHasBit(cached_has_bits, 0x00000008U)) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.poll_timeout_); } // .xtcp_config.v1.EnabledDeserializers enabled_deserializers = 21 [json_name = "enabledDeserializers", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (CheckHasBit(cached_has_bits, 0x00000010U)) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.enabled_deserializers_); } // uint64 nl_timeout_milliseconds = 10 [json_name = "nlTimeoutMilliseconds", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (CheckHasBit(cached_has_bits, 0x00000020U)) { if (this_._internal_nl_timeout_milliseconds() != 0) { total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( this_._internal_nl_timeout_milliseconds()); } } - } - if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { // uint64 max_loops = 14 [json_name = "maxLoops", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000100U)) { + if (CheckHasBit(cached_has_bits, 0x00000040U)) { if (this_._internal_max_loops() != 0) { total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( this_._internal_max_loops()); } } // uint32 poll_jitter_pct = 13 [json_name = "pollJitterPct", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (CheckHasBit(cached_has_bits, 0x00000080U)) { if (this_._internal_poll_jitter_pct() != 0) { total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( this_._internal_poll_jitter_pct()); } } + } + if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { // uint32 netlinkers = 15 [json_name = "netlinkers", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000400U)) { + if (CheckHasBit(cached_has_bits, 0x00000100U)) { if (this_._internal_netlinkers() != 0) { total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne( this_._internal_netlinkers()); } } // uint32 netlinkers_done_chan_size = 16 [json_name = "netlinkersDoneChanSize", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000800U)) { + if (CheckHasBit(cached_has_bits, 0x00000200U)) { if (this_._internal_netlinkers_done_chan_size() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_netlinkers_done_chan_size()); } } // uint32 nlmsg_seq = 17 [json_name = "nlmsgSeq", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00001000U)) { + if (CheckHasBit(cached_has_bits, 0x00000400U)) { if (this_._internal_nlmsg_seq() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_nlmsg_seq()); } } // uint64 packet_size = 18 [json_name = "packetSize", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00002000U)) { + if (CheckHasBit(cached_has_bits, 0x00000800U)) { if (this_._internal_packet_size() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt64Size( this_._internal_packet_size()); } } // uint64 modulus = 20 [json_name = "modulus", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00004000U)) { + if (CheckHasBit(cached_has_bits, 0x00001000U)) { if (this_._internal_modulus() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt64Size( this_._internal_modulus()); } } // uint32 packet_size_mply = 19 [json_name = "packetSizeMply", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00008000U)) { + if (CheckHasBit(cached_has_bits, 0x00002000U)) { if (this_._internal_packet_size_mply() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_packet_size_mply()); } } - } - if (BatchCheckHasBit(cached_has_bits, 0x00ff0000U)) { + // bool io_uring = 22 [json_name = "ioUring", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x00004000U)) { + if (this_._internal_io_uring() != 0) { + total_size += 3; + } + } // uint32 io_uring_recv_batch_size = 23 [json_name = "ioUringRecvBatchSize", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00010000U)) { + if (CheckHasBit(cached_has_bits, 0x00008000U)) { if (this_._internal_io_uring_recv_batch_size() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_io_uring_recv_batch_size()); } } + } + if (BatchCheckHasBit(cached_has_bits, 0x00ff0000U)) { + // uint32 io_uring_cqe_batch_size = 24 [json_name = "ioUringCqeBatchSize", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x00010000U)) { + if (this_._internal_io_uring_cqe_batch_size() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( + this_._internal_io_uring_cqe_batch_size()); + } + } // uint64 max_dump_bytes = 25 [json_name = "maxDumpBytes", (.buf.validate.field) = { if (CheckHasBit(cached_has_bits, 0x00020000U)) { if (this_._internal_max_dump_bytes() != 0) { @@ -11247,23 +11367,25 @@ ::size_t XtcpConfig::ByteSizeLong() const { this_._internal_max_records_per_netns()); } } - // uint32 io_uring_cqe_batch_size = 24 [json_name = "ioUringCqeBatchSize", (.buf.validate.field) = { + // uint64 max_records_per_poll = 27 [json_name = "maxRecordsPerPoll", (.buf.validate.field) = { if (CheckHasBit(cached_has_bits, 0x00080000U)) { - if (this_._internal_io_uring_cqe_batch_size() != 0) { - total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( - this_._internal_io_uring_cqe_batch_size()); + if (this_._internal_max_records_per_poll() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::UInt64Size( + this_._internal_max_records_per_poll()); } } - // bool io_uring = 22 [json_name = "ioUring", (.buf.validate.field) = { + // uint32 io_uring_sockstat_batch_size = 28 [json_name = "ioUringSockstatBatchSize", (.buf.validate.field) = { if (CheckHasBit(cached_has_bits, 0x00100000U)) { - if (this_._internal_io_uring() != 0) { - total_size += 3; + if (this_._internal_io_uring_sockstat_batch_size() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( + this_._internal_io_uring_sockstat_batch_size()); } } - // bool s3_allow_insecure = 107 [json_name = "s3AllowInsecure", (.buf.validate.field) = { + // uint32 io_uring_sockstat_workers = 29 [json_name = "ioUringSockstatWorkers", (.buf.validate.field) = { if (CheckHasBit(cached_has_bits, 0x00200000U)) { - if (this_._internal_s3_allow_insecure() != 0) { - total_size += 3; + if (this_._internal_io_uring_sockstat_workers() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( + this_._internal_io_uring_sockstat_workers()); } } // repeated .xtcp_config.v1.Listener listeners = 162 [json_name = "listeners", (.buf.validate.field) = { @@ -11291,412 +11413,453 @@ ::size_t XtcpConfig::ByteSizeLong() const { this_._internal_capture_path()); } } - // string topic = 80 [json_name = "topic", (.buf.validate.field) = { + // string dest = 60 [json_name = "dest", (.buf.validate.field) = { if (CheckHasBit(cached_has_bits, 0x02000000U)) { + if (!this_._internal_dest().empty()) { + total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_dest()); + } + } + // string marshal_to = 61 [json_name = "marshalTo", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x04000000U)) { + if (!this_._internal_marshal_to().empty()) { + total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( + this_._internal_marshal_to()); + } + } + // string topic = 80 [json_name = "topic", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x08000000U)) { if (!this_._internal_topic().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_topic()); } } // string kafka_schema_url = 81 [json_name = "kafkaSchemaUrl", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x04000000U)) { + if (CheckHasBit(cached_has_bits, 0x10000000U)) { if (!this_._internal_kafka_schema_url().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_kafka_schema_url()); } } // string kafka_compression = 83 [json_name = "kafkaCompression", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x08000000U)) { + if (CheckHasBit(cached_has_bits, 0x20000000U)) { if (!this_._internal_kafka_compression().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_kafka_compression()); } } // string s3_endpoint = 100 [json_name = "s3Endpoint", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x10000000U)) { + if (CheckHasBit(cached_has_bits, 0x40000000U)) { if (!this_._internal_s3_endpoint().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_s3_endpoint()); } } // string s3_region = 101 [json_name = "s3Region", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x20000000U)) { + if (CheckHasBit(cached_has_bits, 0x80000000U)) { if (!this_._internal_s3_region().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_s3_region()); } } + } + cached_has_bits = this_._impl_._has_bits_[1]; + if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { // string s3_bucket = 102 [json_name = "s3Bucket", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x40000000U)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { if (!this_._internal_s3_bucket().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_s3_bucket()); } } // string s3_prefix = 103 [json_name = "s3Prefix", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x80000000U)) { + if (CheckHasBit(cached_has_bits, 0x00000002U)) { if (!this_._internal_s3_prefix().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_s3_prefix()); } } - } - cached_has_bits = this_._impl_._has_bits_[1]; - if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { // string s3_access_key = 104 [json_name = "s3AccessKey", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (CheckHasBit(cached_has_bits, 0x00000004U)) { if (!this_._internal_s3_access_key().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_s3_access_key()); } } // string s3_secret_key = 105 [json_name = "s3SecretKey", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (CheckHasBit(cached_has_bits, 0x00000008U)) { if (!this_._internal_s3_secret_key().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_s3_secret_key()); } } // string s3_ca_file = 108 [json_name = "s3CaFile", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (CheckHasBit(cached_has_bits, 0x00000010U)) { if (!this_._internal_s3_ca_file().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_s3_ca_file()); } } // string hostname = 130 [json_name = "hostname", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (CheckHasBit(cached_has_bits, 0x00000020U)) { if (!this_._internal_hostname().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_hostname()); } } // string location = 131 [json_name = "location", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (CheckHasBit(cached_has_bits, 0x00000040U)) { if (!this_._internal_location().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_location()); } } // string label = 132 [json_name = "label", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (CheckHasBit(cached_has_bits, 0x00000080U)) { if (!this_._internal_label().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_label()); } } + } + if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { // string tag = 133 [json_name = "tag", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (CheckHasBit(cached_has_bits, 0x00000100U)) { if (!this_._internal_tag().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_tag()); } } // string daemon_version = 134 [json_name = "daemonVersion", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (CheckHasBit(cached_has_bits, 0x00000200U)) { if (!this_._internal_daemon_version().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_daemon_version()); } } - } - if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { // string pyroscope_url = 170 [json_name = "pyroscopeUrl", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000100U)) { + if (CheckHasBit(cached_has_bits, 0x00000400U)) { if (!this_._internal_pyroscope_url().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_pyroscope_url()); } } // string pyroscope_app_name = 171 [json_name = "pyroscopeAppName", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (CheckHasBit(cached_has_bits, 0x00000800U)) { if (!this_._internal_pyroscope_app_name().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_pyroscope_app_name()); } } // string docker_socket_path = 202 [json_name = "dockerSocketPath", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000400U)) { + if (CheckHasBit(cached_has_bits, 0x00001000U)) { if (!this_._internal_docker_socket_path().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_docker_socket_path()); } } // string lldpd_socket_path = 211 [json_name = "lldpdSocketPath", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000800U)) { + if (CheckHasBit(cached_has_bits, 0x00002000U)) { if (!this_._internal_lldpd_socket_path().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_lldpd_socket_path()); } } // string lldpd_version_hint = 212 [json_name = "lldpdVersionHint", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00001000U)) { + if (CheckHasBit(cached_has_bits, 0x00004000U)) { if (!this_._internal_lldpd_version_hint().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_lldpd_version_hint()); } } // string asn_db_path = 241 [json_name = "asnDbPath", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00002000U)) { + if (CheckHasBit(cached_has_bits, 0x00008000U)) { if (!this_._internal_asn_db_path().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_asn_db_path()); } } + } + if (BatchCheckHasBit(cached_has_bits, 0x00ff0000U)) { // string ipmeta_bootstrap_path = 243 [json_name = "ipmetaBootstrapPath", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00004000U)) { + if (CheckHasBit(cached_has_bits, 0x00010000U)) { if (!this_._internal_ipmeta_bootstrap_path().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_ipmeta_bootstrap_path()); } } // string ipmeta_cache_path = 244 [json_name = "ipmetaCachePath", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00008000U)) { + if (CheckHasBit(cached_has_bits, 0x00020000U)) { if (!this_._internal_ipmeta_cache_path().empty()) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::StringSize( this_._internal_ipmeta_cache_path()); } } - } - if (BatchCheckHasBit(cached_has_bits, 0x00ff0000U)) { // .google.protobuf.Duration reconcile_frequency = 40 [json_name = "reconcileFrequency", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00010000U)) { + if (CheckHasBit(cached_has_bits, 0x00040000U)) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.reconcile_frequency_); } + // .google.protobuf.Duration reconcile_timeout = 43 [json_name = "reconcileTimeout", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x00080000U)) { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.reconcile_timeout_); + } // .google.protobuf.Duration kafka_produce_timeout = 82 [json_name = "kafkaProduceTimeout", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00020000U)) { + if (CheckHasBit(cached_has_bits, 0x00100000U)) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.kafka_produce_timeout_); } // .google.protobuf.Duration s3_flush_interval = 111 [json_name = "s3FlushInterval", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00040000U)) { + if (CheckHasBit(cached_has_bits, 0x00200000U)) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.s3_flush_interval_); } // .google.protobuf.Duration s3_upload_backoff_cap = 115 [json_name = "s3UploadBackoffCap", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00080000U)) { + if (CheckHasBit(cached_has_bits, 0x00400000U)) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.s3_upload_backoff_cap_); } // .xtcp_config.v1.ListenerAuth listener_auth = 152 [json_name = "listenerAuth", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00100000U)) { + if (CheckHasBit(cached_has_bits, 0x00800000U)) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.listener_auth_); } + } + if (BatchCheckHasBit(cached_has_bits, 0xff000000U)) { // .xtcp_config.v1.ListenerEndpoint prometheus_listener = 153 [json_name = "prometheusListener", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00200000U)) { + if (CheckHasBit(cached_has_bits, 0x01000000U)) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.prometheus_listener_); } // .xtcp_config.v1.ListenerAuth admin_listener_auth = 154 [json_name = "adminListenerAuth", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00400000U)) { + if (CheckHasBit(cached_has_bits, 0x02000000U)) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.admin_listener_auth_); } // .xtcp_config.v1.ListenerEndpoint grpc_listener = 161 [json_name = "grpcListener", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00800000U)) { + if (CheckHasBit(cached_has_bits, 0x04000000U)) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.grpc_listener_); } - } - if (BatchCheckHasBit(cached_has_bits, 0xff000000U)) { // .google.protobuf.Duration asn_refresh_interval = 242 [json_name = "asnRefreshInterval"]; - if (CheckHasBit(cached_has_bits, 0x01000000U)) { + if (CheckHasBit(cached_has_bits, 0x08000000U)) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.asn_refresh_interval_); } // .google.protobuf.Duration locality_refresh_interval = 246 [json_name = "localityRefreshInterval"]; - if (CheckHasBit(cached_has_bits, 0x02000000U)) { + if (CheckHasBit(cached_has_bits, 0x10000000U)) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.locality_refresh_interval_); } // .xtcp_config.v1.LinkMonitorConfig link_monitor = 250 [json_name = "linkMonitor"]; - if (CheckHasBit(cached_has_bits, 0x04000000U)) { + if (CheckHasBit(cached_has_bits, 0x20000000U)) { total_size += 2 + ::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.link_monitor_); } // uint32 max_netns = 42 [json_name = "maxNetns", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x08000000U)) { + if (CheckHasBit(cached_has_bits, 0x40000000U)) { if (this_._internal_max_netns() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_max_netns()); } } + // uint32 max_netns_per_owner = 44 [json_name = "maxNetnsPerOwner", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x80000000U)) { + if (this_._internal_max_netns_per_owner() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( + this_._internal_max_netns_per_owner()); + } + } + } + cached_has_bits = this_._impl_._has_bits_[2]; + if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { + // uint32 max_netns_adds_per_reconcile = 45 [json_name = "maxNetnsAddsPerReconcile", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (this_._internal_max_netns_adds_per_reconcile() != 0) { + total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( + this_._internal_max_netns_adds_per_reconcile()); + } + } // uint32 write_files = 50 [json_name = "writeFiles", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x10000000U)) { + if (CheckHasBit(cached_has_bits, 0x00000002U)) { if (this_._internal_write_files() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_write_files()); } } // uint32 dest_write_files = 52 [json_name = "destWriteFiles", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x20000000U)) { + if (CheckHasBit(cached_has_bits, 0x00000004U)) { if (this_._internal_dest_write_files() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_dest_write_files()); } } // uint32 debug_level = 53 [json_name = "debugLevel", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x40000000U)) { + if (CheckHasBit(cached_has_bits, 0x00000008U)) { if (this_._internal_debug_level() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_debug_level()); } } // uint32 envelope_flush_threshold_bytes = 64 [json_name = "envelopeFlushThresholdBytes", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x80000000U)) { + if (CheckHasBit(cached_has_bits, 0x00000010U)) { if (this_._internal_envelope_flush_threshold_bytes() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_envelope_flush_threshold_bytes()); } } - } - cached_has_bits = this_._impl_._has_bits_[2]; - if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { // uint32 envelope_flush_threshold_rows = 65 [json_name = "envelopeFlushThresholdRows", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (CheckHasBit(cached_has_bits, 0x00000020U)) { if (this_._internal_envelope_flush_threshold_rows() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_envelope_flush_threshold_rows()); } } // bool reconcile_before_poll = 41 [json_name = "reconcileBeforePoll"]; - if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (CheckHasBit(cached_has_bits, 0x00000040U)) { if (this_._internal_reconcile_before_poll() != 0) { total_size += 3; } } // bool debug_prometheus = 54 [json_name = "debugPrometheus", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (CheckHasBit(cached_has_bits, 0x00000080U)) { if (this_._internal_debug_prometheus() != 0) { total_size += 3; } } + } + if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { // bool s3_skip_bucket_probe = 106 [json_name = "s3SkipBucketProbe", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (CheckHasBit(cached_has_bits, 0x00000100U)) { if (this_._internal_s3_skip_bucket_probe() != 0) { total_size += 3; } } - // bool resolve_container_id = 200 [json_name = "resolveContainerId", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000010U)) { - if (this_._internal_resolve_container_id() != 0) { + // bool s3_allow_insecure = 107 [json_name = "s3AllowInsecure", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (this_._internal_s3_allow_insecure() != 0) { total_size += 3; } } // uint32 s3_parquet_flush_threshold_bytes = 110 [json_name = "s3ParquetFlushThresholdBytes", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (CheckHasBit(cached_has_bits, 0x00000400U)) { if (this_._internal_s3_parquet_flush_threshold_bytes() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_s3_parquet_flush_threshold_bytes()); } } // uint32 s3_flush_jitter_pct = 112 [json_name = "s3FlushJitterPct", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (CheckHasBit(cached_has_bits, 0x00000800U)) { if (this_._internal_s3_flush_jitter_pct() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_s3_flush_jitter_pct()); } } // uint32 s3_flush_threshold_jitter_pct = 113 [json_name = "s3FlushThresholdJitterPct", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (CheckHasBit(cached_has_bits, 0x00001000U)) { if (this_._internal_s3_flush_threshold_jitter_pct() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_s3_flush_threshold_jitter_pct()); } } - } - if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { // uint32 s3_upload_max_attempts = 114 [json_name = "s3UploadMaxAttempts", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000100U)) { + if (CheckHasBit(cached_has_bits, 0x00002000U)) { if (this_._internal_s3_upload_max_attempts() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_s3_upload_max_attempts()); } } // uint32 ipv4_ttl = 150 [json_name = "ipv4Ttl", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (CheckHasBit(cached_has_bits, 0x00004000U)) { if (this_._internal_ipv4_ttl() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_ipv4_ttl()); } } // uint32 ipv6_hop_limit = 151 [json_name = "ipv6HopLimit", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000400U)) { + if (CheckHasBit(cached_has_bits, 0x00008000U)) { if (this_._internal_ipv6_hop_limit() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_ipv6_hop_limit()); } } + } + if (BatchCheckHasBit(cached_has_bits, 0x00ff0000U)) { // uint32 grpc_port = 160 [json_name = "grpcPort", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00000800U)) { + if (CheckHasBit(cached_has_bits, 0x00010000U)) { if (this_._internal_grpc_port() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_grpc_port()); } } // uint32 pyroscope_sample_hz = 172 [json_name = "pyroscopeSampleHz", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00001000U)) { + if (CheckHasBit(cached_has_bits, 0x00020000U)) { if (this_._internal_pyroscope_sample_hz() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_pyroscope_sample_hz()); } } // uint32 pyroscope_upload_interval_sec = 173 [json_name = "pyroscopeUploadIntervalSec", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00002000U)) { + if (CheckHasBit(cached_has_bits, 0x00040000U)) { if (this_._internal_pyroscope_upload_interval_sec() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_pyroscope_upload_interval_sec()); } } + // bool resolve_container_id = 200 [json_name = "resolveContainerId", (.buf.validate.field) = { + if (CheckHasBit(cached_has_bits, 0x00080000U)) { + if (this_._internal_resolve_container_id() != 0) { + total_size += 3; + } + } // bool enrich_container_enable = 201 [json_name = "enrichContainerEnable"]; - if (CheckHasBit(cached_has_bits, 0x00004000U)) { + if (CheckHasBit(cached_has_bits, 0x00100000U)) { if (this_._internal_enrich_container_enable() != 0) { total_size += 3; } } // bool enrich_lldp_enable = 210 [json_name = "enrichLldpEnable"]; - if (CheckHasBit(cached_has_bits, 0x00008000U)) { + if (CheckHasBit(cached_has_bits, 0x00200000U)) { if (this_._internal_enrich_lldp_enable() != 0) { total_size += 3; } } - } - if (BatchCheckHasBit(cached_has_bits, 0x003f0000U)) { // bool enrich_nic_enable = 220 [json_name = "enrichNicEnable"]; - if (CheckHasBit(cached_has_bits, 0x00010000U)) { + if (CheckHasBit(cached_has_bits, 0x00400000U)) { if (this_._internal_enrich_nic_enable() != 0) { total_size += 3; } } - // bool populate_nsid = 230 [json_name = "populateNsid"]; - if (CheckHasBit(cached_has_bits, 0x00020000U)) { - if (this_._internal_populate_nsid() != 0) { - total_size += 3; - } - } // uint32 uplink_count = 221 [json_name = "uplinkCount", (.buf.validate.field) = { - if (CheckHasBit(cached_has_bits, 0x00040000U)) { + if (CheckHasBit(cached_has_bits, 0x00800000U)) { if (this_._internal_uplink_count() != 0) { total_size += 2 + ::_pbi::WireFormatLite::UInt32Size( this_._internal_uplink_count()); } } + } + if (BatchCheckHasBit(cached_has_bits, 0x0f000000U)) { + // bool populate_nsid = 230 [json_name = "populateNsid"]; + if (CheckHasBit(cached_has_bits, 0x01000000U)) { + if (this_._internal_populate_nsid() != 0) { + total_size += 3; + } + } // bool enrich_asn_enable = 240 [json_name = "enrichAsnEnable"]; - if (CheckHasBit(cached_has_bits, 0x00080000U)) { + if (CheckHasBit(cached_has_bits, 0x02000000U)) { if (this_._internal_enrich_asn_enable() != 0) { total_size += 3; } } // bool enrich_locality_enable = 245 [json_name = "enrichLocalityEnable"]; - if (CheckHasBit(cached_has_bits, 0x00100000U)) { + if (CheckHasBit(cached_has_bits, 0x04000000U)) { if (this_._internal_enrich_locality_enable() != 0) { total_size += 3; } } // bool locality_events_enable = 247 [json_name = "localityEventsEnable"]; - if (CheckHasBit(cached_has_bits, 0x00200000U)) { + if (CheckHasBit(cached_has_bits, 0x08000000U)) { if (this_._internal_locality_events_enable() != 0) { total_size += 3; } @@ -11722,24 +11885,6 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, cached_has_bits = from._impl_._has_bits_[0]; if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { if (CheckHasBit(cached_has_bits, 0x00000001U)) { - if (!from._internal_dest().empty()) { - _this->_internal_set_dest(from._internal_dest()); - } else { - if (_this->_impl_.dest_.IsDefault()) { - _this->_internal_set_dest(""); - } - } - } - if (CheckHasBit(cached_has_bits, 0x00000002U)) { - if (!from._internal_marshal_to().empty()) { - _this->_internal_set_marshal_to(from._internal_marshal_to()); - } else { - if (_this->_impl_.marshal_to_.IsDefault()) { - _this->_internal_set_marshal_to(""); - } - } - } - if (CheckHasBit(cached_has_bits, 0x00000004U)) { if (!from._internal_csv_columns().empty()) { _this->_internal_set_csv_columns(from._internal_csv_columns()); } else { @@ -11748,7 +11893,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (CheckHasBit(cached_has_bits, 0x00000002U)) { if (!from._internal_xtcp_proto_file().empty()) { _this->_internal_set_xtcp_proto_file(from._internal_xtcp_proto_file()); } else { @@ -11757,7 +11902,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (CheckHasBit(cached_has_bits, 0x00000004U)) { ABSL_DCHECK(from._impl_.poll_frequency_ != nullptr); if (_this->_impl_.poll_frequency_ == nullptr) { _this->_impl_.poll_frequency_ = Super_::CopyConstruct(arena, *from._impl_.poll_frequency_); @@ -11765,7 +11910,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, _this->_impl_.poll_frequency_->MergeFrom(*from._impl_.poll_frequency_); } } - if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (CheckHasBit(cached_has_bits, 0x00000008U)) { ABSL_DCHECK(from._impl_.poll_timeout_ != nullptr); if (_this->_impl_.poll_timeout_ == nullptr) { _this->_impl_.poll_timeout_ = Super_::CopyConstruct(arena, *from._impl_.poll_timeout_); @@ -11773,7 +11918,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, _this->_impl_.poll_timeout_->MergeFrom(*from._impl_.poll_timeout_); } } - if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (CheckHasBit(cached_has_bits, 0x00000010U)) { ABSL_DCHECK(from._impl_.enabled_deserializers_ != nullptr); if (_this->_impl_.enabled_deserializers_ == nullptr) { _this->_impl_.enabled_deserializers_ = Super_::CopyConstruct(arena, *from._impl_.enabled_deserializers_); @@ -11781,58 +11926,68 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, _this->_impl_.enabled_deserializers_->MergeFrom(*from._impl_.enabled_deserializers_); } } - if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (CheckHasBit(cached_has_bits, 0x00000020U)) { if (from._internal_nl_timeout_milliseconds() != 0) { _this->_impl_.nl_timeout_milliseconds_ = from._impl_.nl_timeout_milliseconds_; } } - } - if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { - if (CheckHasBit(cached_has_bits, 0x00000100U)) { + if (CheckHasBit(cached_has_bits, 0x00000040U)) { if (from._internal_max_loops() != 0) { _this->_impl_.max_loops_ = from._impl_.max_loops_; } } - if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (CheckHasBit(cached_has_bits, 0x00000080U)) { if (from._internal_poll_jitter_pct() != 0) { _this->_impl_.poll_jitter_pct_ = from._impl_.poll_jitter_pct_; } } - if (CheckHasBit(cached_has_bits, 0x00000400U)) { + } + if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { + if (CheckHasBit(cached_has_bits, 0x00000100U)) { if (from._internal_netlinkers() != 0) { _this->_impl_.netlinkers_ = from._impl_.netlinkers_; } } - if (CheckHasBit(cached_has_bits, 0x00000800U)) { + if (CheckHasBit(cached_has_bits, 0x00000200U)) { if (from._internal_netlinkers_done_chan_size() != 0) { _this->_impl_.netlinkers_done_chan_size_ = from._impl_.netlinkers_done_chan_size_; } } - if (CheckHasBit(cached_has_bits, 0x00001000U)) { + if (CheckHasBit(cached_has_bits, 0x00000400U)) { if (from._internal_nlmsg_seq() != 0) { _this->_impl_.nlmsg_seq_ = from._impl_.nlmsg_seq_; } } - if (CheckHasBit(cached_has_bits, 0x00002000U)) { + if (CheckHasBit(cached_has_bits, 0x00000800U)) { if (from._internal_packet_size() != 0) { _this->_impl_.packet_size_ = from._impl_.packet_size_; } } - if (CheckHasBit(cached_has_bits, 0x00004000U)) { + if (CheckHasBit(cached_has_bits, 0x00001000U)) { if (from._internal_modulus() != 0) { _this->_impl_.modulus_ = from._impl_.modulus_; } } - if (CheckHasBit(cached_has_bits, 0x00008000U)) { + if (CheckHasBit(cached_has_bits, 0x00002000U)) { if (from._internal_packet_size_mply() != 0) { _this->_impl_.packet_size_mply_ = from._impl_.packet_size_mply_; } } + if (CheckHasBit(cached_has_bits, 0x00004000U)) { + if (from._internal_io_uring() != 0) { + _this->_impl_.io_uring_ = from._impl_.io_uring_; + } + } + if (CheckHasBit(cached_has_bits, 0x00008000U)) { + if (from._internal_io_uring_recv_batch_size() != 0) { + _this->_impl_.io_uring_recv_batch_size_ = from._impl_.io_uring_recv_batch_size_; + } + } } if (BatchCheckHasBit(cached_has_bits, 0x00ff0000U)) { if (CheckHasBit(cached_has_bits, 0x00010000U)) { - if (from._internal_io_uring_recv_batch_size() != 0) { - _this->_impl_.io_uring_recv_batch_size_ = from._impl_.io_uring_recv_batch_size_; + if (from._internal_io_uring_cqe_batch_size() != 0) { + _this->_impl_.io_uring_cqe_batch_size_ = from._impl_.io_uring_cqe_batch_size_; } } if (CheckHasBit(cached_has_bits, 0x00020000U)) { @@ -11846,18 +12001,18 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } if (CheckHasBit(cached_has_bits, 0x00080000U)) { - if (from._internal_io_uring_cqe_batch_size() != 0) { - _this->_impl_.io_uring_cqe_batch_size_ = from._impl_.io_uring_cqe_batch_size_; + if (from._internal_max_records_per_poll() != 0) { + _this->_impl_.max_records_per_poll_ = from._impl_.max_records_per_poll_; } } if (CheckHasBit(cached_has_bits, 0x00100000U)) { - if (from._internal_io_uring() != 0) { - _this->_impl_.io_uring_ = from._impl_.io_uring_; + if (from._internal_io_uring_sockstat_batch_size() != 0) { + _this->_impl_.io_uring_sockstat_batch_size_ = from._impl_.io_uring_sockstat_batch_size_; } } if (CheckHasBit(cached_has_bits, 0x00200000U)) { - if (from._internal_s3_allow_insecure() != 0) { - _this->_impl_.s3_allow_insecure_ = from._impl_.s3_allow_insecure_; + if (from._internal_io_uring_sockstat_workers() != 0) { + _this->_impl_.io_uring_sockstat_workers_ = from._impl_.io_uring_sockstat_workers_; } } if (CheckHasBit(cached_has_bits, 0x00400000U)) { @@ -11882,6 +12037,24 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } if (CheckHasBit(cached_has_bits, 0x02000000U)) { + if (!from._internal_dest().empty()) { + _this->_internal_set_dest(from._internal_dest()); + } else { + if (_this->_impl_.dest_.IsDefault()) { + _this->_internal_set_dest(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x04000000U)) { + if (!from._internal_marshal_to().empty()) { + _this->_internal_set_marshal_to(from._internal_marshal_to()); + } else { + if (_this->_impl_.marshal_to_.IsDefault()) { + _this->_internal_set_marshal_to(""); + } + } + } + if (CheckHasBit(cached_has_bits, 0x08000000U)) { if (!from._internal_topic().empty()) { _this->_internal_set_topic(from._internal_topic()); } else { @@ -11890,7 +12063,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x04000000U)) { + if (CheckHasBit(cached_has_bits, 0x10000000U)) { if (!from._internal_kafka_schema_url().empty()) { _this->_internal_set_kafka_schema_url(from._internal_kafka_schema_url()); } else { @@ -11899,7 +12072,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x08000000U)) { + if (CheckHasBit(cached_has_bits, 0x20000000U)) { if (!from._internal_kafka_compression().empty()) { _this->_internal_set_kafka_compression(from._internal_kafka_compression()); } else { @@ -11908,7 +12081,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x10000000U)) { + if (CheckHasBit(cached_has_bits, 0x40000000U)) { if (!from._internal_s3_endpoint().empty()) { _this->_internal_set_s3_endpoint(from._internal_s3_endpoint()); } else { @@ -11917,7 +12090,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x20000000U)) { + if (CheckHasBit(cached_has_bits, 0x80000000U)) { if (!from._internal_s3_region().empty()) { _this->_internal_set_s3_region(from._internal_s3_region()); } else { @@ -11926,7 +12099,10 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x40000000U)) { + } + cached_has_bits = from._impl_._has_bits_[1]; + if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { if (!from._internal_s3_bucket().empty()) { _this->_internal_set_s3_bucket(from._internal_s3_bucket()); } else { @@ -11935,7 +12111,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x80000000U)) { + if (CheckHasBit(cached_has_bits, 0x00000002U)) { if (!from._internal_s3_prefix().empty()) { _this->_internal_set_s3_prefix(from._internal_s3_prefix()); } else { @@ -11944,10 +12120,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - } - cached_has_bits = from._impl_._has_bits_[1]; - if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { - if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (CheckHasBit(cached_has_bits, 0x00000004U)) { if (!from._internal_s3_access_key().empty()) { _this->_internal_set_s3_access_key(from._internal_s3_access_key()); } else { @@ -11956,7 +12129,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (CheckHasBit(cached_has_bits, 0x00000008U)) { if (!from._internal_s3_secret_key().empty()) { _this->_internal_set_s3_secret_key(from._internal_s3_secret_key()); } else { @@ -11965,7 +12138,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (CheckHasBit(cached_has_bits, 0x00000010U)) { if (!from._internal_s3_ca_file().empty()) { _this->_internal_set_s3_ca_file(from._internal_s3_ca_file()); } else { @@ -11974,7 +12147,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x00000008U)) { + if (CheckHasBit(cached_has_bits, 0x00000020U)) { if (!from._internal_hostname().empty()) { _this->_internal_set_hostname(from._internal_hostname()); } else { @@ -11983,7 +12156,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x00000010U)) { + if (CheckHasBit(cached_has_bits, 0x00000040U)) { if (!from._internal_location().empty()) { _this->_internal_set_location(from._internal_location()); } else { @@ -11992,7 +12165,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (CheckHasBit(cached_has_bits, 0x00000080U)) { if (!from._internal_label().empty()) { _this->_internal_set_label(from._internal_label()); } else { @@ -12001,7 +12174,9 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x00000040U)) { + } + if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { + if (CheckHasBit(cached_has_bits, 0x00000100U)) { if (!from._internal_tag().empty()) { _this->_internal_set_tag(from._internal_tag()); } else { @@ -12010,7 +12185,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (CheckHasBit(cached_has_bits, 0x00000200U)) { if (!from._internal_daemon_version().empty()) { _this->_internal_set_daemon_version(from._internal_daemon_version()); } else { @@ -12019,9 +12194,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - } - if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { - if (CheckHasBit(cached_has_bits, 0x00000100U)) { + if (CheckHasBit(cached_has_bits, 0x00000400U)) { if (!from._internal_pyroscope_url().empty()) { _this->_internal_set_pyroscope_url(from._internal_pyroscope_url()); } else { @@ -12030,7 +12203,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (CheckHasBit(cached_has_bits, 0x00000800U)) { if (!from._internal_pyroscope_app_name().empty()) { _this->_internal_set_pyroscope_app_name(from._internal_pyroscope_app_name()); } else { @@ -12039,7 +12212,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x00000400U)) { + if (CheckHasBit(cached_has_bits, 0x00001000U)) { if (!from._internal_docker_socket_path().empty()) { _this->_internal_set_docker_socket_path(from._internal_docker_socket_path()); } else { @@ -12048,7 +12221,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x00000800U)) { + if (CheckHasBit(cached_has_bits, 0x00002000U)) { if (!from._internal_lldpd_socket_path().empty()) { _this->_internal_set_lldpd_socket_path(from._internal_lldpd_socket_path()); } else { @@ -12057,7 +12230,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x00001000U)) { + if (CheckHasBit(cached_has_bits, 0x00004000U)) { if (!from._internal_lldpd_version_hint().empty()) { _this->_internal_set_lldpd_version_hint(from._internal_lldpd_version_hint()); } else { @@ -12066,7 +12239,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x00002000U)) { + if (CheckHasBit(cached_has_bits, 0x00008000U)) { if (!from._internal_asn_db_path().empty()) { _this->_internal_set_asn_db_path(from._internal_asn_db_path()); } else { @@ -12075,7 +12248,9 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x00004000U)) { + } + if (BatchCheckHasBit(cached_has_bits, 0x00ff0000U)) { + if (CheckHasBit(cached_has_bits, 0x00010000U)) { if (!from._internal_ipmeta_bootstrap_path().empty()) { _this->_internal_set_ipmeta_bootstrap_path(from._internal_ipmeta_bootstrap_path()); } else { @@ -12084,7 +12259,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - if (CheckHasBit(cached_has_bits, 0x00008000U)) { + if (CheckHasBit(cached_has_bits, 0x00020000U)) { if (!from._internal_ipmeta_cache_path().empty()) { _this->_internal_set_ipmeta_cache_path(from._internal_ipmeta_cache_path()); } else { @@ -12093,9 +12268,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, } } } - } - if (BatchCheckHasBit(cached_has_bits, 0x00ff0000U)) { - if (CheckHasBit(cached_has_bits, 0x00010000U)) { + if (CheckHasBit(cached_has_bits, 0x00040000U)) { ABSL_DCHECK(from._impl_.reconcile_frequency_ != nullptr); if (_this->_impl_.reconcile_frequency_ == nullptr) { _this->_impl_.reconcile_frequency_ = Super_::CopyConstruct(arena, *from._impl_.reconcile_frequency_); @@ -12103,7 +12276,15 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, _this->_impl_.reconcile_frequency_->MergeFrom(*from._impl_.reconcile_frequency_); } } - if (CheckHasBit(cached_has_bits, 0x00020000U)) { + if (CheckHasBit(cached_has_bits, 0x00080000U)) { + ABSL_DCHECK(from._impl_.reconcile_timeout_ != nullptr); + if (_this->_impl_.reconcile_timeout_ == nullptr) { + _this->_impl_.reconcile_timeout_ = Super_::CopyConstruct(arena, *from._impl_.reconcile_timeout_); + } else { + _this->_impl_.reconcile_timeout_->MergeFrom(*from._impl_.reconcile_timeout_); + } + } + if (CheckHasBit(cached_has_bits, 0x00100000U)) { ABSL_DCHECK(from._impl_.kafka_produce_timeout_ != nullptr); if (_this->_impl_.kafka_produce_timeout_ == nullptr) { _this->_impl_.kafka_produce_timeout_ = Super_::CopyConstruct(arena, *from._impl_.kafka_produce_timeout_); @@ -12111,7 +12292,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, _this->_impl_.kafka_produce_timeout_->MergeFrom(*from._impl_.kafka_produce_timeout_); } } - if (CheckHasBit(cached_has_bits, 0x00040000U)) { + if (CheckHasBit(cached_has_bits, 0x00200000U)) { ABSL_DCHECK(from._impl_.s3_flush_interval_ != nullptr); if (_this->_impl_.s3_flush_interval_ == nullptr) { _this->_impl_.s3_flush_interval_ = Super_::CopyConstruct(arena, *from._impl_.s3_flush_interval_); @@ -12119,7 +12300,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, _this->_impl_.s3_flush_interval_->MergeFrom(*from._impl_.s3_flush_interval_); } } - if (CheckHasBit(cached_has_bits, 0x00080000U)) { + if (CheckHasBit(cached_has_bits, 0x00400000U)) { ABSL_DCHECK(from._impl_.s3_upload_backoff_cap_ != nullptr); if (_this->_impl_.s3_upload_backoff_cap_ == nullptr) { _this->_impl_.s3_upload_backoff_cap_ = Super_::CopyConstruct(arena, *from._impl_.s3_upload_backoff_cap_); @@ -12127,7 +12308,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, _this->_impl_.s3_upload_backoff_cap_->MergeFrom(*from._impl_.s3_upload_backoff_cap_); } } - if (CheckHasBit(cached_has_bits, 0x00100000U)) { + if (CheckHasBit(cached_has_bits, 0x00800000U)) { ABSL_DCHECK(from._impl_.listener_auth_ != nullptr); if (_this->_impl_.listener_auth_ == nullptr) { _this->_impl_.listener_auth_ = Super_::CopyConstruct(arena, *from._impl_.listener_auth_); @@ -12135,7 +12316,9 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, _this->_impl_.listener_auth_->MergeFrom(*from._impl_.listener_auth_); } } - if (CheckHasBit(cached_has_bits, 0x00200000U)) { + } + if (BatchCheckHasBit(cached_has_bits, 0xff000000U)) { + if (CheckHasBit(cached_has_bits, 0x01000000U)) { ABSL_DCHECK(from._impl_.prometheus_listener_ != nullptr); if (_this->_impl_.prometheus_listener_ == nullptr) { _this->_impl_.prometheus_listener_ = Super_::CopyConstruct(arena, *from._impl_.prometheus_listener_); @@ -12143,7 +12326,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, _this->_impl_.prometheus_listener_->MergeFrom(*from._impl_.prometheus_listener_); } } - if (CheckHasBit(cached_has_bits, 0x00400000U)) { + if (CheckHasBit(cached_has_bits, 0x02000000U)) { ABSL_DCHECK(from._impl_.admin_listener_auth_ != nullptr); if (_this->_impl_.admin_listener_auth_ == nullptr) { _this->_impl_.admin_listener_auth_ = Super_::CopyConstruct(arena, *from._impl_.admin_listener_auth_); @@ -12151,7 +12334,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, _this->_impl_.admin_listener_auth_->MergeFrom(*from._impl_.admin_listener_auth_); } } - if (CheckHasBit(cached_has_bits, 0x00800000U)) { + if (CheckHasBit(cached_has_bits, 0x04000000U)) { ABSL_DCHECK(from._impl_.grpc_listener_ != nullptr); if (_this->_impl_.grpc_listener_ == nullptr) { _this->_impl_.grpc_listener_ = Super_::CopyConstruct(arena, *from._impl_.grpc_listener_); @@ -12159,9 +12342,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, _this->_impl_.grpc_listener_->MergeFrom(*from._impl_.grpc_listener_); } } - } - if (BatchCheckHasBit(cached_has_bits, 0xff000000U)) { - if (CheckHasBit(cached_has_bits, 0x01000000U)) { + if (CheckHasBit(cached_has_bits, 0x08000000U)) { ABSL_DCHECK(from._impl_.asn_refresh_interval_ != nullptr); if (_this->_impl_.asn_refresh_interval_ == nullptr) { _this->_impl_.asn_refresh_interval_ = Super_::CopyConstruct(arena, *from._impl_.asn_refresh_interval_); @@ -12169,7 +12350,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, _this->_impl_.asn_refresh_interval_->MergeFrom(*from._impl_.asn_refresh_interval_); } } - if (CheckHasBit(cached_has_bits, 0x02000000U)) { + if (CheckHasBit(cached_has_bits, 0x10000000U)) { ABSL_DCHECK(from._impl_.locality_refresh_interval_ != nullptr); if (_this->_impl_.locality_refresh_interval_ == nullptr) { _this->_impl_.locality_refresh_interval_ = Super_::CopyConstruct(arena, *from._impl_.locality_refresh_interval_); @@ -12177,7 +12358,7 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, _this->_impl_.locality_refresh_interval_->MergeFrom(*from._impl_.locality_refresh_interval_); } } - if (CheckHasBit(cached_has_bits, 0x04000000U)) { + if (CheckHasBit(cached_has_bits, 0x20000000U)) { ABSL_DCHECK(from._impl_.link_monitor_ != nullptr); if (_this->_impl_.link_monitor_ == nullptr) { _this->_impl_.link_monitor_ = Super_::CopyConstruct(arena, *from._impl_.link_monitor_); @@ -12185,144 +12366,161 @@ void XtcpConfig::MergeImpl(::google::protobuf::MessageLite& to_msg, _this->_impl_.link_monitor_->MergeFrom(*from._impl_.link_monitor_); } } - if (CheckHasBit(cached_has_bits, 0x08000000U)) { + if (CheckHasBit(cached_has_bits, 0x40000000U)) { if (from._internal_max_netns() != 0) { _this->_impl_.max_netns_ = from._impl_.max_netns_; } } - if (CheckHasBit(cached_has_bits, 0x10000000U)) { + if (CheckHasBit(cached_has_bits, 0x80000000U)) { + if (from._internal_max_netns_per_owner() != 0) { + _this->_impl_.max_netns_per_owner_ = from._impl_.max_netns_per_owner_; + } + } + } + cached_has_bits = from._impl_._has_bits_[2]; + if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { + if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (from._internal_max_netns_adds_per_reconcile() != 0) { + _this->_impl_.max_netns_adds_per_reconcile_ = from._impl_.max_netns_adds_per_reconcile_; + } + } + if (CheckHasBit(cached_has_bits, 0x00000002U)) { if (from._internal_write_files() != 0) { _this->_impl_.write_files_ = from._impl_.write_files_; } } - if (CheckHasBit(cached_has_bits, 0x20000000U)) { + if (CheckHasBit(cached_has_bits, 0x00000004U)) { if (from._internal_dest_write_files() != 0) { _this->_impl_.dest_write_files_ = from._impl_.dest_write_files_; } } - if (CheckHasBit(cached_has_bits, 0x40000000U)) { + if (CheckHasBit(cached_has_bits, 0x00000008U)) { if (from._internal_debug_level() != 0) { _this->_impl_.debug_level_ = from._impl_.debug_level_; } } - if (CheckHasBit(cached_has_bits, 0x80000000U)) { + if (CheckHasBit(cached_has_bits, 0x00000010U)) { if (from._internal_envelope_flush_threshold_bytes() != 0) { _this->_impl_.envelope_flush_threshold_bytes_ = from._impl_.envelope_flush_threshold_bytes_; } } - } - cached_has_bits = from._impl_._has_bits_[2]; - if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) { - if (CheckHasBit(cached_has_bits, 0x00000001U)) { + if (CheckHasBit(cached_has_bits, 0x00000020U)) { if (from._internal_envelope_flush_threshold_rows() != 0) { _this->_impl_.envelope_flush_threshold_rows_ = from._impl_.envelope_flush_threshold_rows_; } } - if (CheckHasBit(cached_has_bits, 0x00000002U)) { + if (CheckHasBit(cached_has_bits, 0x00000040U)) { if (from._internal_reconcile_before_poll() != 0) { _this->_impl_.reconcile_before_poll_ = from._impl_.reconcile_before_poll_; } } - if (CheckHasBit(cached_has_bits, 0x00000004U)) { + if (CheckHasBit(cached_has_bits, 0x00000080U)) { if (from._internal_debug_prometheus() != 0) { _this->_impl_.debug_prometheus_ = from._impl_.debug_prometheus_; } } - if (CheckHasBit(cached_has_bits, 0x00000008U)) { + } + if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { + if (CheckHasBit(cached_has_bits, 0x00000100U)) { if (from._internal_s3_skip_bucket_probe() != 0) { _this->_impl_.s3_skip_bucket_probe_ = from._impl_.s3_skip_bucket_probe_; } } - if (CheckHasBit(cached_has_bits, 0x00000010U)) { - if (from._internal_resolve_container_id() != 0) { - _this->_impl_.resolve_container_id_ = from._impl_.resolve_container_id_; + if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (from._internal_s3_allow_insecure() != 0) { + _this->_impl_.s3_allow_insecure_ = from._impl_.s3_allow_insecure_; } } - if (CheckHasBit(cached_has_bits, 0x00000020U)) { + if (CheckHasBit(cached_has_bits, 0x00000400U)) { if (from._internal_s3_parquet_flush_threshold_bytes() != 0) { _this->_impl_.s3_parquet_flush_threshold_bytes_ = from._impl_.s3_parquet_flush_threshold_bytes_; } } - if (CheckHasBit(cached_has_bits, 0x00000040U)) { + if (CheckHasBit(cached_has_bits, 0x00000800U)) { if (from._internal_s3_flush_jitter_pct() != 0) { _this->_impl_.s3_flush_jitter_pct_ = from._impl_.s3_flush_jitter_pct_; } } - if (CheckHasBit(cached_has_bits, 0x00000080U)) { + if (CheckHasBit(cached_has_bits, 0x00001000U)) { if (from._internal_s3_flush_threshold_jitter_pct() != 0) { _this->_impl_.s3_flush_threshold_jitter_pct_ = from._impl_.s3_flush_threshold_jitter_pct_; } } - } - if (BatchCheckHasBit(cached_has_bits, 0x0000ff00U)) { - if (CheckHasBit(cached_has_bits, 0x00000100U)) { + if (CheckHasBit(cached_has_bits, 0x00002000U)) { if (from._internal_s3_upload_max_attempts() != 0) { _this->_impl_.s3_upload_max_attempts_ = from._impl_.s3_upload_max_attempts_; } } - if (CheckHasBit(cached_has_bits, 0x00000200U)) { + if (CheckHasBit(cached_has_bits, 0x00004000U)) { if (from._internal_ipv4_ttl() != 0) { _this->_impl_.ipv4_ttl_ = from._impl_.ipv4_ttl_; } } - if (CheckHasBit(cached_has_bits, 0x00000400U)) { + if (CheckHasBit(cached_has_bits, 0x00008000U)) { if (from._internal_ipv6_hop_limit() != 0) { _this->_impl_.ipv6_hop_limit_ = from._impl_.ipv6_hop_limit_; } } - if (CheckHasBit(cached_has_bits, 0x00000800U)) { + } + if (BatchCheckHasBit(cached_has_bits, 0x00ff0000U)) { + if (CheckHasBit(cached_has_bits, 0x00010000U)) { if (from._internal_grpc_port() != 0) { _this->_impl_.grpc_port_ = from._impl_.grpc_port_; } } - if (CheckHasBit(cached_has_bits, 0x00001000U)) { + if (CheckHasBit(cached_has_bits, 0x00020000U)) { if (from._internal_pyroscope_sample_hz() != 0) { _this->_impl_.pyroscope_sample_hz_ = from._impl_.pyroscope_sample_hz_; } } - if (CheckHasBit(cached_has_bits, 0x00002000U)) { + if (CheckHasBit(cached_has_bits, 0x00040000U)) { if (from._internal_pyroscope_upload_interval_sec() != 0) { _this->_impl_.pyroscope_upload_interval_sec_ = from._impl_.pyroscope_upload_interval_sec_; } } - if (CheckHasBit(cached_has_bits, 0x00004000U)) { + if (CheckHasBit(cached_has_bits, 0x00080000U)) { + if (from._internal_resolve_container_id() != 0) { + _this->_impl_.resolve_container_id_ = from._impl_.resolve_container_id_; + } + } + if (CheckHasBit(cached_has_bits, 0x00100000U)) { if (from._internal_enrich_container_enable() != 0) { _this->_impl_.enrich_container_enable_ = from._impl_.enrich_container_enable_; } } - if (CheckHasBit(cached_has_bits, 0x00008000U)) { + if (CheckHasBit(cached_has_bits, 0x00200000U)) { if (from._internal_enrich_lldp_enable() != 0) { _this->_impl_.enrich_lldp_enable_ = from._impl_.enrich_lldp_enable_; } } - } - if (BatchCheckHasBit(cached_has_bits, 0x003f0000U)) { - if (CheckHasBit(cached_has_bits, 0x00010000U)) { + if (CheckHasBit(cached_has_bits, 0x00400000U)) { if (from._internal_enrich_nic_enable() != 0) { _this->_impl_.enrich_nic_enable_ = from._impl_.enrich_nic_enable_; } } - if (CheckHasBit(cached_has_bits, 0x00020000U)) { - if (from._internal_populate_nsid() != 0) { - _this->_impl_.populate_nsid_ = from._impl_.populate_nsid_; - } - } - if (CheckHasBit(cached_has_bits, 0x00040000U)) { + if (CheckHasBit(cached_has_bits, 0x00800000U)) { if (from._internal_uplink_count() != 0) { _this->_impl_.uplink_count_ = from._impl_.uplink_count_; } } - if (CheckHasBit(cached_has_bits, 0x00080000U)) { + } + if (BatchCheckHasBit(cached_has_bits, 0x0f000000U)) { + if (CheckHasBit(cached_has_bits, 0x01000000U)) { + if (from._internal_populate_nsid() != 0) { + _this->_impl_.populate_nsid_ = from._impl_.populate_nsid_; + } + } + if (CheckHasBit(cached_has_bits, 0x02000000U)) { if (from._internal_enrich_asn_enable() != 0) { _this->_impl_.enrich_asn_enable_ = from._impl_.enrich_asn_enable_; } } - if (CheckHasBit(cached_has_bits, 0x00100000U)) { + if (CheckHasBit(cached_has_bits, 0x04000000U)) { if (from._internal_enrich_locality_enable() != 0) { _this->_impl_.enrich_locality_enable_ = from._impl_.enrich_locality_enable_; } } - if (CheckHasBit(cached_has_bits, 0x00200000U)) { + if (CheckHasBit(cached_has_bits, 0x08000000U)) { if (from._internal_locality_events_enable() != 0) { _this->_impl_.locality_events_enable_ = from._impl_.locality_events_enable_; } @@ -12349,19 +12547,19 @@ void XtcpConfig::InternalSwap(XtcpConfig* PROTOBUF_RESTRICT PROTOBUF_NONNULL oth swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); swap(_impl_._has_bits_[1], other->_impl_._has_bits_[1]); swap(_impl_._has_bits_[2], other->_impl_._has_bits_[2]); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.dest_, &other->_impl_.dest_, arena); - ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.marshal_to_, &other->_impl_.marshal_to_, arena); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.csv_columns_, &other->_impl_.csv_columns_, arena); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.xtcp_proto_file_, &other->_impl_.xtcp_proto_file_, arena); ::google::protobuf::internal::memswap< - PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.s3_allow_insecure_) - + sizeof(XtcpConfig::_impl_.s3_allow_insecure_) + PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.io_uring_sockstat_workers_) + + sizeof(XtcpConfig::_impl_.io_uring_sockstat_workers_) - PROTOBUF_FIELD_OFFSET(XtcpConfig, _impl_.poll_frequency_)>( reinterpret_cast(&_impl_.poll_frequency_), reinterpret_cast(&other->_impl_.poll_frequency_)); _impl_.listeners_.InternalSwap(&other->_impl_.listeners_); _impl_.uplink_interfaces_.InternalSwap(&other->_impl_.uplink_interfaces_); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.capture_path_, &other->_impl_.capture_path_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.dest_, &other->_impl_.dest_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.marshal_to_, &other->_impl_.marshal_to_, arena); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.topic_, &other->_impl_.topic_, arena); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.kafka_schema_url_, &other->_impl_.kafka_schema_url_, arena); ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.kafka_compression_, &other->_impl_.kafka_compression_, arena); diff --git a/gen/cpp/xtcp_config/v1/xtcp_config.pb.h b/gen/cpp/xtcp_config/v1/xtcp_config.pb.h index a687a1cae..403b1e0a2 100644 --- a/gen/cpp/xtcp_config/v1/xtcp_config.pb.h +++ b/gen/cpp/xtcp_config/v1/xtcp_config.pb.h @@ -3822,8 +3822,6 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: // accessors ------------------------------------------------------- enum : int { - kDestFieldNumber = 60, - kMarshalToFieldNumber = 61, kCsvColumnsFieldNumber = 62, kXtcpProtoFileFieldNumber = 63, kPollFrequencyFieldNumber = 11, @@ -3838,15 +3836,19 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: kPacketSizeFieldNumber = 18, kModulusFieldNumber = 20, kPacketSizeMplyFieldNumber = 19, + kIoUringFieldNumber = 22, kIoUringRecvBatchSizeFieldNumber = 23, + kIoUringCqeBatchSizeFieldNumber = 24, kMaxDumpBytesFieldNumber = 25, kMaxRecordsPerNetnsFieldNumber = 26, - kIoUringCqeBatchSizeFieldNumber = 24, - kIoUringFieldNumber = 22, - kS3AllowInsecureFieldNumber = 107, + kMaxRecordsPerPollFieldNumber = 27, + kIoUringSockstatBatchSizeFieldNumber = 28, + kIoUringSockstatWorkersFieldNumber = 29, kListenersFieldNumber = 162, kUplinkInterfacesFieldNumber = 222, kCapturePathFieldNumber = 51, + kDestFieldNumber = 60, + kMarshalToFieldNumber = 61, kTopicFieldNumber = 80, kKafkaSchemaUrlFieldNumber = 81, kKafkaCompressionFieldNumber = 83, @@ -3871,6 +3873,7 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: kIpmetaBootstrapPathFieldNumber = 243, kIpmetaCachePathFieldNumber = 244, kReconcileFrequencyFieldNumber = 40, + kReconcileTimeoutFieldNumber = 43, kKafkaProduceTimeoutFieldNumber = 82, kS3FlushIntervalFieldNumber = 111, kS3UploadBackoffCapFieldNumber = 115, @@ -3882,6 +3885,8 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: kLocalityRefreshIntervalFieldNumber = 246, kLinkMonitorFieldNumber = 250, kMaxNetnsFieldNumber = 42, + kMaxNetnsPerOwnerFieldNumber = 44, + kMaxNetnsAddsPerReconcileFieldNumber = 45, kWriteFilesFieldNumber = 50, kDestWriteFilesFieldNumber = 52, kDebugLevelFieldNumber = 53, @@ -3890,7 +3895,7 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: kReconcileBeforePollFieldNumber = 41, kDebugPrometheusFieldNumber = 54, kS3SkipBucketProbeFieldNumber = 106, - kResolveContainerIdFieldNumber = 200, + kS3AllowInsecureFieldNumber = 107, kS3ParquetFlushThresholdBytesFieldNumber = 110, kS3FlushJitterPctFieldNumber = 112, kS3FlushThresholdJitterPctFieldNumber = 113, @@ -3900,45 +3905,16 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: kGrpcPortFieldNumber = 160, kPyroscopeSampleHzFieldNumber = 172, kPyroscopeUploadIntervalSecFieldNumber = 173, + kResolveContainerIdFieldNumber = 200, kEnrichContainerEnableFieldNumber = 201, kEnrichLldpEnableFieldNumber = 210, kEnrichNicEnableFieldNumber = 220, - kPopulateNsidFieldNumber = 230, kUplinkCountFieldNumber = 221, + kPopulateNsidFieldNumber = 230, kEnrichAsnEnableFieldNumber = 240, kEnrichLocalityEnableFieldNumber = 245, kLocalityEventsEnableFieldNumber = 247, }; - // string dest = 60 [json_name = "dest", (.buf.validate.field) = { - void clear_dest() ; - [[nodiscard]] const ::std::string& dest() const; - template - void set_dest(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_dest(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_dest(); - void set_allocated_dest(::std::string* PROTOBUF_NULLABLE value); - - private: - const ::std::string& _internal_dest() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_dest(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_dest(); - - public: - // string marshal_to = 61 [json_name = "marshalTo", (.buf.validate.field) = { - void clear_marshal_to() ; - [[nodiscard]] const ::std::string& marshal_to() const; - template - void set_marshal_to(Arg_&& arg, Args_... args); - ::std::string* PROTOBUF_NONNULL mutable_marshal_to(); - [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_marshal_to(); - void set_allocated_marshal_to(::std::string* PROTOBUF_NULLABLE value); - - private: - const ::std::string& _internal_marshal_to() const; - PROTOBUF_ALWAYS_INLINE void _internal_set_marshal_to(const ::std::string& value); - ::std::string* PROTOBUF_NONNULL _internal_mutable_marshal_to(); - - public: // string csv_columns = 62 [json_name = "csvColumns", (.buf.validate.field) = { void clear_csv_columns() ; [[nodiscard]] const ::std::string& csv_columns() const; @@ -4103,6 +4079,16 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: ::uint32_t _internal_packet_size_mply() const; void _internal_set_packet_size_mply(::uint32_t value); + public: + // bool io_uring = 22 [json_name = "ioUring", (.buf.validate.field) = { + void clear_io_uring() ; + [[nodiscard]] bool io_uring() const; + void set_io_uring(bool value); + + private: + bool _internal_io_uring() const; + void _internal_set_io_uring(bool value); + public: // uint32 io_uring_recv_batch_size = 23 [json_name = "ioUringRecvBatchSize", (.buf.validate.field) = { void clear_io_uring_recv_batch_size() ; @@ -4113,6 +4099,16 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: ::uint32_t _internal_io_uring_recv_batch_size() const; void _internal_set_io_uring_recv_batch_size(::uint32_t value); + public: + // uint32 io_uring_cqe_batch_size = 24 [json_name = "ioUringCqeBatchSize", (.buf.validate.field) = { + void clear_io_uring_cqe_batch_size() ; + [[nodiscard]] ::uint32_t io_uring_cqe_batch_size() const; + void set_io_uring_cqe_batch_size(::uint32_t value); + + private: + ::uint32_t _internal_io_uring_cqe_batch_size() const; + void _internal_set_io_uring_cqe_batch_size(::uint32_t value); + public: // uint64 max_dump_bytes = 25 [json_name = "maxDumpBytes", (.buf.validate.field) = { void clear_max_dump_bytes() ; @@ -4134,34 +4130,34 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: void _internal_set_max_records_per_netns(::uint64_t value); public: - // uint32 io_uring_cqe_batch_size = 24 [json_name = "ioUringCqeBatchSize", (.buf.validate.field) = { - void clear_io_uring_cqe_batch_size() ; - [[nodiscard]] ::uint32_t io_uring_cqe_batch_size() const; - void set_io_uring_cqe_batch_size(::uint32_t value); + // uint64 max_records_per_poll = 27 [json_name = "maxRecordsPerPoll", (.buf.validate.field) = { + void clear_max_records_per_poll() ; + [[nodiscard]] ::uint64_t max_records_per_poll() const; + void set_max_records_per_poll(::uint64_t value); private: - ::uint32_t _internal_io_uring_cqe_batch_size() const; - void _internal_set_io_uring_cqe_batch_size(::uint32_t value); + ::uint64_t _internal_max_records_per_poll() const; + void _internal_set_max_records_per_poll(::uint64_t value); public: - // bool io_uring = 22 [json_name = "ioUring", (.buf.validate.field) = { - void clear_io_uring() ; - [[nodiscard]] bool io_uring() const; - void set_io_uring(bool value); + // uint32 io_uring_sockstat_batch_size = 28 [json_name = "ioUringSockstatBatchSize", (.buf.validate.field) = { + void clear_io_uring_sockstat_batch_size() ; + [[nodiscard]] ::uint32_t io_uring_sockstat_batch_size() const; + void set_io_uring_sockstat_batch_size(::uint32_t value); private: - bool _internal_io_uring() const; - void _internal_set_io_uring(bool value); + ::uint32_t _internal_io_uring_sockstat_batch_size() const; + void _internal_set_io_uring_sockstat_batch_size(::uint32_t value); public: - // bool s3_allow_insecure = 107 [json_name = "s3AllowInsecure", (.buf.validate.field) = { - void clear_s3_allow_insecure() ; - [[nodiscard]] bool s3_allow_insecure() const; - void set_s3_allow_insecure(bool value); + // uint32 io_uring_sockstat_workers = 29 [json_name = "ioUringSockstatWorkers", (.buf.validate.field) = { + void clear_io_uring_sockstat_workers() ; + [[nodiscard]] ::uint32_t io_uring_sockstat_workers() const; + void set_io_uring_sockstat_workers(::uint32_t value); private: - bool _internal_s3_allow_insecure() const; - void _internal_set_s3_allow_insecure(bool value); + ::uint32_t _internal_io_uring_sockstat_workers() const; + void _internal_set_io_uring_sockstat_workers(::uint32_t value); public: // repeated .xtcp_config.v1.Listener listeners = 162 [json_name = "listeners", (.buf.validate.field) = { @@ -4224,6 +4220,36 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: PROTOBUF_ALWAYS_INLINE void _internal_set_capture_path(const ::std::string& value); ::std::string* PROTOBUF_NONNULL _internal_mutable_capture_path(); + public: + // string dest = 60 [json_name = "dest", (.buf.validate.field) = { + void clear_dest() ; + [[nodiscard]] const ::std::string& dest() const; + template + void set_dest(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_dest(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_dest(); + void set_allocated_dest(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_dest() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_dest(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_dest(); + + public: + // string marshal_to = 61 [json_name = "marshalTo", (.buf.validate.field) = { + void clear_marshal_to() ; + [[nodiscard]] const ::std::string& marshal_to() const; + template + void set_marshal_to(Arg_&& arg, Args_... args); + ::std::string* PROTOBUF_NONNULL mutable_marshal_to(); + [[nodiscard]] ::std::string* PROTOBUF_NULLABLE release_marshal_to(); + void set_allocated_marshal_to(::std::string* PROTOBUF_NULLABLE value); + + private: + const ::std::string& _internal_marshal_to() const; + PROTOBUF_ALWAYS_INLINE void _internal_set_marshal_to(const ::std::string& value); + ::std::string* PROTOBUF_NONNULL _internal_mutable_marshal_to(); + public: // string topic = 80 [json_name = "topic", (.buf.validate.field) = { void clear_topic() ; @@ -4584,6 +4610,21 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: const ::google::protobuf::Duration& _internal_reconcile_frequency() const; ::google::protobuf::Duration* PROTOBUF_NONNULL _internal_mutable_reconcile_frequency(); + public: + // .google.protobuf.Duration reconcile_timeout = 43 [json_name = "reconcileTimeout", (.buf.validate.field) = { + [[nodiscard]] bool has_reconcile_timeout() const; + void clear_reconcile_timeout() ; + [[nodiscard]] const ::google::protobuf::Duration& reconcile_timeout() const; + [[nodiscard]] ::google::protobuf::Duration* PROTOBUF_NULLABLE release_reconcile_timeout(); + ::google::protobuf::Duration* PROTOBUF_NONNULL mutable_reconcile_timeout(); + void set_allocated_reconcile_timeout(::google::protobuf::Duration* PROTOBUF_NULLABLE value); + void unsafe_arena_set_allocated_reconcile_timeout(::google::protobuf::Duration* PROTOBUF_NULLABLE value); + ::google::protobuf::Duration* PROTOBUF_NULLABLE unsafe_arena_release_reconcile_timeout(); + + private: + const ::google::protobuf::Duration& _internal_reconcile_timeout() const; + ::google::protobuf::Duration* PROTOBUF_NONNULL _internal_mutable_reconcile_timeout(); + public: // .google.protobuf.Duration kafka_produce_timeout = 82 [json_name = "kafkaProduceTimeout", (.buf.validate.field) = { [[nodiscard]] bool has_kafka_produce_timeout() const; @@ -4744,6 +4785,26 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: ::uint32_t _internal_max_netns() const; void _internal_set_max_netns(::uint32_t value); + public: + // uint32 max_netns_per_owner = 44 [json_name = "maxNetnsPerOwner", (.buf.validate.field) = { + void clear_max_netns_per_owner() ; + [[nodiscard]] ::uint32_t max_netns_per_owner() const; + void set_max_netns_per_owner(::uint32_t value); + + private: + ::uint32_t _internal_max_netns_per_owner() const; + void _internal_set_max_netns_per_owner(::uint32_t value); + + public: + // uint32 max_netns_adds_per_reconcile = 45 [json_name = "maxNetnsAddsPerReconcile", (.buf.validate.field) = { + void clear_max_netns_adds_per_reconcile() ; + [[nodiscard]] ::uint32_t max_netns_adds_per_reconcile() const; + void set_max_netns_adds_per_reconcile(::uint32_t value); + + private: + ::uint32_t _internal_max_netns_adds_per_reconcile() const; + void _internal_set_max_netns_adds_per_reconcile(::uint32_t value); + public: // uint32 write_files = 50 [json_name = "writeFiles", (.buf.validate.field) = { void clear_write_files() ; @@ -4825,14 +4886,14 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: void _internal_set_s3_skip_bucket_probe(bool value); public: - // bool resolve_container_id = 200 [json_name = "resolveContainerId", (.buf.validate.field) = { - void clear_resolve_container_id() ; - [[nodiscard]] bool resolve_container_id() const; - void set_resolve_container_id(bool value); + // bool s3_allow_insecure = 107 [json_name = "s3AllowInsecure", (.buf.validate.field) = { + void clear_s3_allow_insecure() ; + [[nodiscard]] bool s3_allow_insecure() const; + void set_s3_allow_insecure(bool value); private: - bool _internal_resolve_container_id() const; - void _internal_set_resolve_container_id(bool value); + bool _internal_s3_allow_insecure() const; + void _internal_set_s3_allow_insecure(bool value); public: // uint32 s3_parquet_flush_threshold_bytes = 110 [json_name = "s3ParquetFlushThresholdBytes", (.buf.validate.field) = { @@ -4924,6 +4985,16 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: ::uint32_t _internal_pyroscope_upload_interval_sec() const; void _internal_set_pyroscope_upload_interval_sec(::uint32_t value); + public: + // bool resolve_container_id = 200 [json_name = "resolveContainerId", (.buf.validate.field) = { + void clear_resolve_container_id() ; + [[nodiscard]] bool resolve_container_id() const; + void set_resolve_container_id(bool value); + + private: + bool _internal_resolve_container_id() const; + void _internal_set_resolve_container_id(bool value); + public: // bool enrich_container_enable = 201 [json_name = "enrichContainerEnable"]; void clear_enrich_container_enable() ; @@ -4954,16 +5025,6 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: bool _internal_enrich_nic_enable() const; void _internal_set_enrich_nic_enable(bool value); - public: - // bool populate_nsid = 230 [json_name = "populateNsid"]; - void clear_populate_nsid() ; - [[nodiscard]] bool populate_nsid() const; - void set_populate_nsid(bool value); - - private: - bool _internal_populate_nsid() const; - void _internal_set_populate_nsid(bool value); - public: // uint32 uplink_count = 221 [json_name = "uplinkCount", (.buf.validate.field) = { void clear_uplink_count() ; @@ -4974,6 +5035,16 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: ::uint32_t _internal_uplink_count() const; void _internal_set_uplink_count(::uint32_t value); + public: + // bool populate_nsid = 230 [json_name = "populateNsid"]; + void clear_populate_nsid() ; + [[nodiscard]] bool populate_nsid() const; + void set_populate_nsid(bool value); + + private: + bool _internal_populate_nsid() const; + void _internal_set_populate_nsid(bool value); + public: // bool enrich_asn_enable = 240 [json_name = "enrichAsnEnable"]; void clear_enrich_asn_enable() ; @@ -5009,8 +5080,8 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: private: class _Internal; using ParseTableT_ = - ::google::protobuf::internal::TcParseTable<5, 86, - 15, 466, + ::google::protobuf::internal::TcParseTable<5, 92, + 16, 474, 33>; static constexpr ParseTableT_ InternalGenerateParseTable_( const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL class_data); @@ -5038,8 +5109,6 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: const XtcpConfig& from_msg); ::google::protobuf::internal::HasBits<3> _has_bits_; ::google::protobuf::internal::CachedSize _cached_size_; - ::google::protobuf::internal::ArenaStringPtr dest_; - ::google::protobuf::internal::ArenaStringPtr marshal_to_; ::google::protobuf::internal::ArenaStringPtr csv_columns_; ::google::protobuf::internal::ArenaStringPtr xtcp_proto_file_; ::google::protobuf::Duration* PROTOBUF_NULLABLE poll_frequency_; @@ -5054,15 +5123,19 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: ::uint64_t packet_size_; ::uint64_t modulus_; ::uint32_t packet_size_mply_; + bool io_uring_; ::uint32_t io_uring_recv_batch_size_; + ::uint32_t io_uring_cqe_batch_size_; ::uint64_t max_dump_bytes_; ::uint64_t max_records_per_netns_; - ::uint32_t io_uring_cqe_batch_size_; - bool io_uring_; - bool s3_allow_insecure_; + ::uint64_t max_records_per_poll_; + ::uint32_t io_uring_sockstat_batch_size_; + ::uint32_t io_uring_sockstat_workers_; ::google::protobuf::RepeatedPtrField< ::xtcp_config::v1::Listener > listeners_; ::google::protobuf::RepeatedPtrField<::std::string> uplink_interfaces_; ::google::protobuf::internal::ArenaStringPtr capture_path_; + ::google::protobuf::internal::ArenaStringPtr dest_; + ::google::protobuf::internal::ArenaStringPtr marshal_to_; ::google::protobuf::internal::ArenaStringPtr topic_; ::google::protobuf::internal::ArenaStringPtr kafka_schema_url_; ::google::protobuf::internal::ArenaStringPtr kafka_compression_; @@ -5087,6 +5160,7 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: ::google::protobuf::internal::ArenaStringPtr ipmeta_bootstrap_path_; ::google::protobuf::internal::ArenaStringPtr ipmeta_cache_path_; ::google::protobuf::Duration* PROTOBUF_NULLABLE reconcile_frequency_; + ::google::protobuf::Duration* PROTOBUF_NULLABLE reconcile_timeout_; ::google::protobuf::Duration* PROTOBUF_NULLABLE kafka_produce_timeout_; ::google::protobuf::Duration* PROTOBUF_NULLABLE s3_flush_interval_; ::google::protobuf::Duration* PROTOBUF_NULLABLE s3_upload_backoff_cap_; @@ -5098,6 +5172,8 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: ::google::protobuf::Duration* PROTOBUF_NULLABLE locality_refresh_interval_; ::xtcp_config::v1::LinkMonitorConfig* PROTOBUF_NULLABLE link_monitor_; ::uint32_t max_netns_; + ::uint32_t max_netns_per_owner_; + ::uint32_t max_netns_adds_per_reconcile_; ::uint32_t write_files_; ::uint32_t dest_write_files_; ::uint32_t debug_level_; @@ -5106,7 +5182,7 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: bool reconcile_before_poll_; bool debug_prometheus_; bool s3_skip_bucket_probe_; - bool resolve_container_id_; + bool s3_allow_insecure_; ::uint32_t s3_parquet_flush_threshold_bytes_; ::uint32_t s3_flush_jitter_pct_; ::uint32_t s3_flush_threshold_jitter_pct_; @@ -5116,11 +5192,12 @@ class PROTOBUF_FUTURE_ADD_EARLY_WARN_UNUSED XtcpConfig final : public ::google: ::uint32_t grpc_port_; ::uint32_t pyroscope_sample_hz_; ::uint32_t pyroscope_upload_interval_sec_; + bool resolve_container_id_; bool enrich_container_enable_; bool enrich_lldp_enable_; bool enrich_nic_enable_; - bool populate_nsid_; ::uint32_t uplink_count_; + bool populate_nsid_; bool enrich_asn_enable_; bool enrich_locality_enable_; bool locality_events_enable_; @@ -10648,7 +10725,7 @@ inline void LinkMonitorConfig::set_allocated_learn_deadline(::google::protobuf:: inline void XtcpConfig::clear_nl_timeout_milliseconds() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.nl_timeout_milliseconds_ = ::uint64_t{0u}; - ClearHasBit(_impl_._has_bits_[0], 0x00000080U); + ClearHasBit(_impl_._has_bits_[0], 0x00000020U); } inline ::uint64_t XtcpConfig::nl_timeout_milliseconds() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.nl_timeout_milliseconds) @@ -10656,7 +10733,7 @@ inline ::uint64_t XtcpConfig::nl_timeout_milliseconds() const { } inline void XtcpConfig::set_nl_timeout_milliseconds(::uint64_t value) { _internal_set_nl_timeout_milliseconds(value); - SetHasBit(_impl_._has_bits_[0], 0x00000080U); + SetHasBit(_impl_._has_bits_[0], 0x00000020U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.nl_timeout_milliseconds) } inline ::uint64_t XtcpConfig::_internal_nl_timeout_milliseconds() const { @@ -10670,7 +10747,7 @@ inline void XtcpConfig::_internal_set_nl_timeout_milliseconds(::uint64_t value) // .google.protobuf.Duration poll_frequency = 11 [json_name = "pollFrequency", (.buf.validate.field) = { inline bool XtcpConfig::has_poll_frequency() const { - bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000010U); + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000004U); PROTOBUF_ASSUME(!value || _impl_.poll_frequency_ != nullptr); return value; } @@ -10691,16 +10768,16 @@ inline void XtcpConfig::unsafe_arena_set_allocated_poll_frequency( } _impl_.poll_frequency_ = reinterpret_cast<::google::protobuf::Duration*>(value); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000010U); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xtcp_config.v1.XtcpConfig.poll_frequency) } inline ::google::protobuf::Duration* PROTOBUF_NULLABLE XtcpConfig::release_poll_frequency() { ::google::protobuf::internal::TSanWrite(&_impl_); - ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); ::google::protobuf::Duration* released = _impl_.poll_frequency_; _impl_.poll_frequency_ = nullptr; if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { @@ -10720,7 +10797,7 @@ inline ::google::protobuf::Duration* PROTOBUF_NULLABLE XtcpConfig::unsafe_arena_ ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.poll_frequency) - ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); ::google::protobuf::Duration* temp = _impl_.poll_frequency_; _impl_.poll_frequency_ = nullptr; return temp; @@ -10735,7 +10812,7 @@ inline ::google::protobuf::Duration* PROTOBUF_NONNULL XtcpConfig::_internal_muta } inline ::google::protobuf::Duration* PROTOBUF_NONNULL XtcpConfig::mutable_poll_frequency() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000010U); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); ::google::protobuf::Duration* _msg = _internal_mutable_poll_frequency(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.poll_frequency) return _msg; @@ -10752,9 +10829,9 @@ inline void XtcpConfig::set_allocated_poll_frequency(::google::protobuf::Duratio if (message_arena != submessage_arena) { value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - SetHasBit(_impl_._has_bits_[0], 0x00000010U); + SetHasBit(_impl_._has_bits_[0], 0x00000004U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000010U); + ClearHasBit(_impl_._has_bits_[0], 0x00000004U); } _impl_.poll_frequency_ = reinterpret_cast<::google::protobuf::Duration*>(value); @@ -10763,7 +10840,7 @@ inline void XtcpConfig::set_allocated_poll_frequency(::google::protobuf::Duratio // .google.protobuf.Duration poll_timeout = 12 [json_name = "pollTimeout", (.buf.validate.field) = { inline bool XtcpConfig::has_poll_timeout() const { - bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000020U); + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000008U); PROTOBUF_ASSUME(!value || _impl_.poll_timeout_ != nullptr); return value; } @@ -10784,16 +10861,16 @@ inline void XtcpConfig::unsafe_arena_set_allocated_poll_timeout( } _impl_.poll_timeout_ = reinterpret_cast<::google::protobuf::Duration*>(value); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000020U); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000020U); + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xtcp_config.v1.XtcpConfig.poll_timeout) } inline ::google::protobuf::Duration* PROTOBUF_NULLABLE XtcpConfig::release_poll_timeout() { ::google::protobuf::internal::TSanWrite(&_impl_); - ClearHasBit(_impl_._has_bits_[0], 0x00000020U); + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); ::google::protobuf::Duration* released = _impl_.poll_timeout_; _impl_.poll_timeout_ = nullptr; if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { @@ -10813,7 +10890,7 @@ inline ::google::protobuf::Duration* PROTOBUF_NULLABLE XtcpConfig::unsafe_arena_ ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.poll_timeout) - ClearHasBit(_impl_._has_bits_[0], 0x00000020U); + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); ::google::protobuf::Duration* temp = _impl_.poll_timeout_; _impl_.poll_timeout_ = nullptr; return temp; @@ -10828,7 +10905,7 @@ inline ::google::protobuf::Duration* PROTOBUF_NONNULL XtcpConfig::_internal_muta } inline ::google::protobuf::Duration* PROTOBUF_NONNULL XtcpConfig::mutable_poll_timeout() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000020U); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); ::google::protobuf::Duration* _msg = _internal_mutable_poll_timeout(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.poll_timeout) return _msg; @@ -10845,9 +10922,9 @@ inline void XtcpConfig::set_allocated_poll_timeout(::google::protobuf::Duration* if (message_arena != submessage_arena) { value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - SetHasBit(_impl_._has_bits_[0], 0x00000020U); + SetHasBit(_impl_._has_bits_[0], 0x00000008U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000020U); + ClearHasBit(_impl_._has_bits_[0], 0x00000008U); } _impl_.poll_timeout_ = reinterpret_cast<::google::protobuf::Duration*>(value); @@ -10858,7 +10935,7 @@ inline void XtcpConfig::set_allocated_poll_timeout(::google::protobuf::Duration* inline void XtcpConfig::clear_poll_jitter_pct() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.poll_jitter_pct_ = 0u; - ClearHasBit(_impl_._has_bits_[0], 0x00000200U); + ClearHasBit(_impl_._has_bits_[0], 0x00000080U); } inline ::uint32_t XtcpConfig::poll_jitter_pct() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.poll_jitter_pct) @@ -10866,7 +10943,7 @@ inline ::uint32_t XtcpConfig::poll_jitter_pct() const { } inline void XtcpConfig::set_poll_jitter_pct(::uint32_t value) { _internal_set_poll_jitter_pct(value); - SetHasBit(_impl_._has_bits_[0], 0x00000200U); + SetHasBit(_impl_._has_bits_[0], 0x00000080U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.poll_jitter_pct) } inline ::uint32_t XtcpConfig::_internal_poll_jitter_pct() const { @@ -10882,7 +10959,7 @@ inline void XtcpConfig::_internal_set_poll_jitter_pct(::uint32_t value) { inline void XtcpConfig::clear_max_loops() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.max_loops_ = ::uint64_t{0u}; - ClearHasBit(_impl_._has_bits_[0], 0x00000100U); + ClearHasBit(_impl_._has_bits_[0], 0x00000040U); } inline ::uint64_t XtcpConfig::max_loops() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.max_loops) @@ -10890,7 +10967,7 @@ inline ::uint64_t XtcpConfig::max_loops() const { } inline void XtcpConfig::set_max_loops(::uint64_t value) { _internal_set_max_loops(value); - SetHasBit(_impl_._has_bits_[0], 0x00000100U); + SetHasBit(_impl_._has_bits_[0], 0x00000040U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.max_loops) } inline ::uint64_t XtcpConfig::_internal_max_loops() const { @@ -10906,7 +10983,7 @@ inline void XtcpConfig::_internal_set_max_loops(::uint64_t value) { inline void XtcpConfig::clear_netlinkers() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.netlinkers_ = 0u; - ClearHasBit(_impl_._has_bits_[0], 0x00000400U); + ClearHasBit(_impl_._has_bits_[0], 0x00000100U); } inline ::uint32_t XtcpConfig::netlinkers() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.netlinkers) @@ -10914,7 +10991,7 @@ inline ::uint32_t XtcpConfig::netlinkers() const { } inline void XtcpConfig::set_netlinkers(::uint32_t value) { _internal_set_netlinkers(value); - SetHasBit(_impl_._has_bits_[0], 0x00000400U); + SetHasBit(_impl_._has_bits_[0], 0x00000100U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.netlinkers) } inline ::uint32_t XtcpConfig::_internal_netlinkers() const { @@ -10930,7 +11007,7 @@ inline void XtcpConfig::_internal_set_netlinkers(::uint32_t value) { inline void XtcpConfig::clear_netlinkers_done_chan_size() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.netlinkers_done_chan_size_ = 0u; - ClearHasBit(_impl_._has_bits_[0], 0x00000800U); + ClearHasBit(_impl_._has_bits_[0], 0x00000200U); } inline ::uint32_t XtcpConfig::netlinkers_done_chan_size() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.netlinkers_done_chan_size) @@ -10938,7 +11015,7 @@ inline ::uint32_t XtcpConfig::netlinkers_done_chan_size() const { } inline void XtcpConfig::set_netlinkers_done_chan_size(::uint32_t value) { _internal_set_netlinkers_done_chan_size(value); - SetHasBit(_impl_._has_bits_[0], 0x00000800U); + SetHasBit(_impl_._has_bits_[0], 0x00000200U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.netlinkers_done_chan_size) } inline ::uint32_t XtcpConfig::_internal_netlinkers_done_chan_size() const { @@ -10954,7 +11031,7 @@ inline void XtcpConfig::_internal_set_netlinkers_done_chan_size(::uint32_t value inline void XtcpConfig::clear_nlmsg_seq() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.nlmsg_seq_ = 0u; - ClearHasBit(_impl_._has_bits_[0], 0x00001000U); + ClearHasBit(_impl_._has_bits_[0], 0x00000400U); } inline ::uint32_t XtcpConfig::nlmsg_seq() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.nlmsg_seq) @@ -10962,7 +11039,7 @@ inline ::uint32_t XtcpConfig::nlmsg_seq() const { } inline void XtcpConfig::set_nlmsg_seq(::uint32_t value) { _internal_set_nlmsg_seq(value); - SetHasBit(_impl_._has_bits_[0], 0x00001000U); + SetHasBit(_impl_._has_bits_[0], 0x00000400U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.nlmsg_seq) } inline ::uint32_t XtcpConfig::_internal_nlmsg_seq() const { @@ -10978,7 +11055,7 @@ inline void XtcpConfig::_internal_set_nlmsg_seq(::uint32_t value) { inline void XtcpConfig::clear_packet_size() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.packet_size_ = ::uint64_t{0u}; - ClearHasBit(_impl_._has_bits_[0], 0x00002000U); + ClearHasBit(_impl_._has_bits_[0], 0x00000800U); } inline ::uint64_t XtcpConfig::packet_size() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.packet_size) @@ -10986,7 +11063,7 @@ inline ::uint64_t XtcpConfig::packet_size() const { } inline void XtcpConfig::set_packet_size(::uint64_t value) { _internal_set_packet_size(value); - SetHasBit(_impl_._has_bits_[0], 0x00002000U); + SetHasBit(_impl_._has_bits_[0], 0x00000800U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.packet_size) } inline ::uint64_t XtcpConfig::_internal_packet_size() const { @@ -11002,7 +11079,7 @@ inline void XtcpConfig::_internal_set_packet_size(::uint64_t value) { inline void XtcpConfig::clear_packet_size_mply() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.packet_size_mply_ = 0u; - ClearHasBit(_impl_._has_bits_[0], 0x00008000U); + ClearHasBit(_impl_._has_bits_[0], 0x00002000U); } inline ::uint32_t XtcpConfig::packet_size_mply() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.packet_size_mply) @@ -11010,7 +11087,7 @@ inline ::uint32_t XtcpConfig::packet_size_mply() const { } inline void XtcpConfig::set_packet_size_mply(::uint32_t value) { _internal_set_packet_size_mply(value); - SetHasBit(_impl_._has_bits_[0], 0x00008000U); + SetHasBit(_impl_._has_bits_[0], 0x00002000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.packet_size_mply) } inline ::uint32_t XtcpConfig::_internal_packet_size_mply() const { @@ -11026,7 +11103,7 @@ inline void XtcpConfig::_internal_set_packet_size_mply(::uint32_t value) { inline void XtcpConfig::clear_modulus() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.modulus_ = ::uint64_t{0u}; - ClearHasBit(_impl_._has_bits_[0], 0x00004000U); + ClearHasBit(_impl_._has_bits_[0], 0x00001000U); } inline ::uint64_t XtcpConfig::modulus() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.modulus) @@ -11034,7 +11111,7 @@ inline ::uint64_t XtcpConfig::modulus() const { } inline void XtcpConfig::set_modulus(::uint64_t value) { _internal_set_modulus(value); - SetHasBit(_impl_._has_bits_[0], 0x00004000U); + SetHasBit(_impl_._has_bits_[0], 0x00001000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.modulus) } inline ::uint64_t XtcpConfig::_internal_modulus() const { @@ -11048,14 +11125,14 @@ inline void XtcpConfig::_internal_set_modulus(::uint64_t value) { // .xtcp_config.v1.EnabledDeserializers enabled_deserializers = 21 [json_name = "enabledDeserializers", (.buf.validate.field) = { inline bool XtcpConfig::has_enabled_deserializers() const { - bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000040U); + bool value = CheckHasBit(_impl_._has_bits_[0], 0x00000010U); PROTOBUF_ASSUME(!value || _impl_.enabled_deserializers_ != nullptr); return value; } inline void XtcpConfig::clear_enabled_deserializers() { ::google::protobuf::internal::TSanWrite(&_impl_); if (_impl_.enabled_deserializers_ != nullptr) _impl_.enabled_deserializers_->Clear(); - ClearHasBit(_impl_._has_bits_[0], 0x00000040U); + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); } inline const ::xtcp_config::v1::EnabledDeserializers& XtcpConfig::_internal_enabled_deserializers() const { ::google::protobuf::internal::TSanRead(&_impl_); @@ -11074,16 +11151,16 @@ inline void XtcpConfig::unsafe_arena_set_allocated_enabled_deserializers( } _impl_.enabled_deserializers_ = reinterpret_cast<::xtcp_config::v1::EnabledDeserializers*>(value); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000040U); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000040U); + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xtcp_config.v1.XtcpConfig.enabled_deserializers) } inline ::xtcp_config::v1::EnabledDeserializers* PROTOBUF_NULLABLE XtcpConfig::release_enabled_deserializers() { ::google::protobuf::internal::TSanWrite(&_impl_); - ClearHasBit(_impl_._has_bits_[0], 0x00000040U); + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); ::xtcp_config::v1::EnabledDeserializers* released = _impl_.enabled_deserializers_; _impl_.enabled_deserializers_ = nullptr; if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { @@ -11103,7 +11180,7 @@ inline ::xtcp_config::v1::EnabledDeserializers* PROTOBUF_NULLABLE XtcpConfig::un ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.enabled_deserializers) - ClearHasBit(_impl_._has_bits_[0], 0x00000040U); + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); ::xtcp_config::v1::EnabledDeserializers* temp = _impl_.enabled_deserializers_; _impl_.enabled_deserializers_ = nullptr; return temp; @@ -11118,7 +11195,7 @@ inline ::xtcp_config::v1::EnabledDeserializers* PROTOBUF_NONNULL XtcpConfig::_in } inline ::xtcp_config::v1::EnabledDeserializers* PROTOBUF_NONNULL XtcpConfig::mutable_enabled_deserializers() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000040U); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); ::xtcp_config::v1::EnabledDeserializers* _msg = _internal_mutable_enabled_deserializers(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.enabled_deserializers) return _msg; @@ -11135,9 +11212,9 @@ inline void XtcpConfig::set_allocated_enabled_deserializers(::xtcp_config::v1::E if (message_arena != submessage_arena) { value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - SetHasBit(_impl_._has_bits_[0], 0x00000040U); + SetHasBit(_impl_._has_bits_[0], 0x00000010U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000040U); + ClearHasBit(_impl_._has_bits_[0], 0x00000010U); } _impl_.enabled_deserializers_ = reinterpret_cast<::xtcp_config::v1::EnabledDeserializers*>(value); @@ -11148,7 +11225,7 @@ inline void XtcpConfig::set_allocated_enabled_deserializers(::xtcp_config::v1::E inline void XtcpConfig::clear_io_uring() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.io_uring_ = false; - ClearHasBit(_impl_._has_bits_[0], 0x00100000U); + ClearHasBit(_impl_._has_bits_[0], 0x00004000U); } inline bool XtcpConfig::io_uring() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.io_uring) @@ -11156,7 +11233,7 @@ inline bool XtcpConfig::io_uring() const { } inline void XtcpConfig::set_io_uring(bool value) { _internal_set_io_uring(value); - SetHasBit(_impl_._has_bits_[0], 0x00100000U); + SetHasBit(_impl_._has_bits_[0], 0x00004000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.io_uring) } inline bool XtcpConfig::_internal_io_uring() const { @@ -11172,7 +11249,7 @@ inline void XtcpConfig::_internal_set_io_uring(bool value) { inline void XtcpConfig::clear_io_uring_recv_batch_size() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.io_uring_recv_batch_size_ = 0u; - ClearHasBit(_impl_._has_bits_[0], 0x00010000U); + ClearHasBit(_impl_._has_bits_[0], 0x00008000U); } inline ::uint32_t XtcpConfig::io_uring_recv_batch_size() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.io_uring_recv_batch_size) @@ -11180,7 +11257,7 @@ inline ::uint32_t XtcpConfig::io_uring_recv_batch_size() const { } inline void XtcpConfig::set_io_uring_recv_batch_size(::uint32_t value) { _internal_set_io_uring_recv_batch_size(value); - SetHasBit(_impl_._has_bits_[0], 0x00010000U); + SetHasBit(_impl_._has_bits_[0], 0x00008000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.io_uring_recv_batch_size) } inline ::uint32_t XtcpConfig::_internal_io_uring_recv_batch_size() const { @@ -11196,7 +11273,7 @@ inline void XtcpConfig::_internal_set_io_uring_recv_batch_size(::uint32_t value) inline void XtcpConfig::clear_io_uring_cqe_batch_size() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.io_uring_cqe_batch_size_ = 0u; - ClearHasBit(_impl_._has_bits_[0], 0x00080000U); + ClearHasBit(_impl_._has_bits_[0], 0x00010000U); } inline ::uint32_t XtcpConfig::io_uring_cqe_batch_size() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.io_uring_cqe_batch_size) @@ -11204,7 +11281,7 @@ inline ::uint32_t XtcpConfig::io_uring_cqe_batch_size() const { } inline void XtcpConfig::set_io_uring_cqe_batch_size(::uint32_t value) { _internal_set_io_uring_cqe_batch_size(value); - SetHasBit(_impl_._has_bits_[0], 0x00080000U); + SetHasBit(_impl_._has_bits_[0], 0x00010000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.io_uring_cqe_batch_size) } inline ::uint32_t XtcpConfig::_internal_io_uring_cqe_batch_size() const { @@ -11264,9 +11341,81 @@ inline void XtcpConfig::_internal_set_max_records_per_netns(::uint64_t value) { _impl_.max_records_per_netns_ = value; } +// uint64 max_records_per_poll = 27 [json_name = "maxRecordsPerPoll", (.buf.validate.field) = { +inline void XtcpConfig::clear_max_records_per_poll() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.max_records_per_poll_ = ::uint64_t{0u}; + ClearHasBit(_impl_._has_bits_[0], 0x00080000U); +} +inline ::uint64_t XtcpConfig::max_records_per_poll() const { + // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.max_records_per_poll) + return _internal_max_records_per_poll(); +} +inline void XtcpConfig::set_max_records_per_poll(::uint64_t value) { + _internal_set_max_records_per_poll(value); + SetHasBit(_impl_._has_bits_[0], 0x00080000U); + // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.max_records_per_poll) +} +inline ::uint64_t XtcpConfig::_internal_max_records_per_poll() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.max_records_per_poll_; +} +inline void XtcpConfig::_internal_set_max_records_per_poll(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.max_records_per_poll_ = value; +} + +// uint32 io_uring_sockstat_batch_size = 28 [json_name = "ioUringSockstatBatchSize", (.buf.validate.field) = { +inline void XtcpConfig::clear_io_uring_sockstat_batch_size() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.io_uring_sockstat_batch_size_ = 0u; + ClearHasBit(_impl_._has_bits_[0], 0x00100000U); +} +inline ::uint32_t XtcpConfig::io_uring_sockstat_batch_size() const { + // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.io_uring_sockstat_batch_size) + return _internal_io_uring_sockstat_batch_size(); +} +inline void XtcpConfig::set_io_uring_sockstat_batch_size(::uint32_t value) { + _internal_set_io_uring_sockstat_batch_size(value); + SetHasBit(_impl_._has_bits_[0], 0x00100000U); + // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.io_uring_sockstat_batch_size) +} +inline ::uint32_t XtcpConfig::_internal_io_uring_sockstat_batch_size() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.io_uring_sockstat_batch_size_; +} +inline void XtcpConfig::_internal_set_io_uring_sockstat_batch_size(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.io_uring_sockstat_batch_size_ = value; +} + +// uint32 io_uring_sockstat_workers = 29 [json_name = "ioUringSockstatWorkers", (.buf.validate.field) = { +inline void XtcpConfig::clear_io_uring_sockstat_workers() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.io_uring_sockstat_workers_ = 0u; + ClearHasBit(_impl_._has_bits_[0], 0x00200000U); +} +inline ::uint32_t XtcpConfig::io_uring_sockstat_workers() const { + // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.io_uring_sockstat_workers) + return _internal_io_uring_sockstat_workers(); +} +inline void XtcpConfig::set_io_uring_sockstat_workers(::uint32_t value) { + _internal_set_io_uring_sockstat_workers(value); + SetHasBit(_impl_._has_bits_[0], 0x00200000U); + // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.io_uring_sockstat_workers) +} +inline ::uint32_t XtcpConfig::_internal_io_uring_sockstat_workers() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.io_uring_sockstat_workers_; +} +inline void XtcpConfig::_internal_set_io_uring_sockstat_workers(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.io_uring_sockstat_workers_ = value; +} + // .google.protobuf.Duration reconcile_frequency = 40 [json_name = "reconcileFrequency", (.buf.validate.field) = { inline bool XtcpConfig::has_reconcile_frequency() const { - bool value = CheckHasBit(_impl_._has_bits_[1], 0x00010000U); + bool value = CheckHasBit(_impl_._has_bits_[1], 0x00040000U); PROTOBUF_ASSUME(!value || _impl_.reconcile_frequency_ != nullptr); return value; } @@ -11287,16 +11436,16 @@ inline void XtcpConfig::unsafe_arena_set_allocated_reconcile_frequency( } _impl_.reconcile_frequency_ = reinterpret_cast<::google::protobuf::Duration*>(value); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00010000U); + SetHasBit(_impl_._has_bits_[1], 0x00040000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00010000U); + ClearHasBit(_impl_._has_bits_[1], 0x00040000U); } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xtcp_config.v1.XtcpConfig.reconcile_frequency) } inline ::google::protobuf::Duration* PROTOBUF_NULLABLE XtcpConfig::release_reconcile_frequency() { ::google::protobuf::internal::TSanWrite(&_impl_); - ClearHasBit(_impl_._has_bits_[1], 0x00010000U); + ClearHasBit(_impl_._has_bits_[1], 0x00040000U); ::google::protobuf::Duration* released = _impl_.reconcile_frequency_; _impl_.reconcile_frequency_ = nullptr; if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { @@ -11316,7 +11465,7 @@ inline ::google::protobuf::Duration* PROTOBUF_NULLABLE XtcpConfig::unsafe_arena_ ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.reconcile_frequency) - ClearHasBit(_impl_._has_bits_[1], 0x00010000U); + ClearHasBit(_impl_._has_bits_[1], 0x00040000U); ::google::protobuf::Duration* temp = _impl_.reconcile_frequency_; _impl_.reconcile_frequency_ = nullptr; return temp; @@ -11331,7 +11480,7 @@ inline ::google::protobuf::Duration* PROTOBUF_NONNULL XtcpConfig::_internal_muta } inline ::google::protobuf::Duration* PROTOBUF_NONNULL XtcpConfig::mutable_reconcile_frequency() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00010000U); + SetHasBit(_impl_._has_bits_[1], 0x00040000U); ::google::protobuf::Duration* _msg = _internal_mutable_reconcile_frequency(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.reconcile_frequency) return _msg; @@ -11348,9 +11497,9 @@ inline void XtcpConfig::set_allocated_reconcile_frequency(::google::protobuf::Du if (message_arena != submessage_arena) { value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - SetHasBit(_impl_._has_bits_[1], 0x00010000U); + SetHasBit(_impl_._has_bits_[1], 0x00040000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00010000U); + ClearHasBit(_impl_._has_bits_[1], 0x00040000U); } _impl_.reconcile_frequency_ = reinterpret_cast<::google::protobuf::Duration*>(value); @@ -11361,7 +11510,7 @@ inline void XtcpConfig::set_allocated_reconcile_frequency(::google::protobuf::Du inline void XtcpConfig::clear_reconcile_before_poll() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.reconcile_before_poll_ = false; - ClearHasBit(_impl_._has_bits_[2], 0x00000002U); + ClearHasBit(_impl_._has_bits_[2], 0x00000040U); } inline bool XtcpConfig::reconcile_before_poll() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.reconcile_before_poll) @@ -11369,7 +11518,7 @@ inline bool XtcpConfig::reconcile_before_poll() const { } inline void XtcpConfig::set_reconcile_before_poll(bool value) { _internal_set_reconcile_before_poll(value); - SetHasBit(_impl_._has_bits_[2], 0x00000002U); + SetHasBit(_impl_._has_bits_[2], 0x00000040U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.reconcile_before_poll) } inline bool XtcpConfig::_internal_reconcile_before_poll() const { @@ -11385,7 +11534,7 @@ inline void XtcpConfig::_internal_set_reconcile_before_poll(bool value) { inline void XtcpConfig::clear_max_netns() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.max_netns_ = 0u; - ClearHasBit(_impl_._has_bits_[1], 0x08000000U); + ClearHasBit(_impl_._has_bits_[1], 0x40000000U); } inline ::uint32_t XtcpConfig::max_netns() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.max_netns) @@ -11393,7 +11542,7 @@ inline ::uint32_t XtcpConfig::max_netns() const { } inline void XtcpConfig::set_max_netns(::uint32_t value) { _internal_set_max_netns(value); - SetHasBit(_impl_._has_bits_[1], 0x08000000U); + SetHasBit(_impl_._has_bits_[1], 0x40000000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.max_netns) } inline ::uint32_t XtcpConfig::_internal_max_netns() const { @@ -11405,11 +11554,152 @@ inline void XtcpConfig::_internal_set_max_netns(::uint32_t value) { _impl_.max_netns_ = value; } +// .google.protobuf.Duration reconcile_timeout = 43 [json_name = "reconcileTimeout", (.buf.validate.field) = { +inline bool XtcpConfig::has_reconcile_timeout() const { + bool value = CheckHasBit(_impl_._has_bits_[1], 0x00080000U); + PROTOBUF_ASSUME(!value || _impl_.reconcile_timeout_ != nullptr); + return value; +} +inline const ::google::protobuf::Duration& XtcpConfig::_internal_reconcile_timeout() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::google::protobuf::Duration* p = _impl_.reconcile_timeout_; + return p != nullptr ? *p : *::google::protobuf::internal::MessageGlobalsBase::ToDefaultInstance<::google::protobuf::Duration>(&::google::protobuf::Duration_globals_); +} +inline const ::google::protobuf::Duration& XtcpConfig::reconcile_timeout() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.reconcile_timeout) + return _internal_reconcile_timeout(); +} +inline void XtcpConfig::unsafe_arena_set_allocated_reconcile_timeout( + ::google::protobuf::Duration* PROTOBUF_NULLABLE value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.reconcile_timeout_); + } + _impl_.reconcile_timeout_ = reinterpret_cast<::google::protobuf::Duration*>(value); + if (value != nullptr) { + SetHasBit(_impl_._has_bits_[1], 0x00080000U); + } else { + ClearHasBit(_impl_._has_bits_[1], 0x00080000U); + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xtcp_config.v1.XtcpConfig.reconcile_timeout) +} +inline ::google::protobuf::Duration* PROTOBUF_NULLABLE XtcpConfig::release_reconcile_timeout() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + ClearHasBit(_impl_._has_bits_[1], 0x00080000U); + ::google::protobuf::Duration* released = _impl_.reconcile_timeout_; + _impl_.reconcile_timeout_ = nullptr; + if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } + } else { + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } + } + return released; +} +inline ::google::protobuf::Duration* PROTOBUF_NULLABLE XtcpConfig::unsafe_arena_release_reconcile_timeout() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.reconcile_timeout) + + ClearHasBit(_impl_._has_bits_[1], 0x00080000U); + ::google::protobuf::Duration* temp = _impl_.reconcile_timeout_; + _impl_.reconcile_timeout_ = nullptr; + return temp; +} +inline ::google::protobuf::Duration* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_reconcile_timeout() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.reconcile_timeout_ == nullptr) { + auto* p = Super_::DefaultConstruct<::google::protobuf::Duration>(GetArena()); + _impl_.reconcile_timeout_ = reinterpret_cast<::google::protobuf::Duration*>(p); + } + return _impl_.reconcile_timeout_; +} +inline ::google::protobuf::Duration* PROTOBUF_NONNULL XtcpConfig::mutable_reconcile_timeout() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + SetHasBit(_impl_._has_bits_[1], 0x00080000U); + ::google::protobuf::Duration* _msg = _internal_mutable_reconcile_timeout(); + // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.reconcile_timeout) + return _msg; +} +inline void XtcpConfig::set_allocated_reconcile_timeout(::google::protobuf::Duration* PROTOBUF_NULLABLE value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.reconcile_timeout_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::Message*>(value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + SetHasBit(_impl_._has_bits_[1], 0x00080000U); + } else { + ClearHasBit(_impl_._has_bits_[1], 0x00080000U); + } + + _impl_.reconcile_timeout_ = reinterpret_cast<::google::protobuf::Duration*>(value); + // @@protoc_insertion_point(field_set_allocated:xtcp_config.v1.XtcpConfig.reconcile_timeout) +} + +// uint32 max_netns_per_owner = 44 [json_name = "maxNetnsPerOwner", (.buf.validate.field) = { +inline void XtcpConfig::clear_max_netns_per_owner() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.max_netns_per_owner_ = 0u; + ClearHasBit(_impl_._has_bits_[1], 0x80000000U); +} +inline ::uint32_t XtcpConfig::max_netns_per_owner() const { + // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.max_netns_per_owner) + return _internal_max_netns_per_owner(); +} +inline void XtcpConfig::set_max_netns_per_owner(::uint32_t value) { + _internal_set_max_netns_per_owner(value); + SetHasBit(_impl_._has_bits_[1], 0x80000000U); + // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.max_netns_per_owner) +} +inline ::uint32_t XtcpConfig::_internal_max_netns_per_owner() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.max_netns_per_owner_; +} +inline void XtcpConfig::_internal_set_max_netns_per_owner(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.max_netns_per_owner_ = value; +} + +// uint32 max_netns_adds_per_reconcile = 45 [json_name = "maxNetnsAddsPerReconcile", (.buf.validate.field) = { +inline void XtcpConfig::clear_max_netns_adds_per_reconcile() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.max_netns_adds_per_reconcile_ = 0u; + ClearHasBit(_impl_._has_bits_[2], 0x00000001U); +} +inline ::uint32_t XtcpConfig::max_netns_adds_per_reconcile() const { + // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.max_netns_adds_per_reconcile) + return _internal_max_netns_adds_per_reconcile(); +} +inline void XtcpConfig::set_max_netns_adds_per_reconcile(::uint32_t value) { + _internal_set_max_netns_adds_per_reconcile(value); + SetHasBit(_impl_._has_bits_[2], 0x00000001U); + // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.max_netns_adds_per_reconcile) +} +inline ::uint32_t XtcpConfig::_internal_max_netns_adds_per_reconcile() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.max_netns_adds_per_reconcile_; +} +inline void XtcpConfig::_internal_set_max_netns_adds_per_reconcile(::uint32_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.max_netns_adds_per_reconcile_ = value; +} + // uint32 write_files = 50 [json_name = "writeFiles", (.buf.validate.field) = { inline void XtcpConfig::clear_write_files() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.write_files_ = 0u; - ClearHasBit(_impl_._has_bits_[1], 0x10000000U); + ClearHasBit(_impl_._has_bits_[2], 0x00000002U); } inline ::uint32_t XtcpConfig::write_files() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.write_files) @@ -11417,7 +11707,7 @@ inline ::uint32_t XtcpConfig::write_files() const { } inline void XtcpConfig::set_write_files(::uint32_t value) { _internal_set_write_files(value); - SetHasBit(_impl_._has_bits_[1], 0x10000000U); + SetHasBit(_impl_._has_bits_[2], 0x00000002U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.write_files) } inline ::uint32_t XtcpConfig::_internal_write_files() const { @@ -11497,7 +11787,7 @@ inline void XtcpConfig::set_allocated_capture_path(::std::string* PROTOBUF_NULLA inline void XtcpConfig::clear_dest_write_files() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.dest_write_files_ = 0u; - ClearHasBit(_impl_._has_bits_[1], 0x20000000U); + ClearHasBit(_impl_._has_bits_[2], 0x00000004U); } inline ::uint32_t XtcpConfig::dest_write_files() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.dest_write_files) @@ -11505,7 +11795,7 @@ inline ::uint32_t XtcpConfig::dest_write_files() const { } inline void XtcpConfig::set_dest_write_files(::uint32_t value) { _internal_set_dest_write_files(value); - SetHasBit(_impl_._has_bits_[1], 0x20000000U); + SetHasBit(_impl_._has_bits_[2], 0x00000004U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.dest_write_files) } inline ::uint32_t XtcpConfig::_internal_dest_write_files() const { @@ -11521,7 +11811,7 @@ inline void XtcpConfig::_internal_set_dest_write_files(::uint32_t value) { inline void XtcpConfig::clear_debug_level() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.debug_level_ = 0u; - ClearHasBit(_impl_._has_bits_[1], 0x40000000U); + ClearHasBit(_impl_._has_bits_[2], 0x00000008U); } inline ::uint32_t XtcpConfig::debug_level() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.debug_level) @@ -11529,7 +11819,7 @@ inline ::uint32_t XtcpConfig::debug_level() const { } inline void XtcpConfig::set_debug_level(::uint32_t value) { _internal_set_debug_level(value); - SetHasBit(_impl_._has_bits_[1], 0x40000000U); + SetHasBit(_impl_._has_bits_[2], 0x00000008U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.debug_level) } inline ::uint32_t XtcpConfig::_internal_debug_level() const { @@ -11545,7 +11835,7 @@ inline void XtcpConfig::_internal_set_debug_level(::uint32_t value) { inline void XtcpConfig::clear_debug_prometheus() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.debug_prometheus_ = false; - ClearHasBit(_impl_._has_bits_[2], 0x00000004U); + ClearHasBit(_impl_._has_bits_[2], 0x00000080U); } inline bool XtcpConfig::debug_prometheus() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.debug_prometheus) @@ -11553,7 +11843,7 @@ inline bool XtcpConfig::debug_prometheus() const { } inline void XtcpConfig::set_debug_prometheus(bool value) { _internal_set_debug_prometheus(value); - SetHasBit(_impl_._has_bits_[2], 0x00000004U); + SetHasBit(_impl_._has_bits_[2], 0x00000080U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.debug_prometheus) } inline bool XtcpConfig::_internal_debug_prometheus() const { @@ -11569,7 +11859,7 @@ inline void XtcpConfig::_internal_set_debug_prometheus(bool value) { inline void XtcpConfig::clear_dest() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.dest_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ClearHasBit(_impl_._has_bits_[0], 0x02000000U); } inline const ::std::string& XtcpConfig::dest() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -11579,13 +11869,13 @@ inline const ::std::string& XtcpConfig::dest() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_dest(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000001U); + SetHasBit(_impl_._has_bits_[0], 0x02000000U); _impl_.dest_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.dest) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_dest() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000001U); + SetHasBit(_impl_._has_bits_[0], 0x02000000U); ::std::string* _s = _internal_mutable_dest(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.dest) return _s; @@ -11605,10 +11895,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_dest() { inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_dest() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.dest) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { + if (!CheckHasBit(_impl_._has_bits_[0], 0x02000000U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ClearHasBit(_impl_._has_bits_[0], 0x02000000U); auto* released = _impl_.dest_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.dest_.Set("", GetArena()); @@ -11618,9 +11908,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_dest() { inline void XtcpConfig::set_allocated_dest(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000001U); + SetHasBit(_impl_._has_bits_[0], 0x02000000U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000001U); + ClearHasBit(_impl_._has_bits_[0], 0x02000000U); } _impl_.dest_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.dest_.IsDefault()) { @@ -11633,7 +11923,7 @@ inline void XtcpConfig::set_allocated_dest(::std::string* PROTOBUF_NULLABLE valu inline void XtcpConfig::clear_marshal_to() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.marshal_to_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ClearHasBit(_impl_._has_bits_[0], 0x04000000U); } inline const ::std::string& XtcpConfig::marshal_to() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -11643,13 +11933,13 @@ inline const ::std::string& XtcpConfig::marshal_to() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_marshal_to(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000002U); + SetHasBit(_impl_._has_bits_[0], 0x04000000U); _impl_.marshal_to_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.marshal_to) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_marshal_to() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); + SetHasBit(_impl_._has_bits_[0], 0x04000000U); ::std::string* _s = _internal_mutable_marshal_to(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.marshal_to) return _s; @@ -11669,10 +11959,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_marshal_to( inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_marshal_to() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.marshal_to) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { + if (!CheckHasBit(_impl_._has_bits_[0], 0x04000000U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ClearHasBit(_impl_._has_bits_[0], 0x04000000U); auto* released = _impl_.marshal_to_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.marshal_to_.Set("", GetArena()); @@ -11682,9 +11972,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_marshal_to() { inline void XtcpConfig::set_allocated_marshal_to(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000002U); + SetHasBit(_impl_._has_bits_[0], 0x04000000U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000002U); + ClearHasBit(_impl_._has_bits_[0], 0x04000000U); } _impl_.marshal_to_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.marshal_to_.IsDefault()) { @@ -11697,7 +11987,7 @@ inline void XtcpConfig::set_allocated_marshal_to(::std::string* PROTOBUF_NULLABL inline void XtcpConfig::clear_csv_columns() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.csv_columns_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } inline const ::std::string& XtcpConfig::csv_columns() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -11707,13 +11997,13 @@ inline const ::std::string& XtcpConfig::csv_columns() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_csv_columns(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000004U); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); _impl_.csv_columns_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.csv_columns) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_csv_columns() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000004U); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); ::std::string* _s = _internal_mutable_csv_columns(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.csv_columns) return _s; @@ -11733,10 +12023,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_csv_columns inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_csv_columns() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.csv_columns) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000004U)) { + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000001U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); auto* released = _impl_.csv_columns_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.csv_columns_.Set("", GetArena()); @@ -11746,9 +12036,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_csv_columns() { inline void XtcpConfig::set_allocated_csv_columns(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000004U); + SetHasBit(_impl_._has_bits_[0], 0x00000001U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000004U); + ClearHasBit(_impl_._has_bits_[0], 0x00000001U); } _impl_.csv_columns_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.csv_columns_.IsDefault()) { @@ -11761,7 +12051,7 @@ inline void XtcpConfig::set_allocated_csv_columns(::std::string* PROTOBUF_NULLAB inline void XtcpConfig::clear_xtcp_proto_file() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.xtcp_proto_file_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } inline const ::std::string& XtcpConfig::xtcp_proto_file() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -11771,13 +12061,13 @@ inline const ::std::string& XtcpConfig::xtcp_proto_file() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_xtcp_proto_file(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x00000008U); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); _impl_.xtcp_proto_file_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.xtcp_proto_file) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_xtcp_proto_file() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x00000008U); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); ::std::string* _s = _internal_mutable_xtcp_proto_file(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.xtcp_proto_file) return _s; @@ -11797,10 +12087,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_xtcp_proto_ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_xtcp_proto_file() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.xtcp_proto_file) - if (!CheckHasBit(_impl_._has_bits_[0], 0x00000008U)) { + if (!CheckHasBit(_impl_._has_bits_[0], 0x00000002U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); auto* released = _impl_.xtcp_proto_file_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.xtcp_proto_file_.Set("", GetArena()); @@ -11810,9 +12100,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_xtcp_proto_file() { inline void XtcpConfig::set_allocated_xtcp_proto_file(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x00000008U); + SetHasBit(_impl_._has_bits_[0], 0x00000002U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x00000008U); + ClearHasBit(_impl_._has_bits_[0], 0x00000002U); } _impl_.xtcp_proto_file_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.xtcp_proto_file_.IsDefault()) { @@ -11825,7 +12115,7 @@ inline void XtcpConfig::set_allocated_xtcp_proto_file(::std::string* PROTOBUF_NU inline void XtcpConfig::clear_envelope_flush_threshold_bytes() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.envelope_flush_threshold_bytes_ = 0u; - ClearHasBit(_impl_._has_bits_[1], 0x80000000U); + ClearHasBit(_impl_._has_bits_[2], 0x00000010U); } inline ::uint32_t XtcpConfig::envelope_flush_threshold_bytes() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.envelope_flush_threshold_bytes) @@ -11833,7 +12123,7 @@ inline ::uint32_t XtcpConfig::envelope_flush_threshold_bytes() const { } inline void XtcpConfig::set_envelope_flush_threshold_bytes(::uint32_t value) { _internal_set_envelope_flush_threshold_bytes(value); - SetHasBit(_impl_._has_bits_[1], 0x80000000U); + SetHasBit(_impl_._has_bits_[2], 0x00000010U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.envelope_flush_threshold_bytes) } inline ::uint32_t XtcpConfig::_internal_envelope_flush_threshold_bytes() const { @@ -11849,7 +12139,7 @@ inline void XtcpConfig::_internal_set_envelope_flush_threshold_bytes(::uint32_t inline void XtcpConfig::clear_envelope_flush_threshold_rows() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.envelope_flush_threshold_rows_ = 0u; - ClearHasBit(_impl_._has_bits_[2], 0x00000001U); + ClearHasBit(_impl_._has_bits_[2], 0x00000020U); } inline ::uint32_t XtcpConfig::envelope_flush_threshold_rows() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.envelope_flush_threshold_rows) @@ -11857,7 +12147,7 @@ inline ::uint32_t XtcpConfig::envelope_flush_threshold_rows() const { } inline void XtcpConfig::set_envelope_flush_threshold_rows(::uint32_t value) { _internal_set_envelope_flush_threshold_rows(value); - SetHasBit(_impl_._has_bits_[2], 0x00000001U); + SetHasBit(_impl_._has_bits_[2], 0x00000020U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.envelope_flush_threshold_rows) } inline ::uint32_t XtcpConfig::_internal_envelope_flush_threshold_rows() const { @@ -11873,7 +12163,7 @@ inline void XtcpConfig::_internal_set_envelope_flush_threshold_rows(::uint32_t v inline void XtcpConfig::clear_topic() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.topic_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[0], 0x02000000U); + ClearHasBit(_impl_._has_bits_[0], 0x08000000U); } inline const ::std::string& XtcpConfig::topic() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -11883,13 +12173,13 @@ inline const ::std::string& XtcpConfig::topic() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_topic(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x02000000U); + SetHasBit(_impl_._has_bits_[0], 0x08000000U); _impl_.topic_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.topic) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_topic() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x02000000U); + SetHasBit(_impl_._has_bits_[0], 0x08000000U); ::std::string* _s = _internal_mutable_topic(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.topic) return _s; @@ -11909,10 +12199,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_topic() { inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_topic() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.topic) - if (!CheckHasBit(_impl_._has_bits_[0], 0x02000000U)) { + if (!CheckHasBit(_impl_._has_bits_[0], 0x08000000U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x02000000U); + ClearHasBit(_impl_._has_bits_[0], 0x08000000U); auto* released = _impl_.topic_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.topic_.Set("", GetArena()); @@ -11922,9 +12212,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_topic() { inline void XtcpConfig::set_allocated_topic(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x02000000U); + SetHasBit(_impl_._has_bits_[0], 0x08000000U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x02000000U); + ClearHasBit(_impl_._has_bits_[0], 0x08000000U); } _impl_.topic_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.topic_.IsDefault()) { @@ -11937,7 +12227,7 @@ inline void XtcpConfig::set_allocated_topic(::std::string* PROTOBUF_NULLABLE val inline void XtcpConfig::clear_kafka_schema_url() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.kafka_schema_url_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[0], 0x04000000U); + ClearHasBit(_impl_._has_bits_[0], 0x10000000U); } inline const ::std::string& XtcpConfig::kafka_schema_url() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -11947,13 +12237,13 @@ inline const ::std::string& XtcpConfig::kafka_schema_url() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_kafka_schema_url(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x04000000U); + SetHasBit(_impl_._has_bits_[0], 0x10000000U); _impl_.kafka_schema_url_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.kafka_schema_url) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_kafka_schema_url() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x04000000U); + SetHasBit(_impl_._has_bits_[0], 0x10000000U); ::std::string* _s = _internal_mutable_kafka_schema_url(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.kafka_schema_url) return _s; @@ -11973,10 +12263,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_kafka_schem inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_kafka_schema_url() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.kafka_schema_url) - if (!CheckHasBit(_impl_._has_bits_[0], 0x04000000U)) { + if (!CheckHasBit(_impl_._has_bits_[0], 0x10000000U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x04000000U); + ClearHasBit(_impl_._has_bits_[0], 0x10000000U); auto* released = _impl_.kafka_schema_url_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.kafka_schema_url_.Set("", GetArena()); @@ -11986,9 +12276,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_kafka_schema_url() { inline void XtcpConfig::set_allocated_kafka_schema_url(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x04000000U); + SetHasBit(_impl_._has_bits_[0], 0x10000000U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x04000000U); + ClearHasBit(_impl_._has_bits_[0], 0x10000000U); } _impl_.kafka_schema_url_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.kafka_schema_url_.IsDefault()) { @@ -11999,7 +12289,7 @@ inline void XtcpConfig::set_allocated_kafka_schema_url(::std::string* PROTOBUF_N // .google.protobuf.Duration kafka_produce_timeout = 82 [json_name = "kafkaProduceTimeout", (.buf.validate.field) = { inline bool XtcpConfig::has_kafka_produce_timeout() const { - bool value = CheckHasBit(_impl_._has_bits_[1], 0x00020000U); + bool value = CheckHasBit(_impl_._has_bits_[1], 0x00100000U); PROTOBUF_ASSUME(!value || _impl_.kafka_produce_timeout_ != nullptr); return value; } @@ -12020,16 +12310,16 @@ inline void XtcpConfig::unsafe_arena_set_allocated_kafka_produce_timeout( } _impl_.kafka_produce_timeout_ = reinterpret_cast<::google::protobuf::Duration*>(value); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00020000U); + SetHasBit(_impl_._has_bits_[1], 0x00100000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00020000U); + ClearHasBit(_impl_._has_bits_[1], 0x00100000U); } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xtcp_config.v1.XtcpConfig.kafka_produce_timeout) } inline ::google::protobuf::Duration* PROTOBUF_NULLABLE XtcpConfig::release_kafka_produce_timeout() { ::google::protobuf::internal::TSanWrite(&_impl_); - ClearHasBit(_impl_._has_bits_[1], 0x00020000U); + ClearHasBit(_impl_._has_bits_[1], 0x00100000U); ::google::protobuf::Duration* released = _impl_.kafka_produce_timeout_; _impl_.kafka_produce_timeout_ = nullptr; if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { @@ -12049,7 +12339,7 @@ inline ::google::protobuf::Duration* PROTOBUF_NULLABLE XtcpConfig::unsafe_arena_ ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.kafka_produce_timeout) - ClearHasBit(_impl_._has_bits_[1], 0x00020000U); + ClearHasBit(_impl_._has_bits_[1], 0x00100000U); ::google::protobuf::Duration* temp = _impl_.kafka_produce_timeout_; _impl_.kafka_produce_timeout_ = nullptr; return temp; @@ -12064,7 +12354,7 @@ inline ::google::protobuf::Duration* PROTOBUF_NONNULL XtcpConfig::_internal_muta } inline ::google::protobuf::Duration* PROTOBUF_NONNULL XtcpConfig::mutable_kafka_produce_timeout() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00020000U); + SetHasBit(_impl_._has_bits_[1], 0x00100000U); ::google::protobuf::Duration* _msg = _internal_mutable_kafka_produce_timeout(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.kafka_produce_timeout) return _msg; @@ -12081,9 +12371,9 @@ inline void XtcpConfig::set_allocated_kafka_produce_timeout(::google::protobuf:: if (message_arena != submessage_arena) { value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - SetHasBit(_impl_._has_bits_[1], 0x00020000U); + SetHasBit(_impl_._has_bits_[1], 0x00100000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00020000U); + ClearHasBit(_impl_._has_bits_[1], 0x00100000U); } _impl_.kafka_produce_timeout_ = reinterpret_cast<::google::protobuf::Duration*>(value); @@ -12094,7 +12384,7 @@ inline void XtcpConfig::set_allocated_kafka_produce_timeout(::google::protobuf:: inline void XtcpConfig::clear_kafka_compression() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.kafka_compression_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[0], 0x08000000U); + ClearHasBit(_impl_._has_bits_[0], 0x20000000U); } inline const ::std::string& XtcpConfig::kafka_compression() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -12104,13 +12394,13 @@ inline const ::std::string& XtcpConfig::kafka_compression() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_kafka_compression(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x08000000U); + SetHasBit(_impl_._has_bits_[0], 0x20000000U); _impl_.kafka_compression_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.kafka_compression) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_kafka_compression() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x08000000U); + SetHasBit(_impl_._has_bits_[0], 0x20000000U); ::std::string* _s = _internal_mutable_kafka_compression(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.kafka_compression) return _s; @@ -12130,10 +12420,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_kafka_compr inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_kafka_compression() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.kafka_compression) - if (!CheckHasBit(_impl_._has_bits_[0], 0x08000000U)) { + if (!CheckHasBit(_impl_._has_bits_[0], 0x20000000U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x08000000U); + ClearHasBit(_impl_._has_bits_[0], 0x20000000U); auto* released = _impl_.kafka_compression_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.kafka_compression_.Set("", GetArena()); @@ -12143,9 +12433,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_kafka_compression() inline void XtcpConfig::set_allocated_kafka_compression(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x08000000U); + SetHasBit(_impl_._has_bits_[0], 0x20000000U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x08000000U); + ClearHasBit(_impl_._has_bits_[0], 0x20000000U); } _impl_.kafka_compression_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.kafka_compression_.IsDefault()) { @@ -12158,7 +12448,7 @@ inline void XtcpConfig::set_allocated_kafka_compression(::std::string* PROTOBUF_ inline void XtcpConfig::clear_s3_endpoint() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.s3_endpoint_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[0], 0x10000000U); + ClearHasBit(_impl_._has_bits_[0], 0x40000000U); } inline const ::std::string& XtcpConfig::s3_endpoint() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -12168,13 +12458,13 @@ inline const ::std::string& XtcpConfig::s3_endpoint() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_s3_endpoint(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x10000000U); + SetHasBit(_impl_._has_bits_[0], 0x40000000U); _impl_.s3_endpoint_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.s3_endpoint) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_s3_endpoint() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x10000000U); + SetHasBit(_impl_._has_bits_[0], 0x40000000U); ::std::string* _s = _internal_mutable_s3_endpoint(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.s3_endpoint) return _s; @@ -12194,10 +12484,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_s3_endpoint inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_s3_endpoint() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.s3_endpoint) - if (!CheckHasBit(_impl_._has_bits_[0], 0x10000000U)) { + if (!CheckHasBit(_impl_._has_bits_[0], 0x40000000U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x10000000U); + ClearHasBit(_impl_._has_bits_[0], 0x40000000U); auto* released = _impl_.s3_endpoint_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.s3_endpoint_.Set("", GetArena()); @@ -12207,9 +12497,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_s3_endpoint() { inline void XtcpConfig::set_allocated_s3_endpoint(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x10000000U); + SetHasBit(_impl_._has_bits_[0], 0x40000000U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x10000000U); + ClearHasBit(_impl_._has_bits_[0], 0x40000000U); } _impl_.s3_endpoint_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.s3_endpoint_.IsDefault()) { @@ -12222,7 +12512,7 @@ inline void XtcpConfig::set_allocated_s3_endpoint(::std::string* PROTOBUF_NULLAB inline void XtcpConfig::clear_s3_region() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.s3_region_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[0], 0x20000000U); + ClearHasBit(_impl_._has_bits_[0], 0x80000000U); } inline const ::std::string& XtcpConfig::s3_region() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -12232,13 +12522,13 @@ inline const ::std::string& XtcpConfig::s3_region() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_s3_region(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x20000000U); + SetHasBit(_impl_._has_bits_[0], 0x80000000U); _impl_.s3_region_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.s3_region) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_s3_region() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x20000000U); + SetHasBit(_impl_._has_bits_[0], 0x80000000U); ::std::string* _s = _internal_mutable_s3_region(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.s3_region) return _s; @@ -12258,10 +12548,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_s3_region() inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_s3_region() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.s3_region) - if (!CheckHasBit(_impl_._has_bits_[0], 0x20000000U)) { + if (!CheckHasBit(_impl_._has_bits_[0], 0x80000000U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x20000000U); + ClearHasBit(_impl_._has_bits_[0], 0x80000000U); auto* released = _impl_.s3_region_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.s3_region_.Set("", GetArena()); @@ -12271,9 +12561,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_s3_region() { inline void XtcpConfig::set_allocated_s3_region(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x20000000U); + SetHasBit(_impl_._has_bits_[0], 0x80000000U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x20000000U); + ClearHasBit(_impl_._has_bits_[0], 0x80000000U); } _impl_.s3_region_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.s3_region_.IsDefault()) { @@ -12286,7 +12576,7 @@ inline void XtcpConfig::set_allocated_s3_region(::std::string* PROTOBUF_NULLABLE inline void XtcpConfig::clear_s3_bucket() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.s3_bucket_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[0], 0x40000000U); + ClearHasBit(_impl_._has_bits_[1], 0x00000001U); } inline const ::std::string& XtcpConfig::s3_bucket() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -12296,13 +12586,13 @@ inline const ::std::string& XtcpConfig::s3_bucket() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_s3_bucket(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x40000000U); + SetHasBit(_impl_._has_bits_[1], 0x00000001U); _impl_.s3_bucket_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.s3_bucket) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_s3_bucket() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x40000000U); + SetHasBit(_impl_._has_bits_[1], 0x00000001U); ::std::string* _s = _internal_mutable_s3_bucket(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.s3_bucket) return _s; @@ -12322,10 +12612,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_s3_bucket() inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_s3_bucket() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.s3_bucket) - if (!CheckHasBit(_impl_._has_bits_[0], 0x40000000U)) { + if (!CheckHasBit(_impl_._has_bits_[1], 0x00000001U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x40000000U); + ClearHasBit(_impl_._has_bits_[1], 0x00000001U); auto* released = _impl_.s3_bucket_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.s3_bucket_.Set("", GetArena()); @@ -12335,9 +12625,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_s3_bucket() { inline void XtcpConfig::set_allocated_s3_bucket(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x40000000U); + SetHasBit(_impl_._has_bits_[1], 0x00000001U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x40000000U); + ClearHasBit(_impl_._has_bits_[1], 0x00000001U); } _impl_.s3_bucket_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.s3_bucket_.IsDefault()) { @@ -12350,7 +12640,7 @@ inline void XtcpConfig::set_allocated_s3_bucket(::std::string* PROTOBUF_NULLABLE inline void XtcpConfig::clear_s3_prefix() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.s3_prefix_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[0], 0x80000000U); + ClearHasBit(_impl_._has_bits_[1], 0x00000002U); } inline const ::std::string& XtcpConfig::s3_prefix() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -12360,13 +12650,13 @@ inline const ::std::string& XtcpConfig::s3_prefix() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_s3_prefix(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[0], 0x80000000U); + SetHasBit(_impl_._has_bits_[1], 0x00000002U); _impl_.s3_prefix_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.s3_prefix) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_s3_prefix() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[0], 0x80000000U); + SetHasBit(_impl_._has_bits_[1], 0x00000002U); ::std::string* _s = _internal_mutable_s3_prefix(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.s3_prefix) return _s; @@ -12386,10 +12676,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_s3_prefix() inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_s3_prefix() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.s3_prefix) - if (!CheckHasBit(_impl_._has_bits_[0], 0x80000000U)) { + if (!CheckHasBit(_impl_._has_bits_[1], 0x00000002U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[0], 0x80000000U); + ClearHasBit(_impl_._has_bits_[1], 0x00000002U); auto* released = _impl_.s3_prefix_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.s3_prefix_.Set("", GetArena()); @@ -12399,9 +12689,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_s3_prefix() { inline void XtcpConfig::set_allocated_s3_prefix(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[0], 0x80000000U); + SetHasBit(_impl_._has_bits_[1], 0x00000002U); } else { - ClearHasBit(_impl_._has_bits_[0], 0x80000000U); + ClearHasBit(_impl_._has_bits_[1], 0x00000002U); } _impl_.s3_prefix_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.s3_prefix_.IsDefault()) { @@ -12414,7 +12704,7 @@ inline void XtcpConfig::set_allocated_s3_prefix(::std::string* PROTOBUF_NULLABLE inline void XtcpConfig::clear_s3_access_key() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.s3_access_key_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[1], 0x00000001U); + ClearHasBit(_impl_._has_bits_[1], 0x00000004U); } inline const ::std::string& XtcpConfig::s3_access_key() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -12424,13 +12714,13 @@ inline const ::std::string& XtcpConfig::s3_access_key() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_s3_access_key(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[1], 0x00000001U); + SetHasBit(_impl_._has_bits_[1], 0x00000004U); _impl_.s3_access_key_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.s3_access_key) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_s3_access_key() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00000001U); + SetHasBit(_impl_._has_bits_[1], 0x00000004U); ::std::string* _s = _internal_mutable_s3_access_key(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.s3_access_key) return _s; @@ -12450,10 +12740,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_s3_access_k inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_s3_access_key() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.s3_access_key) - if (!CheckHasBit(_impl_._has_bits_[1], 0x00000001U)) { + if (!CheckHasBit(_impl_._has_bits_[1], 0x00000004U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[1], 0x00000001U); + ClearHasBit(_impl_._has_bits_[1], 0x00000004U); auto* released = _impl_.s3_access_key_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.s3_access_key_.Set("", GetArena()); @@ -12463,9 +12753,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_s3_access_key() { inline void XtcpConfig::set_allocated_s3_access_key(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00000001U); + SetHasBit(_impl_._has_bits_[1], 0x00000004U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00000001U); + ClearHasBit(_impl_._has_bits_[1], 0x00000004U); } _impl_.s3_access_key_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.s3_access_key_.IsDefault()) { @@ -12478,7 +12768,7 @@ inline void XtcpConfig::set_allocated_s3_access_key(::std::string* PROTOBUF_NULL inline void XtcpConfig::clear_s3_secret_key() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.s3_secret_key_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[1], 0x00000002U); + ClearHasBit(_impl_._has_bits_[1], 0x00000008U); } inline const ::std::string& XtcpConfig::s3_secret_key() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -12488,13 +12778,13 @@ inline const ::std::string& XtcpConfig::s3_secret_key() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_s3_secret_key(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[1], 0x00000002U); + SetHasBit(_impl_._has_bits_[1], 0x00000008U); _impl_.s3_secret_key_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.s3_secret_key) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_s3_secret_key() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00000002U); + SetHasBit(_impl_._has_bits_[1], 0x00000008U); ::std::string* _s = _internal_mutable_s3_secret_key(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.s3_secret_key) return _s; @@ -12514,10 +12804,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_s3_secret_k inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_s3_secret_key() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.s3_secret_key) - if (!CheckHasBit(_impl_._has_bits_[1], 0x00000002U)) { + if (!CheckHasBit(_impl_._has_bits_[1], 0x00000008U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[1], 0x00000002U); + ClearHasBit(_impl_._has_bits_[1], 0x00000008U); auto* released = _impl_.s3_secret_key_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.s3_secret_key_.Set("", GetArena()); @@ -12527,9 +12817,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_s3_secret_key() { inline void XtcpConfig::set_allocated_s3_secret_key(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00000002U); + SetHasBit(_impl_._has_bits_[1], 0x00000008U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00000002U); + ClearHasBit(_impl_._has_bits_[1], 0x00000008U); } _impl_.s3_secret_key_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.s3_secret_key_.IsDefault()) { @@ -12542,7 +12832,7 @@ inline void XtcpConfig::set_allocated_s3_secret_key(::std::string* PROTOBUF_NULL inline void XtcpConfig::clear_s3_skip_bucket_probe() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.s3_skip_bucket_probe_ = false; - ClearHasBit(_impl_._has_bits_[2], 0x00000008U); + ClearHasBit(_impl_._has_bits_[2], 0x00000100U); } inline bool XtcpConfig::s3_skip_bucket_probe() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.s3_skip_bucket_probe) @@ -12550,7 +12840,7 @@ inline bool XtcpConfig::s3_skip_bucket_probe() const { } inline void XtcpConfig::set_s3_skip_bucket_probe(bool value) { _internal_set_s3_skip_bucket_probe(value); - SetHasBit(_impl_._has_bits_[2], 0x00000008U); + SetHasBit(_impl_._has_bits_[2], 0x00000100U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.s3_skip_bucket_probe) } inline bool XtcpConfig::_internal_s3_skip_bucket_probe() const { @@ -12566,7 +12856,7 @@ inline void XtcpConfig::_internal_set_s3_skip_bucket_probe(bool value) { inline void XtcpConfig::clear_s3_allow_insecure() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.s3_allow_insecure_ = false; - ClearHasBit(_impl_._has_bits_[0], 0x00200000U); + ClearHasBit(_impl_._has_bits_[2], 0x00000200U); } inline bool XtcpConfig::s3_allow_insecure() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.s3_allow_insecure) @@ -12574,7 +12864,7 @@ inline bool XtcpConfig::s3_allow_insecure() const { } inline void XtcpConfig::set_s3_allow_insecure(bool value) { _internal_set_s3_allow_insecure(value); - SetHasBit(_impl_._has_bits_[0], 0x00200000U); + SetHasBit(_impl_._has_bits_[2], 0x00000200U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.s3_allow_insecure) } inline bool XtcpConfig::_internal_s3_allow_insecure() const { @@ -12590,7 +12880,7 @@ inline void XtcpConfig::_internal_set_s3_allow_insecure(bool value) { inline void XtcpConfig::clear_s3_ca_file() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.s3_ca_file_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[1], 0x00000004U); + ClearHasBit(_impl_._has_bits_[1], 0x00000010U); } inline const ::std::string& XtcpConfig::s3_ca_file() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -12600,13 +12890,13 @@ inline const ::std::string& XtcpConfig::s3_ca_file() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_s3_ca_file(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[1], 0x00000004U); + SetHasBit(_impl_._has_bits_[1], 0x00000010U); _impl_.s3_ca_file_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.s3_ca_file) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_s3_ca_file() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00000004U); + SetHasBit(_impl_._has_bits_[1], 0x00000010U); ::std::string* _s = _internal_mutable_s3_ca_file(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.s3_ca_file) return _s; @@ -12626,10 +12916,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_s3_ca_file( inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_s3_ca_file() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.s3_ca_file) - if (!CheckHasBit(_impl_._has_bits_[1], 0x00000004U)) { + if (!CheckHasBit(_impl_._has_bits_[1], 0x00000010U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[1], 0x00000004U); + ClearHasBit(_impl_._has_bits_[1], 0x00000010U); auto* released = _impl_.s3_ca_file_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.s3_ca_file_.Set("", GetArena()); @@ -12639,9 +12929,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_s3_ca_file() { inline void XtcpConfig::set_allocated_s3_ca_file(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00000004U); + SetHasBit(_impl_._has_bits_[1], 0x00000010U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00000004U); + ClearHasBit(_impl_._has_bits_[1], 0x00000010U); } _impl_.s3_ca_file_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.s3_ca_file_.IsDefault()) { @@ -12654,7 +12944,7 @@ inline void XtcpConfig::set_allocated_s3_ca_file(::std::string* PROTOBUF_NULLABL inline void XtcpConfig::clear_s3_parquet_flush_threshold_bytes() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.s3_parquet_flush_threshold_bytes_ = 0u; - ClearHasBit(_impl_._has_bits_[2], 0x00000020U); + ClearHasBit(_impl_._has_bits_[2], 0x00000400U); } inline ::uint32_t XtcpConfig::s3_parquet_flush_threshold_bytes() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.s3_parquet_flush_threshold_bytes) @@ -12662,7 +12952,7 @@ inline ::uint32_t XtcpConfig::s3_parquet_flush_threshold_bytes() const { } inline void XtcpConfig::set_s3_parquet_flush_threshold_bytes(::uint32_t value) { _internal_set_s3_parquet_flush_threshold_bytes(value); - SetHasBit(_impl_._has_bits_[2], 0x00000020U); + SetHasBit(_impl_._has_bits_[2], 0x00000400U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.s3_parquet_flush_threshold_bytes) } inline ::uint32_t XtcpConfig::_internal_s3_parquet_flush_threshold_bytes() const { @@ -12676,7 +12966,7 @@ inline void XtcpConfig::_internal_set_s3_parquet_flush_threshold_bytes(::uint32_ // .google.protobuf.Duration s3_flush_interval = 111 [json_name = "s3FlushInterval", (.buf.validate.field) = { inline bool XtcpConfig::has_s3_flush_interval() const { - bool value = CheckHasBit(_impl_._has_bits_[1], 0x00040000U); + bool value = CheckHasBit(_impl_._has_bits_[1], 0x00200000U); PROTOBUF_ASSUME(!value || _impl_.s3_flush_interval_ != nullptr); return value; } @@ -12697,16 +12987,16 @@ inline void XtcpConfig::unsafe_arena_set_allocated_s3_flush_interval( } _impl_.s3_flush_interval_ = reinterpret_cast<::google::protobuf::Duration*>(value); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00040000U); + SetHasBit(_impl_._has_bits_[1], 0x00200000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00040000U); + ClearHasBit(_impl_._has_bits_[1], 0x00200000U); } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xtcp_config.v1.XtcpConfig.s3_flush_interval) } inline ::google::protobuf::Duration* PROTOBUF_NULLABLE XtcpConfig::release_s3_flush_interval() { ::google::protobuf::internal::TSanWrite(&_impl_); - ClearHasBit(_impl_._has_bits_[1], 0x00040000U); + ClearHasBit(_impl_._has_bits_[1], 0x00200000U); ::google::protobuf::Duration* released = _impl_.s3_flush_interval_; _impl_.s3_flush_interval_ = nullptr; if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { @@ -12726,7 +13016,7 @@ inline ::google::protobuf::Duration* PROTOBUF_NULLABLE XtcpConfig::unsafe_arena_ ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.s3_flush_interval) - ClearHasBit(_impl_._has_bits_[1], 0x00040000U); + ClearHasBit(_impl_._has_bits_[1], 0x00200000U); ::google::protobuf::Duration* temp = _impl_.s3_flush_interval_; _impl_.s3_flush_interval_ = nullptr; return temp; @@ -12741,7 +13031,7 @@ inline ::google::protobuf::Duration* PROTOBUF_NONNULL XtcpConfig::_internal_muta } inline ::google::protobuf::Duration* PROTOBUF_NONNULL XtcpConfig::mutable_s3_flush_interval() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00040000U); + SetHasBit(_impl_._has_bits_[1], 0x00200000U); ::google::protobuf::Duration* _msg = _internal_mutable_s3_flush_interval(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.s3_flush_interval) return _msg; @@ -12758,9 +13048,9 @@ inline void XtcpConfig::set_allocated_s3_flush_interval(::google::protobuf::Dura if (message_arena != submessage_arena) { value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - SetHasBit(_impl_._has_bits_[1], 0x00040000U); + SetHasBit(_impl_._has_bits_[1], 0x00200000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00040000U); + ClearHasBit(_impl_._has_bits_[1], 0x00200000U); } _impl_.s3_flush_interval_ = reinterpret_cast<::google::protobuf::Duration*>(value); @@ -12771,7 +13061,7 @@ inline void XtcpConfig::set_allocated_s3_flush_interval(::google::protobuf::Dura inline void XtcpConfig::clear_s3_flush_jitter_pct() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.s3_flush_jitter_pct_ = 0u; - ClearHasBit(_impl_._has_bits_[2], 0x00000040U); + ClearHasBit(_impl_._has_bits_[2], 0x00000800U); } inline ::uint32_t XtcpConfig::s3_flush_jitter_pct() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.s3_flush_jitter_pct) @@ -12779,7 +13069,7 @@ inline ::uint32_t XtcpConfig::s3_flush_jitter_pct() const { } inline void XtcpConfig::set_s3_flush_jitter_pct(::uint32_t value) { _internal_set_s3_flush_jitter_pct(value); - SetHasBit(_impl_._has_bits_[2], 0x00000040U); + SetHasBit(_impl_._has_bits_[2], 0x00000800U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.s3_flush_jitter_pct) } inline ::uint32_t XtcpConfig::_internal_s3_flush_jitter_pct() const { @@ -12795,7 +13085,7 @@ inline void XtcpConfig::_internal_set_s3_flush_jitter_pct(::uint32_t value) { inline void XtcpConfig::clear_s3_flush_threshold_jitter_pct() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.s3_flush_threshold_jitter_pct_ = 0u; - ClearHasBit(_impl_._has_bits_[2], 0x00000080U); + ClearHasBit(_impl_._has_bits_[2], 0x00001000U); } inline ::uint32_t XtcpConfig::s3_flush_threshold_jitter_pct() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.s3_flush_threshold_jitter_pct) @@ -12803,7 +13093,7 @@ inline ::uint32_t XtcpConfig::s3_flush_threshold_jitter_pct() const { } inline void XtcpConfig::set_s3_flush_threshold_jitter_pct(::uint32_t value) { _internal_set_s3_flush_threshold_jitter_pct(value); - SetHasBit(_impl_._has_bits_[2], 0x00000080U); + SetHasBit(_impl_._has_bits_[2], 0x00001000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.s3_flush_threshold_jitter_pct) } inline ::uint32_t XtcpConfig::_internal_s3_flush_threshold_jitter_pct() const { @@ -12819,7 +13109,7 @@ inline void XtcpConfig::_internal_set_s3_flush_threshold_jitter_pct(::uint32_t v inline void XtcpConfig::clear_s3_upload_max_attempts() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.s3_upload_max_attempts_ = 0u; - ClearHasBit(_impl_._has_bits_[2], 0x00000100U); + ClearHasBit(_impl_._has_bits_[2], 0x00002000U); } inline ::uint32_t XtcpConfig::s3_upload_max_attempts() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.s3_upload_max_attempts) @@ -12827,7 +13117,7 @@ inline ::uint32_t XtcpConfig::s3_upload_max_attempts() const { } inline void XtcpConfig::set_s3_upload_max_attempts(::uint32_t value) { _internal_set_s3_upload_max_attempts(value); - SetHasBit(_impl_._has_bits_[2], 0x00000100U); + SetHasBit(_impl_._has_bits_[2], 0x00002000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.s3_upload_max_attempts) } inline ::uint32_t XtcpConfig::_internal_s3_upload_max_attempts() const { @@ -12841,7 +13131,7 @@ inline void XtcpConfig::_internal_set_s3_upload_max_attempts(::uint32_t value) { // .google.protobuf.Duration s3_upload_backoff_cap = 115 [json_name = "s3UploadBackoffCap", (.buf.validate.field) = { inline bool XtcpConfig::has_s3_upload_backoff_cap() const { - bool value = CheckHasBit(_impl_._has_bits_[1], 0x00080000U); + bool value = CheckHasBit(_impl_._has_bits_[1], 0x00400000U); PROTOBUF_ASSUME(!value || _impl_.s3_upload_backoff_cap_ != nullptr); return value; } @@ -12862,16 +13152,16 @@ inline void XtcpConfig::unsafe_arena_set_allocated_s3_upload_backoff_cap( } _impl_.s3_upload_backoff_cap_ = reinterpret_cast<::google::protobuf::Duration*>(value); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00080000U); + SetHasBit(_impl_._has_bits_[1], 0x00400000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00080000U); + ClearHasBit(_impl_._has_bits_[1], 0x00400000U); } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xtcp_config.v1.XtcpConfig.s3_upload_backoff_cap) } inline ::google::protobuf::Duration* PROTOBUF_NULLABLE XtcpConfig::release_s3_upload_backoff_cap() { ::google::protobuf::internal::TSanWrite(&_impl_); - ClearHasBit(_impl_._has_bits_[1], 0x00080000U); + ClearHasBit(_impl_._has_bits_[1], 0x00400000U); ::google::protobuf::Duration* released = _impl_.s3_upload_backoff_cap_; _impl_.s3_upload_backoff_cap_ = nullptr; if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { @@ -12891,7 +13181,7 @@ inline ::google::protobuf::Duration* PROTOBUF_NULLABLE XtcpConfig::unsafe_arena_ ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.s3_upload_backoff_cap) - ClearHasBit(_impl_._has_bits_[1], 0x00080000U); + ClearHasBit(_impl_._has_bits_[1], 0x00400000U); ::google::protobuf::Duration* temp = _impl_.s3_upload_backoff_cap_; _impl_.s3_upload_backoff_cap_ = nullptr; return temp; @@ -12906,7 +13196,7 @@ inline ::google::protobuf::Duration* PROTOBUF_NONNULL XtcpConfig::_internal_muta } inline ::google::protobuf::Duration* PROTOBUF_NONNULL XtcpConfig::mutable_s3_upload_backoff_cap() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00080000U); + SetHasBit(_impl_._has_bits_[1], 0x00400000U); ::google::protobuf::Duration* _msg = _internal_mutable_s3_upload_backoff_cap(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.s3_upload_backoff_cap) return _msg; @@ -12923,9 +13213,9 @@ inline void XtcpConfig::set_allocated_s3_upload_backoff_cap(::google::protobuf:: if (message_arena != submessage_arena) { value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - SetHasBit(_impl_._has_bits_[1], 0x00080000U); + SetHasBit(_impl_._has_bits_[1], 0x00400000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00080000U); + ClearHasBit(_impl_._has_bits_[1], 0x00400000U); } _impl_.s3_upload_backoff_cap_ = reinterpret_cast<::google::protobuf::Duration*>(value); @@ -12936,7 +13226,7 @@ inline void XtcpConfig::set_allocated_s3_upload_backoff_cap(::google::protobuf:: inline void XtcpConfig::clear_hostname() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.hostname_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[1], 0x00000008U); + ClearHasBit(_impl_._has_bits_[1], 0x00000020U); } inline const ::std::string& XtcpConfig::hostname() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -12946,13 +13236,13 @@ inline const ::std::string& XtcpConfig::hostname() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_hostname(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[1], 0x00000008U); + SetHasBit(_impl_._has_bits_[1], 0x00000020U); _impl_.hostname_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.hostname) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_hostname() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00000008U); + SetHasBit(_impl_._has_bits_[1], 0x00000020U); ::std::string* _s = _internal_mutable_hostname(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.hostname) return _s; @@ -12972,10 +13262,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_hostname() inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_hostname() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.hostname) - if (!CheckHasBit(_impl_._has_bits_[1], 0x00000008U)) { + if (!CheckHasBit(_impl_._has_bits_[1], 0x00000020U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[1], 0x00000008U); + ClearHasBit(_impl_._has_bits_[1], 0x00000020U); auto* released = _impl_.hostname_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.hostname_.Set("", GetArena()); @@ -12985,9 +13275,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_hostname() { inline void XtcpConfig::set_allocated_hostname(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00000008U); + SetHasBit(_impl_._has_bits_[1], 0x00000020U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00000008U); + ClearHasBit(_impl_._has_bits_[1], 0x00000020U); } _impl_.hostname_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.hostname_.IsDefault()) { @@ -13000,7 +13290,7 @@ inline void XtcpConfig::set_allocated_hostname(::std::string* PROTOBUF_NULLABLE inline void XtcpConfig::clear_location() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.location_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[1], 0x00000010U); + ClearHasBit(_impl_._has_bits_[1], 0x00000040U); } inline const ::std::string& XtcpConfig::location() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -13010,13 +13300,13 @@ inline const ::std::string& XtcpConfig::location() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_location(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[1], 0x00000010U); + SetHasBit(_impl_._has_bits_[1], 0x00000040U); _impl_.location_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.location) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_location() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00000010U); + SetHasBit(_impl_._has_bits_[1], 0x00000040U); ::std::string* _s = _internal_mutable_location(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.location) return _s; @@ -13036,10 +13326,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_location() inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_location() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.location) - if (!CheckHasBit(_impl_._has_bits_[1], 0x00000010U)) { + if (!CheckHasBit(_impl_._has_bits_[1], 0x00000040U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[1], 0x00000010U); + ClearHasBit(_impl_._has_bits_[1], 0x00000040U); auto* released = _impl_.location_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.location_.Set("", GetArena()); @@ -13049,9 +13339,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_location() { inline void XtcpConfig::set_allocated_location(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00000010U); + SetHasBit(_impl_._has_bits_[1], 0x00000040U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00000010U); + ClearHasBit(_impl_._has_bits_[1], 0x00000040U); } _impl_.location_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.location_.IsDefault()) { @@ -13064,7 +13354,7 @@ inline void XtcpConfig::set_allocated_location(::std::string* PROTOBUF_NULLABLE inline void XtcpConfig::clear_label() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.label_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[1], 0x00000020U); + ClearHasBit(_impl_._has_bits_[1], 0x00000080U); } inline const ::std::string& XtcpConfig::label() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -13074,13 +13364,13 @@ inline const ::std::string& XtcpConfig::label() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_label(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[1], 0x00000020U); + SetHasBit(_impl_._has_bits_[1], 0x00000080U); _impl_.label_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.label) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_label() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00000020U); + SetHasBit(_impl_._has_bits_[1], 0x00000080U); ::std::string* _s = _internal_mutable_label(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.label) return _s; @@ -13100,10 +13390,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_label() { inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_label() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.label) - if (!CheckHasBit(_impl_._has_bits_[1], 0x00000020U)) { + if (!CheckHasBit(_impl_._has_bits_[1], 0x00000080U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[1], 0x00000020U); + ClearHasBit(_impl_._has_bits_[1], 0x00000080U); auto* released = _impl_.label_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.label_.Set("", GetArena()); @@ -13113,9 +13403,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_label() { inline void XtcpConfig::set_allocated_label(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00000020U); + SetHasBit(_impl_._has_bits_[1], 0x00000080U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00000020U); + ClearHasBit(_impl_._has_bits_[1], 0x00000080U); } _impl_.label_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.label_.IsDefault()) { @@ -13128,7 +13418,7 @@ inline void XtcpConfig::set_allocated_label(::std::string* PROTOBUF_NULLABLE val inline void XtcpConfig::clear_tag() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.tag_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[1], 0x00000040U); + ClearHasBit(_impl_._has_bits_[1], 0x00000100U); } inline const ::std::string& XtcpConfig::tag() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -13138,13 +13428,13 @@ inline const ::std::string& XtcpConfig::tag() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_tag(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[1], 0x00000040U); + SetHasBit(_impl_._has_bits_[1], 0x00000100U); _impl_.tag_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.tag) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_tag() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00000040U); + SetHasBit(_impl_._has_bits_[1], 0x00000100U); ::std::string* _s = _internal_mutable_tag(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.tag) return _s; @@ -13164,10 +13454,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_tag() { inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_tag() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.tag) - if (!CheckHasBit(_impl_._has_bits_[1], 0x00000040U)) { + if (!CheckHasBit(_impl_._has_bits_[1], 0x00000100U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[1], 0x00000040U); + ClearHasBit(_impl_._has_bits_[1], 0x00000100U); auto* released = _impl_.tag_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.tag_.Set("", GetArena()); @@ -13177,9 +13467,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_tag() { inline void XtcpConfig::set_allocated_tag(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00000040U); + SetHasBit(_impl_._has_bits_[1], 0x00000100U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00000040U); + ClearHasBit(_impl_._has_bits_[1], 0x00000100U); } _impl_.tag_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.tag_.IsDefault()) { @@ -13192,7 +13482,7 @@ inline void XtcpConfig::set_allocated_tag(::std::string* PROTOBUF_NULLABLE value inline void XtcpConfig::clear_daemon_version() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.daemon_version_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[1], 0x00000080U); + ClearHasBit(_impl_._has_bits_[1], 0x00000200U); } inline const ::std::string& XtcpConfig::daemon_version() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -13202,13 +13492,13 @@ inline const ::std::string& XtcpConfig::daemon_version() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_daemon_version(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[1], 0x00000080U); + SetHasBit(_impl_._has_bits_[1], 0x00000200U); _impl_.daemon_version_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.daemon_version) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_daemon_version() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00000080U); + SetHasBit(_impl_._has_bits_[1], 0x00000200U); ::std::string* _s = _internal_mutable_daemon_version(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.daemon_version) return _s; @@ -13228,10 +13518,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_daemon_vers inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_daemon_version() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.daemon_version) - if (!CheckHasBit(_impl_._has_bits_[1], 0x00000080U)) { + if (!CheckHasBit(_impl_._has_bits_[1], 0x00000200U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[1], 0x00000080U); + ClearHasBit(_impl_._has_bits_[1], 0x00000200U); auto* released = _impl_.daemon_version_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.daemon_version_.Set("", GetArena()); @@ -13241,9 +13531,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_daemon_version() { inline void XtcpConfig::set_allocated_daemon_version(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00000080U); + SetHasBit(_impl_._has_bits_[1], 0x00000200U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00000080U); + ClearHasBit(_impl_._has_bits_[1], 0x00000200U); } _impl_.daemon_version_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.daemon_version_.IsDefault()) { @@ -13256,7 +13546,7 @@ inline void XtcpConfig::set_allocated_daemon_version(::std::string* PROTOBUF_NUL inline void XtcpConfig::clear_ipv4_ttl() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.ipv4_ttl_ = 0u; - ClearHasBit(_impl_._has_bits_[2], 0x00000200U); + ClearHasBit(_impl_._has_bits_[2], 0x00004000U); } inline ::uint32_t XtcpConfig::ipv4_ttl() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.ipv4_ttl) @@ -13264,7 +13554,7 @@ inline ::uint32_t XtcpConfig::ipv4_ttl() const { } inline void XtcpConfig::set_ipv4_ttl(::uint32_t value) { _internal_set_ipv4_ttl(value); - SetHasBit(_impl_._has_bits_[2], 0x00000200U); + SetHasBit(_impl_._has_bits_[2], 0x00004000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.ipv4_ttl) } inline ::uint32_t XtcpConfig::_internal_ipv4_ttl() const { @@ -13280,7 +13570,7 @@ inline void XtcpConfig::_internal_set_ipv4_ttl(::uint32_t value) { inline void XtcpConfig::clear_ipv6_hop_limit() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.ipv6_hop_limit_ = 0u; - ClearHasBit(_impl_._has_bits_[2], 0x00000400U); + ClearHasBit(_impl_._has_bits_[2], 0x00008000U); } inline ::uint32_t XtcpConfig::ipv6_hop_limit() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.ipv6_hop_limit) @@ -13288,7 +13578,7 @@ inline ::uint32_t XtcpConfig::ipv6_hop_limit() const { } inline void XtcpConfig::set_ipv6_hop_limit(::uint32_t value) { _internal_set_ipv6_hop_limit(value); - SetHasBit(_impl_._has_bits_[2], 0x00000400U); + SetHasBit(_impl_._has_bits_[2], 0x00008000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.ipv6_hop_limit) } inline ::uint32_t XtcpConfig::_internal_ipv6_hop_limit() const { @@ -13302,14 +13592,14 @@ inline void XtcpConfig::_internal_set_ipv6_hop_limit(::uint32_t value) { // .xtcp_config.v1.ListenerAuth listener_auth = 152 [json_name = "listenerAuth", (.buf.validate.field) = { inline bool XtcpConfig::has_listener_auth() const { - bool value = CheckHasBit(_impl_._has_bits_[1], 0x00100000U); + bool value = CheckHasBit(_impl_._has_bits_[1], 0x00800000U); PROTOBUF_ASSUME(!value || _impl_.listener_auth_ != nullptr); return value; } inline void XtcpConfig::clear_listener_auth() { ::google::protobuf::internal::TSanWrite(&_impl_); if (_impl_.listener_auth_ != nullptr) _impl_.listener_auth_->Clear(); - ClearHasBit(_impl_._has_bits_[1], 0x00100000U); + ClearHasBit(_impl_._has_bits_[1], 0x00800000U); } inline const ::xtcp_config::v1::ListenerAuth& XtcpConfig::_internal_listener_auth() const { ::google::protobuf::internal::TSanRead(&_impl_); @@ -13328,16 +13618,16 @@ inline void XtcpConfig::unsafe_arena_set_allocated_listener_auth( } _impl_.listener_auth_ = reinterpret_cast<::xtcp_config::v1::ListenerAuth*>(value); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00100000U); + SetHasBit(_impl_._has_bits_[1], 0x00800000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00100000U); + ClearHasBit(_impl_._has_bits_[1], 0x00800000U); } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xtcp_config.v1.XtcpConfig.listener_auth) } inline ::xtcp_config::v1::ListenerAuth* PROTOBUF_NULLABLE XtcpConfig::release_listener_auth() { ::google::protobuf::internal::TSanWrite(&_impl_); - ClearHasBit(_impl_._has_bits_[1], 0x00100000U); + ClearHasBit(_impl_._has_bits_[1], 0x00800000U); ::xtcp_config::v1::ListenerAuth* released = _impl_.listener_auth_; _impl_.listener_auth_ = nullptr; if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { @@ -13357,7 +13647,7 @@ inline ::xtcp_config::v1::ListenerAuth* PROTOBUF_NULLABLE XtcpConfig::unsafe_are ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.listener_auth) - ClearHasBit(_impl_._has_bits_[1], 0x00100000U); + ClearHasBit(_impl_._has_bits_[1], 0x00800000U); ::xtcp_config::v1::ListenerAuth* temp = _impl_.listener_auth_; _impl_.listener_auth_ = nullptr; return temp; @@ -13372,7 +13662,7 @@ inline ::xtcp_config::v1::ListenerAuth* PROTOBUF_NONNULL XtcpConfig::_internal_m } inline ::xtcp_config::v1::ListenerAuth* PROTOBUF_NONNULL XtcpConfig::mutable_listener_auth() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00100000U); + SetHasBit(_impl_._has_bits_[1], 0x00800000U); ::xtcp_config::v1::ListenerAuth* _msg = _internal_mutable_listener_auth(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.listener_auth) return _msg; @@ -13389,9 +13679,9 @@ inline void XtcpConfig::set_allocated_listener_auth(::xtcp_config::v1::ListenerA if (message_arena != submessage_arena) { value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - SetHasBit(_impl_._has_bits_[1], 0x00100000U); + SetHasBit(_impl_._has_bits_[1], 0x00800000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00100000U); + ClearHasBit(_impl_._has_bits_[1], 0x00800000U); } _impl_.listener_auth_ = reinterpret_cast<::xtcp_config::v1::ListenerAuth*>(value); @@ -13400,14 +13690,14 @@ inline void XtcpConfig::set_allocated_listener_auth(::xtcp_config::v1::ListenerA // .xtcp_config.v1.ListenerEndpoint prometheus_listener = 153 [json_name = "prometheusListener", (.buf.validate.field) = { inline bool XtcpConfig::has_prometheus_listener() const { - bool value = CheckHasBit(_impl_._has_bits_[1], 0x00200000U); + bool value = CheckHasBit(_impl_._has_bits_[1], 0x01000000U); PROTOBUF_ASSUME(!value || _impl_.prometheus_listener_ != nullptr); return value; } inline void XtcpConfig::clear_prometheus_listener() { ::google::protobuf::internal::TSanWrite(&_impl_); if (_impl_.prometheus_listener_ != nullptr) _impl_.prometheus_listener_->Clear(); - ClearHasBit(_impl_._has_bits_[1], 0x00200000U); + ClearHasBit(_impl_._has_bits_[1], 0x01000000U); } inline const ::xtcp_config::v1::ListenerEndpoint& XtcpConfig::_internal_prometheus_listener() const { ::google::protobuf::internal::TSanRead(&_impl_); @@ -13426,16 +13716,16 @@ inline void XtcpConfig::unsafe_arena_set_allocated_prometheus_listener( } _impl_.prometheus_listener_ = reinterpret_cast<::xtcp_config::v1::ListenerEndpoint*>(value); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00200000U); + SetHasBit(_impl_._has_bits_[1], 0x01000000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00200000U); + ClearHasBit(_impl_._has_bits_[1], 0x01000000U); } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xtcp_config.v1.XtcpConfig.prometheus_listener) } inline ::xtcp_config::v1::ListenerEndpoint* PROTOBUF_NULLABLE XtcpConfig::release_prometheus_listener() { ::google::protobuf::internal::TSanWrite(&_impl_); - ClearHasBit(_impl_._has_bits_[1], 0x00200000U); + ClearHasBit(_impl_._has_bits_[1], 0x01000000U); ::xtcp_config::v1::ListenerEndpoint* released = _impl_.prometheus_listener_; _impl_.prometheus_listener_ = nullptr; if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { @@ -13455,7 +13745,7 @@ inline ::xtcp_config::v1::ListenerEndpoint* PROTOBUF_NULLABLE XtcpConfig::unsafe ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.prometheus_listener) - ClearHasBit(_impl_._has_bits_[1], 0x00200000U); + ClearHasBit(_impl_._has_bits_[1], 0x01000000U); ::xtcp_config::v1::ListenerEndpoint* temp = _impl_.prometheus_listener_; _impl_.prometheus_listener_ = nullptr; return temp; @@ -13470,7 +13760,7 @@ inline ::xtcp_config::v1::ListenerEndpoint* PROTOBUF_NONNULL XtcpConfig::_intern } inline ::xtcp_config::v1::ListenerEndpoint* PROTOBUF_NONNULL XtcpConfig::mutable_prometheus_listener() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00200000U); + SetHasBit(_impl_._has_bits_[1], 0x01000000U); ::xtcp_config::v1::ListenerEndpoint* _msg = _internal_mutable_prometheus_listener(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.prometheus_listener) return _msg; @@ -13487,9 +13777,9 @@ inline void XtcpConfig::set_allocated_prometheus_listener(::xtcp_config::v1::Lis if (message_arena != submessage_arena) { value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - SetHasBit(_impl_._has_bits_[1], 0x00200000U); + SetHasBit(_impl_._has_bits_[1], 0x01000000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00200000U); + ClearHasBit(_impl_._has_bits_[1], 0x01000000U); } _impl_.prometheus_listener_ = reinterpret_cast<::xtcp_config::v1::ListenerEndpoint*>(value); @@ -13498,14 +13788,14 @@ inline void XtcpConfig::set_allocated_prometheus_listener(::xtcp_config::v1::Lis // .xtcp_config.v1.ListenerAuth admin_listener_auth = 154 [json_name = "adminListenerAuth", (.buf.validate.field) = { inline bool XtcpConfig::has_admin_listener_auth() const { - bool value = CheckHasBit(_impl_._has_bits_[1], 0x00400000U); + bool value = CheckHasBit(_impl_._has_bits_[1], 0x02000000U); PROTOBUF_ASSUME(!value || _impl_.admin_listener_auth_ != nullptr); return value; } inline void XtcpConfig::clear_admin_listener_auth() { ::google::protobuf::internal::TSanWrite(&_impl_); if (_impl_.admin_listener_auth_ != nullptr) _impl_.admin_listener_auth_->Clear(); - ClearHasBit(_impl_._has_bits_[1], 0x00400000U); + ClearHasBit(_impl_._has_bits_[1], 0x02000000U); } inline const ::xtcp_config::v1::ListenerAuth& XtcpConfig::_internal_admin_listener_auth() const { ::google::protobuf::internal::TSanRead(&_impl_); @@ -13524,16 +13814,16 @@ inline void XtcpConfig::unsafe_arena_set_allocated_admin_listener_auth( } _impl_.admin_listener_auth_ = reinterpret_cast<::xtcp_config::v1::ListenerAuth*>(value); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00400000U); + SetHasBit(_impl_._has_bits_[1], 0x02000000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00400000U); + ClearHasBit(_impl_._has_bits_[1], 0x02000000U); } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xtcp_config.v1.XtcpConfig.admin_listener_auth) } inline ::xtcp_config::v1::ListenerAuth* PROTOBUF_NULLABLE XtcpConfig::release_admin_listener_auth() { ::google::protobuf::internal::TSanWrite(&_impl_); - ClearHasBit(_impl_._has_bits_[1], 0x00400000U); + ClearHasBit(_impl_._has_bits_[1], 0x02000000U); ::xtcp_config::v1::ListenerAuth* released = _impl_.admin_listener_auth_; _impl_.admin_listener_auth_ = nullptr; if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { @@ -13553,7 +13843,7 @@ inline ::xtcp_config::v1::ListenerAuth* PROTOBUF_NULLABLE XtcpConfig::unsafe_are ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.admin_listener_auth) - ClearHasBit(_impl_._has_bits_[1], 0x00400000U); + ClearHasBit(_impl_._has_bits_[1], 0x02000000U); ::xtcp_config::v1::ListenerAuth* temp = _impl_.admin_listener_auth_; _impl_.admin_listener_auth_ = nullptr; return temp; @@ -13568,7 +13858,7 @@ inline ::xtcp_config::v1::ListenerAuth* PROTOBUF_NONNULL XtcpConfig::_internal_m } inline ::xtcp_config::v1::ListenerAuth* PROTOBUF_NONNULL XtcpConfig::mutable_admin_listener_auth() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00400000U); + SetHasBit(_impl_._has_bits_[1], 0x02000000U); ::xtcp_config::v1::ListenerAuth* _msg = _internal_mutable_admin_listener_auth(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.admin_listener_auth) return _msg; @@ -13585,9 +13875,9 @@ inline void XtcpConfig::set_allocated_admin_listener_auth(::xtcp_config::v1::Lis if (message_arena != submessage_arena) { value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - SetHasBit(_impl_._has_bits_[1], 0x00400000U); + SetHasBit(_impl_._has_bits_[1], 0x02000000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00400000U); + ClearHasBit(_impl_._has_bits_[1], 0x02000000U); } _impl_.admin_listener_auth_ = reinterpret_cast<::xtcp_config::v1::ListenerAuth*>(value); @@ -13598,7 +13888,7 @@ inline void XtcpConfig::set_allocated_admin_listener_auth(::xtcp_config::v1::Lis inline void XtcpConfig::clear_grpc_port() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.grpc_port_ = 0u; - ClearHasBit(_impl_._has_bits_[2], 0x00000800U); + ClearHasBit(_impl_._has_bits_[2], 0x00010000U); } inline ::uint32_t XtcpConfig::grpc_port() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.grpc_port) @@ -13606,7 +13896,7 @@ inline ::uint32_t XtcpConfig::grpc_port() const { } inline void XtcpConfig::set_grpc_port(::uint32_t value) { _internal_set_grpc_port(value); - SetHasBit(_impl_._has_bits_[2], 0x00000800U); + SetHasBit(_impl_._has_bits_[2], 0x00010000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.grpc_port) } inline ::uint32_t XtcpConfig::_internal_grpc_port() const { @@ -13620,14 +13910,14 @@ inline void XtcpConfig::_internal_set_grpc_port(::uint32_t value) { // .xtcp_config.v1.ListenerEndpoint grpc_listener = 161 [json_name = "grpcListener", (.buf.validate.field) = { inline bool XtcpConfig::has_grpc_listener() const { - bool value = CheckHasBit(_impl_._has_bits_[1], 0x00800000U); + bool value = CheckHasBit(_impl_._has_bits_[1], 0x04000000U); PROTOBUF_ASSUME(!value || _impl_.grpc_listener_ != nullptr); return value; } inline void XtcpConfig::clear_grpc_listener() { ::google::protobuf::internal::TSanWrite(&_impl_); if (_impl_.grpc_listener_ != nullptr) _impl_.grpc_listener_->Clear(); - ClearHasBit(_impl_._has_bits_[1], 0x00800000U); + ClearHasBit(_impl_._has_bits_[1], 0x04000000U); } inline const ::xtcp_config::v1::ListenerEndpoint& XtcpConfig::_internal_grpc_listener() const { ::google::protobuf::internal::TSanRead(&_impl_); @@ -13646,16 +13936,16 @@ inline void XtcpConfig::unsafe_arena_set_allocated_grpc_listener( } _impl_.grpc_listener_ = reinterpret_cast<::xtcp_config::v1::ListenerEndpoint*>(value); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00800000U); + SetHasBit(_impl_._has_bits_[1], 0x04000000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00800000U); + ClearHasBit(_impl_._has_bits_[1], 0x04000000U); } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xtcp_config.v1.XtcpConfig.grpc_listener) } inline ::xtcp_config::v1::ListenerEndpoint* PROTOBUF_NULLABLE XtcpConfig::release_grpc_listener() { ::google::protobuf::internal::TSanWrite(&_impl_); - ClearHasBit(_impl_._has_bits_[1], 0x00800000U); + ClearHasBit(_impl_._has_bits_[1], 0x04000000U); ::xtcp_config::v1::ListenerEndpoint* released = _impl_.grpc_listener_; _impl_.grpc_listener_ = nullptr; if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { @@ -13675,7 +13965,7 @@ inline ::xtcp_config::v1::ListenerEndpoint* PROTOBUF_NULLABLE XtcpConfig::unsafe ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.grpc_listener) - ClearHasBit(_impl_._has_bits_[1], 0x00800000U); + ClearHasBit(_impl_._has_bits_[1], 0x04000000U); ::xtcp_config::v1::ListenerEndpoint* temp = _impl_.grpc_listener_; _impl_.grpc_listener_ = nullptr; return temp; @@ -13690,7 +13980,7 @@ inline ::xtcp_config::v1::ListenerEndpoint* PROTOBUF_NONNULL XtcpConfig::_intern } inline ::xtcp_config::v1::ListenerEndpoint* PROTOBUF_NONNULL XtcpConfig::mutable_grpc_listener() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00800000U); + SetHasBit(_impl_._has_bits_[1], 0x04000000U); ::xtcp_config::v1::ListenerEndpoint* _msg = _internal_mutable_grpc_listener(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.grpc_listener) return _msg; @@ -13707,9 +13997,9 @@ inline void XtcpConfig::set_allocated_grpc_listener(::xtcp_config::v1::ListenerE if (message_arena != submessage_arena) { value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - SetHasBit(_impl_._has_bits_[1], 0x00800000U); + SetHasBit(_impl_._has_bits_[1], 0x04000000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00800000U); + ClearHasBit(_impl_._has_bits_[1], 0x04000000U); } _impl_.grpc_listener_ = reinterpret_cast<::xtcp_config::v1::ListenerEndpoint*>(value); @@ -13775,7 +14065,7 @@ XtcpConfig::_internal_mutable_listeners() { inline void XtcpConfig::clear_pyroscope_url() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.pyroscope_url_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[1], 0x00000100U); + ClearHasBit(_impl_._has_bits_[1], 0x00000400U); } inline const ::std::string& XtcpConfig::pyroscope_url() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -13785,13 +14075,13 @@ inline const ::std::string& XtcpConfig::pyroscope_url() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_pyroscope_url(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[1], 0x00000100U); + SetHasBit(_impl_._has_bits_[1], 0x00000400U); _impl_.pyroscope_url_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.pyroscope_url) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_pyroscope_url() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00000100U); + SetHasBit(_impl_._has_bits_[1], 0x00000400U); ::std::string* _s = _internal_mutable_pyroscope_url(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.pyroscope_url) return _s; @@ -13811,10 +14101,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_pyroscope_u inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_pyroscope_url() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.pyroscope_url) - if (!CheckHasBit(_impl_._has_bits_[1], 0x00000100U)) { + if (!CheckHasBit(_impl_._has_bits_[1], 0x00000400U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[1], 0x00000100U); + ClearHasBit(_impl_._has_bits_[1], 0x00000400U); auto* released = _impl_.pyroscope_url_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.pyroscope_url_.Set("", GetArena()); @@ -13824,9 +14114,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_pyroscope_url() { inline void XtcpConfig::set_allocated_pyroscope_url(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00000100U); + SetHasBit(_impl_._has_bits_[1], 0x00000400U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00000100U); + ClearHasBit(_impl_._has_bits_[1], 0x00000400U); } _impl_.pyroscope_url_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.pyroscope_url_.IsDefault()) { @@ -13839,7 +14129,7 @@ inline void XtcpConfig::set_allocated_pyroscope_url(::std::string* PROTOBUF_NULL inline void XtcpConfig::clear_pyroscope_app_name() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.pyroscope_app_name_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[1], 0x00000200U); + ClearHasBit(_impl_._has_bits_[1], 0x00000800U); } inline const ::std::string& XtcpConfig::pyroscope_app_name() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -13849,13 +14139,13 @@ inline const ::std::string& XtcpConfig::pyroscope_app_name() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_pyroscope_app_name(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[1], 0x00000200U); + SetHasBit(_impl_._has_bits_[1], 0x00000800U); _impl_.pyroscope_app_name_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.pyroscope_app_name) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_pyroscope_app_name() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00000200U); + SetHasBit(_impl_._has_bits_[1], 0x00000800U); ::std::string* _s = _internal_mutable_pyroscope_app_name(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.pyroscope_app_name) return _s; @@ -13875,10 +14165,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_pyroscope_a inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_pyroscope_app_name() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.pyroscope_app_name) - if (!CheckHasBit(_impl_._has_bits_[1], 0x00000200U)) { + if (!CheckHasBit(_impl_._has_bits_[1], 0x00000800U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[1], 0x00000200U); + ClearHasBit(_impl_._has_bits_[1], 0x00000800U); auto* released = _impl_.pyroscope_app_name_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.pyroscope_app_name_.Set("", GetArena()); @@ -13888,9 +14178,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_pyroscope_app_name() inline void XtcpConfig::set_allocated_pyroscope_app_name(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00000200U); + SetHasBit(_impl_._has_bits_[1], 0x00000800U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00000200U); + ClearHasBit(_impl_._has_bits_[1], 0x00000800U); } _impl_.pyroscope_app_name_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.pyroscope_app_name_.IsDefault()) { @@ -13903,7 +14193,7 @@ inline void XtcpConfig::set_allocated_pyroscope_app_name(::std::string* PROTOBUF inline void XtcpConfig::clear_pyroscope_sample_hz() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.pyroscope_sample_hz_ = 0u; - ClearHasBit(_impl_._has_bits_[2], 0x00001000U); + ClearHasBit(_impl_._has_bits_[2], 0x00020000U); } inline ::uint32_t XtcpConfig::pyroscope_sample_hz() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.pyroscope_sample_hz) @@ -13911,7 +14201,7 @@ inline ::uint32_t XtcpConfig::pyroscope_sample_hz() const { } inline void XtcpConfig::set_pyroscope_sample_hz(::uint32_t value) { _internal_set_pyroscope_sample_hz(value); - SetHasBit(_impl_._has_bits_[2], 0x00001000U); + SetHasBit(_impl_._has_bits_[2], 0x00020000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.pyroscope_sample_hz) } inline ::uint32_t XtcpConfig::_internal_pyroscope_sample_hz() const { @@ -13927,7 +14217,7 @@ inline void XtcpConfig::_internal_set_pyroscope_sample_hz(::uint32_t value) { inline void XtcpConfig::clear_pyroscope_upload_interval_sec() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.pyroscope_upload_interval_sec_ = 0u; - ClearHasBit(_impl_._has_bits_[2], 0x00002000U); + ClearHasBit(_impl_._has_bits_[2], 0x00040000U); } inline ::uint32_t XtcpConfig::pyroscope_upload_interval_sec() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.pyroscope_upload_interval_sec) @@ -13935,7 +14225,7 @@ inline ::uint32_t XtcpConfig::pyroscope_upload_interval_sec() const { } inline void XtcpConfig::set_pyroscope_upload_interval_sec(::uint32_t value) { _internal_set_pyroscope_upload_interval_sec(value); - SetHasBit(_impl_._has_bits_[2], 0x00002000U); + SetHasBit(_impl_._has_bits_[2], 0x00040000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.pyroscope_upload_interval_sec) } inline ::uint32_t XtcpConfig::_internal_pyroscope_upload_interval_sec() const { @@ -13951,7 +14241,7 @@ inline void XtcpConfig::_internal_set_pyroscope_upload_interval_sec(::uint32_t v inline void XtcpConfig::clear_resolve_container_id() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.resolve_container_id_ = false; - ClearHasBit(_impl_._has_bits_[2], 0x00000010U); + ClearHasBit(_impl_._has_bits_[2], 0x00080000U); } inline bool XtcpConfig::resolve_container_id() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.resolve_container_id) @@ -13959,7 +14249,7 @@ inline bool XtcpConfig::resolve_container_id() const { } inline void XtcpConfig::set_resolve_container_id(bool value) { _internal_set_resolve_container_id(value); - SetHasBit(_impl_._has_bits_[2], 0x00000010U); + SetHasBit(_impl_._has_bits_[2], 0x00080000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.resolve_container_id) } inline bool XtcpConfig::_internal_resolve_container_id() const { @@ -13975,7 +14265,7 @@ inline void XtcpConfig::_internal_set_resolve_container_id(bool value) { inline void XtcpConfig::clear_enrich_container_enable() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.enrich_container_enable_ = false; - ClearHasBit(_impl_._has_bits_[2], 0x00004000U); + ClearHasBit(_impl_._has_bits_[2], 0x00100000U); } inline bool XtcpConfig::enrich_container_enable() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.enrich_container_enable) @@ -13983,7 +14273,7 @@ inline bool XtcpConfig::enrich_container_enable() const { } inline void XtcpConfig::set_enrich_container_enable(bool value) { _internal_set_enrich_container_enable(value); - SetHasBit(_impl_._has_bits_[2], 0x00004000U); + SetHasBit(_impl_._has_bits_[2], 0x00100000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.enrich_container_enable) } inline bool XtcpConfig::_internal_enrich_container_enable() const { @@ -13999,7 +14289,7 @@ inline void XtcpConfig::_internal_set_enrich_container_enable(bool value) { inline void XtcpConfig::clear_docker_socket_path() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.docker_socket_path_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[1], 0x00000400U); + ClearHasBit(_impl_._has_bits_[1], 0x00001000U); } inline const ::std::string& XtcpConfig::docker_socket_path() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -14009,13 +14299,13 @@ inline const ::std::string& XtcpConfig::docker_socket_path() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_docker_socket_path(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[1], 0x00000400U); + SetHasBit(_impl_._has_bits_[1], 0x00001000U); _impl_.docker_socket_path_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.docker_socket_path) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_docker_socket_path() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00000400U); + SetHasBit(_impl_._has_bits_[1], 0x00001000U); ::std::string* _s = _internal_mutable_docker_socket_path(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.docker_socket_path) return _s; @@ -14035,10 +14325,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_docker_sock inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_docker_socket_path() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.docker_socket_path) - if (!CheckHasBit(_impl_._has_bits_[1], 0x00000400U)) { + if (!CheckHasBit(_impl_._has_bits_[1], 0x00001000U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[1], 0x00000400U); + ClearHasBit(_impl_._has_bits_[1], 0x00001000U); auto* released = _impl_.docker_socket_path_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.docker_socket_path_.Set("", GetArena()); @@ -14048,9 +14338,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_docker_socket_path() inline void XtcpConfig::set_allocated_docker_socket_path(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00000400U); + SetHasBit(_impl_._has_bits_[1], 0x00001000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00000400U); + ClearHasBit(_impl_._has_bits_[1], 0x00001000U); } _impl_.docker_socket_path_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.docker_socket_path_.IsDefault()) { @@ -14063,7 +14353,7 @@ inline void XtcpConfig::set_allocated_docker_socket_path(::std::string* PROTOBUF inline void XtcpConfig::clear_enrich_lldp_enable() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.enrich_lldp_enable_ = false; - ClearHasBit(_impl_._has_bits_[2], 0x00008000U); + ClearHasBit(_impl_._has_bits_[2], 0x00200000U); } inline bool XtcpConfig::enrich_lldp_enable() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.enrich_lldp_enable) @@ -14071,7 +14361,7 @@ inline bool XtcpConfig::enrich_lldp_enable() const { } inline void XtcpConfig::set_enrich_lldp_enable(bool value) { _internal_set_enrich_lldp_enable(value); - SetHasBit(_impl_._has_bits_[2], 0x00008000U); + SetHasBit(_impl_._has_bits_[2], 0x00200000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.enrich_lldp_enable) } inline bool XtcpConfig::_internal_enrich_lldp_enable() const { @@ -14087,7 +14377,7 @@ inline void XtcpConfig::_internal_set_enrich_lldp_enable(bool value) { inline void XtcpConfig::clear_lldpd_socket_path() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.lldpd_socket_path_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[1], 0x00000800U); + ClearHasBit(_impl_._has_bits_[1], 0x00002000U); } inline const ::std::string& XtcpConfig::lldpd_socket_path() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -14097,13 +14387,13 @@ inline const ::std::string& XtcpConfig::lldpd_socket_path() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_lldpd_socket_path(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[1], 0x00000800U); + SetHasBit(_impl_._has_bits_[1], 0x00002000U); _impl_.lldpd_socket_path_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.lldpd_socket_path) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_lldpd_socket_path() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00000800U); + SetHasBit(_impl_._has_bits_[1], 0x00002000U); ::std::string* _s = _internal_mutable_lldpd_socket_path(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.lldpd_socket_path) return _s; @@ -14123,10 +14413,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_lldpd_socke inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_lldpd_socket_path() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.lldpd_socket_path) - if (!CheckHasBit(_impl_._has_bits_[1], 0x00000800U)) { + if (!CheckHasBit(_impl_._has_bits_[1], 0x00002000U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[1], 0x00000800U); + ClearHasBit(_impl_._has_bits_[1], 0x00002000U); auto* released = _impl_.lldpd_socket_path_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.lldpd_socket_path_.Set("", GetArena()); @@ -14136,9 +14426,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_lldpd_socket_path() inline void XtcpConfig::set_allocated_lldpd_socket_path(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00000800U); + SetHasBit(_impl_._has_bits_[1], 0x00002000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00000800U); + ClearHasBit(_impl_._has_bits_[1], 0x00002000U); } _impl_.lldpd_socket_path_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.lldpd_socket_path_.IsDefault()) { @@ -14151,7 +14441,7 @@ inline void XtcpConfig::set_allocated_lldpd_socket_path(::std::string* PROTOBUF_ inline void XtcpConfig::clear_lldpd_version_hint() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.lldpd_version_hint_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[1], 0x00001000U); + ClearHasBit(_impl_._has_bits_[1], 0x00004000U); } inline const ::std::string& XtcpConfig::lldpd_version_hint() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -14161,13 +14451,13 @@ inline const ::std::string& XtcpConfig::lldpd_version_hint() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_lldpd_version_hint(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[1], 0x00001000U); + SetHasBit(_impl_._has_bits_[1], 0x00004000U); _impl_.lldpd_version_hint_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.lldpd_version_hint) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_lldpd_version_hint() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00001000U); + SetHasBit(_impl_._has_bits_[1], 0x00004000U); ::std::string* _s = _internal_mutable_lldpd_version_hint(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.lldpd_version_hint) return _s; @@ -14187,10 +14477,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_lldpd_versi inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_lldpd_version_hint() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.lldpd_version_hint) - if (!CheckHasBit(_impl_._has_bits_[1], 0x00001000U)) { + if (!CheckHasBit(_impl_._has_bits_[1], 0x00004000U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[1], 0x00001000U); + ClearHasBit(_impl_._has_bits_[1], 0x00004000U); auto* released = _impl_.lldpd_version_hint_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.lldpd_version_hint_.Set("", GetArena()); @@ -14200,9 +14490,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_lldpd_version_hint() inline void XtcpConfig::set_allocated_lldpd_version_hint(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00001000U); + SetHasBit(_impl_._has_bits_[1], 0x00004000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00001000U); + ClearHasBit(_impl_._has_bits_[1], 0x00004000U); } _impl_.lldpd_version_hint_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.lldpd_version_hint_.IsDefault()) { @@ -14215,7 +14505,7 @@ inline void XtcpConfig::set_allocated_lldpd_version_hint(::std::string* PROTOBUF inline void XtcpConfig::clear_enrich_nic_enable() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.enrich_nic_enable_ = false; - ClearHasBit(_impl_._has_bits_[2], 0x00010000U); + ClearHasBit(_impl_._has_bits_[2], 0x00400000U); } inline bool XtcpConfig::enrich_nic_enable() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.enrich_nic_enable) @@ -14223,7 +14513,7 @@ inline bool XtcpConfig::enrich_nic_enable() const { } inline void XtcpConfig::set_enrich_nic_enable(bool value) { _internal_set_enrich_nic_enable(value); - SetHasBit(_impl_._has_bits_[2], 0x00010000U); + SetHasBit(_impl_._has_bits_[2], 0x00400000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.enrich_nic_enable) } inline bool XtcpConfig::_internal_enrich_nic_enable() const { @@ -14239,7 +14529,7 @@ inline void XtcpConfig::_internal_set_enrich_nic_enable(bool value) { inline void XtcpConfig::clear_uplink_count() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.uplink_count_ = 0u; - ClearHasBit(_impl_._has_bits_[2], 0x00040000U); + ClearHasBit(_impl_._has_bits_[2], 0x00800000U); } inline ::uint32_t XtcpConfig::uplink_count() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.uplink_count) @@ -14247,7 +14537,7 @@ inline ::uint32_t XtcpConfig::uplink_count() const { } inline void XtcpConfig::set_uplink_count(::uint32_t value) { _internal_set_uplink_count(value); - SetHasBit(_impl_._has_bits_[2], 0x00040000U); + SetHasBit(_impl_._has_bits_[2], 0x00800000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.uplink_count) } inline ::uint32_t XtcpConfig::_internal_uplink_count() const { @@ -14335,7 +14625,7 @@ XtcpConfig::_internal_mutable_uplink_interfaces() { inline void XtcpConfig::clear_populate_nsid() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.populate_nsid_ = false; - ClearHasBit(_impl_._has_bits_[2], 0x00020000U); + ClearHasBit(_impl_._has_bits_[2], 0x01000000U); } inline bool XtcpConfig::populate_nsid() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.populate_nsid) @@ -14343,7 +14633,7 @@ inline bool XtcpConfig::populate_nsid() const { } inline void XtcpConfig::set_populate_nsid(bool value) { _internal_set_populate_nsid(value); - SetHasBit(_impl_._has_bits_[2], 0x00020000U); + SetHasBit(_impl_._has_bits_[2], 0x01000000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.populate_nsid) } inline bool XtcpConfig::_internal_populate_nsid() const { @@ -14359,7 +14649,7 @@ inline void XtcpConfig::_internal_set_populate_nsid(bool value) { inline void XtcpConfig::clear_enrich_asn_enable() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.enrich_asn_enable_ = false; - ClearHasBit(_impl_._has_bits_[2], 0x00080000U); + ClearHasBit(_impl_._has_bits_[2], 0x02000000U); } inline bool XtcpConfig::enrich_asn_enable() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.enrich_asn_enable) @@ -14367,7 +14657,7 @@ inline bool XtcpConfig::enrich_asn_enable() const { } inline void XtcpConfig::set_enrich_asn_enable(bool value) { _internal_set_enrich_asn_enable(value); - SetHasBit(_impl_._has_bits_[2], 0x00080000U); + SetHasBit(_impl_._has_bits_[2], 0x02000000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.enrich_asn_enable) } inline bool XtcpConfig::_internal_enrich_asn_enable() const { @@ -14383,7 +14673,7 @@ inline void XtcpConfig::_internal_set_enrich_asn_enable(bool value) { inline void XtcpConfig::clear_asn_db_path() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.asn_db_path_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[1], 0x00002000U); + ClearHasBit(_impl_._has_bits_[1], 0x00008000U); } inline const ::std::string& XtcpConfig::asn_db_path() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -14393,13 +14683,13 @@ inline const ::std::string& XtcpConfig::asn_db_path() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_asn_db_path(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[1], 0x00002000U); + SetHasBit(_impl_._has_bits_[1], 0x00008000U); _impl_.asn_db_path_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.asn_db_path) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_asn_db_path() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00002000U); + SetHasBit(_impl_._has_bits_[1], 0x00008000U); ::std::string* _s = _internal_mutable_asn_db_path(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.asn_db_path) return _s; @@ -14419,10 +14709,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_asn_db_path inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_asn_db_path() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.asn_db_path) - if (!CheckHasBit(_impl_._has_bits_[1], 0x00002000U)) { + if (!CheckHasBit(_impl_._has_bits_[1], 0x00008000U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[1], 0x00002000U); + ClearHasBit(_impl_._has_bits_[1], 0x00008000U); auto* released = _impl_.asn_db_path_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.asn_db_path_.Set("", GetArena()); @@ -14432,9 +14722,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_asn_db_path() { inline void XtcpConfig::set_allocated_asn_db_path(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00002000U); + SetHasBit(_impl_._has_bits_[1], 0x00008000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00002000U); + ClearHasBit(_impl_._has_bits_[1], 0x00008000U); } _impl_.asn_db_path_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.asn_db_path_.IsDefault()) { @@ -14445,7 +14735,7 @@ inline void XtcpConfig::set_allocated_asn_db_path(::std::string* PROTOBUF_NULLAB // .google.protobuf.Duration asn_refresh_interval = 242 [json_name = "asnRefreshInterval"]; inline bool XtcpConfig::has_asn_refresh_interval() const { - bool value = CheckHasBit(_impl_._has_bits_[1], 0x01000000U); + bool value = CheckHasBit(_impl_._has_bits_[1], 0x08000000U); PROTOBUF_ASSUME(!value || _impl_.asn_refresh_interval_ != nullptr); return value; } @@ -14466,16 +14756,16 @@ inline void XtcpConfig::unsafe_arena_set_allocated_asn_refresh_interval( } _impl_.asn_refresh_interval_ = reinterpret_cast<::google::protobuf::Duration*>(value); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x01000000U); + SetHasBit(_impl_._has_bits_[1], 0x08000000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x01000000U); + ClearHasBit(_impl_._has_bits_[1], 0x08000000U); } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xtcp_config.v1.XtcpConfig.asn_refresh_interval) } inline ::google::protobuf::Duration* PROTOBUF_NULLABLE XtcpConfig::release_asn_refresh_interval() { ::google::protobuf::internal::TSanWrite(&_impl_); - ClearHasBit(_impl_._has_bits_[1], 0x01000000U); + ClearHasBit(_impl_._has_bits_[1], 0x08000000U); ::google::protobuf::Duration* released = _impl_.asn_refresh_interval_; _impl_.asn_refresh_interval_ = nullptr; if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { @@ -14495,7 +14785,7 @@ inline ::google::protobuf::Duration* PROTOBUF_NULLABLE XtcpConfig::unsafe_arena_ ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.asn_refresh_interval) - ClearHasBit(_impl_._has_bits_[1], 0x01000000U); + ClearHasBit(_impl_._has_bits_[1], 0x08000000U); ::google::protobuf::Duration* temp = _impl_.asn_refresh_interval_; _impl_.asn_refresh_interval_ = nullptr; return temp; @@ -14510,7 +14800,7 @@ inline ::google::protobuf::Duration* PROTOBUF_NONNULL XtcpConfig::_internal_muta } inline ::google::protobuf::Duration* PROTOBUF_NONNULL XtcpConfig::mutable_asn_refresh_interval() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x01000000U); + SetHasBit(_impl_._has_bits_[1], 0x08000000U); ::google::protobuf::Duration* _msg = _internal_mutable_asn_refresh_interval(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.asn_refresh_interval) return _msg; @@ -14527,9 +14817,9 @@ inline void XtcpConfig::set_allocated_asn_refresh_interval(::google::protobuf::D if (message_arena != submessage_arena) { value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - SetHasBit(_impl_._has_bits_[1], 0x01000000U); + SetHasBit(_impl_._has_bits_[1], 0x08000000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x01000000U); + ClearHasBit(_impl_._has_bits_[1], 0x08000000U); } _impl_.asn_refresh_interval_ = reinterpret_cast<::google::protobuf::Duration*>(value); @@ -14540,7 +14830,7 @@ inline void XtcpConfig::set_allocated_asn_refresh_interval(::google::protobuf::D inline void XtcpConfig::clear_ipmeta_bootstrap_path() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.ipmeta_bootstrap_path_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[1], 0x00004000U); + ClearHasBit(_impl_._has_bits_[1], 0x00010000U); } inline const ::std::string& XtcpConfig::ipmeta_bootstrap_path() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -14550,13 +14840,13 @@ inline const ::std::string& XtcpConfig::ipmeta_bootstrap_path() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_ipmeta_bootstrap_path(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[1], 0x00004000U); + SetHasBit(_impl_._has_bits_[1], 0x00010000U); _impl_.ipmeta_bootstrap_path_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.ipmeta_bootstrap_path) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_ipmeta_bootstrap_path() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00004000U); + SetHasBit(_impl_._has_bits_[1], 0x00010000U); ::std::string* _s = _internal_mutable_ipmeta_bootstrap_path(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.ipmeta_bootstrap_path) return _s; @@ -14576,10 +14866,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_ipmeta_boot inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_ipmeta_bootstrap_path() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.ipmeta_bootstrap_path) - if (!CheckHasBit(_impl_._has_bits_[1], 0x00004000U)) { + if (!CheckHasBit(_impl_._has_bits_[1], 0x00010000U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[1], 0x00004000U); + ClearHasBit(_impl_._has_bits_[1], 0x00010000U); auto* released = _impl_.ipmeta_bootstrap_path_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.ipmeta_bootstrap_path_.Set("", GetArena()); @@ -14589,9 +14879,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_ipmeta_bootstrap_pat inline void XtcpConfig::set_allocated_ipmeta_bootstrap_path(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00004000U); + SetHasBit(_impl_._has_bits_[1], 0x00010000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00004000U); + ClearHasBit(_impl_._has_bits_[1], 0x00010000U); } _impl_.ipmeta_bootstrap_path_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.ipmeta_bootstrap_path_.IsDefault()) { @@ -14604,7 +14894,7 @@ inline void XtcpConfig::set_allocated_ipmeta_bootstrap_path(::std::string* PROTO inline void XtcpConfig::clear_ipmeta_cache_path() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.ipmeta_cache_path_.ClearToEmpty(); - ClearHasBit(_impl_._has_bits_[1], 0x00008000U); + ClearHasBit(_impl_._has_bits_[1], 0x00020000U); } inline const ::std::string& XtcpConfig::ipmeta_cache_path() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -14614,13 +14904,13 @@ inline const ::std::string& XtcpConfig::ipmeta_cache_path() const template PROTOBUF_ALWAYS_INLINE void XtcpConfig::set_ipmeta_cache_path(Arg_&& arg, Args_... args) { ::google::protobuf::internal::TSanWrite(&_impl_); - SetHasBit(_impl_._has_bits_[1], 0x00008000U); + SetHasBit(_impl_._has_bits_[1], 0x00020000U); _impl_.ipmeta_cache_path_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.ipmeta_cache_path) } inline ::std::string* PROTOBUF_NONNULL XtcpConfig::mutable_ipmeta_cache_path() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x00008000U); + SetHasBit(_impl_._has_bits_[1], 0x00020000U); ::std::string* _s = _internal_mutable_ipmeta_cache_path(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.ipmeta_cache_path) return _s; @@ -14640,10 +14930,10 @@ inline ::std::string* PROTOBUF_NONNULL XtcpConfig::_internal_mutable_ipmeta_cach inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_ipmeta_cache_path() { ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.ipmeta_cache_path) - if (!CheckHasBit(_impl_._has_bits_[1], 0x00008000U)) { + if (!CheckHasBit(_impl_._has_bits_[1], 0x00020000U)) { return nullptr; } - ClearHasBit(_impl_._has_bits_[1], 0x00008000U); + ClearHasBit(_impl_._has_bits_[1], 0x00020000U); auto* released = _impl_.ipmeta_cache_path_.Release(); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString()) { _impl_.ipmeta_cache_path_.Set("", GetArena()); @@ -14653,9 +14943,9 @@ inline ::std::string* PROTOBUF_NULLABLE XtcpConfig::release_ipmeta_cache_path() inline void XtcpConfig::set_allocated_ipmeta_cache_path(::std::string* PROTOBUF_NULLABLE value) { ::google::protobuf::internal::TSanWrite(&_impl_); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x00008000U); + SetHasBit(_impl_._has_bits_[1], 0x00020000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x00008000U); + ClearHasBit(_impl_._has_bits_[1], 0x00020000U); } _impl_.ipmeta_cache_path_.SetAllocated(value, GetArena()); if (::google::protobuf::internal::DebugHardenForceCopyDefaultString() && _impl_.ipmeta_cache_path_.IsDefault()) { @@ -14668,7 +14958,7 @@ inline void XtcpConfig::set_allocated_ipmeta_cache_path(::std::string* PROTOBUF_ inline void XtcpConfig::clear_enrich_locality_enable() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.enrich_locality_enable_ = false; - ClearHasBit(_impl_._has_bits_[2], 0x00100000U); + ClearHasBit(_impl_._has_bits_[2], 0x04000000U); } inline bool XtcpConfig::enrich_locality_enable() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.enrich_locality_enable) @@ -14676,7 +14966,7 @@ inline bool XtcpConfig::enrich_locality_enable() const { } inline void XtcpConfig::set_enrich_locality_enable(bool value) { _internal_set_enrich_locality_enable(value); - SetHasBit(_impl_._has_bits_[2], 0x00100000U); + SetHasBit(_impl_._has_bits_[2], 0x04000000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.enrich_locality_enable) } inline bool XtcpConfig::_internal_enrich_locality_enable() const { @@ -14690,7 +14980,7 @@ inline void XtcpConfig::_internal_set_enrich_locality_enable(bool value) { // .google.protobuf.Duration locality_refresh_interval = 246 [json_name = "localityRefreshInterval"]; inline bool XtcpConfig::has_locality_refresh_interval() const { - bool value = CheckHasBit(_impl_._has_bits_[1], 0x02000000U); + bool value = CheckHasBit(_impl_._has_bits_[1], 0x10000000U); PROTOBUF_ASSUME(!value || _impl_.locality_refresh_interval_ != nullptr); return value; } @@ -14711,16 +15001,16 @@ inline void XtcpConfig::unsafe_arena_set_allocated_locality_refresh_interval( } _impl_.locality_refresh_interval_ = reinterpret_cast<::google::protobuf::Duration*>(value); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x02000000U); + SetHasBit(_impl_._has_bits_[1], 0x10000000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x02000000U); + ClearHasBit(_impl_._has_bits_[1], 0x10000000U); } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xtcp_config.v1.XtcpConfig.locality_refresh_interval) } inline ::google::protobuf::Duration* PROTOBUF_NULLABLE XtcpConfig::release_locality_refresh_interval() { ::google::protobuf::internal::TSanWrite(&_impl_); - ClearHasBit(_impl_._has_bits_[1], 0x02000000U); + ClearHasBit(_impl_._has_bits_[1], 0x10000000U); ::google::protobuf::Duration* released = _impl_.locality_refresh_interval_; _impl_.locality_refresh_interval_ = nullptr; if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { @@ -14740,7 +15030,7 @@ inline ::google::protobuf::Duration* PROTOBUF_NULLABLE XtcpConfig::unsafe_arena_ ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.locality_refresh_interval) - ClearHasBit(_impl_._has_bits_[1], 0x02000000U); + ClearHasBit(_impl_._has_bits_[1], 0x10000000U); ::google::protobuf::Duration* temp = _impl_.locality_refresh_interval_; _impl_.locality_refresh_interval_ = nullptr; return temp; @@ -14755,7 +15045,7 @@ inline ::google::protobuf::Duration* PROTOBUF_NONNULL XtcpConfig::_internal_muta } inline ::google::protobuf::Duration* PROTOBUF_NONNULL XtcpConfig::mutable_locality_refresh_interval() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x02000000U); + SetHasBit(_impl_._has_bits_[1], 0x10000000U); ::google::protobuf::Duration* _msg = _internal_mutable_locality_refresh_interval(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.locality_refresh_interval) return _msg; @@ -14772,9 +15062,9 @@ inline void XtcpConfig::set_allocated_locality_refresh_interval(::google::protob if (message_arena != submessage_arena) { value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - SetHasBit(_impl_._has_bits_[1], 0x02000000U); + SetHasBit(_impl_._has_bits_[1], 0x10000000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x02000000U); + ClearHasBit(_impl_._has_bits_[1], 0x10000000U); } _impl_.locality_refresh_interval_ = reinterpret_cast<::google::protobuf::Duration*>(value); @@ -14785,7 +15075,7 @@ inline void XtcpConfig::set_allocated_locality_refresh_interval(::google::protob inline void XtcpConfig::clear_locality_events_enable() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.locality_events_enable_ = false; - ClearHasBit(_impl_._has_bits_[2], 0x00200000U); + ClearHasBit(_impl_._has_bits_[2], 0x08000000U); } inline bool XtcpConfig::locality_events_enable() const { // @@protoc_insertion_point(field_get:xtcp_config.v1.XtcpConfig.locality_events_enable) @@ -14793,7 +15083,7 @@ inline bool XtcpConfig::locality_events_enable() const { } inline void XtcpConfig::set_locality_events_enable(bool value) { _internal_set_locality_events_enable(value); - SetHasBit(_impl_._has_bits_[2], 0x00200000U); + SetHasBit(_impl_._has_bits_[2], 0x08000000U); // @@protoc_insertion_point(field_set:xtcp_config.v1.XtcpConfig.locality_events_enable) } inline bool XtcpConfig::_internal_locality_events_enable() const { @@ -14807,14 +15097,14 @@ inline void XtcpConfig::_internal_set_locality_events_enable(bool value) { // .xtcp_config.v1.LinkMonitorConfig link_monitor = 250 [json_name = "linkMonitor"]; inline bool XtcpConfig::has_link_monitor() const { - bool value = CheckHasBit(_impl_._has_bits_[1], 0x04000000U); + bool value = CheckHasBit(_impl_._has_bits_[1], 0x20000000U); PROTOBUF_ASSUME(!value || _impl_.link_monitor_ != nullptr); return value; } inline void XtcpConfig::clear_link_monitor() { ::google::protobuf::internal::TSanWrite(&_impl_); if (_impl_.link_monitor_ != nullptr) _impl_.link_monitor_->Clear(); - ClearHasBit(_impl_._has_bits_[1], 0x04000000U); + ClearHasBit(_impl_._has_bits_[1], 0x20000000U); } inline const ::xtcp_config::v1::LinkMonitorConfig& XtcpConfig::_internal_link_monitor() const { ::google::protobuf::internal::TSanRead(&_impl_); @@ -14833,16 +15123,16 @@ inline void XtcpConfig::unsafe_arena_set_allocated_link_monitor( } _impl_.link_monitor_ = reinterpret_cast<::xtcp_config::v1::LinkMonitorConfig*>(value); if (value != nullptr) { - SetHasBit(_impl_._has_bits_[1], 0x04000000U); + SetHasBit(_impl_._has_bits_[1], 0x20000000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x04000000U); + ClearHasBit(_impl_._has_bits_[1], 0x20000000U); } // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xtcp_config.v1.XtcpConfig.link_monitor) } inline ::xtcp_config::v1::LinkMonitorConfig* PROTOBUF_NULLABLE XtcpConfig::release_link_monitor() { ::google::protobuf::internal::TSanWrite(&_impl_); - ClearHasBit(_impl_._has_bits_[1], 0x04000000U); + ClearHasBit(_impl_._has_bits_[1], 0x20000000U); ::xtcp_config::v1::LinkMonitorConfig* released = _impl_.link_monitor_; _impl_.link_monitor_ = nullptr; if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) { @@ -14862,7 +15152,7 @@ inline ::xtcp_config::v1::LinkMonitorConfig* PROTOBUF_NULLABLE XtcpConfig::unsaf ::google::protobuf::internal::TSanWrite(&_impl_); // @@protoc_insertion_point(field_release:xtcp_config.v1.XtcpConfig.link_monitor) - ClearHasBit(_impl_._has_bits_[1], 0x04000000U); + ClearHasBit(_impl_._has_bits_[1], 0x20000000U); ::xtcp_config::v1::LinkMonitorConfig* temp = _impl_.link_monitor_; _impl_.link_monitor_ = nullptr; return temp; @@ -14877,7 +15167,7 @@ inline ::xtcp_config::v1::LinkMonitorConfig* PROTOBUF_NONNULL XtcpConfig::_inter } inline ::xtcp_config::v1::LinkMonitorConfig* PROTOBUF_NONNULL XtcpConfig::mutable_link_monitor() ABSL_ATTRIBUTE_LIFETIME_BOUND { - SetHasBit(_impl_._has_bits_[1], 0x04000000U); + SetHasBit(_impl_._has_bits_[1], 0x20000000U); ::xtcp_config::v1::LinkMonitorConfig* _msg = _internal_mutable_link_monitor(); // @@protoc_insertion_point(field_mutable:xtcp_config.v1.XtcpConfig.link_monitor) return _msg; @@ -14894,9 +15184,9 @@ inline void XtcpConfig::set_allocated_link_monitor(::xtcp_config::v1::LinkMonito if (message_arena != submessage_arena) { value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); } - SetHasBit(_impl_._has_bits_[1], 0x04000000U); + SetHasBit(_impl_._has_bits_[1], 0x20000000U); } else { - ClearHasBit(_impl_._has_bits_[1], 0x04000000U); + ClearHasBit(_impl_._has_bits_[1], 0x20000000U); } _impl_.link_monitor_ = reinterpret_cast<::xtcp_config::v1::LinkMonitorConfig*>(value); diff --git a/gen/dart/xtcp_config/v1/xtcp_config.pb.dart b/gen/dart/xtcp_config/v1/xtcp_config.pb.dart index d695485b3..bfdab47f6 100644 --- a/gen/dart/xtcp_config/v1/xtcp_config.pb.dart +++ b/gen/dart/xtcp_config/v1/xtcp_config.pb.dart @@ -1824,9 +1824,15 @@ class XtcpConfig extends $pb.GeneratedMessage { $core.int? ioUringCqeBatchSize, $fixnum.Int64? maxDumpBytes, $fixnum.Int64? maxRecordsPerNetns, + $fixnum.Int64? maxRecordsPerPoll, + $core.int? ioUringSockstatBatchSize, + $core.int? ioUringSockstatWorkers, $1.Duration? reconcileFrequency, $core.bool? reconcileBeforePoll, $core.int? maxNetns, + $1.Duration? reconcileTimeout, + $core.int? maxNetnsPerOwner, + $core.int? maxNetnsAddsPerReconcile, $core.int? writeFiles, $core.String? capturePath, $core.int? destWriteFiles, @@ -1918,11 +1924,20 @@ class XtcpConfig extends $pb.GeneratedMessage { if (maxDumpBytes != null) result.maxDumpBytes = maxDumpBytes; if (maxRecordsPerNetns != null) result.maxRecordsPerNetns = maxRecordsPerNetns; + if (maxRecordsPerPoll != null) result.maxRecordsPerPoll = maxRecordsPerPoll; + if (ioUringSockstatBatchSize != null) + result.ioUringSockstatBatchSize = ioUringSockstatBatchSize; + if (ioUringSockstatWorkers != null) + result.ioUringSockstatWorkers = ioUringSockstatWorkers; if (reconcileFrequency != null) result.reconcileFrequency = reconcileFrequency; if (reconcileBeforePoll != null) result.reconcileBeforePoll = reconcileBeforePoll; if (maxNetns != null) result.maxNetns = maxNetns; + if (reconcileTimeout != null) result.reconcileTimeout = reconcileTimeout; + if (maxNetnsPerOwner != null) result.maxNetnsPerOwner = maxNetnsPerOwner; + if (maxNetnsAddsPerReconcile != null) + result.maxNetnsAddsPerReconcile = maxNetnsAddsPerReconcile; if (writeFiles != null) result.writeFiles = writeFiles; if (capturePath != null) result.capturePath = capturePath; if (destWriteFiles != null) result.destWriteFiles = destWriteFiles; @@ -2061,10 +2076,23 @@ class XtcpConfig extends $pb.GeneratedMessage { ..a<$fixnum.Int64>( 26, _omitFieldNames ? '' : 'maxRecordsPerNetns', $pb.PbFieldType.OU6, defaultOrMaker: $fixnum.Int64.ZERO) + ..a<$fixnum.Int64>( + 27, _omitFieldNames ? '' : 'maxRecordsPerPoll', $pb.PbFieldType.OU6, + defaultOrMaker: $fixnum.Int64.ZERO) + ..aI(28, _omitFieldNames ? '' : 'ioUringSockstatBatchSize', + fieldType: $pb.PbFieldType.OU3) + ..aI(29, _omitFieldNames ? '' : 'ioUringSockstatWorkers', + fieldType: $pb.PbFieldType.OU3) ..aOM<$1.Duration>(40, _omitFieldNames ? '' : 'reconcileFrequency', subBuilder: $1.Duration.$_createMessage) ..aOB(41, _omitFieldNames ? '' : 'reconcileBeforePoll') ..aI(42, _omitFieldNames ? '' : 'maxNetns', fieldType: $pb.PbFieldType.OU3) + ..aOM<$1.Duration>(43, _omitFieldNames ? '' : 'reconcileTimeout', + subBuilder: $1.Duration.$_createMessage) + ..aI(44, _omitFieldNames ? '' : 'maxNetnsPerOwner', + fieldType: $pb.PbFieldType.OU3) + ..aI(45, _omitFieldNames ? '' : 'maxNetnsAddsPerReconcile', + fieldType: $pb.PbFieldType.OU3) ..aI(50, _omitFieldNames ? '' : 'writeFiles', fieldType: $pb.PbFieldType.OU3) ..aOS(51, _omitFieldNames ? '' : 'capturePath') @@ -2384,6 +2412,46 @@ class XtcpConfig extends $pb.GeneratedMessage { @$pb.TagNumber(26) void clearMaxRecordsPerNetns() => $_clearField(26); + /// Budget on the records all namespaces contribute per poll. Before each + /// poll xtcp2 reads every namespace's TCP socket count (sockstat) and, + /// when the total is over the budget, splits it max-min fairly: a + /// namespace over its share first stops asking for TIME_WAIT and + /// SYN_RECV, then is sampled by port range across polls. Counted in + /// xtcp_poll_degraded_total. Startup-only. 0 = off (sockstat is not read). + /// Daemon default 1048576. + @$pb.TagNumber(27) + $fixnum.Int64 get maxRecordsPerPoll => $_getI64(17); + @$pb.TagNumber(27) + set maxRecordsPerPoll($fixnum.Int64 value) => $_setInt64(17, value); + @$pb.TagNumber(27) + $core.bool hasMaxRecordsPerPoll() => $_has(17); + @$pb.TagNumber(27) + void clearMaxRecordsPerPoll() => $_clearField(27); + + /// Sockstat reads queued per io_uring submit when io_uring=true. + /// Ignored otherwise. 0 = daemon default 64; at most 1024. + @$pb.TagNumber(28) + $core.int get ioUringSockstatBatchSize => $_getIZ(18); + @$pb.TagNumber(28) + set ioUringSockstatBatchSize($core.int value) => + $_setUnsignedInt32(18, value); + @$pb.TagNumber(28) + $core.bool hasIoUringSockstatBatchSize() => $_has(18); + @$pb.TagNumber(28) + void clearIoUringSockstatBatchSize() => $_clearField(28); + + /// Cap on io_uring's kernel worker threads for sockstat reads (procfs + /// reads are handed to io-wq workers). Ignored unless io_uring=true. + /// 0 = daemon default 4; at most 64. + @$pb.TagNumber(29) + $core.int get ioUringSockstatWorkers => $_getIZ(19); + @$pb.TagNumber(29) + set ioUringSockstatWorkers($core.int value) => $_setUnsignedInt32(19, value); + @$pb.TagNumber(29) + $core.bool hasIoUringSockstatWorkers() => $_has(19); + @$pb.TagNumber(29) + void clearIoUringSockstatWorkers() => $_clearField(29); + /// Period of the background namespace-reconcile ticker (Method B /proc scan /// that converges the tracked namespace set). With reconcile_before_poll the /// Poller reconciles every cycle and is the real discovery mechanism, so this @@ -2393,15 +2461,15 @@ class XtcpConfig extends $pb.GeneratedMessage { /// matters when the poller is idle or disabled. 0 disables the background /// ticker entirely (the startup reconcile still runs once). @$pb.TagNumber(40) - $1.Duration get reconcileFrequency => $_getN(17); + $1.Duration get reconcileFrequency => $_getN(20); @$pb.TagNumber(40) set reconcileFrequency($1.Duration value) => $_setField(40, value); @$pb.TagNumber(40) - $core.bool hasReconcileFrequency() => $_has(17); + $core.bool hasReconcileFrequency() => $_has(20); @$pb.TagNumber(40) void clearReconcileFrequency() => $_clearField(40); @$pb.TagNumber(40) - $1.Duration ensureReconcileFrequency() => $_ensure(17); + $1.Duration ensureReconcileFrequency() => $_ensure(20); /// Run a namespace reconcile immediately before each poll cycle, so a /// namespace that appeared since the last cycle is entered and gets a socket @@ -2409,11 +2477,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// discovery cadence to poll cadence; the /proc scan is zero-allocation and /// mutex-serialized with the background reconciler. Default true. @$pb.TagNumber(41) - $core.bool get reconcileBeforePoll => $_getBF(18); + $core.bool get reconcileBeforePoll => $_getBF(21); @$pb.TagNumber(41) - set reconcileBeforePoll($core.bool value) => $_setBool(18, value); + set reconcileBeforePoll($core.bool value) => $_setBool(21, value); @$pb.TagNumber(41) - $core.bool hasReconcileBeforePoll() => $_has(18); + $core.bool hasReconcileBeforePoll() => $_has(21); @$pb.TagNumber(41) void clearReconcileBeforePoll() => $_clearField(41); @@ -2424,33 +2492,79 @@ class XtcpConfig extends $pb.GeneratedMessage { /// order xtcp2 first saw them. Startup-only. /// 0 = unlimited. Daemon default 4096. @$pb.TagNumber(42) - $core.int get maxNetns => $_getIZ(19); + $core.int get maxNetns => $_getIZ(22); @$pb.TagNumber(42) - set maxNetns($core.int value) => $_setUnsignedInt32(19, value); + set maxNetns($core.int value) => $_setUnsignedInt32(22, value); @$pb.TagNumber(42) - $core.bool hasMaxNetns() => $_has(19); + $core.bool hasMaxNetns() => $_has(22); @$pb.TagNumber(42) void clearMaxNetns() => $_clearField(42); + /// Time budget for one reconcile's namespace scan. A scan cut short adds + /// what it found but deletes nothing (a partial view cannot prove a + /// namespace is gone), and is counted in + /// xtcp_reconcile_incomplete_total{reason="timeout"}. Bounds how long a + /// namespace flood can delay a poll. The scan also stops after + /// 4 x max_netns distinct namespaces (reason="scan_cap"). + /// Startup-only. 0 = no limit. Daemon default 1s. + @$pb.TagNumber(43) + $1.Duration get reconcileTimeout => $_getN(23); + @$pb.TagNumber(43) + set reconcileTimeout($1.Duration value) => $_setField(43, value); + @$pb.TagNumber(43) + $core.bool hasReconcileTimeout() => $_has(23); + @$pb.TagNumber(43) + void clearReconcileTimeout() => $_clearField(43); + @$pb.TagNumber(43) + $1.Duration ensureReconcileTimeout() => $_ensure(23); + + /// Cap on the namespaces one owner (the outermost container id in the + /// namespace's cgroup) may have tracked. Bind-mounted namespaces with no + /// live process are exempt. Candidates over it keep their queue place and + /// are counted in xtcp_netns_dropped_total{reason="owner_quota"}. + /// Startup-only. 0 = no limit. Daemon default 64. + @$pb.TagNumber(44) + $core.int get maxNetnsPerOwner => $_getIZ(24); + @$pb.TagNumber(44) + set maxNetnsPerOwner($core.int value) => $_setUnsignedInt32(24, value); + @$pb.TagNumber(44) + $core.bool hasMaxNetnsPerOwner() => $_has(24); + @$pb.TagNumber(44) + void clearMaxNetnsPerOwner() => $_clearField(44); + + /// Cap on namespaces added per reconcile, so a burst cannot open + /// thousands of sockets (each a setns on a locked thread) at once. The + /// rest wait their turn (reason="add_rate"). Startup-only. + /// 0 = no limit. Daemon default 256. + @$pb.TagNumber(45) + $core.int get maxNetnsAddsPerReconcile => $_getIZ(25); + @$pb.TagNumber(45) + set maxNetnsAddsPerReconcile($core.int value) => + $_setUnsignedInt32(25, value); + @$pb.TagNumber(45) + $core.bool hasMaxNetnsAddsPerReconcile() => $_has(25); + @$pb.TagNumber(45) + void clearMaxNetnsAddsPerReconcile() => $_clearField(45); + /// Write netlink packets to writeFiles number of files ( to generate test data ) per netlinker /// xtcp will capture this many Netlink response packets when it starts /// This is PER netlinker @$pb.TagNumber(50) - $core.int get writeFiles => $_getIZ(20); + $core.int get writeFiles => $_getIZ(26); @$pb.TagNumber(50) - set writeFiles($core.int value) => $_setUnsignedInt32(20, value); + set writeFiles($core.int value) => $_setUnsignedInt32(26, value); @$pb.TagNumber(50) - $core.bool hasWriteFiles() => $_has(20); + $core.bool hasWriteFiles() => $_has(26); @$pb.TagNumber(50) void clearWriteFiles() => $_clearField(50); /// Write files path @$pb.TagNumber(51) - $core.String get capturePath => $_getSZ(21); + $core.String get capturePath => $_getSZ(27); @$pb.TagNumber(51) - set capturePath($core.String value) => $_setString(21, value); + set capturePath($core.String value) => $_setString(27, value); @$pb.TagNumber(51) - $core.bool hasCapturePath() => $_has(21); + $core.bool hasCapturePath() => $_has(27); @$pb.TagNumber(51) void clearCapturePath() => $_clearField(51); @@ -2458,21 +2572,21 @@ class XtcpConfig extends $pb.GeneratedMessage { /// xtcp will capture this many examples of the marshalled data /// This is PER poller @$pb.TagNumber(52) - $core.int get destWriteFiles => $_getIZ(22); + $core.int get destWriteFiles => $_getIZ(28); @$pb.TagNumber(52) - set destWriteFiles($core.int value) => $_setUnsignedInt32(22, value); + set destWriteFiles($core.int value) => $_setUnsignedInt32(28, value); @$pb.TagNumber(52) - $core.bool hasDestWriteFiles() => $_has(22); + $core.bool hasDestWriteFiles() => $_has(28); @$pb.TagNumber(52) void clearDestWriteFiles() => $_clearField(52); /// DebugLevel @$pb.TagNumber(53) - $core.int get debugLevel => $_getIZ(23); + $core.int get debugLevel => $_getIZ(29); @$pb.TagNumber(53) - set debugLevel($core.int value) => $_setUnsignedInt32(23, value); + set debugLevel($core.int value) => $_setUnsignedInt32(29, value); @$pb.TagNumber(53) - $core.bool hasDebugLevel() => $_has(23); + $core.bool hasDebugLevel() => $_has(29); @$pb.TagNumber(53) void clearDebugLevel() => $_clearField(53); @@ -2482,11 +2596,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// decode itself. The per-packet and per-dump series are always on. /// Takes effect when the netlinkers start (a restart after a Set). @$pb.TagNumber(54) - $core.bool get debugPrometheus => $_getBF(24); + $core.bool get debugPrometheus => $_getBF(30); @$pb.TagNumber(54) - set debugPrometheus($core.bool value) => $_setBool(24, value); + set debugPrometheus($core.bool value) => $_setBool(30, value); @$pb.TagNumber(54) - $core.bool hasDebugPrometheus() => $_has(24); + $core.bool hasDebugPrometheus() => $_has(30); @$pb.TagNumber(54) void clearDebugPrometheus() => $_clearField(54); @@ -2499,21 +2613,21 @@ class XtcpConfig extends $pb.GeneratedMessage { /// and S3 endpoints the INSERT query + FORMAT + format_schema + auth query /// params routinely run ~150+ chars, which the old 128 cap rejected. @$pb.TagNumber(60) - $core.String get dest => $_getSZ(25); + $core.String get dest => $_getSZ(31); @$pb.TagNumber(60) - set dest($core.String value) => $_setString(25, value); + set dest($core.String value) => $_setString(31, value); @$pb.TagNumber(60) - $core.bool hasDest() => $_has(25); + $core.bool hasDest() => $_has(31); @$pb.TagNumber(60) void clearDest() => $_clearField(60); /// Marshalling of the exported data (protobufList,json,prototext) @$pb.TagNumber(61) - $core.String get marshalTo => $_getSZ(26); + $core.String get marshalTo => $_getSZ(32); @$pb.TagNumber(61) - set marshalTo($core.String value) => $_setString(26, value); + set marshalTo($core.String value) => $_setString(32, value); @$pb.TagNumber(61) - $core.bool hasMarshalTo() => $_has(26); + $core.bool hasMarshalTo() => $_has(32); @$pb.TagNumber(61) void clearMarshalTo() => $_clearField(61); @@ -2522,22 +2636,22 @@ class XtcpConfig extends $pb.GeneratedMessage { /// "hostname,inetDiagMsgSocketSourcePort,inetDiagMsgState,tcpInfoRtt"). /// Empty = all fields. Ignored by non-tabular marshallers. @$pb.TagNumber(62) - $core.String get csvColumns => $_getSZ(27); + $core.String get csvColumns => $_getSZ(33); @$pb.TagNumber(62) - set csvColumns($core.String value) => $_setString(27, value); + set csvColumns($core.String value) => $_setString(33, value); @$pb.TagNumber(62) - $core.bool hasCsvColumns() => $_has(27); + $core.bool hasCsvColumns() => $_has(33); @$pb.TagNumber(62) void clearCsvColumns() => $_clearField(62); /// XtcpProtoFile — path of the xtcp_flat_record.proto the daemon reads at /// startup and POSTs to the Kafka schema registry (kafka_schema_url). @$pb.TagNumber(63) - $core.String get xtcpProtoFile => $_getSZ(28); + $core.String get xtcpProtoFile => $_getSZ(34); @$pb.TagNumber(63) - set xtcpProtoFile($core.String value) => $_setString(28, value); + set xtcpProtoFile($core.String value) => $_setString(34, value); @$pb.TagNumber(63) - $core.bool hasXtcpProtoFile() => $_has(28); + $core.bool hasXtcpProtoFile() => $_has(34); @$pb.TagNumber(63) void clearXtcpProtoFile() => $_clearField(63); @@ -2554,12 +2668,12 @@ class XtcpConfig extends $pb.GeneratedMessage { /// `bytes` fields. For everyday batch sizing, prefer the row-count /// cap (envelope_flush_threshold_rows) below. @$pb.TagNumber(64) - $core.int get envelopeFlushThresholdBytes => $_getIZ(29); + $core.int get envelopeFlushThresholdBytes => $_getIZ(35); @$pb.TagNumber(64) set envelopeFlushThresholdBytes($core.int value) => - $_setUnsignedInt32(29, value); + $_setUnsignedInt32(35, value); @$pb.TagNumber(64) - $core.bool hasEnvelopeFlushThresholdBytes() => $_has(29); + $core.bool hasEnvelopeFlushThresholdBytes() => $_has(35); @$pb.TagNumber(64) void clearEnvelopeFlushThresholdBytes() => $_clearField(64); @@ -2574,32 +2688,32 @@ class XtcpConfig extends $pb.GeneratedMessage { /// with the ClickHouse kafka_max_rows_per_message setting so a /// produced envelope never forces the consumer to split it). @$pb.TagNumber(65) - $core.int get envelopeFlushThresholdRows => $_getIZ(30); + $core.int get envelopeFlushThresholdRows => $_getIZ(36); @$pb.TagNumber(65) set envelopeFlushThresholdRows($core.int value) => - $_setUnsignedInt32(30, value); + $_setUnsignedInt32(36, value); @$pb.TagNumber(65) - $core.bool hasEnvelopeFlushThresholdRows() => $_has(30); + $core.bool hasEnvelopeFlushThresholdRows() => $_has(36); @$pb.TagNumber(65) void clearEnvelopeFlushThresholdRows() => $_clearField(65); /// Kafka or NSQ topic @$pb.TagNumber(80) - $core.String get topic => $_getSZ(31); + $core.String get topic => $_getSZ(37); @$pb.TagNumber(80) - set topic($core.String value) => $_setString(31, value); + set topic($core.String value) => $_setString(37, value); @$pb.TagNumber(80) - $core.bool hasTopic() => $_has(31); + $core.bool hasTopic() => $_has(37); @$pb.TagNumber(80) void clearTopic() => $_clearField(80); /// Kafka schema registry url @$pb.TagNumber(81) - $core.String get kafkaSchemaUrl => $_getSZ(32); + $core.String get kafkaSchemaUrl => $_getSZ(38); @$pb.TagNumber(81) - set kafkaSchemaUrl($core.String value) => $_setString(32, value); + set kafkaSchemaUrl($core.String value) => $_setString(38, value); @$pb.TagNumber(81) - $core.bool hasKafkaSchemaUrl() => $_has(32); + $core.bool hasKafkaSchemaUrl() => $_has(38); @$pb.TagNumber(81) void clearKafkaSchemaUrl() => $_clearField(81); @@ -2607,15 +2721,15 @@ class XtcpConfig extends $pb.GeneratedMessage { /// Recommend a small timeout, like 1-2 seconds /// kgo seems to have a bug, because the timeout is always expired @$pb.TagNumber(82) - $1.Duration get kafkaProduceTimeout => $_getN(33); + $1.Duration get kafkaProduceTimeout => $_getN(39); @$pb.TagNumber(82) set kafkaProduceTimeout($1.Duration value) => $_setField(82, value); @$pb.TagNumber(82) - $core.bool hasKafkaProduceTimeout() => $_has(33); + $core.bool hasKafkaProduceTimeout() => $_has(39); @$pb.TagNumber(82) void clearKafkaProduceTimeout() => $_clearField(82); @$pb.TagNumber(82) - $1.Duration ensureKafkaProduceTimeout() => $_ensure(33); + $1.Duration ensureKafkaProduceTimeout() => $_ensure(39); /// Kafka producer-batch compression codec. franz-go picks one codec /// from the supplied preference list that the broker advertises. @@ -2636,11 +2750,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// Pick "lz4" if xtcp2 is CPU-bound on the producer side; pick /// "zstd" (the default) if Kafka throughput / disk usage matters more. @$pb.TagNumber(83) - $core.String get kafkaCompression => $_getSZ(34); + $core.String get kafkaCompression => $_getSZ(40); @$pb.TagNumber(83) - set kafkaCompression($core.String value) => $_setString(34, value); + set kafkaCompression($core.String value) => $_setString(40, value); @$pb.TagNumber(83) - $core.bool hasKafkaCompression() => $_has(34); + $core.bool hasKafkaCompression() => $_has(40); @$pb.TagNumber(83) void clearKafkaCompression() => $_clearField(83); @@ -2648,33 +2762,33 @@ class XtcpConfig extends $pb.GeneratedMessage { /// "https://s3.amazonaws.com" (AWS). May be empty if -dest carries /// it via the s3parquet: form. @$pb.TagNumber(100) - $core.String get s3Endpoint => $_getSZ(35); + $core.String get s3Endpoint => $_getSZ(41); @$pb.TagNumber(100) - set s3Endpoint($core.String value) => $_setString(35, value); + set s3Endpoint($core.String value) => $_setString(41, value); @$pb.TagNumber(100) - $core.bool hasS3Endpoint() => $_has(35); + $core.bool hasS3Endpoint() => $_has(41); @$pb.TagNumber(100) void clearS3Endpoint() => $_clearField(100); /// S3 region. Required by some S3 implementations even when talking /// to a single-region MinIO. Default "us-east-1" when blank. @$pb.TagNumber(101) - $core.String get s3Region => $_getSZ(36); + $core.String get s3Region => $_getSZ(42); @$pb.TagNumber(101) - set s3Region($core.String value) => $_setString(36, value); + set s3Region($core.String value) => $_setString(42, value); @$pb.TagNumber(101) - $core.bool hasS3Region() => $_has(36); + $core.bool hasS3Region() => $_has(42); @$pb.TagNumber(101) void clearS3Region() => $_clearField(101); /// Required when -dest s3parquet. Bucket must already exist on the /// endpoint; the daemon does not auto-create. @$pb.TagNumber(102) - $core.String get s3Bucket => $_getSZ(37); + $core.String get s3Bucket => $_getSZ(43); @$pb.TagNumber(102) - set s3Bucket($core.String value) => $_setString(37, value); + set s3Bucket($core.String value) => $_setString(43, value); @$pb.TagNumber(102) - $core.bool hasS3Bucket() => $_has(37); + $core.bool hasS3Bucket() => $_has(43); @$pb.TagNumber(102) void clearS3Bucket() => $_clearField(102); @@ -2682,33 +2796,33 @@ class XtcpConfig extends $pb.GeneratedMessage { /// partition segments (host=…/date=…/hour=…/.parquet). Empty /// = files land at the bucket root level. @$pb.TagNumber(103) - $core.String get s3Prefix => $_getSZ(38); + $core.String get s3Prefix => $_getSZ(44); @$pb.TagNumber(103) - set s3Prefix($core.String value) => $_setString(38, value); + set s3Prefix($core.String value) => $_setString(44, value); @$pb.TagNumber(103) - $core.bool hasS3Prefix() => $_has(38); + $core.bool hasS3Prefix() => $_has(44); @$pb.TagNumber(103) void clearS3Prefix() => $_clearField(103); /// Required when -dest s3parquet. Picked up from AWS_ACCESS_KEY_ID /// env if blank. @$pb.TagNumber(104) - $core.String get s3AccessKey => $_getSZ(39); + $core.String get s3AccessKey => $_getSZ(45); @$pb.TagNumber(104) - set s3AccessKey($core.String value) => $_setString(39, value); + set s3AccessKey($core.String value) => $_setString(45, value); @$pb.TagNumber(104) - $core.bool hasS3AccessKey() => $_has(39); + $core.bool hasS3AccessKey() => $_has(45); @$pb.TagNumber(104) void clearS3AccessKey() => $_clearField(104); /// Required when -dest s3parquet. Picked up from AWS_SECRET_ACCESS_KEY /// env if blank. Never logged. @$pb.TagNumber(105) - $core.String get s3SecretKey => $_getSZ(40); + $core.String get s3SecretKey => $_getSZ(46); @$pb.TagNumber(105) - set s3SecretKey($core.String value) => $_setString(40, value); + set s3SecretKey($core.String value) => $_setString(46, value); @$pb.TagNumber(105) - $core.bool hasS3SecretKey() => $_has(40); + $core.bool hasS3SecretKey() => $_has(46); @$pb.TagNumber(105) void clearS3SecretKey() => $_clearField(105); @@ -2719,11 +2833,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// daemon can start without list permission. Default false keeps the /// fail-fast probe for normal deployments. @$pb.TagNumber(106) - $core.bool get s3SkipBucketProbe => $_getBF(41); + $core.bool get s3SkipBucketProbe => $_getBF(47); @$pb.TagNumber(106) - set s3SkipBucketProbe($core.bool value) => $_setBool(41, value); + set s3SkipBucketProbe($core.bool value) => $_setBool(47, value); @$pb.TagNumber(106) - $core.bool hasS3SkipBucketProbe() => $_has(41); + $core.bool hasS3SkipBucketProbe() => $_has(47); @$pb.TagNumber(106) void clearS3SkipBucketProbe() => $_clearField(106); @@ -2732,11 +2846,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// refuses http:// unless this is set; a bare host:port and https:// both /// use TLS. For local test fixtures only. Sets the xtcp2_s3_insecure gauge. @$pb.TagNumber(107) - $core.bool get s3AllowInsecure => $_getBF(42); + $core.bool get s3AllowInsecure => $_getBF(48); @$pb.TagNumber(107) - set s3AllowInsecure($core.bool value) => $_setBool(42, value); + set s3AllowInsecure($core.bool value) => $_setBool(48, value); @$pb.TagNumber(107) - $core.bool hasS3AllowInsecure() => $_has(42); + $core.bool hasS3AllowInsecure() => $_has(48); @$pb.TagNumber(107) void clearS3AllowInsecure() => $_clearField(107); @@ -2744,11 +2858,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// to the system roots. For a private CA in front of an S3-compatible /// store. Empty = system roots only. @$pb.TagNumber(108) - $core.String get s3CaFile => $_getSZ(43); + $core.String get s3CaFile => $_getSZ(49); @$pb.TagNumber(108) - set s3CaFile($core.String value) => $_setString(43, value); + set s3CaFile($core.String value) => $_setString(49, value); @$pb.TagNumber(108) - $core.bool hasS3CaFile() => $_has(43); + $core.bool hasS3CaFile() => $_has(49); @$pb.TagNumber(108) void clearS3CaFile() => $_clearField(108); @@ -2759,12 +2873,12 @@ class XtcpConfig extends $pb.GeneratedMessage { /// smaller per-file query latency) or up for fewer larger files /// (better compression ratio, more memory). @$pb.TagNumber(110) - $core.int get s3ParquetFlushThresholdBytes => $_getIZ(44); + $core.int get s3ParquetFlushThresholdBytes => $_getIZ(50); @$pb.TagNumber(110) set s3ParquetFlushThresholdBytes($core.int value) => - $_setUnsignedInt32(44, value); + $_setUnsignedInt32(50, value); @$pb.TagNumber(110) - $core.bool hasS3ParquetFlushThresholdBytes() => $_has(44); + $core.bool hasS3ParquetFlushThresholdBytes() => $_has(50); @$pb.TagNumber(110) void clearS3ParquetFlushThresholdBytes() => $_clearField(110); @@ -2772,25 +2886,25 @@ class XtcpConfig extends $pb.GeneratedMessage { /// after this long even if it hasn't reached the byte cap, bounding upload /// latency for low-volume hosts. 0 = derive as max(poll_frequency, 30m). @$pb.TagNumber(111) - $1.Duration get s3FlushInterval => $_getN(45); + $1.Duration get s3FlushInterval => $_getN(51); @$pb.TagNumber(111) set s3FlushInterval($1.Duration value) => $_setField(111, value); @$pb.TagNumber(111) - $core.bool hasS3FlushInterval() => $_has(45); + $core.bool hasS3FlushInterval() => $_has(51); @$pb.TagNumber(111) void clearS3FlushInterval() => $_clearField(111); @$pb.TagNumber(111) - $1.Duration ensureS3FlushInterval() => $_ensure(45); + $1.Duration ensureS3FlushInterval() => $_ensure(51); /// Maximum jitter as a percent of s3_flush_interval, applied to the first /// timed flush and each interval so the fleet doesn't ceiling-flush in /// lockstep. 0 disables. Default 20. @$pb.TagNumber(112) - $core.int get s3FlushJitterPct => $_getIZ(46); + $core.int get s3FlushJitterPct => $_getIZ(52); @$pb.TagNumber(112) - set s3FlushJitterPct($core.int value) => $_setUnsignedInt32(46, value); + set s3FlushJitterPct($core.int value) => $_setUnsignedInt32(52, value); @$pb.TagNumber(112) - $core.bool hasS3FlushJitterPct() => $_has(46); + $core.bool hasS3FlushJitterPct() => $_has(52); @$pb.TagNumber(112) void clearS3FlushJitterPct() => $_clearField(112); @@ -2799,23 +2913,23 @@ class XtcpConfig extends $pb.GeneratedMessage { /// size-cap upload path even under uniform load. Downward-only, so an /// object never exceeds the in-memory byte bound. 0 disables. Default 20. @$pb.TagNumber(113) - $core.int get s3FlushThresholdJitterPct => $_getIZ(47); + $core.int get s3FlushThresholdJitterPct => $_getIZ(53); @$pb.TagNumber(113) set s3FlushThresholdJitterPct($core.int value) => - $_setUnsignedInt32(47, value); + $_setUnsignedInt32(53, value); @$pb.TagNumber(113) - $core.bool hasS3FlushThresholdJitterPct() => $_has(47); + $core.bool hasS3FlushThresholdJitterPct() => $_has(53); @$pb.TagNumber(113) void clearS3FlushThresholdJitterPct() => $_clearField(113); /// Maximum S3 upload attempts (original + retries) before dropping the /// object. Retries use full-jitter exponential backoff. Default 10. @$pb.TagNumber(114) - $core.int get s3UploadMaxAttempts => $_getIZ(48); + $core.int get s3UploadMaxAttempts => $_getIZ(54); @$pb.TagNumber(114) - set s3UploadMaxAttempts($core.int value) => $_setUnsignedInt32(48, value); + set s3UploadMaxAttempts($core.int value) => $_setUnsignedInt32(54, value); @$pb.TagNumber(114) - $core.bool hasS3UploadMaxAttempts() => $_has(48); + $core.bool hasS3UploadMaxAttempts() => $_has(54); @$pb.TagNumber(114) void clearS3UploadMaxAttempts() => $_clearField(114); @@ -2823,15 +2937,15 @@ class XtcpConfig extends $pb.GeneratedMessage { /// [0, window], window grows exponentially up to this cap). 0 = derive as /// clamp(poll_frequency/10, 1s, 1h). @$pb.TagNumber(115) - $1.Duration get s3UploadBackoffCap => $_getN(49); + $1.Duration get s3UploadBackoffCap => $_getN(55); @$pb.TagNumber(115) set s3UploadBackoffCap($1.Duration value) => $_setField(115, value); @$pb.TagNumber(115) - $core.bool hasS3UploadBackoffCap() => $_has(49); + $core.bool hasS3UploadBackoffCap() => $_has(55); @$pb.TagNumber(115) void clearS3UploadBackoffCap() => $_clearField(115); @$pb.TagNumber(115) - $1.Duration ensureS3UploadBackoffCap() => $_ensure(49); + $1.Duration ensureS3UploadBackoffCap() => $_ensure(55); /// Hostname override. When empty the daemon uses os.Hostname(); set this to /// stamp an explicit hostname on records — required in containers, where @@ -2839,11 +2953,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// flag or XTCP_HOSTNAME env (NOT HOSTNAME, which Docker sets to the /// container id). @$pb.TagNumber(130) - $core.String get hostname => $_getSZ(50); + $core.String get hostname => $_getSZ(56); @$pb.TagNumber(130) - set hostname($core.String value) => $_setString(50, value); + set hostname($core.String value) => $_setString(56, value); @$pb.TagNumber(130) - $core.bool hasHostname() => $_has(50); + $core.bool hasHostname() => $_has(56); @$pb.TagNumber(130) void clearHostname() => $_clearField(130); @@ -2851,31 +2965,31 @@ class XtcpConfig extends $pb.GeneratedMessage { /// region, site, …). Generic; stamped on every record's `location` field. /// Set via -location flag or LOCATION env. @$pb.TagNumber(131) - $core.String get location => $_getSZ(51); + $core.String get location => $_getSZ(57); @$pb.TagNumber(131) - set location($core.String value) => $_setString(51, value); + set location($core.String value) => $_setString(57, value); @$pb.TagNumber(131) - $core.bool hasLocation() => $_has(51); + $core.bool hasLocation() => $_has(57); @$pb.TagNumber(131) void clearLocation() => $_clearField(131); /// Label applied to the protobuf @$pb.TagNumber(132) - $core.String get label => $_getSZ(52); + $core.String get label => $_getSZ(58); @$pb.TagNumber(132) - set label($core.String value) => $_setString(52, value); + set label($core.String value) => $_setString(58, value); @$pb.TagNumber(132) - $core.bool hasLabel() => $_has(52); + $core.bool hasLabel() => $_has(58); @$pb.TagNumber(132) void clearLabel() => $_clearField(132); /// Tag applied to the protobuf @$pb.TagNumber(133) - $core.String get tag => $_getSZ(53); + $core.String get tag => $_getSZ(59); @$pb.TagNumber(133) - set tag($core.String value) => $_setString(53, value); + set tag($core.String value) => $_setString(59, value); @$pb.TagNumber(133) - $core.bool hasTag() => $_has(53); + $core.bool hasTag() => $_has(59); @$pb.TagNumber(133) void clearTag() => $_clearField(133); @@ -2884,11 +2998,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// vars, not a user flag; informational only (debugging which binary produced a /// row). See XtcpFlatRecord.daemon_version. @$pb.TagNumber(134) - $core.String get daemonVersion => $_getSZ(54); + $core.String get daemonVersion => $_getSZ(60); @$pb.TagNumber(134) - set daemonVersion($core.String value) => $_setString(54, value); + set daemonVersion($core.String value) => $_setString(60, value); @$pb.TagNumber(134) - $core.bool hasDaemonVersion() => $_has(54); + $core.bool hasDaemonVersion() => $_has(60); @$pb.TagNumber(134) void clearDaemonVersion() => $_clearField(134); @@ -2898,22 +3012,22 @@ class XtcpConfig extends $pb.GeneratedMessage { /// analogue of the host nftables TTL clamp. Set via -ipv4Ttl / IPV4_TTL. /// (cf. prometheus/exporter-toolkit#396.) @$pb.TagNumber(150) - $core.int get ipv4Ttl => $_getIZ(55); + $core.int get ipv4Ttl => $_getIZ(61); @$pb.TagNumber(150) - set ipv4Ttl($core.int value) => $_setUnsignedInt32(55, value); + set ipv4Ttl($core.int value) => $_setUnsignedInt32(61, value); @$pb.TagNumber(150) - $core.bool hasIpv4Ttl() => $_has(55); + $core.bool hasIpv4Ttl() => $_has(61); @$pb.TagNumber(150) void clearIpv4Ttl() => $_clearField(150); /// Outgoing IPv6 unicast hop limit for xtcp2's own TCP listeners. 0 = kernel /// default. Same intent as ipv4_ttl. Set via -ipv6HopLimit / IPV6_HOP_LIMIT. @$pb.TagNumber(151) - $core.int get ipv6HopLimit => $_getIZ(56); + $core.int get ipv6HopLimit => $_getIZ(62); @$pb.TagNumber(151) - set ipv6HopLimit($core.int value) => $_setUnsignedInt32(56, value); + set ipv6HopLimit($core.int value) => $_setUnsignedInt32(62, value); @$pb.TagNumber(151) - $core.bool hasIpv6HopLimit() => $_has(56); + $core.bool hasIpv6HopLimit() => $_has(62); @$pb.TagNumber(151) void clearIpv6HopLimit() => $_clearField(151); @@ -2923,28 +3037,28 @@ class XtcpConfig extends $pb.GeneratedMessage { /// the read credential: it reaches only methods marked ACCESS_READ. /// Secrets are redacted from every ConfigService response. @$pb.TagNumber(152) - ListenerAuth get listenerAuth => $_getN(57); + ListenerAuth get listenerAuth => $_getN(63); @$pb.TagNumber(152) set listenerAuth(ListenerAuth value) => $_setField(152, value); @$pb.TagNumber(152) - $core.bool hasListenerAuth() => $_has(57); + $core.bool hasListenerAuth() => $_has(63); @$pb.TagNumber(152) void clearListenerAuth() => $_clearField(152); @$pb.TagNumber(152) - ListenerAuth ensureListenerAuth() => $_ensure(57); + ListenerAuth ensureListenerAuth() => $_ensure(63); /// Prometheus / pprof / health listener endpoint. When unset, the daemon /// keeps the legacy TCP behavior from -promListen / PROM_LISTEN. @$pb.TagNumber(153) - ListenerEndpoint get prometheusListener => $_getN(58); + ListenerEndpoint get prometheusListener => $_getN(64); @$pb.TagNumber(153) set prometheusListener(ListenerEndpoint value) => $_setField(153, value); @$pb.TagNumber(153) - $core.bool hasPrometheusListener() => $_has(58); + $core.bool hasPrometheusListener() => $_has(64); @$pb.TagNumber(153) void clearPrometheusListener() => $_clearField(153); @$pb.TagNumber(153) - ListenerEndpoint ensurePrometheusListener() => $_ensure(58); + ListenerEndpoint ensurePrometheusListener() => $_ensure(64); /// Admin credential. When set, ACCESS_ADMIN methods (ConfigService.Set, the /// runtime triggers, link-monitor rebaseline, /debug/pprof) require it, and @@ -2952,47 +3066,47 @@ class XtcpConfig extends $pb.GeneratedMessage { /// listener_auth behaviour. Secrets are redacted from ConfigService /// responses. @$pb.TagNumber(154) - ListenerAuth get adminListenerAuth => $_getN(59); + ListenerAuth get adminListenerAuth => $_getN(65); @$pb.TagNumber(154) set adminListenerAuth(ListenerAuth value) => $_setField(154, value); @$pb.TagNumber(154) - $core.bool hasAdminListenerAuth() => $_has(59); + $core.bool hasAdminListenerAuth() => $_has(65); @$pb.TagNumber(154) void clearAdminListenerAuth() => $_clearField(154); @$pb.TagNumber(154) - ListenerAuth ensureAdminListenerAuth() => $_ensure(59); + ListenerAuth ensureAdminListenerAuth() => $_ensure(65); /// GRPC listening port /// Legacy: the gRPC port when -grpcPort (or GRPC_PORT) expands into a /// listener. 0 when the listener model configures gRPC. @$pb.TagNumber(160) - $core.int get grpcPort => $_getIZ(60); + $core.int get grpcPort => $_getIZ(66); @$pb.TagNumber(160) - set grpcPort($core.int value) => $_setUnsignedInt32(60, value); + set grpcPort($core.int value) => $_setUnsignedInt32(66, value); @$pb.TagNumber(160) - $core.bool hasGrpcPort() => $_has(60); + $core.bool hasGrpcPort() => $_has(66); @$pb.TagNumber(160) void clearGrpcPort() => $_clearField(160); /// gRPC listener endpoint. When unset, the daemon keeps the legacy TCP /// behavior derived from grpc_port. @$pb.TagNumber(161) - ListenerEndpoint get grpcListener => $_getN(61); + ListenerEndpoint get grpcListener => $_getN(67); @$pb.TagNumber(161) set grpcListener(ListenerEndpoint value) => $_setField(161, value); @$pb.TagNumber(161) - $core.bool hasGrpcListener() => $_has(61); + $core.bool hasGrpcListener() => $_has(67); @$pb.TagNumber(161) void clearGrpcListener() => $_clearField(161); @$pb.TagNumber(161) - ListenerEndpoint ensureGrpcListener() => $_ensure(61); + ListenerEndpoint ensureGrpcListener() => $_ensure(67); /// Every listener the daemon opens (-listener, LISTENERS). Empty means the /// default: one UDS, /run/xtcp2/metrics.sock mode 0600, raw bearer auth, /// serving health, metrics and metrics-detail. The legacy -promListen*, /// -grpc* and -linkMonitorIPListen flags expand into entries here. @$pb.TagNumber(162) - $pb.PbList get listeners => $_getList(62); + $pb.PbList get listeners => $_getList(68); /// Pyroscope continuous-profiling server URL (e.g. /// http://127.0.0.1:4040). When set, the daemon streams CPU, @@ -3002,11 +3116,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// Grafana Cloud Pyroscope) and point xtcp2 at it for live profile /// data without restarts. @$pb.TagNumber(170) - $core.String get pyroscopeUrl => $_getSZ(63); + $core.String get pyroscopeUrl => $_getSZ(69); @$pb.TagNumber(170) - set pyroscopeUrl($core.String value) => $_setString(63, value); + set pyroscopeUrl($core.String value) => $_setString(69, value); @$pb.TagNumber(170) - $core.bool hasPyroscopeUrl() => $_has(63); + $core.bool hasPyroscopeUrl() => $_has(69); @$pb.TagNumber(170) void clearPyroscopeUrl() => $_clearField(170); @@ -3015,34 +3129,34 @@ class XtcpConfig extends $pb.GeneratedMessage { /// Set per fleet/role for multi-host environments /// (e.g. "xtcp2.prod.iad", "xtcp2.staging.fra"). @$pb.TagNumber(171) - $core.String get pyroscopeAppName => $_getSZ(64); + $core.String get pyroscopeAppName => $_getSZ(70); @$pb.TagNumber(171) - set pyroscopeAppName($core.String value) => $_setString(64, value); + set pyroscopeAppName($core.String value) => $_setString(70, value); @$pb.TagNumber(171) - $core.bool hasPyroscopeAppName() => $_has(64); + $core.bool hasPyroscopeAppName() => $_has(70); @$pb.TagNumber(171) void clearPyroscopeAppName() => $_clearField(171); /// CPU profile sampling rate in Hz. Default 100. The Pyroscope /// agent uses this to call runtime.SetCPUProfileRate at startup. @$pb.TagNumber(172) - $core.int get pyroscopeSampleHz => $_getIZ(65); + $core.int get pyroscopeSampleHz => $_getIZ(71); @$pb.TagNumber(172) - set pyroscopeSampleHz($core.int value) => $_setUnsignedInt32(65, value); + set pyroscopeSampleHz($core.int value) => $_setUnsignedInt32(71, value); @$pb.TagNumber(172) - $core.bool hasPyroscopeSampleHz() => $_has(65); + $core.bool hasPyroscopeSampleHz() => $_has(71); @$pb.TagNumber(172) void clearPyroscopeSampleHz() => $_clearField(172); /// Profile upload interval (seconds between batched profile /// pushes). Default 15 s. @$pb.TagNumber(173) - $core.int get pyroscopeUploadIntervalSec => $_getIZ(66); + $core.int get pyroscopeUploadIntervalSec => $_getIZ(72); @$pb.TagNumber(173) set pyroscopeUploadIntervalSec($core.int value) => - $_setUnsignedInt32(66, value); + $_setUnsignedInt32(72, value); @$pb.TagNumber(173) - $core.bool hasPyroscopeUploadIntervalSec() => $_has(66); + $core.bool hasPyroscopeUploadIntervalSec() => $_has(72); @$pb.TagNumber(173) void clearPyroscopeUploadIntervalSec() => $_clearField(173); @@ -3053,11 +3167,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// CONTAINER_ID_RESOLVE env. Needs /sys/fs/cgroup readable (mount it and run /// --cgroupns=host in a container). @$pb.TagNumber(200) - $core.bool get resolveContainerId => $_getBF(67); + $core.bool get resolveContainerId => $_getBF(73); @$pb.TagNumber(200) - set resolveContainerId($core.bool value) => $_setBool(67, value); + set resolveContainerId($core.bool value) => $_setBool(73, value); @$pb.TagNumber(200) - $core.bool hasResolveContainerId() => $_has(67); + $core.bool hasResolveContainerId() => $_has(73); @$pb.TagNumber(200) void clearResolveContainerId() => $_clearField(200); @@ -3065,21 +3179,21 @@ class XtcpConfig extends $pb.GeneratedMessage { /// by joining the socket's owning netns inode against the Docker Engine API /// index over docker_socket_path. Default false. @$pb.TagNumber(201) - $core.bool get enrichContainerEnable => $_getBF(68); + $core.bool get enrichContainerEnable => $_getBF(74); @$pb.TagNumber(201) - set enrichContainerEnable($core.bool value) => $_setBool(68, value); + set enrichContainerEnable($core.bool value) => $_setBool(74, value); @$pb.TagNumber(201) - $core.bool hasEnrichContainerEnable() => $_has(68); + $core.bool hasEnrichContainerEnable() => $_has(74); @$pb.TagNumber(201) void clearEnrichContainerEnable() => $_clearField(201); /// Docker Engine API unix socket. Default "/run/docker.sock". @$pb.TagNumber(202) - $core.String get dockerSocketPath => $_getSZ(69); + $core.String get dockerSocketPath => $_getSZ(75); @$pb.TagNumber(202) - set dockerSocketPath($core.String value) => $_setString(69, value); + set dockerSocketPath($core.String value) => $_setString(75, value); @$pb.TagNumber(202) - $core.bool hasDockerSocketPath() => $_has(69); + $core.bool hasDockerSocketPath() => $_has(75); @$pb.TagNumber(202) void clearDockerSocketPath() => $_clearField(202); @@ -3087,32 +3201,32 @@ class XtcpConfig extends $pb.GeneratedMessage { /// Enrich per-uplink LLDP neighbor labels by reading the lldpd control socket /// (lldpd_socket_path) once at startup. Default false. @$pb.TagNumber(210) - $core.bool get enrichLldpEnable => $_getBF(70); + $core.bool get enrichLldpEnable => $_getBF(76); @$pb.TagNumber(210) - set enrichLldpEnable($core.bool value) => $_setBool(70, value); + set enrichLldpEnable($core.bool value) => $_setBool(76, value); @$pb.TagNumber(210) - $core.bool hasEnrichLldpEnable() => $_has(70); + $core.bool hasEnrichLldpEnable() => $_has(76); @$pb.TagNumber(210) void clearEnrichLldpEnable() => $_clearField(210); /// lldpd control socket. Default "/run/lldpd.socket". @$pb.TagNumber(211) - $core.String get lldpdSocketPath => $_getSZ(71); + $core.String get lldpdSocketPath => $_getSZ(77); @$pb.TagNumber(211) - set lldpdSocketPath($core.String value) => $_setString(71, value); + set lldpdSocketPath($core.String value) => $_setString(77, value); @$pb.TagNumber(211) - $core.bool hasLldpdSocketPath() => $_has(71); + $core.bool hasLldpdSocketPath() => $_has(77); @$pb.TagNumber(211) void clearLldpdSocketPath() => $_clearField(211); /// Optional lldpd version hint ("1.0.13"/"1.0.18") selecting the struct-layout /// descriptor for the wire parser. Empty = auto-detect. Default "". @$pb.TagNumber(212) - $core.String get lldpdVersionHint => $_getSZ(72); + $core.String get lldpdVersionHint => $_getSZ(78); @$pb.TagNumber(212) - set lldpdVersionHint($core.String value) => $_setString(72, value); + set lldpdVersionHint($core.String value) => $_setString(78, value); @$pb.TagNumber(212) - $core.bool hasLldpdVersionHint() => $_has(72); + $core.bool hasLldpdVersionHint() => $_has(78); @$pb.TagNumber(212) void clearLldpdVersionHint() => $_clearField(212); @@ -3120,38 +3234,38 @@ class XtcpConfig extends $pb.GeneratedMessage { /// Enrich per-uplink NIC labels (driver/model/pci/speed/firmware) from sysfs + /// the ethtool ioctl once at startup. Default false. @$pb.TagNumber(220) - $core.bool get enrichNicEnable => $_getBF(73); + $core.bool get enrichNicEnable => $_getBF(79); @$pb.TagNumber(220) - set enrichNicEnable($core.bool value) => $_setBool(73, value); + set enrichNicEnable($core.bool value) => $_setBool(79, value); @$pb.TagNumber(220) - $core.bool hasEnrichNicEnable() => $_has(73); + $core.bool hasEnrichNicEnable() => $_has(79); @$pb.TagNumber(220) void clearEnrichNicEnable() => $_clearField(220); /// Number of host uplink slots to populate (dual-homed hosts = 2). Default 2. @$pb.TagNumber(221) - $core.int get uplinkCount => $_getIZ(74); + $core.int get uplinkCount => $_getIZ(80); @$pb.TagNumber(221) - set uplinkCount($core.int value) => $_setUnsignedInt32(74, value); + set uplinkCount($core.int value) => $_setUnsignedInt32(80, value); @$pb.TagNumber(221) - $core.bool hasUplinkCount() => $_has(74); + $core.bool hasUplinkCount() => $_has(80); @$pb.TagNumber(221) void clearUplinkCount() => $_clearField(221); /// Explicit uplink interface names, slot order. Empty = auto-detect from the /// default IPv4/IPv6 routes. @$pb.TagNumber(222) - $pb.PbList<$core.String> get uplinkInterfaces => $_getList(75); + $pb.PbList<$core.String> get uplinkInterfaces => $_getList(81); /// -- nsid (230-239) /// Populate nsid (record field 32) best-effort via RTM_GETNSID. Usually 0 for /// Docker/containerd namespaces. Default false. @$pb.TagNumber(230) - $core.bool get populateNsid => $_getBF(76); + $core.bool get populateNsid => $_getBF(82); @$pb.TagNumber(230) - set populateNsid($core.bool value) => $_setBool(76, value); + set populateNsid($core.bool value) => $_setBool(82, value); @$pb.TagNumber(230) - $core.bool hasPopulateNsid() => $_has(76); + $core.bool hasPopulateNsid() => $_has(82); @$pb.TagNumber(230) void clearPopulateNsid() => $_clearField(230); @@ -3162,47 +3276,47 @@ class XtcpConfig extends $pb.GeneratedMessage { /// enabled but asn_db_path is missing/unreadable, xtcp2 logs, bumps a counter, /// and leaves both columns empty. Default false. @$pb.TagNumber(240) - $core.bool get enrichAsnEnable => $_getBF(77); + $core.bool get enrichAsnEnable => $_getBF(83); @$pb.TagNumber(240) - set enrichAsnEnable($core.bool value) => $_setBool(77, value); + set enrichAsnEnable($core.bool value) => $_setBool(83, value); @$pb.TagNumber(240) - $core.bool hasEnrichAsnEnable() => $_has(77); + $core.bool hasEnrichAsnEnable() => $_has(83); @$pb.TagNumber(240) void clearEnrichAsnEnable() => $_clearField(240); /// Path to the ipfeed-collector Parquet artifact (prefix -> {asn, /// network_owner}). Default "". @$pb.TagNumber(241) - $core.String get asnDbPath => $_getSZ(78); + $core.String get asnDbPath => $_getSZ(84); @$pb.TagNumber(241) - set asnDbPath($core.String value) => $_setString(78, value); + set asnDbPath($core.String value) => $_setString(84, value); @$pb.TagNumber(241) - $core.bool hasAsnDbPath() => $_has(78); + $core.bool hasAsnDbPath() => $_has(84); @$pb.TagNumber(241) void clearAsnDbPath() => $_clearField(241); /// How often to reload asn_db_path in the background so a refreshed artifact /// is picked up without a restart. 0 = load once at startup, never reload. @$pb.TagNumber(242) - $1.Duration get asnRefreshInterval => $_getN(79); + $1.Duration get asnRefreshInterval => $_getN(85); @$pb.TagNumber(242) set asnRefreshInterval($1.Duration value) => $_setField(242, value); @$pb.TagNumber(242) - $core.bool hasAsnRefreshInterval() => $_has(79); + $core.bool hasAsnRefreshInterval() => $_has(85); @$pb.TagNumber(242) void clearAsnRefreshInterval() => $_clearField(242); @$pb.TagNumber(242) - $1.Duration ensureAsnRefreshInterval() => $_ensure(79); + $1.Duration ensureAsnRefreshInterval() => $_ensure(85); /// Optional zstd-compressed lookup artifact baked into the image and used at /// startup when no fresher writable cache is available. Default is supplied /// by the daemon CLI as /share/xtcp2/ipmeta/bootstrap.lookup.parquet.zst. @$pb.TagNumber(243) - $core.String get ipmetaBootstrapPath => $_getSZ(80); + $core.String get ipmetaBootstrapPath => $_getSZ(86); @$pb.TagNumber(243) - set ipmetaBootstrapPath($core.String value) => $_setString(80, value); + set ipmetaBootstrapPath($core.String value) => $_setString(86, value); @$pb.TagNumber(243) - $core.bool hasIpmetaBootstrapPath() => $_has(80); + $core.bool hasIpmetaBootstrapPath() => $_has(86); @$pb.TagNumber(243) void clearIpmetaBootstrapPath() => $_clearField(243); @@ -3211,11 +3325,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// The companion previous.lookup.parquet.zst in the same directory is kept /// as a recovery fallback. @$pb.TagNumber(244) - $core.String get ipmetaCachePath => $_getSZ(81); + $core.String get ipmetaCachePath => $_getSZ(87); @$pb.TagNumber(244) - set ipmetaCachePath($core.String value) => $_setString(81, value); + set ipmetaCachePath($core.String value) => $_setString(87, value); @$pb.TagNumber(244) - $core.bool hasIpmetaCachePath() => $_has(81); + $core.bool hasIpmetaCachePath() => $_has(87); @$pb.TagNumber(244) void clearIpmetaCachePath() => $_clearField(244); @@ -3228,11 +3342,11 @@ class XtcpConfig extends $pb.GeneratedMessage { /// Non-fatal: a per-namespace discovery failure just leaves that namespace's /// sockets unclassified (and is retried with backoff). Default false. @$pb.TagNumber(245) - $core.bool get enrichLocalityEnable => $_getBF(82); + $core.bool get enrichLocalityEnable => $_getBF(88); @$pb.TagNumber(245) - set enrichLocalityEnable($core.bool value) => $_setBool(82, value); + set enrichLocalityEnable($core.bool value) => $_setBool(88, value); @$pb.TagNumber(245) - $core.bool hasEnrichLocalityEnable() => $_has(82); + $core.bool hasEnrichLocalityEnable() => $_has(88); @$pb.TagNumber(245) void clearEnrichLocalityEnable() => $_clearField(245); @@ -3241,15 +3355,15 @@ class XtcpConfig extends $pb.GeneratedMessage { /// namespaces are always snapshotted on the next reconcile regardless. 0 = /// discover once per namespace, never refresh. Daemon default 60s. @$pb.TagNumber(246) - $1.Duration get localityRefreshInterval => $_getN(83); + $1.Duration get localityRefreshInterval => $_getN(89); @$pb.TagNumber(246) set localityRefreshInterval($1.Duration value) => $_setField(246, value); @$pb.TagNumber(246) - $core.bool hasLocalityRefreshInterval() => $_has(83); + $core.bool hasLocalityRefreshInterval() => $_has(89); @$pb.TagNumber(246) void clearLocalityRefreshInterval() => $_clearField(246); @$pb.TagNumber(246) - $1.Duration ensureLocalityRefreshInterval() => $_ensure(83); + $1.Duration ensureLocalityRefreshInterval() => $_ensure(89); /// Keep each namespace's locality snapshot current from rtnetlink /// notifications (link, address and route changes) instead of waiting for @@ -3257,25 +3371,25 @@ class XtcpConfig extends $pb.GeneratedMessage { /// locality_refresh_interval then becomes the backstop, a resync taken /// after that long. Needs enrich_locality_enable. Default false. @$pb.TagNumber(247) - $core.bool get localityEventsEnable => $_getBF(84); + $core.bool get localityEventsEnable => $_getBF(90); @$pb.TagNumber(247) - set localityEventsEnable($core.bool value) => $_setBool(84, value); + set localityEventsEnable($core.bool value) => $_setBool(90, value); @$pb.TagNumber(247) - $core.bool hasLocalityEventsEnable() => $_has(84); + $core.bool hasLocalityEventsEnable() => $_has(90); @$pb.TagNumber(247) void clearLocalityEventsEnable() => $_clearField(247); /// Physical link monitor; see LinkMonitorConfig. @$pb.TagNumber(250) - LinkMonitorConfig get linkMonitor => $_getN(85); + LinkMonitorConfig get linkMonitor => $_getN(91); @$pb.TagNumber(250) set linkMonitor(LinkMonitorConfig value) => $_setField(250, value); @$pb.TagNumber(250) - $core.bool hasLinkMonitor() => $_has(85); + $core.bool hasLinkMonitor() => $_has(91); @$pb.TagNumber(250) void clearLinkMonitor() => $_clearField(250); @$pb.TagNumber(250) - LinkMonitorConfig ensureLinkMonitor() => $_ensure(85); + LinkMonitorConfig ensureLinkMonitor() => $_ensure(91); } class EnabledDeserializers extends $pb.GeneratedMessage { diff --git a/gen/dart/xtcp_config/v1/xtcp_config.pbjson.dart b/gen/dart/xtcp_config/v1/xtcp_config.pbjson.dart index a3396fabe..8bff2e73a 100644 --- a/gen/dart/xtcp_config/v1/xtcp_config.pbjson.dart +++ b/gen/dart/xtcp_config/v1/xtcp_config.pbjson.dart @@ -939,6 +939,30 @@ const XtcpConfig$json = { '8': {}, '10': 'maxRecordsPerNetns' }, + { + '1': 'max_records_per_poll', + '3': 27, + '4': 1, + '5': 4, + '8': {}, + '10': 'maxRecordsPerPoll' + }, + { + '1': 'io_uring_sockstat_batch_size', + '3': 28, + '4': 1, + '5': 13, + '8': {}, + '10': 'ioUringSockstatBatchSize' + }, + { + '1': 'io_uring_sockstat_workers', + '3': 29, + '4': 1, + '5': 13, + '8': {}, + '10': 'ioUringSockstatWorkers' + }, { '1': 'reconcile_frequency', '3': 40, @@ -956,6 +980,31 @@ const XtcpConfig$json = { '10': 'reconcileBeforePoll' }, {'1': 'max_netns', '3': 42, '4': 1, '5': 13, '8': {}, '10': 'maxNetns'}, + { + '1': 'reconcile_timeout', + '3': 43, + '4': 1, + '5': 11, + '6': '.google.protobuf.Duration', + '8': {}, + '10': 'reconcileTimeout' + }, + { + '1': 'max_netns_per_owner', + '3': 44, + '4': 1, + '5': 13, + '8': {}, + '10': 'maxNetnsPerOwner' + }, + { + '1': 'max_netns_adds_per_reconcile', + '3': 45, + '4': 1, + '5': 13, + '8': {}, + '10': 'maxNetnsAddsPerReconcile' + }, {'1': 'write_files', '3': 50, '4': 1, '5': 13, '8': {}, '10': 'writeFiles'}, { '1': 'capture_path', @@ -1377,79 +1426,87 @@ final $typed_data.Uint8List xtcpConfigDescriptor = $convert.base64Decode( 'EAKgUYgCAoAVIUaW9VcmluZ1JlY3ZCYXRjaFNpemUSQwoXaW9fdXJpbmdfY3FlX2JhdGNoX3Np' 'emUYGCABKA1CDbpICsgBACoFGIAgKAFSE2lvVXJpbmdDcWVCYXRjaFNpemUSLAoObWF4X2R1bX' 'BfYnl0ZXMYGSABKARCBrpIA8gBAFIMbWF4RHVtcEJ5dGVzEjkKFW1heF9yZWNvcmRzX3Blcl9u' - 'ZXRucxgaIAEoBEIGukgDyAEAUhJtYXhSZWNvcmRzUGVyTmV0bnMSVwoTcmVjb25jaWxlX2ZyZX' - 'F1ZW5jeRgoIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbkILukgIyAEAqgECMgBSEnJl' - 'Y29uY2lsZUZyZXF1ZW5jeRIyChVyZWNvbmNpbGVfYmVmb3JlX3BvbGwYKSABKAhSE3JlY29uY2' - 'lsZUJlZm9yZVBvbGwSIwoJbWF4X25ldG5zGCogASgNQga6SAPIAQBSCG1heE5ldG5zEi4KC3dy' - 'aXRlX2ZpbGVzGDIgASgNQg26SArIAQAqBRjoBygAUgp3cml0ZUZpbGVzEi8KDGNhcHR1cmVfcG' - 'F0aBgzIAEoCUIMukgJyAEAcgQQARhQUgtjYXB0dXJlUGF0aBI3ChBkZXN0X3dyaXRlX2ZpbGVz' - 'GDQgASgNQg26SArIAQAqBRjoBygAUg5kZXN0V3JpdGVGaWxlcxIuCgtkZWJ1Z19sZXZlbBg1IA' - 'EoDUINukgKyAEBKgUY6AcoAFIKZGVidWdMZXZlbBIxChBkZWJ1Z19wcm9tZXRoZXVzGDYgASgI' - 'Qga6SAPIAQBSD2RlYnVnUHJvbWV0aGV1cxIhCgRkZXN0GDwgASgJQg26SArIAQFyBRAEGIAEUg' - 'RkZXN0EisKCm1hcnNoYWxfdG8YPSABKAlCDLpICcgBAXIEEAMYKFIJbWFyc2hhbFRvEicKC2Nz' - 'dl9jb2x1bW5zGD4gASgJQga6SAPIAQBSCmNzdkNvbHVtbnMSNAoPeHRjcF9wcm90b19maWxlGD' - '8gASgJQgy6SAnIAQByBBABGFBSDXh0Y3BQcm90b0ZpbGUSSwoeZW52ZWxvcGVfZmx1c2hfdGhy' - 'ZXNob2xkX2J5dGVzGEAgASgNQga6SAPIAQBSG2VudmVsb3BlRmx1c2hUaHJlc2hvbGRCeXRlcx' - 'JJCh1lbnZlbG9wZV9mbHVzaF90aHJlc2hvbGRfcm93cxhBIAEoDUIGukgDyAEAUhplbnZlbG9w' - 'ZUZsdXNoVGhyZXNob2xkUm93cxIiCgV0b3BpYxhQIAEoCUIMukgJyAEAcgQQARgoUgV0b3BpYx' - 'I2ChBrYWZrYV9zY2hlbWFfdXJsGFEgASgJQgy6SAnIAQByBBABGDxSDmthZmthU2NoZW1hVXJs' - 'El8KFWthZmthX3Byb2R1Y2VfdGltZW91dBhSIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdG' - 'lvbkIQukgNyAEAqgEHIgMI2AQyAFITa2Fma2FQcm9kdWNlVGltZW91dBIzChFrYWZrYV9jb21w' - 'cmVzc2lvbhhTIAEoCUIGukgDyAEAUhBrYWZrYUNvbXByZXNzaW9uEicKC3MzX2VuZHBvaW50GG' - 'QgASgJQga6SAPIAQBSCnMzRW5kcG9pbnQSIwoJczNfcmVnaW9uGGUgASgJQga6SAPIAQBSCHMz' - 'UmVnaW9uEiMKCXMzX2J1Y2tldBhmIAEoCUIGukgDyAEAUghzM0J1Y2tldBIjCglzM19wcmVmaX' - 'gYZyABKAlCBrpIA8gBAFIIczNQcmVmaXgSKgoNczNfYWNjZXNzX2tleRhoIAEoCUIGukgDyAEA' - 'UgtzM0FjY2Vzc0tleRIqCg1zM19zZWNyZXRfa2V5GGkgASgJQga6SAPIAQBSC3MzU2VjcmV0S2' - 'V5EjcKFHMzX3NraXBfYnVja2V0X3Byb2JlGGogASgIQga6SAPIAQBSEXMzU2tpcEJ1Y2tldFBy' - 'b2JlEjIKEXMzX2FsbG93X2luc2VjdXJlGGsgASgIQga6SAPIAQBSD3MzQWxsb3dJbnNlY3VyZR' - 'IpCgpzM19jYV9maWxlGGwgASgJQgu6SAjIAQByAxiAIFIIczNDYUZpbGUSTgogczNfcGFycXVl' - 'dF9mbHVzaF90aHJlc2hvbGRfYnl0ZXMYbiABKA1CBrpIA8gBAFIcczNQYXJxdWV0Rmx1c2hUaH' - 'Jlc2hvbGRCeXRlcxJSChFzM19mbHVzaF9pbnRlcnZhbBhvIAEoCzIZLmdvb2dsZS5wcm90b2J1' - 'Zi5EdXJhdGlvbkILukgIyAEAqgECMgBSD3MzRmx1c2hJbnRlcnZhbBI5ChNzM19mbHVzaF9qaX' - 'R0ZXJfcGN0GHAgASgNQgq6SAfIAQAqAhhkUhBzM0ZsdXNoSml0dGVyUGN0EkwKHXMzX2ZsdXNo' - 'X3RocmVzaG9sZF9qaXR0ZXJfcGN0GHEgASgNQgq6SAfIAQAqAhhkUhlzM0ZsdXNoVGhyZXNob2' - 'xkSml0dGVyUGN0EkEKFnMzX3VwbG9hZF9tYXhfYXR0ZW1wdHMYciABKA1CDLpICcgBACoEGGQo' - 'AVITczNVcGxvYWRNYXhBdHRlbXB0cxJZChVzM191cGxvYWRfYmFja29mZl9jYXAYcyABKAsyGS' - '5nb29nbGUucHJvdG9idWYuRHVyYXRpb25CC7pICMgBAKoBAjIAUhJzM1VwbG9hZEJhY2tvZmZD' - 'YXASKAoIaG9zdG5hbWUYggEgASgJQgu6SAjIAQByAxj9AVIIaG9zdG5hbWUSKAoIbG9jYXRpb2' - '4YgwEgASgJQgu6SAjIAQByAxj9AVIIbG9jYXRpb24SIQoFbGFiZWwYhAEgASgJQgq6SAfIAQBy' - 'AhgoUgVsYWJlbBIdCgN0YWcYhQEgASgJQgq6SAfIAQByAhgoUgN0YWcSMwoOZGFlbW9uX3Zlcn' - 'Npb24YhgEgASgJQgu6SAjIAQByAxj9AVINZGFlbW9uVmVyc2lvbhInCghpcHY0X3R0bBiWASAB' - 'KA1CC7pICMgBACoDGP8BUgdpcHY0VHRsEjIKDmlwdjZfaG9wX2xpbWl0GJcBIAEoDUILukgIyA' - 'EAKgMY/wFSDGlwdjZIb3BMaW1pdBJKCg1saXN0ZW5lcl9hdXRoGJgBIAEoCzIcLnh0Y3BfY29u' - 'ZmlnLnYxLkxpc3RlbmVyQXV0aEIGukgDyAEAUgxsaXN0ZW5lckF1dGgSWgoTcHJvbWV0aGV1c1' - '9saXN0ZW5lchiZASABKAsyIC54dGNwX2NvbmZpZy52MS5MaXN0ZW5lckVuZHBvaW50Qga6SAPI' - 'AQBSEnByb21ldGhldXNMaXN0ZW5lchJVChNhZG1pbl9saXN0ZW5lcl9hdXRoGJoBIAEoCzIcLn' - 'h0Y3BfY29uZmlnLnYxLkxpc3RlbmVyQXV0aEIGukgDyAEAUhFhZG1pbkxpc3RlbmVyQXV0aBIn' - 'CglncnBjX3BvcnQYoAEgASgNQgm6SAYqBBj//wNSCGdycGNQb3J0Ek4KDWdycGNfbGlzdGVuZX' - 'IYoQEgASgLMiAueHRjcF9jb25maWcudjEuTGlzdGVuZXJFbmRwb2ludEIGukgDyAEAUgxncnBj' - 'TGlzdGVuZXISQQoJbGlzdGVuZXJzGKIBIAMoCzIYLnh0Y3BfY29uZmlnLnYxLkxpc3RlbmVyQg' - 'i6SAWSAQIQEFIJbGlzdGVuZXJzEiwKDXB5cm9zY29wZV91cmwYqgEgASgJQga6SAPIAQBSDHB5' - 'cm9zY29wZVVybBI1ChJweXJvc2NvcGVfYXBwX25hbWUYqwEgASgJQga6SAPIAQBSEHB5cm9zY2' - '9wZUFwcE5hbWUSNwoTcHlyb3Njb3BlX3NhbXBsZV9oehisASABKA1CBrpIA8gBAFIRcHlyb3Nj' - 'b3BlU2FtcGxlSHoSSgodcHlyb3Njb3BlX3VwbG9hZF9pbnRlcnZhbF9zZWMYrQEgASgNQga6SA' - 'PIAQBSGnB5cm9zY29wZVVwbG9hZEludGVydmFsU2VjEjkKFHJlc29sdmVfY29udGFpbmVyX2lk' - 'GMgBIAEoCEIGukgDyAEAUhJyZXNvbHZlQ29udGFpbmVySWQSNwoXZW5yaWNoX2NvbnRhaW5lcl' - '9lbmFibGUYyQEgASgIUhVlbnJpY2hDb250YWluZXJFbmFibGUSNwoSZG9ja2VyX3NvY2tldF9w' - 'YXRoGMoBIAEoCUIIukgFcgMY/wFSEGRvY2tlclNvY2tldFBhdGgSLQoSZW5yaWNoX2xsZHBfZW' - '5hYmxlGNIBIAEoCFIQZW5yaWNoTGxkcEVuYWJsZRI1ChFsbGRwZF9zb2NrZXRfcGF0aBjTASAB' - 'KAlCCLpIBXIDGP8BUg9sbGRwZFNvY2tldFBhdGgSNgoSbGxkcGRfdmVyc2lvbl9oaW50GNQBIA' - 'EoCUIHukgEcgIYEFIQbGxkcGRWZXJzaW9uSGludBIrChFlbnJpY2hfbmljX2VuYWJsZRjcASAB' - 'KAhSD2VucmljaE5pY0VuYWJsZRIrCgx1cGxpbmtfY291bnQY3QEgASgNQge6SAQqAhgCUgt1cG' - 'xpbmtDb3VudBI2ChF1cGxpbmtfaW50ZXJmYWNlcxjeASADKAlCCLpIBZIBAhACUhB1cGxpbmtJ' - 'bnRlcmZhY2VzEiQKDXBvcHVsYXRlX25zaWQY5gEgASgIUgxwb3B1bGF0ZU5zaWQSKwoRZW5yaW' - 'NoX2Fzbl9lbmFibGUY8AEgASgIUg9lbnJpY2hBc25FbmFibGUSKQoLYXNuX2RiX3BhdGgY8QEg' - 'ASgJQgi6SAVyAxj/AVIJYXNuRGJQYXRoEkwKFGFzbl9yZWZyZXNoX2ludGVydmFsGPIBIAEoCz' - 'IZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvblISYXNuUmVmcmVzaEludGVydmFsEj0KFWlwbWV0' - 'YV9ib290c3RyYXBfcGF0aBjzASABKAlCCLpIBXIDGP8BUhNpcG1ldGFCb290c3RyYXBQYXRoEj' - 'UKEWlwbWV0YV9jYWNoZV9wYXRoGPQBIAEoCUIIukgFcgMY/wFSD2lwbWV0YUNhY2hlUGF0aBI1' - 'ChZlbnJpY2hfbG9jYWxpdHlfZW5hYmxlGPUBIAEoCFIUZW5yaWNoTG9jYWxpdHlFbmFibGUSVg' - 'oZbG9jYWxpdHlfcmVmcmVzaF9pbnRlcnZhbBj2ASABKAsyGS5nb29nbGUucHJvdG9idWYuRHVy' - 'YXRpb25SF2xvY2FsaXR5UmVmcmVzaEludGVydmFsEjUKFmxvY2FsaXR5X2V2ZW50c19lbmFibG' - 'UY9wEgASgIUhRsb2NhbGl0eUV2ZW50c0VuYWJsZRJFCgxsaW5rX21vbml0b3IY+gEgASgLMiEu' - 'eHRjcF9jb25maWcudjEuTGlua01vbml0b3JDb25maWdSC2xpbmtNb25pdG9yOnO6SHAabgoPWH' - 'RjcENvbmZpZy5wb2xsEjJQb2xsIHRpbWVvdXQgbXVzdCBiZSBsZXNzIHRoYW4gcG9sbCBwb2xs' - 'X2ZyZXF1ZW5jeRondGhpcy5wb2xsX2ZyZXF1ZW5jeSA+IHRoaXMucG9sbF90aW1lb3V0'); + 'ZXRucxgaIAEoBEIGukgDyAEAUhJtYXhSZWNvcmRzUGVyTmV0bnMSNwoUbWF4X3JlY29yZHNfcG' + 'VyX3BvbGwYGyABKARCBrpIA8gBAFIRbWF4UmVjb3Jkc1BlclBvbGwSSwocaW9fdXJpbmdfc29j' + 'a3N0YXRfYmF0Y2hfc2l6ZRgcIAEoDUILukgIyAEAKgMYgAhSGGlvVXJpbmdTb2Nrc3RhdEJhdG' + 'NoU2l6ZRJFChlpb191cmluZ19zb2Nrc3RhdF93b3JrZXJzGB0gASgNQgq6SAfIAQAqAhhAUhZp' + 'b1VyaW5nU29ja3N0YXRXb3JrZXJzElcKE3JlY29uY2lsZV9mcmVxdWVuY3kYKCABKAsyGS5nb2' + '9nbGUucHJvdG9idWYuRHVyYXRpb25CC7pICMgBAKoBAjIAUhJyZWNvbmNpbGVGcmVxdWVuY3kS' + 'MgoVcmVjb25jaWxlX2JlZm9yZV9wb2xsGCkgASgIUhNyZWNvbmNpbGVCZWZvcmVQb2xsEiMKCW' + '1heF9uZXRucxgqIAEoDUIGukgDyAEAUghtYXhOZXRucxJTChFyZWNvbmNpbGVfdGltZW91dBgr' + 'IAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbkILukgIyAEAqgECMgBSEHJlY29uY2lsZV' + 'RpbWVvdXQSNQoTbWF4X25ldG5zX3Blcl9vd25lchgsIAEoDUIGukgDyAEAUhBtYXhOZXRuc1Bl' + 'ck93bmVyEkYKHG1heF9uZXRuc19hZGRzX3Blcl9yZWNvbmNpbGUYLSABKA1CBrpIA8gBAFIYbW' + 'F4TmV0bnNBZGRzUGVyUmVjb25jaWxlEi4KC3dyaXRlX2ZpbGVzGDIgASgNQg26SArIAQAqBRjo' + 'BygAUgp3cml0ZUZpbGVzEi8KDGNhcHR1cmVfcGF0aBgzIAEoCUIMukgJyAEAcgQQARhQUgtjYX' + 'B0dXJlUGF0aBI3ChBkZXN0X3dyaXRlX2ZpbGVzGDQgASgNQg26SArIAQAqBRjoBygAUg5kZXN0' + 'V3JpdGVGaWxlcxIuCgtkZWJ1Z19sZXZlbBg1IAEoDUINukgKyAEBKgUY6AcoAFIKZGVidWdMZX' + 'ZlbBIxChBkZWJ1Z19wcm9tZXRoZXVzGDYgASgIQga6SAPIAQBSD2RlYnVnUHJvbWV0aGV1cxIh' + 'CgRkZXN0GDwgASgJQg26SArIAQFyBRAEGIAEUgRkZXN0EisKCm1hcnNoYWxfdG8YPSABKAlCDL' + 'pICcgBAXIEEAMYKFIJbWFyc2hhbFRvEicKC2Nzdl9jb2x1bW5zGD4gASgJQga6SAPIAQBSCmNz' + 'dkNvbHVtbnMSNAoPeHRjcF9wcm90b19maWxlGD8gASgJQgy6SAnIAQByBBABGFBSDXh0Y3BQcm' + '90b0ZpbGUSSwoeZW52ZWxvcGVfZmx1c2hfdGhyZXNob2xkX2J5dGVzGEAgASgNQga6SAPIAQBS' + 'G2VudmVsb3BlRmx1c2hUaHJlc2hvbGRCeXRlcxJJCh1lbnZlbG9wZV9mbHVzaF90aHJlc2hvbG' + 'Rfcm93cxhBIAEoDUIGukgDyAEAUhplbnZlbG9wZUZsdXNoVGhyZXNob2xkUm93cxIiCgV0b3Bp' + 'YxhQIAEoCUIMukgJyAEAcgQQARgoUgV0b3BpYxI2ChBrYWZrYV9zY2hlbWFfdXJsGFEgASgJQg' + 'y6SAnIAQByBBABGDxSDmthZmthU2NoZW1hVXJsEl8KFWthZmthX3Byb2R1Y2VfdGltZW91dBhS' + 'IAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbkIQukgNyAEAqgEHIgMI2AQyAFITa2Fma2' + 'FQcm9kdWNlVGltZW91dBIzChFrYWZrYV9jb21wcmVzc2lvbhhTIAEoCUIGukgDyAEAUhBrYWZr' + 'YUNvbXByZXNzaW9uEicKC3MzX2VuZHBvaW50GGQgASgJQga6SAPIAQBSCnMzRW5kcG9pbnQSIw' + 'oJczNfcmVnaW9uGGUgASgJQga6SAPIAQBSCHMzUmVnaW9uEiMKCXMzX2J1Y2tldBhmIAEoCUIG' + 'ukgDyAEAUghzM0J1Y2tldBIjCglzM19wcmVmaXgYZyABKAlCBrpIA8gBAFIIczNQcmVmaXgSKg' + 'oNczNfYWNjZXNzX2tleRhoIAEoCUIGukgDyAEAUgtzM0FjY2Vzc0tleRIqCg1zM19zZWNyZXRf' + 'a2V5GGkgASgJQga6SAPIAQBSC3MzU2VjcmV0S2V5EjcKFHMzX3NraXBfYnVja2V0X3Byb2JlGG' + 'ogASgIQga6SAPIAQBSEXMzU2tpcEJ1Y2tldFByb2JlEjIKEXMzX2FsbG93X2luc2VjdXJlGGsg' + 'ASgIQga6SAPIAQBSD3MzQWxsb3dJbnNlY3VyZRIpCgpzM19jYV9maWxlGGwgASgJQgu6SAjIAQ' + 'ByAxiAIFIIczNDYUZpbGUSTgogczNfcGFycXVldF9mbHVzaF90aHJlc2hvbGRfYnl0ZXMYbiAB' + 'KA1CBrpIA8gBAFIcczNQYXJxdWV0Rmx1c2hUaHJlc2hvbGRCeXRlcxJSChFzM19mbHVzaF9pbn' + 'RlcnZhbBhvIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbkILukgIyAEAqgECMgBSD3Mz' + 'Rmx1c2hJbnRlcnZhbBI5ChNzM19mbHVzaF9qaXR0ZXJfcGN0GHAgASgNQgq6SAfIAQAqAhhkUh' + 'BzM0ZsdXNoSml0dGVyUGN0EkwKHXMzX2ZsdXNoX3RocmVzaG9sZF9qaXR0ZXJfcGN0GHEgASgN' + 'Qgq6SAfIAQAqAhhkUhlzM0ZsdXNoVGhyZXNob2xkSml0dGVyUGN0EkEKFnMzX3VwbG9hZF9tYX' + 'hfYXR0ZW1wdHMYciABKA1CDLpICcgBACoEGGQoAVITczNVcGxvYWRNYXhBdHRlbXB0cxJZChVz' + 'M191cGxvYWRfYmFja29mZl9jYXAYcyABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb25CC7' + 'pICMgBAKoBAjIAUhJzM1VwbG9hZEJhY2tvZmZDYXASKAoIaG9zdG5hbWUYggEgASgJQgu6SAjI' + 'AQByAxj9AVIIaG9zdG5hbWUSKAoIbG9jYXRpb24YgwEgASgJQgu6SAjIAQByAxj9AVIIbG9jYX' + 'Rpb24SIQoFbGFiZWwYhAEgASgJQgq6SAfIAQByAhgoUgVsYWJlbBIdCgN0YWcYhQEgASgJQgq6' + 'SAfIAQByAhgoUgN0YWcSMwoOZGFlbW9uX3ZlcnNpb24YhgEgASgJQgu6SAjIAQByAxj9AVINZG' + 'FlbW9uVmVyc2lvbhInCghpcHY0X3R0bBiWASABKA1CC7pICMgBACoDGP8BUgdpcHY0VHRsEjIK' + 'DmlwdjZfaG9wX2xpbWl0GJcBIAEoDUILukgIyAEAKgMY/wFSDGlwdjZIb3BMaW1pdBJKCg1saX' + 'N0ZW5lcl9hdXRoGJgBIAEoCzIcLnh0Y3BfY29uZmlnLnYxLkxpc3RlbmVyQXV0aEIGukgDyAEA' + 'UgxsaXN0ZW5lckF1dGgSWgoTcHJvbWV0aGV1c19saXN0ZW5lchiZASABKAsyIC54dGNwX2Nvbm' + 'ZpZy52MS5MaXN0ZW5lckVuZHBvaW50Qga6SAPIAQBSEnByb21ldGhldXNMaXN0ZW5lchJVChNh' + 'ZG1pbl9saXN0ZW5lcl9hdXRoGJoBIAEoCzIcLnh0Y3BfY29uZmlnLnYxLkxpc3RlbmVyQXV0aE' + 'IGukgDyAEAUhFhZG1pbkxpc3RlbmVyQXV0aBInCglncnBjX3BvcnQYoAEgASgNQgm6SAYqBBj/' + '/wNSCGdycGNQb3J0Ek4KDWdycGNfbGlzdGVuZXIYoQEgASgLMiAueHRjcF9jb25maWcudjEuTG' + 'lzdGVuZXJFbmRwb2ludEIGukgDyAEAUgxncnBjTGlzdGVuZXISQQoJbGlzdGVuZXJzGKIBIAMo' + 'CzIYLnh0Y3BfY29uZmlnLnYxLkxpc3RlbmVyQgi6SAWSAQIQEFIJbGlzdGVuZXJzEiwKDXB5cm' + '9zY29wZV91cmwYqgEgASgJQga6SAPIAQBSDHB5cm9zY29wZVVybBI1ChJweXJvc2NvcGVfYXBw' + 'X25hbWUYqwEgASgJQga6SAPIAQBSEHB5cm9zY29wZUFwcE5hbWUSNwoTcHlyb3Njb3BlX3NhbX' + 'BsZV9oehisASABKA1CBrpIA8gBAFIRcHlyb3Njb3BlU2FtcGxlSHoSSgodcHlyb3Njb3BlX3Vw' + 'bG9hZF9pbnRlcnZhbF9zZWMYrQEgASgNQga6SAPIAQBSGnB5cm9zY29wZVVwbG9hZEludGVydm' + 'FsU2VjEjkKFHJlc29sdmVfY29udGFpbmVyX2lkGMgBIAEoCEIGukgDyAEAUhJyZXNvbHZlQ29u' + 'dGFpbmVySWQSNwoXZW5yaWNoX2NvbnRhaW5lcl9lbmFibGUYyQEgASgIUhVlbnJpY2hDb250YW' + 'luZXJFbmFibGUSNwoSZG9ja2VyX3NvY2tldF9wYXRoGMoBIAEoCUIIukgFcgMY/wFSEGRvY2tl' + 'clNvY2tldFBhdGgSLQoSZW5yaWNoX2xsZHBfZW5hYmxlGNIBIAEoCFIQZW5yaWNoTGxkcEVuYW' + 'JsZRI1ChFsbGRwZF9zb2NrZXRfcGF0aBjTASABKAlCCLpIBXIDGP8BUg9sbGRwZFNvY2tldFBh' + 'dGgSNgoSbGxkcGRfdmVyc2lvbl9oaW50GNQBIAEoCUIHukgEcgIYEFIQbGxkcGRWZXJzaW9uSG' + 'ludBIrChFlbnJpY2hfbmljX2VuYWJsZRjcASABKAhSD2VucmljaE5pY0VuYWJsZRIrCgx1cGxp' + 'bmtfY291bnQY3QEgASgNQge6SAQqAhgCUgt1cGxpbmtDb3VudBI2ChF1cGxpbmtfaW50ZXJmYW' + 'NlcxjeASADKAlCCLpIBZIBAhACUhB1cGxpbmtJbnRlcmZhY2VzEiQKDXBvcHVsYXRlX25zaWQY' + '5gEgASgIUgxwb3B1bGF0ZU5zaWQSKwoRZW5yaWNoX2Fzbl9lbmFibGUY8AEgASgIUg9lbnJpY2' + 'hBc25FbmFibGUSKQoLYXNuX2RiX3BhdGgY8QEgASgJQgi6SAVyAxj/AVIJYXNuRGJQYXRoEkwK' + 'FGFzbl9yZWZyZXNoX2ludGVydmFsGPIBIAEoCzIZLmdvb2dsZS5wcm90b2J1Zi5EdXJhdGlvbl' + 'ISYXNuUmVmcmVzaEludGVydmFsEj0KFWlwbWV0YV9ib290c3RyYXBfcGF0aBjzASABKAlCCLpI' + 'BXIDGP8BUhNpcG1ldGFCb290c3RyYXBQYXRoEjUKEWlwbWV0YV9jYWNoZV9wYXRoGPQBIAEoCU' + 'IIukgFcgMY/wFSD2lwbWV0YUNhY2hlUGF0aBI1ChZlbnJpY2hfbG9jYWxpdHlfZW5hYmxlGPUB' + 'IAEoCFIUZW5yaWNoTG9jYWxpdHlFbmFibGUSVgoZbG9jYWxpdHlfcmVmcmVzaF9pbnRlcnZhbB' + 'j2ASABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb25SF2xvY2FsaXR5UmVmcmVzaEludGVy' + 'dmFsEjUKFmxvY2FsaXR5X2V2ZW50c19lbmFibGUY9wEgASgIUhRsb2NhbGl0eUV2ZW50c0VuYW' + 'JsZRJFCgxsaW5rX21vbml0b3IY+gEgASgLMiEueHRjcF9jb25maWcudjEuTGlua01vbml0b3JD' + 'b25maWdSC2xpbmtNb25pdG9yOnO6SHAabgoPWHRjcENvbmZpZy5wb2xsEjJQb2xsIHRpbWVvdX' + 'QgbXVzdCBiZSBsZXNzIHRoYW4gcG9sbCBwb2xsX2ZyZXF1ZW5jeRondGhpcy5wb2xsX2ZyZXF1' + 'ZW5jeSA+IHRoaXMucG9sbF90aW1lb3V0'); @$core.Deprecated('Use enabledDeserializersDescriptor instead') const EnabledDeserializers$json = { diff --git a/gen/go/xtcp_config/xtcp_config.pb.go b/gen/go/xtcp_config/xtcp_config.pb.go index c629e1e36..e03c6be81 100644 --- a/gen/go/xtcp_config/xtcp_config.pb.go +++ b/gen/go/xtcp_config/xtcp_config.pb.go @@ -1554,6 +1554,21 @@ type XtcpConfig struct { // counted in xtcp_dump_dropped_total{reason="records"}. Startup-only. // 0 = unlimited. Daemon default 262144. MaxRecordsPerNetns uint64 `protobuf:"varint,26,opt,name=max_records_per_netns,json=maxRecordsPerNetns,proto3" json:"max_records_per_netns,omitempty"` + // Budget on the records all namespaces contribute per poll. Before each + // poll xtcp2 reads every namespace's TCP socket count (sockstat) and, + // when the total is over the budget, splits it max-min fairly: a + // namespace over its share first stops asking for TIME_WAIT and + // SYN_RECV, then is sampled by port range across polls. Counted in + // xtcp_poll_degraded_total. Startup-only. 0 = off (sockstat is not read). + // Daemon default 1048576. + MaxRecordsPerPoll uint64 `protobuf:"varint,27,opt,name=max_records_per_poll,json=maxRecordsPerPoll,proto3" json:"max_records_per_poll,omitempty"` + // Sockstat reads queued per io_uring submit when io_uring=true. + // Ignored otherwise. 0 = daemon default 64; at most 1024. + IoUringSockstatBatchSize uint32 `protobuf:"varint,28,opt,name=io_uring_sockstat_batch_size,json=ioUringSockstatBatchSize,proto3" json:"io_uring_sockstat_batch_size,omitempty"` + // Cap on io_uring's kernel worker threads for sockstat reads (procfs + // reads are handed to io-wq workers). Ignored unless io_uring=true. + // 0 = daemon default 4; at most 64. + IoUringSockstatWorkers uint32 `protobuf:"varint,29,opt,name=io_uring_sockstat_workers,json=ioUringSockstatWorkers,proto3" json:"io_uring_sockstat_workers,omitempty"` // Period of the background namespace-reconcile ticker (Method B /proc scan // that converges the tracked namespace set). With reconcile_before_poll the // Poller reconciles every cycle and is the real discovery mechanism, so this @@ -1576,6 +1591,25 @@ type XtcpConfig struct { // order xtcp2 first saw them. Startup-only. // 0 = unlimited. Daemon default 4096. MaxNetns uint32 `protobuf:"varint,42,opt,name=max_netns,json=maxNetns,proto3" json:"max_netns,omitempty"` + // Time budget for one reconcile's namespace scan. A scan cut short adds + // what it found but deletes nothing (a partial view cannot prove a + // namespace is gone), and is counted in + // xtcp_reconcile_incomplete_total{reason="timeout"}. Bounds how long a + // namespace flood can delay a poll. The scan also stops after + // 4 x max_netns distinct namespaces (reason="scan_cap"). + // Startup-only. 0 = no limit. Daemon default 1s. + ReconcileTimeout *durationpb.Duration `protobuf:"bytes,43,opt,name=reconcile_timeout,json=reconcileTimeout,proto3" json:"reconcile_timeout,omitempty"` + // Cap on the namespaces one owner (the outermost container id in the + // namespace's cgroup) may have tracked. Bind-mounted namespaces with no + // live process are exempt. Candidates over it keep their queue place and + // are counted in xtcp_netns_dropped_total{reason="owner_quota"}. + // Startup-only. 0 = no limit. Daemon default 64. + MaxNetnsPerOwner uint32 `protobuf:"varint,44,opt,name=max_netns_per_owner,json=maxNetnsPerOwner,proto3" json:"max_netns_per_owner,omitempty"` + // Cap on namespaces added per reconcile, so a burst cannot open + // thousands of sockets (each a setns on a locked thread) at once. The + // rest wait their turn (reason="add_rate"). Startup-only. + // 0 = no limit. Daemon default 256. + MaxNetnsAddsPerReconcile uint32 `protobuf:"varint,45,opt,name=max_netns_adds_per_reconcile,json=maxNetnsAddsPerReconcile,proto3" json:"max_netns_adds_per_reconcile,omitempty"` // Write netlink packets to writeFiles number of files ( to generate test data ) per netlinker // xtcp will capture this many Netlink response packets when it starts // This is PER netlinker @@ -2034,6 +2068,27 @@ func (x *XtcpConfig) GetMaxRecordsPerNetns() uint64 { return 0 } +func (x *XtcpConfig) GetMaxRecordsPerPoll() uint64 { + if x != nil { + return x.MaxRecordsPerPoll + } + return 0 +} + +func (x *XtcpConfig) GetIoUringSockstatBatchSize() uint32 { + if x != nil { + return x.IoUringSockstatBatchSize + } + return 0 +} + +func (x *XtcpConfig) GetIoUringSockstatWorkers() uint32 { + if x != nil { + return x.IoUringSockstatWorkers + } + return 0 +} + func (x *XtcpConfig) GetReconcileFrequency() *durationpb.Duration { if x != nil { return x.ReconcileFrequency @@ -2055,6 +2110,27 @@ func (x *XtcpConfig) GetMaxNetns() uint32 { return 0 } +func (x *XtcpConfig) GetReconcileTimeout() *durationpb.Duration { + if x != nil { + return x.ReconcileTimeout + } + return nil +} + +func (x *XtcpConfig) GetMaxNetnsPerOwner() uint32 { + if x != nil { + return x.MaxNetnsPerOwner + } + return 0 +} + +func (x *XtcpConfig) GetMaxNetnsAddsPerReconcile() uint32 { + if x != nil { + return x.MaxNetnsAddsPerReconcile + } + return 0 +} + func (x *XtcpConfig) GetWriteFiles() uint32 { if x != nil { return x.WriteFiles @@ -2669,7 +2745,7 @@ const file_xtcp_config_v1_xtcp_config_proto_rawDesc = "" + "\x0e_error_classesB\x15\n" + "\x13_metrics_categoriesB\x1a\n" + "\x18_metrics_interface_pathsB\x13\n" + - "\x11_metrics_all_path\"\xb6'\n" + + "\x11_metrics_all_path\"\xd7*\n" + "\n" + "XtcpConfig\x12F\n" + "\x17nl_timeout_milliseconds\x18\n" + @@ -2697,10 +2773,17 @@ const file_xtcp_config_v1_xtcp_config_proto_rawDesc = "" + "\x17io_uring_cqe_batch_size\x18\x18 \x01(\rB\r\xbaH\n" + "\xc8\x01\x00*\x05\x18\x80 (\x01R\x13ioUringCqeBatchSize\x12,\n" + "\x0emax_dump_bytes\x18\x19 \x01(\x04B\x06\xbaH\x03\xc8\x01\x00R\fmaxDumpBytes\x129\n" + - "\x15max_records_per_netns\x18\x1a \x01(\x04B\x06\xbaH\x03\xc8\x01\x00R\x12maxRecordsPerNetns\x12W\n" + + "\x15max_records_per_netns\x18\x1a \x01(\x04B\x06\xbaH\x03\xc8\x01\x00R\x12maxRecordsPerNetns\x127\n" + + "\x14max_records_per_poll\x18\x1b \x01(\x04B\x06\xbaH\x03\xc8\x01\x00R\x11maxRecordsPerPoll\x12K\n" + + "\x1cio_uring_sockstat_batch_size\x18\x1c \x01(\rB\v\xbaH\b\xc8\x01\x00*\x03\x18\x80\bR\x18ioUringSockstatBatchSize\x12E\n" + + "\x19io_uring_sockstat_workers\x18\x1d \x01(\rB\n" + + "\xbaH\a\xc8\x01\x00*\x02\x18@R\x16ioUringSockstatWorkers\x12W\n" + "\x13reconcile_frequency\x18( \x01(\v2\x19.google.protobuf.DurationB\v\xbaH\b\xc8\x01\x00\xaa\x01\x022\x00R\x12reconcileFrequency\x122\n" + "\x15reconcile_before_poll\x18) \x01(\bR\x13reconcileBeforePoll\x12#\n" + - "\tmax_netns\x18* \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\bmaxNetns\x12.\n" + + "\tmax_netns\x18* \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\bmaxNetns\x12S\n" + + "\x11reconcile_timeout\x18+ \x01(\v2\x19.google.protobuf.DurationB\v\xbaH\b\xc8\x01\x00\xaa\x01\x022\x00R\x10reconcileTimeout\x125\n" + + "\x13max_netns_per_owner\x18, \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x10maxNetnsPerOwner\x12F\n" + + "\x1cmax_netns_adds_per_reconcile\x18- \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x18maxNetnsAddsPerReconcile\x12.\n" + "\vwrite_files\x182 \x01(\rB\r\xbaH\n" + "\xc8\x01\x00*\x05\x18\xe8\a(\x00R\n" + "writeFiles\x12/\n" + @@ -2890,37 +2973,38 @@ var file_xtcp_config_v1_xtcp_config_proto_depIdxs = []int32{ 24, // 30: xtcp_config.v1.XtcpConfig.poll_timeout:type_name -> google.protobuf.Duration 22, // 31: xtcp_config.v1.XtcpConfig.enabled_deserializers:type_name -> xtcp_config.v1.EnabledDeserializers 24, // 32: xtcp_config.v1.XtcpConfig.reconcile_frequency:type_name -> google.protobuf.Duration - 24, // 33: xtcp_config.v1.XtcpConfig.kafka_produce_timeout:type_name -> google.protobuf.Duration - 24, // 34: xtcp_config.v1.XtcpConfig.s3_flush_interval:type_name -> google.protobuf.Duration - 24, // 35: xtcp_config.v1.XtcpConfig.s3_upload_backoff_cap:type_name -> google.protobuf.Duration - 18, // 36: xtcp_config.v1.XtcpConfig.listener_auth:type_name -> xtcp_config.v1.ListenerAuth - 17, // 37: xtcp_config.v1.XtcpConfig.prometheus_listener:type_name -> xtcp_config.v1.ListenerEndpoint - 18, // 38: xtcp_config.v1.XtcpConfig.admin_listener_auth:type_name -> xtcp_config.v1.ListenerAuth - 17, // 39: xtcp_config.v1.XtcpConfig.grpc_listener:type_name -> xtcp_config.v1.ListenerEndpoint - 19, // 40: xtcp_config.v1.XtcpConfig.listeners:type_name -> xtcp_config.v1.Listener - 24, // 41: xtcp_config.v1.XtcpConfig.asn_refresh_interval:type_name -> google.protobuf.Duration - 24, // 42: xtcp_config.v1.XtcpConfig.locality_refresh_interval:type_name -> google.protobuf.Duration - 20, // 43: xtcp_config.v1.XtcpConfig.link_monitor:type_name -> xtcp_config.v1.LinkMonitorConfig - 23, // 44: xtcp_config.v1.EnabledDeserializers.enabled:type_name -> xtcp_config.v1.EnabledDeserializers.EnabledEntry - 3, // 45: xtcp_config.v1.ConfigService.Get:input_type -> xtcp_config.v1.GetRequest - 5, // 46: xtcp_config.v1.ConfigService.Set:input_type -> xtcp_config.v1.SetRequest - 7, // 47: xtcp_config.v1.ConfigService.SetPollFrequency:input_type -> xtcp_config.v1.SetPollFrequencyRequest - 9, // 48: xtcp_config.v1.ConfigService.TriggerPoll:input_type -> xtcp_config.v1.TriggerPollRequest - 11, // 49: xtcp_config.v1.ConfigService.TriggerPollBurst:input_type -> xtcp_config.v1.TriggerPollBurstRequest - 13, // 50: xtcp_config.v1.ConfigService.SetS3Upload:input_type -> xtcp_config.v1.SetS3UploadRequest - 15, // 51: xtcp_config.v1.ConfigService.SetEnvelopeFlush:input_type -> xtcp_config.v1.SetEnvelopeFlushRequest - 4, // 52: xtcp_config.v1.ConfigService.Get:output_type -> xtcp_config.v1.GetResponse - 6, // 53: xtcp_config.v1.ConfigService.Set:output_type -> xtcp_config.v1.SetResponse - 8, // 54: xtcp_config.v1.ConfigService.SetPollFrequency:output_type -> xtcp_config.v1.SetPollFrequencyResponse - 10, // 55: xtcp_config.v1.ConfigService.TriggerPoll:output_type -> xtcp_config.v1.TriggerPollResponse - 12, // 56: xtcp_config.v1.ConfigService.TriggerPollBurst:output_type -> xtcp_config.v1.TriggerPollBurstResponse - 14, // 57: xtcp_config.v1.ConfigService.SetS3Upload:output_type -> xtcp_config.v1.SetS3UploadResponse - 16, // 58: xtcp_config.v1.ConfigService.SetEnvelopeFlush:output_type -> xtcp_config.v1.SetEnvelopeFlushResponse - 52, // [52:59] is the sub-list for method output_type - 45, // [45:52] is the sub-list for method input_type - 45, // [45:45] is the sub-list for extension type_name - 45, // [45:45] is the sub-list for extension extendee - 0, // [0:45] is the sub-list for field type_name + 24, // 33: xtcp_config.v1.XtcpConfig.reconcile_timeout:type_name -> google.protobuf.Duration + 24, // 34: xtcp_config.v1.XtcpConfig.kafka_produce_timeout:type_name -> google.protobuf.Duration + 24, // 35: xtcp_config.v1.XtcpConfig.s3_flush_interval:type_name -> google.protobuf.Duration + 24, // 36: xtcp_config.v1.XtcpConfig.s3_upload_backoff_cap:type_name -> google.protobuf.Duration + 18, // 37: xtcp_config.v1.XtcpConfig.listener_auth:type_name -> xtcp_config.v1.ListenerAuth + 17, // 38: xtcp_config.v1.XtcpConfig.prometheus_listener:type_name -> xtcp_config.v1.ListenerEndpoint + 18, // 39: xtcp_config.v1.XtcpConfig.admin_listener_auth:type_name -> xtcp_config.v1.ListenerAuth + 17, // 40: xtcp_config.v1.XtcpConfig.grpc_listener:type_name -> xtcp_config.v1.ListenerEndpoint + 19, // 41: xtcp_config.v1.XtcpConfig.listeners:type_name -> xtcp_config.v1.Listener + 24, // 42: xtcp_config.v1.XtcpConfig.asn_refresh_interval:type_name -> google.protobuf.Duration + 24, // 43: xtcp_config.v1.XtcpConfig.locality_refresh_interval:type_name -> google.protobuf.Duration + 20, // 44: xtcp_config.v1.XtcpConfig.link_monitor:type_name -> xtcp_config.v1.LinkMonitorConfig + 23, // 45: xtcp_config.v1.EnabledDeserializers.enabled:type_name -> xtcp_config.v1.EnabledDeserializers.EnabledEntry + 3, // 46: xtcp_config.v1.ConfigService.Get:input_type -> xtcp_config.v1.GetRequest + 5, // 47: xtcp_config.v1.ConfigService.Set:input_type -> xtcp_config.v1.SetRequest + 7, // 48: xtcp_config.v1.ConfigService.SetPollFrequency:input_type -> xtcp_config.v1.SetPollFrequencyRequest + 9, // 49: xtcp_config.v1.ConfigService.TriggerPoll:input_type -> xtcp_config.v1.TriggerPollRequest + 11, // 50: xtcp_config.v1.ConfigService.TriggerPollBurst:input_type -> xtcp_config.v1.TriggerPollBurstRequest + 13, // 51: xtcp_config.v1.ConfigService.SetS3Upload:input_type -> xtcp_config.v1.SetS3UploadRequest + 15, // 52: xtcp_config.v1.ConfigService.SetEnvelopeFlush:input_type -> xtcp_config.v1.SetEnvelopeFlushRequest + 4, // 53: xtcp_config.v1.ConfigService.Get:output_type -> xtcp_config.v1.GetResponse + 6, // 54: xtcp_config.v1.ConfigService.Set:output_type -> xtcp_config.v1.SetResponse + 8, // 55: xtcp_config.v1.ConfigService.SetPollFrequency:output_type -> xtcp_config.v1.SetPollFrequencyResponse + 10, // 56: xtcp_config.v1.ConfigService.TriggerPoll:output_type -> xtcp_config.v1.TriggerPollResponse + 12, // 57: xtcp_config.v1.ConfigService.TriggerPollBurst:output_type -> xtcp_config.v1.TriggerPollBurstResponse + 14, // 58: xtcp_config.v1.ConfigService.SetS3Upload:output_type -> xtcp_config.v1.SetS3UploadResponse + 16, // 59: xtcp_config.v1.ConfigService.SetEnvelopeFlush:output_type -> xtcp_config.v1.SetEnvelopeFlushResponse + 53, // [53:60] is the sub-list for method output_type + 46, // [46:53] is the sub-list for method input_type + 46, // [46:46] is the sub-list for extension type_name + 46, // [46:46] is the sub-list for extension extendee + 0, // [0:46] is the sub-list for field type_name } func init() { file_xtcp_config_v1_xtcp_config_proto_init() } diff --git a/gen/go/xtcp_config/xtcp_config_vtproto.pb.go b/gen/go/xtcp_config/xtcp_config_vtproto.pb.go index be60767bb..85510a9a4 100644 --- a/gen/go/xtcp_config/xtcp_config_vtproto.pb.go +++ b/gen/go/xtcp_config/xtcp_config_vtproto.pb.go @@ -1847,6 +1847,32 @@ func (m *XtcpConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i-- dAtA[i] = 0x90 } + if m.MaxNetnsAddsPerReconcile != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MaxNetnsAddsPerReconcile)) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0xe8 + } + if m.MaxNetnsPerOwner != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MaxNetnsPerOwner)) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0xe0 + } + if m.ReconcileTimeout != nil { + size, err := (*durationpb.Duration)(m.ReconcileTimeout).MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x2 + i-- + dAtA[i] = 0xda + } if m.MaxNetns != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MaxNetns)) i-- @@ -1878,6 +1904,27 @@ func (m *XtcpConfig) MarshalToSizedBufferVT(dAtA []byte) (int, error) { i-- dAtA[i] = 0xc2 } + if m.IoUringSockstatWorkers != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.IoUringSockstatWorkers)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xe8 + } + if m.IoUringSockstatBatchSize != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.IoUringSockstatBatchSize)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xe0 + } + if m.MaxRecordsPerPoll != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MaxRecordsPerPoll)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd8 + } if m.MaxRecordsPerNetns != 0 { i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MaxRecordsPerNetns)) i-- @@ -2546,6 +2593,15 @@ func (m *XtcpConfig) SizeVT() (n int) { if m.MaxRecordsPerNetns != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.MaxRecordsPerNetns)) } + if m.MaxRecordsPerPoll != 0 { + n += 2 + protohelpers.SizeOfVarint(uint64(m.MaxRecordsPerPoll)) + } + if m.IoUringSockstatBatchSize != 0 { + n += 2 + protohelpers.SizeOfVarint(uint64(m.IoUringSockstatBatchSize)) + } + if m.IoUringSockstatWorkers != 0 { + n += 2 + protohelpers.SizeOfVarint(uint64(m.IoUringSockstatWorkers)) + } if m.ReconcileFrequency != nil { l = (*durationpb.Duration)(m.ReconcileFrequency).SizeVT() n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) @@ -2556,6 +2612,16 @@ func (m *XtcpConfig) SizeVT() (n int) { if m.MaxNetns != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.MaxNetns)) } + if m.ReconcileTimeout != nil { + l = (*durationpb.Duration)(m.ReconcileTimeout).SizeVT() + n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) + } + if m.MaxNetnsPerOwner != 0 { + n += 2 + protohelpers.SizeOfVarint(uint64(m.MaxNetnsPerOwner)) + } + if m.MaxNetnsAddsPerReconcile != 0 { + n += 2 + protohelpers.SizeOfVarint(uint64(m.MaxNetnsAddsPerReconcile)) + } if m.WriteFiles != 0 { n += 2 + protohelpers.SizeOfVarint(uint64(m.WriteFiles)) } @@ -6107,6 +6173,63 @@ func (m *XtcpConfig) UnmarshalVT(dAtA []byte) error { break } } + case 27: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxRecordsPerPoll", wireType) + } + m.MaxRecordsPerPoll = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxRecordsPerPoll |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 28: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IoUringSockstatBatchSize", wireType) + } + m.IoUringSockstatBatchSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.IoUringSockstatBatchSize |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 29: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IoUringSockstatWorkers", wireType) + } + m.IoUringSockstatWorkers = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.IoUringSockstatWorkers |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } case 40: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ReconcileFrequency", wireType) @@ -6182,6 +6305,80 @@ func (m *XtcpConfig) UnmarshalVT(dAtA []byte) error { break } } + case 43: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReconcileTimeout", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protohelpers.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protohelpers.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ReconcileTimeout == nil { + m.ReconcileTimeout = &durationpb1.Duration{} + } + if err := (*durationpb.Duration)(m.ReconcileTimeout).UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 44: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxNetnsPerOwner", wireType) + } + m.MaxNetnsPerOwner = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxNetnsPerOwner |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 45: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxNetnsAddsPerReconcile", wireType) + } + m.MaxNetnsAddsPerReconcile = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protohelpers.ErrIntOverflow + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxNetnsAddsPerReconcile |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } case 50: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field WriteFiles", wireType) diff --git a/gen/openapi/xtcp_config/v1/xtcp_config.swagger.json b/gen/openapi/xtcp_config/v1/xtcp_config.swagger.json index c489d7f6e..8f2a66a15 100644 --- a/gen/openapi/xtcp_config/v1/xtcp_config.swagger.json +++ b/gen/openapi/xtcp_config/v1/xtcp_config.swagger.json @@ -740,6 +740,21 @@ "format": "uint64", "description": "Cap on the records one namespace contributes per poll. Records past it\nare dropped before attribute decode and enrichment, and the dump is\ncounted in xtcp_dump_dropped_total{reason=\"records\"}. Startup-only.\n0 = unlimited. Daemon default 262144." }, + "maxRecordsPerPoll": { + "type": "string", + "format": "uint64", + "description": "Budget on the records all namespaces contribute per poll. Before each\npoll xtcp2 reads every namespace's TCP socket count (sockstat) and,\nwhen the total is over the budget, splits it max-min fairly: a\nnamespace over its share first stops asking for TIME_WAIT and\nSYN_RECV, then is sampled by port range across polls. Counted in\nxtcp_poll_degraded_total. Startup-only. 0 = off (sockstat is not read).\nDaemon default 1048576." + }, + "ioUringSockstatBatchSize": { + "type": "integer", + "format": "int64", + "description": "Sockstat reads queued per io_uring submit when io_uring=true.\nIgnored otherwise. 0 = daemon default 64; at most 1024." + }, + "ioUringSockstatWorkers": { + "type": "integer", + "format": "int64", + "description": "Cap on io_uring's kernel worker threads for sockstat reads (procfs\nreads are handed to io-wq workers). Ignored unless io_uring=true.\n0 = daemon default 4; at most 64." + }, "reconcileFrequency": { "type": "string", "description": "Period of the background namespace-reconcile ticker (Method B /proc scan\nthat converges the tracked namespace set). With reconcile_before_poll the\nPoller reconciles every cycle and is the real discovery mechanism, so this\nbackground pass is an occasional safety-net expected to find nothing\n(mapReconciler dels/stores stay 0) — the default is deliberately long (6h)\nso operators can confirm from the counters that it is redundant. It still\nmatters when the poller is idle or disabled. 0 disables the background\nticker entirely (the startup reconcile still runs once)." @@ -753,6 +768,20 @@ "format": "int64", "description": "Cap on the network namespaces tracked, xtcp2's own included. Each costs\na netlink socket, a receiver and its decoders. At the cap, tracked\nnamespaces keep their slots until they die; the rest wait, are counted\nin xtcp_netns_dropped_total each reconcile, and get freed slots in the\norder xtcp2 first saw them. Startup-only.\n0 = unlimited. Daemon default 4096." }, + "reconcileTimeout": { + "type": "string", + "description": "Time budget for one reconcile's namespace scan. A scan cut short adds\nwhat it found but deletes nothing (a partial view cannot prove a\nnamespace is gone), and is counted in\nxtcp_reconcile_incomplete_total{reason=\"timeout\"}. Bounds how long a\nnamespace flood can delay a poll. The scan also stops after\n4 x max_netns distinct namespaces (reason=\"scan_cap\").\nStartup-only. 0 = no limit. Daemon default 1s." + }, + "maxNetnsPerOwner": { + "type": "integer", + "format": "int64", + "description": "Cap on the namespaces one owner (the outermost container id in the\nnamespace's cgroup) may have tracked. Bind-mounted namespaces with no\nlive process are exempt. Candidates over it keep their queue place and\nare counted in xtcp_netns_dropped_total{reason=\"owner_quota\"}.\nStartup-only. 0 = no limit. Daemon default 64." + }, + "maxNetnsAddsPerReconcile": { + "type": "integer", + "format": "int64", + "description": "Cap on namespaces added per reconcile, so a burst cannot open\nthousands of sockets (each a setns on a locked thread) at once. The\nrest wait their turn (reason=\"add_rate\"). Startup-only.\n0 = no limit. Daemon default 256." + }, "writeFiles": { "type": "integer", "format": "int64", diff --git a/gen/python/xtcp_config/v1/xtcp_config_pb2.py b/gen/python/xtcp_config/v1/xtcp_config_pb2.py index 4ff889db8..42b79395b 100644 --- a/gen/python/xtcp_config/v1/xtcp_config_pb2.py +++ b/gen/python/xtcp_config/v1/xtcp_config_pb2.py @@ -28,7 +28,7 @@ from buf.validate import validate_pb2 as buf_dot_validate_dot_validate__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n xtcp_config/v1/xtcp_config.proto\x12\x0extcp_config.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1cxtcp_auth/v1/xtcp_auth.proto\x1a\x1b\x62uf/validate/validate.proto\"\x0c\n\nGetRequest\"A\n\x0bGetResponse\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"@\n\nSetRequest\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"A\n\x0bSetResponse\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"\xb4\x02\n\x17SetPollFrequencyRequest\x12S\n\x0epoll_frequency\x18\x14 \x01(\x0b\x32\x19.google.protobuf.DurationB\x11\xbaH\x0e\xaa\x01\x08\"\x04\x08\x80\xf5$2\x00\xc8\x01\x01R\rpollFrequency\x12O\n\x0cpoll_timeout\x18\x1e \x01(\x0b\x32\x19.google.protobuf.DurationB\x11\xbaH\x0e\xaa\x01\x08\"\x04\x08\x80\xf5$2\x00\xc8\x01\x01R\x0bpollTimeout:s\xbaHp\x1an\n\x0fXtcpConfig.poll\x12\x32Poll timeout must be less than poll poll_frequency\x1a\'this.poll_timeout < this.poll_frequency\"N\n\x18SetPollFrequencyResponse\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"\x14\n\x12TriggerPollRequest\"\x15\n\x13TriggerPollResponse\"\x89\x01\n\x17TriggerPollBurstRequest\x12#\n\x05\x63ount\x18\n \x01(\rB\r\xbaH\n*\x05\x18\xe8\x07(\x01\xc8\x01\x01R\x05\x63ount\x12I\n\x08interval\x18\x14 \x01(\x0b\x32\x19.google.protobuf.DurationB\x12\xbaH\x0f\xaa\x01\t\"\x03\x08\x90\x1c\x32\x02\x08\x01\xc8\x01\x01R\x08interval\"g\n\x18TriggerPollBurstResponse\x12\x14\n\x05\x63ount\x18\n \x01(\rR\x05\x63ount\x12\x35\n\x08interval\x18\x14 \x01(\x0b\x32\x19.google.protobuf.DurationR\x08interval\"\xe3\x02\n\x12SetS3UploadRequest\x12R\n\x11s3_flush_interval\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationB\x0b\xbaH\x08\xaa\x01\x02\x32\x00\xc8\x01\x00R\x0fs3FlushInterval\x12N\n s3_parquet_flush_threshold_bytes\x18\x14 \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1cs3ParquetFlushThresholdBytes:\xa8\x01\xbaH\xa4\x01\x1a\xa1\x01\n\x16SetS3Upload.atLeastOne\x12=set s3_flush_interval and/or s3_parquet_flush_threshold_bytes\x1aHhas(this.s3_flush_interval) || this.s3_parquet_flush_threshold_bytes > 0\"I\n\x13SetS3UploadResponse\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"\xf4\x02\n\x17SetEnvelopeFlushRequest\x12K\n\x1e\x65nvelope_flush_threshold_bytes\x18\n \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1b\x65nvelopeFlushThresholdBytes\x12I\n\x1d\x65nvelope_flush_threshold_rows\x18\x14 \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1a\x65nvelopeFlushThresholdRows:\xc0\x01\xbaH\xbc\x01\x1a\xb9\x01\n\x1bSetEnvelopeFlush.atLeastOne\x12Gset envelope_flush_threshold_bytes and/or envelope_flush_threshold_rows\x1aQthis.envelope_flush_threshold_bytes > 0 || this.envelope_flush_threshold_rows > 0\"N\n\x18SetEnvelopeFlushResponse\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"\x8a\x03\n\x10ListenerEndpoint\x12\x43\n\x07network\x18\x01 \x01(\x0e\x32\x1f.xtcp_config.v1.ListenerNetworkB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x07network\x12\"\n\x07\x61\x64\x64ress\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\x18\x80\x04R\x07\x61\x64\x64ress\x12\x32\n\x10unix_socket_mode\x18\x03 \x01(\rB\x08\xbaH\x05*\x03\x18\xff\x03R\x0eunixSocketMode\x12\x37\n\x18unlink_stale_unix_socket\x18\x04 \x01(\x08R\x15unlinkStaleUnixSocket\x12\x32\n\x0fmax_connections\x18\x05 \x01(\rB\t\xbaH\x06*\x04\x18\xa0\x8d\x06R\x0emaxConnections\x12>\n\x16\x61\x63\x63\x65pt_rate_per_second\x18\x06 \x01(\rB\t\xbaH\x06*\x04\x18\xa0\x8d\x06R\x13\x61\x63\x63\x65ptRatePerSecond\x12,\n\x0c\x61\x63\x63\x65pt_burst\x18\x07 \x01(\rB\t\xbaH\x06*\x04\x18\xa0\x8d\x06R\x0b\x61\x63\x63\x65ptBurst\"\x83\x06\n\x0cListenerAuth\x12>\n\x04mode\x18\x01 \x01(\x0e\x32 .xtcp_config.v1.ListenerAuthModeB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x04mode\x12%\n\traw_token\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x08rawToken\x12\x30\n\x0fhmac_shared_key\x18\x03 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\rhmacSharedKey\x12G\n\x19signed_token_skew_minutes\x18\x04 \x01(\rB\x07\xbaH\x04*\x02\x18\x05H\x00R\x16signedTokenSkewMinutes\x88\x01\x01\x12Q\n\x12\x66\x61ilure_jitter_min\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x08\xbaH\x05\xaa\x01\x02\x32\x00R\x10\x66\x61ilureJitterMin\x12Q\n\x12\x66\x61ilure_jitter_max\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x08\xbaH\x05\xaa\x01\x02\x32\x00R\x10\x66\x61ilureJitterMax\x12.\n\x0eraw_token_file\x18\x07 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x0crawTokenFile\x12\x39\n\x14hmac_shared_key_file\x18\x08 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x11hmacSharedKeyFile:\xe1\x01\xbaH\xdd\x01\x1a\xda\x01\n\x1aListenerAuth.failureJitter\x12\x46\x66\x61ilure_jitter_max must be greater than or equal to failure_jitter_min\x1at!has(this.failure_jitter_min) || !has(this.failure_jitter_max) || this.failure_jitter_max >= this.failure_jitter_minB\x1c\n\x1a_signed_token_skew_minutes\"\xbf\x02\n\x08Listener\x12\x30\n\x04name\x18\x01 \x01(\tB\x1c\xbaH\x19r\x17\x10\x01\x18 2\x11^[a-z][a-z0-9-]*$R\x04name\x12\x44\n\x08\x65ndpoint\x18\x02 \x01(\x0b\x32 .xtcp_config.v1.ListenerEndpointB\x06\xbaH\x03\xc8\x01\x01R\x08\x65ndpoint\x12\x30\n\x04\x61uth\x18\x03 \x01(\x0b\x32\x1c.xtcp_config.v1.ListenerAuthR\x04\x61uth\x12;\n\nadmin_auth\x18\x04 \x01(\x0b\x32\x1c.xtcp_config.v1.ListenerAuthR\tadminAuth\x12L\n\x06serves\x18\x05 \x03(\x0e\x32\x1d.xtcp_config.v1.EndpointClassB\x15\xbaH\x12\x92\x01\x0f\x08\x01\x10\x07\x18\x01\"\x07\x82\x01\x04\x10\x01 \x00R\x06serves\"\x9a\x0e\n\x11LinkMonitorConfig\x12\x16\n\x06\x65nable\x18\x01 \x01(\x08R\x06\x65nable\x12-\n\rbaseline_file\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x0c\x62\x61selineFile\x12\x41\n\x06settle\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05\x32\x00R\x06settle\x12\x41\n\x06resync\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xf5$*\x00R\x06resync\x12P\n\x0estats_interval\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05*\x00R\rstatsInterval\x12-\n\rstats_include\x18\x06 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x0cstatsInclude\x12-\n\rstats_exclude\x18\x07 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x0cstatsExclude\x12/\n\x0enetstat_fields\x18\x08 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\rnetstatFields\x12\x44\n\x14max_speed_exceptions\x18\t \x03(\tB\x12\xbaH\x0f\x92\x01\x0c\x10\x80\x02\"\x07r\x05\x10\x01\x18\x80\x01R\x12maxSpeedExceptions\x12:\n\x14metrics_core_include\x18\n \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x12metricsCoreInclude\x12:\n\x14metrics_core_exclude\x18\x0b \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x12metricsCoreExclude\x12\x1f\n\x0bmetrics_all\x18\x0c \x01(\x08R\nmetricsAll\x12\x41\n\x0f\x63ollection_mode\x18\r \x01(\tB\x18\xbaH\x15r\x13R\x00R\x04pollR\ton-demandR\x0e\x63ollectionMode\x12P\n\x0ewatch_interval\x18\x0e \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05*\x00R\rwatchInterval\x12N\n\rslow_interval\x18\x0f \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05*\x00R\x0cslowInterval\x12M\n\ron_demand_ttl\x18\x10 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05\x32\x00R\x0bonDemandTtl\x12M\n\x0eon_demand_wait\x18\x11 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0c\xbaH\t\xaa\x01\x06\x1a\x02\x08\n*\x00R\x0conDemandWait\x12L\n\x0c\x65rror_window\x18\x12 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xf5$2\x00R\x0b\x65rrorWindow\x12J\n\x0b\x66lap_window\x18\x13 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xf5$2\x00R\nflapWindow\x12\\\n\rerror_classes\x18\x14 \x01(\tB2\xbaH/r-\x18@2)^((link|rdma|drop)(,(link|rdma|drop))*)?$H\x00R\x0c\x65rrorClasses\x88\x01\x01\x12-\n\rerror_exclude\x18\x15 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x0c\x65rrorExclude\x12<\n\x12metrics_categories\x18\x16 \x01(\tB\x08\xbaH\x05r\x03\x18\x80\x02H\x01R\x11metricsCategories\x88\x01\x01\x12;\n\x17metrics_interface_paths\x18\x17 \x01(\x08H\x02R\x15metricsInterfacePaths\x88\x01\x01\x12\x37\n\x10metrics_all_path\x18\x18 \x01(\tB\x08\xbaH\x05r\x03\x18\x80\x02H\x03R\x0emetricsAllPath\x88\x01\x01\x12\x19\n\x08ip_paths\x18\x19 \x01(\x08R\x07ipPaths\x12-\n\x0cip_max_bytes\x18\x1a \x01(\rB\x0b\xbaH\x08*\x06\x18\x80\x80\x80\x80\x04R\nipMaxBytes\x12$\n\tip_listen\x18\x1b \x01(\tB\x07\xbaH\x04r\x02\x18@R\x08ipListen\x12P\n\x0elearn_deadline\x18\x1c \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05\x32\x00R\rlearnDeadlineB\x10\n\x0e_error_classesB\x15\n\x13_metrics_categoriesB\x1a\n\x18_metrics_interface_pathsB\x13\n\x11_metrics_all_path\"\xb6\'\n\nXtcpConfig\x12\x46\n\x17nl_timeout_milliseconds\x18\n \x01(\x04\x42\x0e\xbaH\x0b\x32\x06\x18\xa0\x8d\x06(\x00\xc8\x01\x01R\x15nlTimeoutMilliseconds\x12S\n\x0epoll_frequency\x18\x0b \x01(\x0b\x32\x19.google.protobuf.DurationB\x11\xbaH\x0e\xaa\x01\x08\"\x04\x08\x80\xf5$*\x00\xc8\x01\x01R\rpollFrequency\x12O\n\x0cpoll_timeout\x18\x0c \x01(\x0b\x32\x19.google.protobuf.DurationB\x11\xbaH\x0e\xaa\x01\x08\"\x04\x08\x80\xf5$*\x00\xc8\x01\x01R\x0bpollTimeout\x12\x32\n\x0fpoll_jitter_pct\x18\r \x01(\rB\n\xbaH\x07*\x02\x18\x64\xc8\x01\x00R\rpollJitterPct\x12+\n\tmax_loops\x18\x0e \x01(\x04\x42\x0e\xbaH\x0b\x32\x06\x18\xa0\x8d\x06(\x00\xc8\x01\x00R\x08maxLoops\x12,\n\nnetlinkers\x18\x0f \x01(\rB\x0c\xbaH\t*\x04\x18\x64(\x01\xc8\x01\x01R\nnetlinkers\x12H\n\x19netlinkers_done_chan_size\x18\x10 \x01(\rB\r\xbaH\n*\x05\x18\xe8\x07(\x01\xc8\x01\x01R\x16netlinkersDoneChanSize\x12*\n\tnlmsg_seq\x18\x11 \x01(\rB\r\xbaH\n*\x05\x18\x90N(\x00\xc8\x01\x01R\x08nlmsgSeq\x12/\n\x0bpacket_size\x18\x12 \x01(\x04\x42\x0e\xbaH\x0b\x32\x06\x18\xc0\x84=(\x00\xc8\x01\x00R\npacketSize\x12\x36\n\x10packet_size_mply\x18\x13 \x01(\rB\x0c\xbaH\t*\x04\x18\x64(\x00\xc8\x01\x00R\x0epacketSizeMply\x12(\n\x07modulus\x18\x14 \x01(\x04\x42\x0e\xbaH\x0b\x32\x06\x18\xc0\x84=(\x01\xc8\x01\x01R\x07modulus\x12\x61\n\x15\x65nabled_deserializers\x18\x15 \x01(\x0b\x32$.xtcp_config.v1.EnabledDeserializersB\x06\xbaH\x03\xc8\x01\x00R\x14\x65nabledDeserializers\x12!\n\x08io_uring\x18\x16 \x01(\x08\x42\x06\xbaH\x03\xc8\x01\x00R\x07ioUring\x12\x45\n\x18io_uring_recv_batch_size\x18\x17 \x01(\rB\r\xbaH\n*\x05\x18\x80 (\x01\xc8\x01\x00R\x14ioUringRecvBatchSize\x12\x43\n\x17io_uring_cqe_batch_size\x18\x18 \x01(\rB\r\xbaH\n*\x05\x18\x80 (\x01\xc8\x01\x00R\x13ioUringCqeBatchSize\x12,\n\x0emax_dump_bytes\x18\x19 \x01(\x04\x42\x06\xbaH\x03\xc8\x01\x00R\x0cmaxDumpBytes\x12\x39\n\x15max_records_per_netns\x18\x1a \x01(\x04\x42\x06\xbaH\x03\xc8\x01\x00R\x12maxRecordsPerNetns\x12W\n\x13reconcile_frequency\x18( \x01(\x0b\x32\x19.google.protobuf.DurationB\x0b\xbaH\x08\xaa\x01\x02\x32\x00\xc8\x01\x00R\x12reconcileFrequency\x12\x32\n\x15reconcile_before_poll\x18) \x01(\x08R\x13reconcileBeforePoll\x12#\n\tmax_netns\x18* \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x08maxNetns\x12.\n\x0bwrite_files\x18\x32 \x01(\rB\r\xbaH\n*\x05\x18\xe8\x07(\x00\xc8\x01\x00R\nwriteFiles\x12/\n\x0c\x63\x61pture_path\x18\x33 \x01(\tB\x0c\xbaH\tr\x04\x10\x01\x18P\xc8\x01\x00R\x0b\x63\x61pturePath\x12\x37\n\x10\x64\x65st_write_files\x18\x34 \x01(\rB\r\xbaH\n*\x05\x18\xe8\x07(\x00\xc8\x01\x00R\x0e\x64\x65stWriteFiles\x12.\n\x0b\x64\x65\x62ug_level\x18\x35 \x01(\rB\r\xbaH\n*\x05\x18\xe8\x07(\x00\xc8\x01\x01R\ndebugLevel\x12\x31\n\x10\x64\x65\x62ug_prometheus\x18\x36 \x01(\x08\x42\x06\xbaH\x03\xc8\x01\x00R\x0f\x64\x65\x62ugPrometheus\x12!\n\x04\x64\x65st\x18< \x01(\tB\r\xbaH\nr\x05\x10\x04\x18\x80\x04\xc8\x01\x01R\x04\x64\x65st\x12+\n\nmarshal_to\x18= \x01(\tB\x0c\xbaH\tr\x04\x10\x03\x18(\xc8\x01\x01R\tmarshalTo\x12\'\n\x0b\x63sv_columns\x18> \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\ncsvColumns\x12\x34\n\x0fxtcp_proto_file\x18? \x01(\tB\x0c\xbaH\tr\x04\x10\x01\x18P\xc8\x01\x00R\rxtcpProtoFile\x12K\n\x1e\x65nvelope_flush_threshold_bytes\x18@ \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1b\x65nvelopeFlushThresholdBytes\x12I\n\x1d\x65nvelope_flush_threshold_rows\x18\x41 \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1a\x65nvelopeFlushThresholdRows\x12\"\n\x05topic\x18P \x01(\tB\x0c\xbaH\tr\x04\x10\x01\x18(\xc8\x01\x00R\x05topic\x12\x36\n\x10kafka_schema_url\x18Q \x01(\tB\x0c\xbaH\tr\x04\x10\x01\x18<\xc8\x01\x00R\x0ekafkaSchemaUrl\x12_\n\x15kafka_produce_timeout\x18R \x01(\x0b\x32\x19.google.protobuf.DurationB\x10\xbaH\r\xaa\x01\x07\"\x03\x08\xd8\x04\x32\x00\xc8\x01\x00R\x13kafkaProduceTimeout\x12\x33\n\x11kafka_compression\x18S \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x10kafkaCompression\x12\'\n\x0bs3_endpoint\x18\x64 \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\ns3Endpoint\x12#\n\ts3_region\x18\x65 \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x08s3Region\x12#\n\ts3_bucket\x18\x66 \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x08s3Bucket\x12#\n\ts3_prefix\x18g \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x08s3Prefix\x12*\n\rs3_access_key\x18h \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x0bs3AccessKey\x12*\n\rs3_secret_key\x18i \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x0bs3SecretKey\x12\x37\n\x14s3_skip_bucket_probe\x18j \x01(\x08\x42\x06\xbaH\x03\xc8\x01\x00R\x11s3SkipBucketProbe\x12\x32\n\x11s3_allow_insecure\x18k \x01(\x08\x42\x06\xbaH\x03\xc8\x01\x00R\x0fs3AllowInsecure\x12)\n\ns3_ca_file\x18l \x01(\tB\x0b\xbaH\x08r\x03\x18\x80 \xc8\x01\x00R\x08s3CaFile\x12N\n s3_parquet_flush_threshold_bytes\x18n \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1cs3ParquetFlushThresholdBytes\x12R\n\x11s3_flush_interval\x18o \x01(\x0b\x32\x19.google.protobuf.DurationB\x0b\xbaH\x08\xaa\x01\x02\x32\x00\xc8\x01\x00R\x0fs3FlushInterval\x12\x39\n\x13s3_flush_jitter_pct\x18p \x01(\rB\n\xbaH\x07*\x02\x18\x64\xc8\x01\x00R\x10s3FlushJitterPct\x12L\n\x1ds3_flush_threshold_jitter_pct\x18q \x01(\rB\n\xbaH\x07*\x02\x18\x64\xc8\x01\x00R\x19s3FlushThresholdJitterPct\x12\x41\n\x16s3_upload_max_attempts\x18r \x01(\rB\x0c\xbaH\t*\x04\x18\x64(\x01\xc8\x01\x00R\x13s3UploadMaxAttempts\x12Y\n\x15s3_upload_backoff_cap\x18s \x01(\x0b\x32\x19.google.protobuf.DurationB\x0b\xbaH\x08\xaa\x01\x02\x32\x00\xc8\x01\x00R\x12s3UploadBackoffCap\x12(\n\x08hostname\x18\x82\x01 \x01(\tB\x0b\xbaH\x08r\x03\x18\xfd\x01\xc8\x01\x00R\x08hostname\x12(\n\x08location\x18\x83\x01 \x01(\tB\x0b\xbaH\x08r\x03\x18\xfd\x01\xc8\x01\x00R\x08location\x12!\n\x05label\x18\x84\x01 \x01(\tB\n\xbaH\x07r\x02\x18(\xc8\x01\x00R\x05label\x12\x1d\n\x03tag\x18\x85\x01 \x01(\tB\n\xbaH\x07r\x02\x18(\xc8\x01\x00R\x03tag\x12\x33\n\x0e\x64\x61\x65mon_version\x18\x86\x01 \x01(\tB\x0b\xbaH\x08r\x03\x18\xfd\x01\xc8\x01\x00R\rdaemonVersion\x12\'\n\x08ipv4_ttl\x18\x96\x01 \x01(\rB\x0b\xbaH\x08*\x03\x18\xff\x01\xc8\x01\x00R\x07ipv4Ttl\x12\x32\n\x0eipv6_hop_limit\x18\x97\x01 \x01(\rB\x0b\xbaH\x08*\x03\x18\xff\x01\xc8\x01\x00R\x0cipv6HopLimit\x12J\n\rlistener_auth\x18\x98\x01 \x01(\x0b\x32\x1c.xtcp_config.v1.ListenerAuthB\x06\xbaH\x03\xc8\x01\x00R\x0clistenerAuth\x12Z\n\x13prometheus_listener\x18\x99\x01 \x01(\x0b\x32 .xtcp_config.v1.ListenerEndpointB\x06\xbaH\x03\xc8\x01\x00R\x12prometheusListener\x12U\n\x13\x61\x64min_listener_auth\x18\x9a\x01 \x01(\x0b\x32\x1c.xtcp_config.v1.ListenerAuthB\x06\xbaH\x03\xc8\x01\x00R\x11\x61\x64minListenerAuth\x12\'\n\tgrpc_port\x18\xa0\x01 \x01(\rB\t\xbaH\x06*\x04\x18\xff\xff\x03R\x08grpcPort\x12N\n\rgrpc_listener\x18\xa1\x01 \x01(\x0b\x32 .xtcp_config.v1.ListenerEndpointB\x06\xbaH\x03\xc8\x01\x00R\x0cgrpcListener\x12\x41\n\tlisteners\x18\xa2\x01 \x03(\x0b\x32\x18.xtcp_config.v1.ListenerB\x08\xbaH\x05\x92\x01\x02\x10\x10R\tlisteners\x12,\n\rpyroscope_url\x18\xaa\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x0cpyroscopeUrl\x12\x35\n\x12pyroscope_app_name\x18\xab\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x10pyroscopeAppName\x12\x37\n\x13pyroscope_sample_hz\x18\xac\x01 \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x11pyroscopeSampleHz\x12J\n\x1dpyroscope_upload_interval_sec\x18\xad\x01 \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1apyroscopeUploadIntervalSec\x12\x39\n\x14resolve_container_id\x18\xc8\x01 \x01(\x08\x42\x06\xbaH\x03\xc8\x01\x00R\x12resolveContainerId\x12\x37\n\x17\x65nrich_container_enable\x18\xc9\x01 \x01(\x08R\x15\x65nrichContainerEnable\x12\x37\n\x12\x64ocker_socket_path\x18\xca\x01 \x01(\tB\x08\xbaH\x05r\x03\x18\xff\x01R\x10\x64ockerSocketPath\x12-\n\x12\x65nrich_lldp_enable\x18\xd2\x01 \x01(\x08R\x10\x65nrichLldpEnable\x12\x35\n\x11lldpd_socket_path\x18\xd3\x01 \x01(\tB\x08\xbaH\x05r\x03\x18\xff\x01R\x0flldpdSocketPath\x12\x36\n\x12lldpd_version_hint\x18\xd4\x01 \x01(\tB\x07\xbaH\x04r\x02\x18\x10R\x10lldpdVersionHint\x12+\n\x11\x65nrich_nic_enable\x18\xdc\x01 \x01(\x08R\x0f\x65nrichNicEnable\x12+\n\x0cuplink_count\x18\xdd\x01 \x01(\rB\x07\xbaH\x04*\x02\x18\x02R\x0buplinkCount\x12\x36\n\x11uplink_interfaces\x18\xde\x01 \x03(\tB\x08\xbaH\x05\x92\x01\x02\x10\x02R\x10uplinkInterfaces\x12$\n\rpopulate_nsid\x18\xe6\x01 \x01(\x08R\x0cpopulateNsid\x12+\n\x11\x65nrich_asn_enable\x18\xf0\x01 \x01(\x08R\x0f\x65nrichAsnEnable\x12)\n\x0b\x61sn_db_path\x18\xf1\x01 \x01(\tB\x08\xbaH\x05r\x03\x18\xff\x01R\tasnDbPath\x12L\n\x14\x61sn_refresh_interval\x18\xf2\x01 \x01(\x0b\x32\x19.google.protobuf.DurationR\x12\x61snRefreshInterval\x12=\n\x15ipmeta_bootstrap_path\x18\xf3\x01 \x01(\tB\x08\xbaH\x05r\x03\x18\xff\x01R\x13ipmetaBootstrapPath\x12\x35\n\x11ipmeta_cache_path\x18\xf4\x01 \x01(\tB\x08\xbaH\x05r\x03\x18\xff\x01R\x0fipmetaCachePath\x12\x35\n\x16\x65nrich_locality_enable\x18\xf5\x01 \x01(\x08R\x14\x65nrichLocalityEnable\x12V\n\x19locality_refresh_interval\x18\xf6\x01 \x01(\x0b\x32\x19.google.protobuf.DurationR\x17localityRefreshInterval\x12\x35\n\x16locality_events_enable\x18\xf7\x01 \x01(\x08R\x14localityEventsEnable\x12\x45\n\x0clink_monitor\x18\xfa\x01 \x01(\x0b\x32!.xtcp_config.v1.LinkMonitorConfigR\x0blinkMonitor:s\xbaHp\x1an\n\x0fXtcpConfig.poll\x12\x32Poll timeout must be less than poll poll_frequency\x1a\'this.poll_frequency > this.poll_timeout\"\x9f\x01\n\x14\x45nabledDeserializers\x12K\n\x07\x65nabled\x18\x01 \x03(\x0b\x32\x31.xtcp_config.v1.EnabledDeserializers.EnabledEntryR\x07\x65nabled\x1a:\n\x0c\x45nabledEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x08R\x05value:\x02\x38\x01*h\n\x0fListenerNetwork\x12 \n\x1cLISTENER_NETWORK_UNSPECIFIED\x10\x00\x12\x18\n\x14LISTENER_NETWORK_TCP\x10\x01\x12\x19\n\x15LISTENER_NETWORK_UNIX\x10\x02*\xa1\x01\n\x10ListenerAuthMode\x12\"\n\x1eLISTENER_AUTH_MODE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bLISTENER_AUTH_MODE_DISABLED\x10\x01\x12 \n\x1cLISTENER_AUTH_MODE_RAW_TOKEN\x10\x02\x12&\n\"LISTENER_AUTH_MODE_HMAC_UTC_MINUTE\x10\x03*\xf7\x01\n\rEndpointClass\x12\x1e\n\x1a\x45NDPOINT_CLASS_UNSPECIFIED\x10\x00\x12\x19\n\x15\x45NDPOINT_CLASS_HEALTH\x10\x01\x12\x1a\n\x16\x45NDPOINT_CLASS_METRICS\x10\x02\x12!\n\x1d\x45NDPOINT_CLASS_METRICS_DETAIL\x10\x03\x12\x15\n\x11\x45NDPOINT_CLASS_IP\x10\x04\x12\x18\n\x14\x45NDPOINT_CLASS_DEBUG\x10\x05\x12\x1c\n\x18\x45NDPOINT_CLASS_GRPC_READ\x10\x06\x12\x1d\n\x19\x45NDPOINT_CLASS_GRPC_ADMIN\x10\x07\x32\xa5\x07\n\rConfigService\x12\x61\n\x03Get\x12\x1a.xtcp_config.v1.GetRequest\x1a\x1b.xtcp_config.v1.GetResponse\"!\xc8\xf3\x18\x01\x82\xd3\xe4\x93\x02\x17\x1a\x12/ConfigService/Get:\x01*\x12\x61\n\x03Set\x12\x1a.xtcp_config.v1.SetRequest\x1a\x1b.xtcp_config.v1.SetResponse\"!\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02\x17\x1a\x12/ConfigService/Set:\x01*\x12\x95\x01\n\x10SetPollFrequency\x12\'.xtcp_config.v1.SetPollFrequencyRequest\x1a(.xtcp_config.v1.SetPollFrequencyResponse\".\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02$\x1a\x1f/ConfigService/SetPollFrequency:\x01*\x12\x81\x01\n\x0bTriggerPoll\x12\".xtcp_config.v1.TriggerPollRequest\x1a#.xtcp_config.v1.TriggerPollResponse\")\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02\x1f\x1a\x1a/ConfigService/TriggerPoll:\x01*\x12\x95\x01\n\x10TriggerPollBurst\x12\'.xtcp_config.v1.TriggerPollBurstRequest\x1a(.xtcp_config.v1.TriggerPollBurstResponse\".\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02$\x1a\x1f/ConfigService/TriggerPollBurst:\x01*\x12\x81\x01\n\x0bSetS3Upload\x12\".xtcp_config.v1.SetS3UploadRequest\x1a#.xtcp_config.v1.SetS3UploadResponse\")\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02\x1f\x1a\x1a/ConfigService/SetS3Upload:\x01*\x12\x95\x01\n\x10SetEnvelopeFlush\x12\'.xtcp_config.v1.SetEnvelopeFlushRequest\x1a(.xtcp_config.v1.SetEnvelopeFlushResponse\".\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02$\x1a\x1f/ConfigService/SetEnvelopeFlush:\x01*B\xaf\x01\n\x12\x63om.xtcp_config.v1B\x0fXtcpConfigProtoP\x01Z3github.com/randomizedcoder/xtcp2/gen/go/xtcp_config\xa2\x02\x03XXX\xaa\x02\rXtcpConfig.V1\xca\x02\rXtcpConfig\\V1\xe2\x02\x19XtcpConfig\\V1\\GPBMetadata\xea\x02\x0eXtcpConfig::V1b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n xtcp_config/v1/xtcp_config.proto\x12\x0extcp_config.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1cxtcp_auth/v1/xtcp_auth.proto\x1a\x1b\x62uf/validate/validate.proto\"\x0c\n\nGetRequest\"A\n\x0bGetResponse\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"@\n\nSetRequest\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"A\n\x0bSetResponse\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"\xb4\x02\n\x17SetPollFrequencyRequest\x12S\n\x0epoll_frequency\x18\x14 \x01(\x0b\x32\x19.google.protobuf.DurationB\x11\xbaH\x0e\xaa\x01\x08\"\x04\x08\x80\xf5$2\x00\xc8\x01\x01R\rpollFrequency\x12O\n\x0cpoll_timeout\x18\x1e \x01(\x0b\x32\x19.google.protobuf.DurationB\x11\xbaH\x0e\xaa\x01\x08\"\x04\x08\x80\xf5$2\x00\xc8\x01\x01R\x0bpollTimeout:s\xbaHp\x1an\n\x0fXtcpConfig.poll\x12\x32Poll timeout must be less than poll poll_frequency\x1a\'this.poll_timeout < this.poll_frequency\"N\n\x18SetPollFrequencyResponse\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"\x14\n\x12TriggerPollRequest\"\x15\n\x13TriggerPollResponse\"\x89\x01\n\x17TriggerPollBurstRequest\x12#\n\x05\x63ount\x18\n \x01(\rB\r\xbaH\n*\x05\x18\xe8\x07(\x01\xc8\x01\x01R\x05\x63ount\x12I\n\x08interval\x18\x14 \x01(\x0b\x32\x19.google.protobuf.DurationB\x12\xbaH\x0f\xaa\x01\t\"\x03\x08\x90\x1c\x32\x02\x08\x01\xc8\x01\x01R\x08interval\"g\n\x18TriggerPollBurstResponse\x12\x14\n\x05\x63ount\x18\n \x01(\rR\x05\x63ount\x12\x35\n\x08interval\x18\x14 \x01(\x0b\x32\x19.google.protobuf.DurationR\x08interval\"\xe3\x02\n\x12SetS3UploadRequest\x12R\n\x11s3_flush_interval\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationB\x0b\xbaH\x08\xaa\x01\x02\x32\x00\xc8\x01\x00R\x0fs3FlushInterval\x12N\n s3_parquet_flush_threshold_bytes\x18\x14 \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1cs3ParquetFlushThresholdBytes:\xa8\x01\xbaH\xa4\x01\x1a\xa1\x01\n\x16SetS3Upload.atLeastOne\x12=set s3_flush_interval and/or s3_parquet_flush_threshold_bytes\x1aHhas(this.s3_flush_interval) || this.s3_parquet_flush_threshold_bytes > 0\"I\n\x13SetS3UploadResponse\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"\xf4\x02\n\x17SetEnvelopeFlushRequest\x12K\n\x1e\x65nvelope_flush_threshold_bytes\x18\n \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1b\x65nvelopeFlushThresholdBytes\x12I\n\x1d\x65nvelope_flush_threshold_rows\x18\x14 \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1a\x65nvelopeFlushThresholdRows:\xc0\x01\xbaH\xbc\x01\x1a\xb9\x01\n\x1bSetEnvelopeFlush.atLeastOne\x12Gset envelope_flush_threshold_bytes and/or envelope_flush_threshold_rows\x1aQthis.envelope_flush_threshold_bytes > 0 || this.envelope_flush_threshold_rows > 0\"N\n\x18SetEnvelopeFlushResponse\x12\x32\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x1a.xtcp_config.v1.XtcpConfigR\x06\x63onfig\"\x8a\x03\n\x10ListenerEndpoint\x12\x43\n\x07network\x18\x01 \x01(\x0e\x32\x1f.xtcp_config.v1.ListenerNetworkB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x07network\x12\"\n\x07\x61\x64\x64ress\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\x18\x80\x04R\x07\x61\x64\x64ress\x12\x32\n\x10unix_socket_mode\x18\x03 \x01(\rB\x08\xbaH\x05*\x03\x18\xff\x03R\x0eunixSocketMode\x12\x37\n\x18unlink_stale_unix_socket\x18\x04 \x01(\x08R\x15unlinkStaleUnixSocket\x12\x32\n\x0fmax_connections\x18\x05 \x01(\rB\t\xbaH\x06*\x04\x18\xa0\x8d\x06R\x0emaxConnections\x12>\n\x16\x61\x63\x63\x65pt_rate_per_second\x18\x06 \x01(\rB\t\xbaH\x06*\x04\x18\xa0\x8d\x06R\x13\x61\x63\x63\x65ptRatePerSecond\x12,\n\x0c\x61\x63\x63\x65pt_burst\x18\x07 \x01(\rB\t\xbaH\x06*\x04\x18\xa0\x8d\x06R\x0b\x61\x63\x63\x65ptBurst\"\x83\x06\n\x0cListenerAuth\x12>\n\x04mode\x18\x01 \x01(\x0e\x32 .xtcp_config.v1.ListenerAuthModeB\x08\xbaH\x05\x82\x01\x02\x10\x01R\x04mode\x12%\n\traw_token\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x08rawToken\x12\x30\n\x0fhmac_shared_key\x18\x03 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\rhmacSharedKey\x12G\n\x19signed_token_skew_minutes\x18\x04 \x01(\rB\x07\xbaH\x04*\x02\x18\x05H\x00R\x16signedTokenSkewMinutes\x88\x01\x01\x12Q\n\x12\x66\x61ilure_jitter_min\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x08\xbaH\x05\xaa\x01\x02\x32\x00R\x10\x66\x61ilureJitterMin\x12Q\n\x12\x66\x61ilure_jitter_max\x18\x06 \x01(\x0b\x32\x19.google.protobuf.DurationB\x08\xbaH\x05\xaa\x01\x02\x32\x00R\x10\x66\x61ilureJitterMax\x12.\n\x0eraw_token_file\x18\x07 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x0crawTokenFile\x12\x39\n\x14hmac_shared_key_file\x18\x08 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x11hmacSharedKeyFile:\xe1\x01\xbaH\xdd\x01\x1a\xda\x01\n\x1aListenerAuth.failureJitter\x12\x46\x66\x61ilure_jitter_max must be greater than or equal to failure_jitter_min\x1at!has(this.failure_jitter_min) || !has(this.failure_jitter_max) || this.failure_jitter_max >= this.failure_jitter_minB\x1c\n\x1a_signed_token_skew_minutes\"\xbf\x02\n\x08Listener\x12\x30\n\x04name\x18\x01 \x01(\tB\x1c\xbaH\x19r\x17\x10\x01\x18 2\x11^[a-z][a-z0-9-]*$R\x04name\x12\x44\n\x08\x65ndpoint\x18\x02 \x01(\x0b\x32 .xtcp_config.v1.ListenerEndpointB\x06\xbaH\x03\xc8\x01\x01R\x08\x65ndpoint\x12\x30\n\x04\x61uth\x18\x03 \x01(\x0b\x32\x1c.xtcp_config.v1.ListenerAuthR\x04\x61uth\x12;\n\nadmin_auth\x18\x04 \x01(\x0b\x32\x1c.xtcp_config.v1.ListenerAuthR\tadminAuth\x12L\n\x06serves\x18\x05 \x03(\x0e\x32\x1d.xtcp_config.v1.EndpointClassB\x15\xbaH\x12\x92\x01\x0f\x08\x01\x10\x07\x18\x01\"\x07\x82\x01\x04\x10\x01 \x00R\x06serves\"\x9a\x0e\n\x11LinkMonitorConfig\x12\x16\n\x06\x65nable\x18\x01 \x01(\x08R\x06\x65nable\x12-\n\rbaseline_file\x18\x02 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x0c\x62\x61selineFile\x12\x41\n\x06settle\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05\x32\x00R\x06settle\x12\x41\n\x06resync\x18\x04 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xf5$*\x00R\x06resync\x12P\n\x0estats_interval\x18\x05 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05*\x00R\rstatsInterval\x12-\n\rstats_include\x18\x06 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x0cstatsInclude\x12-\n\rstats_exclude\x18\x07 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x0cstatsExclude\x12/\n\x0enetstat_fields\x18\x08 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\rnetstatFields\x12\x44\n\x14max_speed_exceptions\x18\t \x03(\tB\x12\xbaH\x0f\x92\x01\x0c\x10\x80\x02\"\x07r\x05\x10\x01\x18\x80\x01R\x12maxSpeedExceptions\x12:\n\x14metrics_core_include\x18\n \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x12metricsCoreInclude\x12:\n\x14metrics_core_exclude\x18\x0b \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x12metricsCoreExclude\x12\x1f\n\x0bmetrics_all\x18\x0c \x01(\x08R\nmetricsAll\x12\x41\n\x0f\x63ollection_mode\x18\r \x01(\tB\x18\xbaH\x15r\x13R\x00R\x04pollR\ton-demandR\x0e\x63ollectionMode\x12P\n\x0ewatch_interval\x18\x0e \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05*\x00R\rwatchInterval\x12N\n\rslow_interval\x18\x0f \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05*\x00R\x0cslowInterval\x12M\n\ron_demand_ttl\x18\x10 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05\x32\x00R\x0bonDemandTtl\x12M\n\x0eon_demand_wait\x18\x11 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0c\xbaH\t\xaa\x01\x06\x1a\x02\x08\n*\x00R\x0conDemandWait\x12L\n\x0c\x65rror_window\x18\x12 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xf5$2\x00R\x0b\x65rrorWindow\x12J\n\x0b\x66lap_window\x18\x13 \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xf5$2\x00R\nflapWindow\x12\\\n\rerror_classes\x18\x14 \x01(\tB2\xbaH/r-\x18@2)^((link|rdma|drop)(,(link|rdma|drop))*)?$H\x00R\x0c\x65rrorClasses\x88\x01\x01\x12-\n\rerror_exclude\x18\x15 \x01(\tB\x08\xbaH\x05r\x03\x18\x80 R\x0c\x65rrorExclude\x12<\n\x12metrics_categories\x18\x16 \x01(\tB\x08\xbaH\x05r\x03\x18\x80\x02H\x01R\x11metricsCategories\x88\x01\x01\x12;\n\x17metrics_interface_paths\x18\x17 \x01(\x08H\x02R\x15metricsInterfacePaths\x88\x01\x01\x12\x37\n\x10metrics_all_path\x18\x18 \x01(\tB\x08\xbaH\x05r\x03\x18\x80\x02H\x03R\x0emetricsAllPath\x88\x01\x01\x12\x19\n\x08ip_paths\x18\x19 \x01(\x08R\x07ipPaths\x12-\n\x0cip_max_bytes\x18\x1a \x01(\rB\x0b\xbaH\x08*\x06\x18\x80\x80\x80\x80\x04R\nipMaxBytes\x12$\n\tip_listen\x18\x1b \x01(\tB\x07\xbaH\x04r\x02\x18@R\x08ipListen\x12P\n\x0elearn_deadline\x18\x1c \x01(\x0b\x32\x19.google.protobuf.DurationB\x0e\xbaH\x0b\xaa\x01\x08\"\x04\x08\x80\xa3\x05\x32\x00R\rlearnDeadlineB\x10\n\x0e_error_classesB\x15\n\x13_metrics_categoriesB\x1a\n\x18_metrics_interface_pathsB\x13\n\x11_metrics_all_path\"\xd7*\n\nXtcpConfig\x12\x46\n\x17nl_timeout_milliseconds\x18\n \x01(\x04\x42\x0e\xbaH\x0b\x32\x06\x18\xa0\x8d\x06(\x00\xc8\x01\x01R\x15nlTimeoutMilliseconds\x12S\n\x0epoll_frequency\x18\x0b \x01(\x0b\x32\x19.google.protobuf.DurationB\x11\xbaH\x0e\xaa\x01\x08\"\x04\x08\x80\xf5$*\x00\xc8\x01\x01R\rpollFrequency\x12O\n\x0cpoll_timeout\x18\x0c \x01(\x0b\x32\x19.google.protobuf.DurationB\x11\xbaH\x0e\xaa\x01\x08\"\x04\x08\x80\xf5$*\x00\xc8\x01\x01R\x0bpollTimeout\x12\x32\n\x0fpoll_jitter_pct\x18\r \x01(\rB\n\xbaH\x07*\x02\x18\x64\xc8\x01\x00R\rpollJitterPct\x12+\n\tmax_loops\x18\x0e \x01(\x04\x42\x0e\xbaH\x0b\x32\x06\x18\xa0\x8d\x06(\x00\xc8\x01\x00R\x08maxLoops\x12,\n\nnetlinkers\x18\x0f \x01(\rB\x0c\xbaH\t*\x04\x18\x64(\x01\xc8\x01\x01R\nnetlinkers\x12H\n\x19netlinkers_done_chan_size\x18\x10 \x01(\rB\r\xbaH\n*\x05\x18\xe8\x07(\x01\xc8\x01\x01R\x16netlinkersDoneChanSize\x12*\n\tnlmsg_seq\x18\x11 \x01(\rB\r\xbaH\n*\x05\x18\x90N(\x00\xc8\x01\x01R\x08nlmsgSeq\x12/\n\x0bpacket_size\x18\x12 \x01(\x04\x42\x0e\xbaH\x0b\x32\x06\x18\xc0\x84=(\x00\xc8\x01\x00R\npacketSize\x12\x36\n\x10packet_size_mply\x18\x13 \x01(\rB\x0c\xbaH\t*\x04\x18\x64(\x00\xc8\x01\x00R\x0epacketSizeMply\x12(\n\x07modulus\x18\x14 \x01(\x04\x42\x0e\xbaH\x0b\x32\x06\x18\xc0\x84=(\x01\xc8\x01\x01R\x07modulus\x12\x61\n\x15\x65nabled_deserializers\x18\x15 \x01(\x0b\x32$.xtcp_config.v1.EnabledDeserializersB\x06\xbaH\x03\xc8\x01\x00R\x14\x65nabledDeserializers\x12!\n\x08io_uring\x18\x16 \x01(\x08\x42\x06\xbaH\x03\xc8\x01\x00R\x07ioUring\x12\x45\n\x18io_uring_recv_batch_size\x18\x17 \x01(\rB\r\xbaH\n*\x05\x18\x80 (\x01\xc8\x01\x00R\x14ioUringRecvBatchSize\x12\x43\n\x17io_uring_cqe_batch_size\x18\x18 \x01(\rB\r\xbaH\n*\x05\x18\x80 (\x01\xc8\x01\x00R\x13ioUringCqeBatchSize\x12,\n\x0emax_dump_bytes\x18\x19 \x01(\x04\x42\x06\xbaH\x03\xc8\x01\x00R\x0cmaxDumpBytes\x12\x39\n\x15max_records_per_netns\x18\x1a \x01(\x04\x42\x06\xbaH\x03\xc8\x01\x00R\x12maxRecordsPerNetns\x12\x37\n\x14max_records_per_poll\x18\x1b \x01(\x04\x42\x06\xbaH\x03\xc8\x01\x00R\x11maxRecordsPerPoll\x12K\n\x1cio_uring_sockstat_batch_size\x18\x1c \x01(\rB\x0b\xbaH\x08*\x03\x18\x80\x08\xc8\x01\x00R\x18ioUringSockstatBatchSize\x12\x45\n\x19io_uring_sockstat_workers\x18\x1d \x01(\rB\n\xbaH\x07*\x02\x18@\xc8\x01\x00R\x16ioUringSockstatWorkers\x12W\n\x13reconcile_frequency\x18( \x01(\x0b\x32\x19.google.protobuf.DurationB\x0b\xbaH\x08\xaa\x01\x02\x32\x00\xc8\x01\x00R\x12reconcileFrequency\x12\x32\n\x15reconcile_before_poll\x18) \x01(\x08R\x13reconcileBeforePoll\x12#\n\tmax_netns\x18* \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x08maxNetns\x12S\n\x11reconcile_timeout\x18+ \x01(\x0b\x32\x19.google.protobuf.DurationB\x0b\xbaH\x08\xaa\x01\x02\x32\x00\xc8\x01\x00R\x10reconcileTimeout\x12\x35\n\x13max_netns_per_owner\x18, \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x10maxNetnsPerOwner\x12\x46\n\x1cmax_netns_adds_per_reconcile\x18- \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x18maxNetnsAddsPerReconcile\x12.\n\x0bwrite_files\x18\x32 \x01(\rB\r\xbaH\n*\x05\x18\xe8\x07(\x00\xc8\x01\x00R\nwriteFiles\x12/\n\x0c\x63\x61pture_path\x18\x33 \x01(\tB\x0c\xbaH\tr\x04\x10\x01\x18P\xc8\x01\x00R\x0b\x63\x61pturePath\x12\x37\n\x10\x64\x65st_write_files\x18\x34 \x01(\rB\r\xbaH\n*\x05\x18\xe8\x07(\x00\xc8\x01\x00R\x0e\x64\x65stWriteFiles\x12.\n\x0b\x64\x65\x62ug_level\x18\x35 \x01(\rB\r\xbaH\n*\x05\x18\xe8\x07(\x00\xc8\x01\x01R\ndebugLevel\x12\x31\n\x10\x64\x65\x62ug_prometheus\x18\x36 \x01(\x08\x42\x06\xbaH\x03\xc8\x01\x00R\x0f\x64\x65\x62ugPrometheus\x12!\n\x04\x64\x65st\x18< \x01(\tB\r\xbaH\nr\x05\x10\x04\x18\x80\x04\xc8\x01\x01R\x04\x64\x65st\x12+\n\nmarshal_to\x18= \x01(\tB\x0c\xbaH\tr\x04\x10\x03\x18(\xc8\x01\x01R\tmarshalTo\x12\'\n\x0b\x63sv_columns\x18> \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\ncsvColumns\x12\x34\n\x0fxtcp_proto_file\x18? \x01(\tB\x0c\xbaH\tr\x04\x10\x01\x18P\xc8\x01\x00R\rxtcpProtoFile\x12K\n\x1e\x65nvelope_flush_threshold_bytes\x18@ \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1b\x65nvelopeFlushThresholdBytes\x12I\n\x1d\x65nvelope_flush_threshold_rows\x18\x41 \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1a\x65nvelopeFlushThresholdRows\x12\"\n\x05topic\x18P \x01(\tB\x0c\xbaH\tr\x04\x10\x01\x18(\xc8\x01\x00R\x05topic\x12\x36\n\x10kafka_schema_url\x18Q \x01(\tB\x0c\xbaH\tr\x04\x10\x01\x18<\xc8\x01\x00R\x0ekafkaSchemaUrl\x12_\n\x15kafka_produce_timeout\x18R \x01(\x0b\x32\x19.google.protobuf.DurationB\x10\xbaH\r\xaa\x01\x07\"\x03\x08\xd8\x04\x32\x00\xc8\x01\x00R\x13kafkaProduceTimeout\x12\x33\n\x11kafka_compression\x18S \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x10kafkaCompression\x12\'\n\x0bs3_endpoint\x18\x64 \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\ns3Endpoint\x12#\n\ts3_region\x18\x65 \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x08s3Region\x12#\n\ts3_bucket\x18\x66 \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x08s3Bucket\x12#\n\ts3_prefix\x18g \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x08s3Prefix\x12*\n\rs3_access_key\x18h \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x0bs3AccessKey\x12*\n\rs3_secret_key\x18i \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x0bs3SecretKey\x12\x37\n\x14s3_skip_bucket_probe\x18j \x01(\x08\x42\x06\xbaH\x03\xc8\x01\x00R\x11s3SkipBucketProbe\x12\x32\n\x11s3_allow_insecure\x18k \x01(\x08\x42\x06\xbaH\x03\xc8\x01\x00R\x0fs3AllowInsecure\x12)\n\ns3_ca_file\x18l \x01(\tB\x0b\xbaH\x08r\x03\x18\x80 \xc8\x01\x00R\x08s3CaFile\x12N\n s3_parquet_flush_threshold_bytes\x18n \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1cs3ParquetFlushThresholdBytes\x12R\n\x11s3_flush_interval\x18o \x01(\x0b\x32\x19.google.protobuf.DurationB\x0b\xbaH\x08\xaa\x01\x02\x32\x00\xc8\x01\x00R\x0fs3FlushInterval\x12\x39\n\x13s3_flush_jitter_pct\x18p \x01(\rB\n\xbaH\x07*\x02\x18\x64\xc8\x01\x00R\x10s3FlushJitterPct\x12L\n\x1ds3_flush_threshold_jitter_pct\x18q \x01(\rB\n\xbaH\x07*\x02\x18\x64\xc8\x01\x00R\x19s3FlushThresholdJitterPct\x12\x41\n\x16s3_upload_max_attempts\x18r \x01(\rB\x0c\xbaH\t*\x04\x18\x64(\x01\xc8\x01\x00R\x13s3UploadMaxAttempts\x12Y\n\x15s3_upload_backoff_cap\x18s \x01(\x0b\x32\x19.google.protobuf.DurationB\x0b\xbaH\x08\xaa\x01\x02\x32\x00\xc8\x01\x00R\x12s3UploadBackoffCap\x12(\n\x08hostname\x18\x82\x01 \x01(\tB\x0b\xbaH\x08r\x03\x18\xfd\x01\xc8\x01\x00R\x08hostname\x12(\n\x08location\x18\x83\x01 \x01(\tB\x0b\xbaH\x08r\x03\x18\xfd\x01\xc8\x01\x00R\x08location\x12!\n\x05label\x18\x84\x01 \x01(\tB\n\xbaH\x07r\x02\x18(\xc8\x01\x00R\x05label\x12\x1d\n\x03tag\x18\x85\x01 \x01(\tB\n\xbaH\x07r\x02\x18(\xc8\x01\x00R\x03tag\x12\x33\n\x0e\x64\x61\x65mon_version\x18\x86\x01 \x01(\tB\x0b\xbaH\x08r\x03\x18\xfd\x01\xc8\x01\x00R\rdaemonVersion\x12\'\n\x08ipv4_ttl\x18\x96\x01 \x01(\rB\x0b\xbaH\x08*\x03\x18\xff\x01\xc8\x01\x00R\x07ipv4Ttl\x12\x32\n\x0eipv6_hop_limit\x18\x97\x01 \x01(\rB\x0b\xbaH\x08*\x03\x18\xff\x01\xc8\x01\x00R\x0cipv6HopLimit\x12J\n\rlistener_auth\x18\x98\x01 \x01(\x0b\x32\x1c.xtcp_config.v1.ListenerAuthB\x06\xbaH\x03\xc8\x01\x00R\x0clistenerAuth\x12Z\n\x13prometheus_listener\x18\x99\x01 \x01(\x0b\x32 .xtcp_config.v1.ListenerEndpointB\x06\xbaH\x03\xc8\x01\x00R\x12prometheusListener\x12U\n\x13\x61\x64min_listener_auth\x18\x9a\x01 \x01(\x0b\x32\x1c.xtcp_config.v1.ListenerAuthB\x06\xbaH\x03\xc8\x01\x00R\x11\x61\x64minListenerAuth\x12\'\n\tgrpc_port\x18\xa0\x01 \x01(\rB\t\xbaH\x06*\x04\x18\xff\xff\x03R\x08grpcPort\x12N\n\rgrpc_listener\x18\xa1\x01 \x01(\x0b\x32 .xtcp_config.v1.ListenerEndpointB\x06\xbaH\x03\xc8\x01\x00R\x0cgrpcListener\x12\x41\n\tlisteners\x18\xa2\x01 \x03(\x0b\x32\x18.xtcp_config.v1.ListenerB\x08\xbaH\x05\x92\x01\x02\x10\x10R\tlisteners\x12,\n\rpyroscope_url\x18\xaa\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x0cpyroscopeUrl\x12\x35\n\x12pyroscope_app_name\x18\xab\x01 \x01(\tB\x06\xbaH\x03\xc8\x01\x00R\x10pyroscopeAppName\x12\x37\n\x13pyroscope_sample_hz\x18\xac\x01 \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x11pyroscopeSampleHz\x12J\n\x1dpyroscope_upload_interval_sec\x18\xad\x01 \x01(\rB\x06\xbaH\x03\xc8\x01\x00R\x1apyroscopeUploadIntervalSec\x12\x39\n\x14resolve_container_id\x18\xc8\x01 \x01(\x08\x42\x06\xbaH\x03\xc8\x01\x00R\x12resolveContainerId\x12\x37\n\x17\x65nrich_container_enable\x18\xc9\x01 \x01(\x08R\x15\x65nrichContainerEnable\x12\x37\n\x12\x64ocker_socket_path\x18\xca\x01 \x01(\tB\x08\xbaH\x05r\x03\x18\xff\x01R\x10\x64ockerSocketPath\x12-\n\x12\x65nrich_lldp_enable\x18\xd2\x01 \x01(\x08R\x10\x65nrichLldpEnable\x12\x35\n\x11lldpd_socket_path\x18\xd3\x01 \x01(\tB\x08\xbaH\x05r\x03\x18\xff\x01R\x0flldpdSocketPath\x12\x36\n\x12lldpd_version_hint\x18\xd4\x01 \x01(\tB\x07\xbaH\x04r\x02\x18\x10R\x10lldpdVersionHint\x12+\n\x11\x65nrich_nic_enable\x18\xdc\x01 \x01(\x08R\x0f\x65nrichNicEnable\x12+\n\x0cuplink_count\x18\xdd\x01 \x01(\rB\x07\xbaH\x04*\x02\x18\x02R\x0buplinkCount\x12\x36\n\x11uplink_interfaces\x18\xde\x01 \x03(\tB\x08\xbaH\x05\x92\x01\x02\x10\x02R\x10uplinkInterfaces\x12$\n\rpopulate_nsid\x18\xe6\x01 \x01(\x08R\x0cpopulateNsid\x12+\n\x11\x65nrich_asn_enable\x18\xf0\x01 \x01(\x08R\x0f\x65nrichAsnEnable\x12)\n\x0b\x61sn_db_path\x18\xf1\x01 \x01(\tB\x08\xbaH\x05r\x03\x18\xff\x01R\tasnDbPath\x12L\n\x14\x61sn_refresh_interval\x18\xf2\x01 \x01(\x0b\x32\x19.google.protobuf.DurationR\x12\x61snRefreshInterval\x12=\n\x15ipmeta_bootstrap_path\x18\xf3\x01 \x01(\tB\x08\xbaH\x05r\x03\x18\xff\x01R\x13ipmetaBootstrapPath\x12\x35\n\x11ipmeta_cache_path\x18\xf4\x01 \x01(\tB\x08\xbaH\x05r\x03\x18\xff\x01R\x0fipmetaCachePath\x12\x35\n\x16\x65nrich_locality_enable\x18\xf5\x01 \x01(\x08R\x14\x65nrichLocalityEnable\x12V\n\x19locality_refresh_interval\x18\xf6\x01 \x01(\x0b\x32\x19.google.protobuf.DurationR\x17localityRefreshInterval\x12\x35\n\x16locality_events_enable\x18\xf7\x01 \x01(\x08R\x14localityEventsEnable\x12\x45\n\x0clink_monitor\x18\xfa\x01 \x01(\x0b\x32!.xtcp_config.v1.LinkMonitorConfigR\x0blinkMonitor:s\xbaHp\x1an\n\x0fXtcpConfig.poll\x12\x32Poll timeout must be less than poll poll_frequency\x1a\'this.poll_frequency > this.poll_timeout\"\x9f\x01\n\x14\x45nabledDeserializers\x12K\n\x07\x65nabled\x18\x01 \x03(\x0b\x32\x31.xtcp_config.v1.EnabledDeserializers.EnabledEntryR\x07\x65nabled\x1a:\n\x0c\x45nabledEntry\x12\x10\n\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n\x05value\x18\x02 \x01(\x08R\x05value:\x02\x38\x01*h\n\x0fListenerNetwork\x12 \n\x1cLISTENER_NETWORK_UNSPECIFIED\x10\x00\x12\x18\n\x14LISTENER_NETWORK_TCP\x10\x01\x12\x19\n\x15LISTENER_NETWORK_UNIX\x10\x02*\xa1\x01\n\x10ListenerAuthMode\x12\"\n\x1eLISTENER_AUTH_MODE_UNSPECIFIED\x10\x00\x12\x1f\n\x1bLISTENER_AUTH_MODE_DISABLED\x10\x01\x12 \n\x1cLISTENER_AUTH_MODE_RAW_TOKEN\x10\x02\x12&\n\"LISTENER_AUTH_MODE_HMAC_UTC_MINUTE\x10\x03*\xf7\x01\n\rEndpointClass\x12\x1e\n\x1a\x45NDPOINT_CLASS_UNSPECIFIED\x10\x00\x12\x19\n\x15\x45NDPOINT_CLASS_HEALTH\x10\x01\x12\x1a\n\x16\x45NDPOINT_CLASS_METRICS\x10\x02\x12!\n\x1d\x45NDPOINT_CLASS_METRICS_DETAIL\x10\x03\x12\x15\n\x11\x45NDPOINT_CLASS_IP\x10\x04\x12\x18\n\x14\x45NDPOINT_CLASS_DEBUG\x10\x05\x12\x1c\n\x18\x45NDPOINT_CLASS_GRPC_READ\x10\x06\x12\x1d\n\x19\x45NDPOINT_CLASS_GRPC_ADMIN\x10\x07\x32\xa5\x07\n\rConfigService\x12\x61\n\x03Get\x12\x1a.xtcp_config.v1.GetRequest\x1a\x1b.xtcp_config.v1.GetResponse\"!\xc8\xf3\x18\x01\x82\xd3\xe4\x93\x02\x17\x1a\x12/ConfigService/Get:\x01*\x12\x61\n\x03Set\x12\x1a.xtcp_config.v1.SetRequest\x1a\x1b.xtcp_config.v1.SetResponse\"!\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02\x17\x1a\x12/ConfigService/Set:\x01*\x12\x95\x01\n\x10SetPollFrequency\x12\'.xtcp_config.v1.SetPollFrequencyRequest\x1a(.xtcp_config.v1.SetPollFrequencyResponse\".\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02$\x1a\x1f/ConfigService/SetPollFrequency:\x01*\x12\x81\x01\n\x0bTriggerPoll\x12\".xtcp_config.v1.TriggerPollRequest\x1a#.xtcp_config.v1.TriggerPollResponse\")\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02\x1f\x1a\x1a/ConfigService/TriggerPoll:\x01*\x12\x95\x01\n\x10TriggerPollBurst\x12\'.xtcp_config.v1.TriggerPollBurstRequest\x1a(.xtcp_config.v1.TriggerPollBurstResponse\".\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02$\x1a\x1f/ConfigService/TriggerPollBurst:\x01*\x12\x81\x01\n\x0bSetS3Upload\x12\".xtcp_config.v1.SetS3UploadRequest\x1a#.xtcp_config.v1.SetS3UploadResponse\")\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02\x1f\x1a\x1a/ConfigService/SetS3Upload:\x01*\x12\x95\x01\n\x10SetEnvelopeFlush\x12\'.xtcp_config.v1.SetEnvelopeFlushRequest\x1a(.xtcp_config.v1.SetEnvelopeFlushResponse\".\xc8\xf3\x18\x02\x82\xd3\xe4\x93\x02$\x1a\x1f/ConfigService/SetEnvelopeFlush:\x01*B\xaf\x01\n\x12\x63om.xtcp_config.v1B\x0fXtcpConfigProtoP\x01Z3github.com/randomizedcoder/xtcp2/gen/go/xtcp_config\xa2\x02\x03XXX\xaa\x02\rXtcpConfig.V1\xca\x02\rXtcpConfig\\V1\xe2\x02\x19XtcpConfig\\V1\\GPBMetadata\xea\x02\x0eXtcpConfig::V1b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -176,10 +176,22 @@ _globals['_XTCPCONFIG'].fields_by_name['max_dump_bytes']._serialized_options = b'\272H\003\310\001\000' _globals['_XTCPCONFIG'].fields_by_name['max_records_per_netns']._loaded_options = None _globals['_XTCPCONFIG'].fields_by_name['max_records_per_netns']._serialized_options = b'\272H\003\310\001\000' + _globals['_XTCPCONFIG'].fields_by_name['max_records_per_poll']._loaded_options = None + _globals['_XTCPCONFIG'].fields_by_name['max_records_per_poll']._serialized_options = b'\272H\003\310\001\000' + _globals['_XTCPCONFIG'].fields_by_name['io_uring_sockstat_batch_size']._loaded_options = None + _globals['_XTCPCONFIG'].fields_by_name['io_uring_sockstat_batch_size']._serialized_options = b'\272H\010*\003\030\200\010\310\001\000' + _globals['_XTCPCONFIG'].fields_by_name['io_uring_sockstat_workers']._loaded_options = None + _globals['_XTCPCONFIG'].fields_by_name['io_uring_sockstat_workers']._serialized_options = b'\272H\007*\002\030@\310\001\000' _globals['_XTCPCONFIG'].fields_by_name['reconcile_frequency']._loaded_options = None _globals['_XTCPCONFIG'].fields_by_name['reconcile_frequency']._serialized_options = b'\272H\010\252\001\0022\000\310\001\000' _globals['_XTCPCONFIG'].fields_by_name['max_netns']._loaded_options = None _globals['_XTCPCONFIG'].fields_by_name['max_netns']._serialized_options = b'\272H\003\310\001\000' + _globals['_XTCPCONFIG'].fields_by_name['reconcile_timeout']._loaded_options = None + _globals['_XTCPCONFIG'].fields_by_name['reconcile_timeout']._serialized_options = b'\272H\010\252\001\0022\000\310\001\000' + _globals['_XTCPCONFIG'].fields_by_name['max_netns_per_owner']._loaded_options = None + _globals['_XTCPCONFIG'].fields_by_name['max_netns_per_owner']._serialized_options = b'\272H\003\310\001\000' + _globals['_XTCPCONFIG'].fields_by_name['max_netns_adds_per_reconcile']._loaded_options = None + _globals['_XTCPCONFIG'].fields_by_name['max_netns_adds_per_reconcile']._serialized_options = b'\272H\003\310\001\000' _globals['_XTCPCONFIG'].fields_by_name['write_files']._loaded_options = None _globals['_XTCPCONFIG'].fields_by_name['write_files']._serialized_options = b'\272H\n*\005\030\350\007(\000\310\001\000' _globals['_XTCPCONFIG'].fields_by_name['capture_path']._loaded_options = None @@ -310,12 +322,12 @@ _globals['_CONFIGSERVICE'].methods_by_name['SetS3Upload']._serialized_options = b'\310\363\030\002\202\323\344\223\002\037\032\032/ConfigService/SetS3Upload:\001*' _globals['_CONFIGSERVICE'].methods_by_name['SetEnvelopeFlush']._loaded_options = None _globals['_CONFIGSERVICE'].methods_by_name['SetEnvelopeFlush']._serialized_options = b'\310\363\030\002\202\323\344\223\002$\032\037/ConfigService/SetEnvelopeFlush:\001*' - _globals['_LISTENERNETWORK']._serialized_start=10481 - _globals['_LISTENERNETWORK']._serialized_end=10585 - _globals['_LISTENERAUTHMODE']._serialized_start=10588 - _globals['_LISTENERAUTHMODE']._serialized_end=10749 - _globals['_ENDPOINTCLASS']._serialized_start=10752 - _globals['_ENDPOINTCLASS']._serialized_end=10999 + _globals['_LISTENERNETWORK']._serialized_start=10898 + _globals['_LISTENERNETWORK']._serialized_end=11002 + _globals['_LISTENERAUTHMODE']._serialized_start=11005 + _globals['_LISTENERAUTHMODE']._serialized_end=11166 + _globals['_ENDPOINTCLASS']._serialized_start=11169 + _globals['_ENDPOINTCLASS']._serialized_end=11416 _globals['_GETREQUEST']._serialized_start=173 _globals['_GETREQUEST']._serialized_end=185 _globals['_GETRESPONSE']._serialized_start=187 @@ -353,11 +365,11 @@ _globals['_LINKMONITORCONFIG']._serialized_start=3450 _globals['_LINKMONITORCONFIG']._serialized_end=5268 _globals['_XTCPCONFIG']._serialized_start=5271 - _globals['_XTCPCONFIG']._serialized_end=10317 - _globals['_ENABLEDDESERIALIZERS']._serialized_start=10320 - _globals['_ENABLEDDESERIALIZERS']._serialized_end=10479 - _globals['_ENABLEDDESERIALIZERS_ENABLEDENTRY']._serialized_start=10421 - _globals['_ENABLEDDESERIALIZERS_ENABLEDENTRY']._serialized_end=10479 - _globals['_CONFIGSERVICE']._serialized_start=11002 - _globals['_CONFIGSERVICE']._serialized_end=11935 + _globals['_XTCPCONFIG']._serialized_end=10734 + _globals['_ENABLEDDESERIALIZERS']._serialized_start=10737 + _globals['_ENABLEDDESERIALIZERS']._serialized_end=10896 + _globals['_ENABLEDDESERIALIZERS_ENABLEDENTRY']._serialized_start=10838 + _globals['_ENABLEDDESERIALIZERS_ENABLEDENTRY']._serialized_end=10896 + _globals['_CONFIGSERVICE']._serialized_start=11419 + _globals['_CONFIGSERVICE']._serialized_end=12352 # @@protoc_insertion_point(module_scope) diff --git a/gen/python/xtcp_config/v1/xtcp_config_pb2.pyi b/gen/python/xtcp_config/v1/xtcp_config_pb2.pyi index 7157acb58..00eca9537 100644 --- a/gen/python/xtcp_config/v1/xtcp_config_pb2.pyi +++ b/gen/python/xtcp_config/v1/xtcp_config_pb2.pyi @@ -253,7 +253,7 @@ class LinkMonitorConfig(_message.Message): def __init__(self, enable: _Optional[bool] = ..., baseline_file: _Optional[str] = ..., settle: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., resync: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., stats_interval: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., stats_include: _Optional[str] = ..., stats_exclude: _Optional[str] = ..., netstat_fields: _Optional[str] = ..., max_speed_exceptions: _Optional[_Iterable[str]] = ..., metrics_core_include: _Optional[str] = ..., metrics_core_exclude: _Optional[str] = ..., metrics_all: _Optional[bool] = ..., collection_mode: _Optional[str] = ..., watch_interval: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., slow_interval: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., on_demand_ttl: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., on_demand_wait: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., error_window: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., flap_window: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., error_classes: _Optional[str] = ..., error_exclude: _Optional[str] = ..., metrics_categories: _Optional[str] = ..., metrics_interface_paths: _Optional[bool] = ..., metrics_all_path: _Optional[str] = ..., ip_paths: _Optional[bool] = ..., ip_max_bytes: _Optional[int] = ..., ip_listen: _Optional[str] = ..., learn_deadline: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ...) -> None: ... class XtcpConfig(_message.Message): - __slots__ = ("nl_timeout_milliseconds", "poll_frequency", "poll_timeout", "poll_jitter_pct", "max_loops", "netlinkers", "netlinkers_done_chan_size", "nlmsg_seq", "packet_size", "packet_size_mply", "modulus", "enabled_deserializers", "io_uring", "io_uring_recv_batch_size", "io_uring_cqe_batch_size", "max_dump_bytes", "max_records_per_netns", "reconcile_frequency", "reconcile_before_poll", "max_netns", "write_files", "capture_path", "dest_write_files", "debug_level", "debug_prometheus", "dest", "marshal_to", "csv_columns", "xtcp_proto_file", "envelope_flush_threshold_bytes", "envelope_flush_threshold_rows", "topic", "kafka_schema_url", "kafka_produce_timeout", "kafka_compression", "s3_endpoint", "s3_region", "s3_bucket", "s3_prefix", "s3_access_key", "s3_secret_key", "s3_skip_bucket_probe", "s3_allow_insecure", "s3_ca_file", "s3_parquet_flush_threshold_bytes", "s3_flush_interval", "s3_flush_jitter_pct", "s3_flush_threshold_jitter_pct", "s3_upload_max_attempts", "s3_upload_backoff_cap", "hostname", "location", "label", "tag", "daemon_version", "ipv4_ttl", "ipv6_hop_limit", "listener_auth", "prometheus_listener", "admin_listener_auth", "grpc_port", "grpc_listener", "listeners", "pyroscope_url", "pyroscope_app_name", "pyroscope_sample_hz", "pyroscope_upload_interval_sec", "resolve_container_id", "enrich_container_enable", "docker_socket_path", "enrich_lldp_enable", "lldpd_socket_path", "lldpd_version_hint", "enrich_nic_enable", "uplink_count", "uplink_interfaces", "populate_nsid", "enrich_asn_enable", "asn_db_path", "asn_refresh_interval", "ipmeta_bootstrap_path", "ipmeta_cache_path", "enrich_locality_enable", "locality_refresh_interval", "locality_events_enable", "link_monitor") + __slots__ = ("nl_timeout_milliseconds", "poll_frequency", "poll_timeout", "poll_jitter_pct", "max_loops", "netlinkers", "netlinkers_done_chan_size", "nlmsg_seq", "packet_size", "packet_size_mply", "modulus", "enabled_deserializers", "io_uring", "io_uring_recv_batch_size", "io_uring_cqe_batch_size", "max_dump_bytes", "max_records_per_netns", "max_records_per_poll", "io_uring_sockstat_batch_size", "io_uring_sockstat_workers", "reconcile_frequency", "reconcile_before_poll", "max_netns", "reconcile_timeout", "max_netns_per_owner", "max_netns_adds_per_reconcile", "write_files", "capture_path", "dest_write_files", "debug_level", "debug_prometheus", "dest", "marshal_to", "csv_columns", "xtcp_proto_file", "envelope_flush_threshold_bytes", "envelope_flush_threshold_rows", "topic", "kafka_schema_url", "kafka_produce_timeout", "kafka_compression", "s3_endpoint", "s3_region", "s3_bucket", "s3_prefix", "s3_access_key", "s3_secret_key", "s3_skip_bucket_probe", "s3_allow_insecure", "s3_ca_file", "s3_parquet_flush_threshold_bytes", "s3_flush_interval", "s3_flush_jitter_pct", "s3_flush_threshold_jitter_pct", "s3_upload_max_attempts", "s3_upload_backoff_cap", "hostname", "location", "label", "tag", "daemon_version", "ipv4_ttl", "ipv6_hop_limit", "listener_auth", "prometheus_listener", "admin_listener_auth", "grpc_port", "grpc_listener", "listeners", "pyroscope_url", "pyroscope_app_name", "pyroscope_sample_hz", "pyroscope_upload_interval_sec", "resolve_container_id", "enrich_container_enable", "docker_socket_path", "enrich_lldp_enable", "lldpd_socket_path", "lldpd_version_hint", "enrich_nic_enable", "uplink_count", "uplink_interfaces", "populate_nsid", "enrich_asn_enable", "asn_db_path", "asn_refresh_interval", "ipmeta_bootstrap_path", "ipmeta_cache_path", "enrich_locality_enable", "locality_refresh_interval", "locality_events_enable", "link_monitor") NL_TIMEOUT_MILLISECONDS_FIELD_NUMBER: _ClassVar[int] POLL_FREQUENCY_FIELD_NUMBER: _ClassVar[int] POLL_TIMEOUT_FIELD_NUMBER: _ClassVar[int] @@ -271,9 +271,15 @@ class XtcpConfig(_message.Message): IO_URING_CQE_BATCH_SIZE_FIELD_NUMBER: _ClassVar[int] MAX_DUMP_BYTES_FIELD_NUMBER: _ClassVar[int] MAX_RECORDS_PER_NETNS_FIELD_NUMBER: _ClassVar[int] + MAX_RECORDS_PER_POLL_FIELD_NUMBER: _ClassVar[int] + IO_URING_SOCKSTAT_BATCH_SIZE_FIELD_NUMBER: _ClassVar[int] + IO_URING_SOCKSTAT_WORKERS_FIELD_NUMBER: _ClassVar[int] RECONCILE_FREQUENCY_FIELD_NUMBER: _ClassVar[int] RECONCILE_BEFORE_POLL_FIELD_NUMBER: _ClassVar[int] MAX_NETNS_FIELD_NUMBER: _ClassVar[int] + RECONCILE_TIMEOUT_FIELD_NUMBER: _ClassVar[int] + MAX_NETNS_PER_OWNER_FIELD_NUMBER: _ClassVar[int] + MAX_NETNS_ADDS_PER_RECONCILE_FIELD_NUMBER: _ClassVar[int] WRITE_FILES_FIELD_NUMBER: _ClassVar[int] CAPTURE_PATH_FIELD_NUMBER: _ClassVar[int] DEST_WRITE_FILES_FIELD_NUMBER: _ClassVar[int] @@ -357,9 +363,15 @@ class XtcpConfig(_message.Message): io_uring_cqe_batch_size: int max_dump_bytes: int max_records_per_netns: int + max_records_per_poll: int + io_uring_sockstat_batch_size: int + io_uring_sockstat_workers: int reconcile_frequency: _duration_pb2.Duration reconcile_before_poll: bool max_netns: int + reconcile_timeout: _duration_pb2.Duration + max_netns_per_owner: int + max_netns_adds_per_reconcile: int write_files: int capture_path: str dest_write_files: int @@ -426,7 +438,7 @@ class XtcpConfig(_message.Message): locality_refresh_interval: _duration_pb2.Duration locality_events_enable: bool link_monitor: LinkMonitorConfig - def __init__(self, nl_timeout_milliseconds: _Optional[int] = ..., poll_frequency: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., poll_timeout: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., poll_jitter_pct: _Optional[int] = ..., max_loops: _Optional[int] = ..., netlinkers: _Optional[int] = ..., netlinkers_done_chan_size: _Optional[int] = ..., nlmsg_seq: _Optional[int] = ..., packet_size: _Optional[int] = ..., packet_size_mply: _Optional[int] = ..., modulus: _Optional[int] = ..., enabled_deserializers: _Optional[_Union[EnabledDeserializers, _Mapping]] = ..., io_uring: _Optional[bool] = ..., io_uring_recv_batch_size: _Optional[int] = ..., io_uring_cqe_batch_size: _Optional[int] = ..., max_dump_bytes: _Optional[int] = ..., max_records_per_netns: _Optional[int] = ..., reconcile_frequency: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., reconcile_before_poll: _Optional[bool] = ..., max_netns: _Optional[int] = ..., write_files: _Optional[int] = ..., capture_path: _Optional[str] = ..., dest_write_files: _Optional[int] = ..., debug_level: _Optional[int] = ..., debug_prometheus: _Optional[bool] = ..., dest: _Optional[str] = ..., marshal_to: _Optional[str] = ..., csv_columns: _Optional[str] = ..., xtcp_proto_file: _Optional[str] = ..., envelope_flush_threshold_bytes: _Optional[int] = ..., envelope_flush_threshold_rows: _Optional[int] = ..., topic: _Optional[str] = ..., kafka_schema_url: _Optional[str] = ..., kafka_produce_timeout: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., kafka_compression: _Optional[str] = ..., s3_endpoint: _Optional[str] = ..., s3_region: _Optional[str] = ..., s3_bucket: _Optional[str] = ..., s3_prefix: _Optional[str] = ..., s3_access_key: _Optional[str] = ..., s3_secret_key: _Optional[str] = ..., s3_skip_bucket_probe: _Optional[bool] = ..., s3_allow_insecure: _Optional[bool] = ..., s3_ca_file: _Optional[str] = ..., s3_parquet_flush_threshold_bytes: _Optional[int] = ..., s3_flush_interval: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., s3_flush_jitter_pct: _Optional[int] = ..., s3_flush_threshold_jitter_pct: _Optional[int] = ..., s3_upload_max_attempts: _Optional[int] = ..., s3_upload_backoff_cap: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., hostname: _Optional[str] = ..., location: _Optional[str] = ..., label: _Optional[str] = ..., tag: _Optional[str] = ..., daemon_version: _Optional[str] = ..., ipv4_ttl: _Optional[int] = ..., ipv6_hop_limit: _Optional[int] = ..., listener_auth: _Optional[_Union[ListenerAuth, _Mapping]] = ..., prometheus_listener: _Optional[_Union[ListenerEndpoint, _Mapping]] = ..., admin_listener_auth: _Optional[_Union[ListenerAuth, _Mapping]] = ..., grpc_port: _Optional[int] = ..., grpc_listener: _Optional[_Union[ListenerEndpoint, _Mapping]] = ..., listeners: _Optional[_Iterable[_Union[Listener, _Mapping]]] = ..., pyroscope_url: _Optional[str] = ..., pyroscope_app_name: _Optional[str] = ..., pyroscope_sample_hz: _Optional[int] = ..., pyroscope_upload_interval_sec: _Optional[int] = ..., resolve_container_id: _Optional[bool] = ..., enrich_container_enable: _Optional[bool] = ..., docker_socket_path: _Optional[str] = ..., enrich_lldp_enable: _Optional[bool] = ..., lldpd_socket_path: _Optional[str] = ..., lldpd_version_hint: _Optional[str] = ..., enrich_nic_enable: _Optional[bool] = ..., uplink_count: _Optional[int] = ..., uplink_interfaces: _Optional[_Iterable[str]] = ..., populate_nsid: _Optional[bool] = ..., enrich_asn_enable: _Optional[bool] = ..., asn_db_path: _Optional[str] = ..., asn_refresh_interval: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., ipmeta_bootstrap_path: _Optional[str] = ..., ipmeta_cache_path: _Optional[str] = ..., enrich_locality_enable: _Optional[bool] = ..., locality_refresh_interval: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., locality_events_enable: _Optional[bool] = ..., link_monitor: _Optional[_Union[LinkMonitorConfig, _Mapping]] = ...) -> None: ... + def __init__(self, nl_timeout_milliseconds: _Optional[int] = ..., poll_frequency: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., poll_timeout: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., poll_jitter_pct: _Optional[int] = ..., max_loops: _Optional[int] = ..., netlinkers: _Optional[int] = ..., netlinkers_done_chan_size: _Optional[int] = ..., nlmsg_seq: _Optional[int] = ..., packet_size: _Optional[int] = ..., packet_size_mply: _Optional[int] = ..., modulus: _Optional[int] = ..., enabled_deserializers: _Optional[_Union[EnabledDeserializers, _Mapping]] = ..., io_uring: _Optional[bool] = ..., io_uring_recv_batch_size: _Optional[int] = ..., io_uring_cqe_batch_size: _Optional[int] = ..., max_dump_bytes: _Optional[int] = ..., max_records_per_netns: _Optional[int] = ..., max_records_per_poll: _Optional[int] = ..., io_uring_sockstat_batch_size: _Optional[int] = ..., io_uring_sockstat_workers: _Optional[int] = ..., reconcile_frequency: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., reconcile_before_poll: _Optional[bool] = ..., max_netns: _Optional[int] = ..., reconcile_timeout: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., max_netns_per_owner: _Optional[int] = ..., max_netns_adds_per_reconcile: _Optional[int] = ..., write_files: _Optional[int] = ..., capture_path: _Optional[str] = ..., dest_write_files: _Optional[int] = ..., debug_level: _Optional[int] = ..., debug_prometheus: _Optional[bool] = ..., dest: _Optional[str] = ..., marshal_to: _Optional[str] = ..., csv_columns: _Optional[str] = ..., xtcp_proto_file: _Optional[str] = ..., envelope_flush_threshold_bytes: _Optional[int] = ..., envelope_flush_threshold_rows: _Optional[int] = ..., topic: _Optional[str] = ..., kafka_schema_url: _Optional[str] = ..., kafka_produce_timeout: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., kafka_compression: _Optional[str] = ..., s3_endpoint: _Optional[str] = ..., s3_region: _Optional[str] = ..., s3_bucket: _Optional[str] = ..., s3_prefix: _Optional[str] = ..., s3_access_key: _Optional[str] = ..., s3_secret_key: _Optional[str] = ..., s3_skip_bucket_probe: _Optional[bool] = ..., s3_allow_insecure: _Optional[bool] = ..., s3_ca_file: _Optional[str] = ..., s3_parquet_flush_threshold_bytes: _Optional[int] = ..., s3_flush_interval: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., s3_flush_jitter_pct: _Optional[int] = ..., s3_flush_threshold_jitter_pct: _Optional[int] = ..., s3_upload_max_attempts: _Optional[int] = ..., s3_upload_backoff_cap: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., hostname: _Optional[str] = ..., location: _Optional[str] = ..., label: _Optional[str] = ..., tag: _Optional[str] = ..., daemon_version: _Optional[str] = ..., ipv4_ttl: _Optional[int] = ..., ipv6_hop_limit: _Optional[int] = ..., listener_auth: _Optional[_Union[ListenerAuth, _Mapping]] = ..., prometheus_listener: _Optional[_Union[ListenerEndpoint, _Mapping]] = ..., admin_listener_auth: _Optional[_Union[ListenerAuth, _Mapping]] = ..., grpc_port: _Optional[int] = ..., grpc_listener: _Optional[_Union[ListenerEndpoint, _Mapping]] = ..., listeners: _Optional[_Iterable[_Union[Listener, _Mapping]]] = ..., pyroscope_url: _Optional[str] = ..., pyroscope_app_name: _Optional[str] = ..., pyroscope_sample_hz: _Optional[int] = ..., pyroscope_upload_interval_sec: _Optional[int] = ..., resolve_container_id: _Optional[bool] = ..., enrich_container_enable: _Optional[bool] = ..., docker_socket_path: _Optional[str] = ..., enrich_lldp_enable: _Optional[bool] = ..., lldpd_socket_path: _Optional[str] = ..., lldpd_version_hint: _Optional[str] = ..., enrich_nic_enable: _Optional[bool] = ..., uplink_count: _Optional[int] = ..., uplink_interfaces: _Optional[_Iterable[str]] = ..., populate_nsid: _Optional[bool] = ..., enrich_asn_enable: _Optional[bool] = ..., asn_db_path: _Optional[str] = ..., asn_refresh_interval: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., ipmeta_bootstrap_path: _Optional[str] = ..., ipmeta_cache_path: _Optional[str] = ..., enrich_locality_enable: _Optional[bool] = ..., locality_refresh_interval: _Optional[_Union[datetime.timedelta, _duration_pb2.Duration, _Mapping]] = ..., locality_events_enable: _Optional[bool] = ..., link_monitor: _Optional[_Union[LinkMonitorConfig, _Mapping]] = ...) -> None: ... class EnabledDeserializers(_message.Message): __slots__ = ("enabled",) diff --git a/pkg/xtcp/caps_test.go b/pkg/xtcp/caps_test.go index b4827ef03..f310ad8a2 100644 --- a/pkg/xtcp/caps_test.go +++ b/pkg/xtcp/caps_test.go @@ -12,6 +12,8 @@ import ( "github.com/randomizedcoder/xtcp2/gen/go/xtcp_config" "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" + "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/durationpb" ) // TestDumpTracker_byteCap pins assign's byte accounting: which packets of a @@ -349,23 +351,44 @@ func TestNetnsCapQueue(t *testing.T) { // TestSetPreservesCaps: ConfigService.Set cannot change the caps. func TestSetPreservesCaps(t *testing.T) { - running := &xtcp_config.XtcpConfig{MaxDumpBytes: 100, MaxRecordsPerNetns: 200, MaxNetns: 300} + newRunning := func() *xtcp_config.XtcpConfig { + return &xtcp_config.XtcpConfig{ + MaxDumpBytes: 100, MaxRecordsPerNetns: 200, MaxNetns: 300, + MaxRecordsPerPoll: 400, IoUringSockstatBatchSize: 16, IoUringSockstatWorkers: 2, + MaxNetnsPerOwner: 5, MaxNetnsAddsPerReconcile: 6, + ReconcileTimeout: durationpb.New(700 * time.Millisecond), + } + } tests := []struct { name string category string description string + running *xtcp_config.XtcpConfig in *xtcp_config.XtcpConfig + expected *xtcp_config.XtcpConfig }{ - {name: "set_omits_caps", category: "N", description: "a Set without the caps would turn them off", in: &xtcp_config.XtcpConfig{}}, - {name: "set_raises_caps", category: "N", description: "a Set raising the caps", in: &xtcp_config.XtcpConfig{MaxDumpBytes: 1 << 40, MaxRecordsPerNetns: 1 << 40, MaxNetns: 1 << 20}}, - {name: "set_same_caps", category: "P", description: "a Get→Set round trip", in: &xtcp_config.XtcpConfig{MaxDumpBytes: 100, MaxRecordsPerNetns: 200, MaxNetns: 300}}, + {name: "set_omits_caps", category: "N", description: "a Set without the caps would turn them off", + running: newRunning(), in: &xtcp_config.XtcpConfig{}, expected: newRunning()}, + {name: "set_raises_caps", category: "N", description: "a Set raising every cap", + running: newRunning(), + in: &xtcp_config.XtcpConfig{MaxDumpBytes: 1 << 40, MaxRecordsPerNetns: 1 << 40, MaxNetns: 1 << 20, + MaxRecordsPerPoll: 1 << 40, IoUringSockstatBatchSize: 1024, IoUringSockstatWorkers: 64, + MaxNetnsPerOwner: 1 << 20, MaxNetnsAddsPerReconcile: 1 << 20, ReconcileTimeout: durationpb.New(time.Hour)}, + expected: newRunning()}, + {name: "set_same_caps", category: "P", description: "a Get→Set round trip", + running: newRunning(), in: newRunning(), expected: newRunning()}, + {name: "running_timeout_unset", category: "C", description: "running has no timeout; a Set can't add one", + running: &xtcp_config.XtcpConfig{}, in: &xtcp_config.XtcpConfig{ReconcileTimeout: durationpb.New(time.Second)}, + expected: &xtcp_config.XtcpConfig{}}, } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { - preserveCaps(tc.in, running) - if tc.in.MaxDumpBytes != 100 || tc.in.MaxRecordsPerNetns != 200 || tc.in.MaxNetns != 300 { - t.Errorf("%s: caps %d/%d/%d, expected the running 100/200/300", - tc.description, tc.in.MaxDumpBytes, tc.in.MaxRecordsPerNetns, tc.in.MaxNetns) + preserveCaps(tc.in, tc.running) + if !proto.Equal(tc.in, tc.expected) { + t.Errorf("%s: got %v, expected %v", tc.description, tc.in, tc.expected) + } + if tc.in.ReconcileTimeout != nil && tc.in.ReconcileTimeout == tc.running.ReconcileTimeout { + t.Errorf("%s: ReconcileTimeout aliases the running config", tc.description) } }) } diff --git a/pkg/xtcp/grpc_configService.go b/pkg/xtcp/grpc_configService.go index 73390a036..4d87e1965 100644 --- a/pkg/xtcp/grpc_configService.go +++ b/pkg/xtcp/grpc_configService.go @@ -18,6 +18,7 @@ import ( "google.golang.org/grpc/status" "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/known/durationpb" ) // ReconfigureMaxConfigBytes bounds the protojson config, secrets blanked, @@ -564,12 +565,23 @@ func (c *xtcpConfigService) SetEnvelopeFlush( } // preserveCaps keeps the running daemon's tenant caps (-maxDumpBytes, -// -maxRecordsPerNetns, -maxNetns) across a Set. They bound what a workload -// can cost the collector, so they are startup-only: a Set that omitted them -// would otherwise turn them off (0), and one that raised them would undo the -// bound from the admin plane. Change them with flags or env and a restart. +// -maxRecordsPerNetns, -maxNetns, -maxRecordsPerPoll, -maxNetnsPerOwner, +// -maxNetnsAddsPerReconcile, -reconcileTimeout and the sockstat ring sizing) +// across a Set. They bound what a workload can cost the collector, so they +// are startup-only: a Set that omitted them would otherwise turn them off (0), +// and one that raised them would undo the bound from the admin plane. Change +// them with flags or env and a restart. func preserveCaps(in, running *xtcp_config.XtcpConfig) { in.MaxDumpBytes = running.GetMaxDumpBytes() in.MaxRecordsPerNetns = running.GetMaxRecordsPerNetns() in.MaxNetns = running.GetMaxNetns() + in.MaxRecordsPerPoll = running.GetMaxRecordsPerPoll() + in.IoUringSockstatBatchSize = running.GetIoUringSockstatBatchSize() + in.IoUringSockstatWorkers = running.GetIoUringSockstatWorkers() + in.MaxNetnsPerOwner = running.GetMaxNetnsPerOwner() + in.MaxNetnsAddsPerReconcile = running.GetMaxNetnsAddsPerReconcile() + in.ReconcileTimeout = nil + if rt := running.GetReconcileTimeout(); rt != nil { + in.ReconcileTimeout = durationpb.New(rt.AsDuration()) + } } diff --git a/proto/xtcp_config/v1/xtcp_config.proto b/proto/xtcp_config/v1/xtcp_config.proto index fec8f3b3d..970a8b30d 100644 --- a/proto/xtcp_config/v1/xtcp_config.proto +++ b/proto/xtcp_config/v1/xtcp_config.proto @@ -795,6 +795,32 @@ message XtcpConfig { (buf.validate.field).required = false ]; + // Budget on the records all namespaces contribute per poll. Before each + // poll xtcp2 reads every namespace's TCP socket count (sockstat) and, + // when the total is over the budget, splits it max-min fairly: a + // namespace over its share first stops asking for TIME_WAIT and + // SYN_RECV, then is sampled by port range across polls. Counted in + // xtcp_poll_degraded_total. Startup-only. 0 = off (sockstat is not read). + // Daemon default 1048576. + uint64 max_records_per_poll = 27 [ + (buf.validate.field).required = false + ]; + + // Sockstat reads queued per io_uring submit when io_uring=true. + // Ignored otherwise. 0 = daemon default 64; at most 1024. + uint32 io_uring_sockstat_batch_size = 28 [ + (buf.validate.field).required = false, + (buf.validate.field).uint32 = { lte: 1024 } + ]; + + // Cap on io_uring's kernel worker threads for sockstat reads (procfs + // reads are handed to io-wq workers). Ignored unless io_uring=true. + // 0 = daemon default 4; at most 64. + uint32 io_uring_sockstat_workers = 29 [ + (buf.validate.field).required = false, + (buf.validate.field).uint32 = { lte: 64 } + ]; + // ---- namespace reconcile (40-49) ----------------------------------------- // Period of the background namespace-reconcile ticker (Method B /proc scan @@ -828,6 +854,36 @@ message XtcpConfig { (buf.validate.field).required = false ]; + // Time budget for one reconcile's namespace scan. A scan cut short adds + // what it found but deletes nothing (a partial view cannot prove a + // namespace is gone), and is counted in + // xtcp_reconcile_incomplete_total{reason="timeout"}. Bounds how long a + // namespace flood can delay a poll. The scan also stops after + // 4 x max_netns distinct namespaces (reason="scan_cap"). + // Startup-only. 0 = no limit. Daemon default 1s. + google.protobuf.Duration reconcile_timeout = 43 [ + (buf.validate.field).required = false, + (buf.validate.field).duration = { + gte: { seconds: 0 } + }]; + + // Cap on the namespaces one owner (the outermost container id in the + // namespace's cgroup) may have tracked. Bind-mounted namespaces with no + // live process are exempt. Candidates over it keep their queue place and + // are counted in xtcp_netns_dropped_total{reason="owner_quota"}. + // Startup-only. 0 = no limit. Daemon default 64. + uint32 max_netns_per_owner = 44 [ + (buf.validate.field).required = false + ]; + + // Cap on namespaces added per reconcile, so a burst cannot open + // thousands of sockets (each a setns on a locked thread) at once. The + // rest wait their turn (reason="add_rate"). Startup-only. + // 0 = no limit. Daemon default 256. + uint32 max_netns_adds_per_reconcile = 45 [ + (buf.validate.field).required = false + ]; + // ---- capture / debug (50-59) --------------------------------------------- // Write netlink packets to writeFiles number of files ( to generate test data ) per netlinker From 8bf5670385a8c77f31a6561fa2238df847308f52 Mon Sep 17 00:00:00 2001 From: "randomizedcoder dave.seddon.ca@gmail.com" Date: Fri, 13 Nov 2026 09:29:25 -0800 Subject: [PATCH 06/19] feat(io_uring): EnqueueReadAt, SetIOWQMaxWorkers, RequestID on Result Positioned reads (OpReadAt, optional IOSQE_ASYNC) for batching per-netns procfs reads. SetIOWQMaxWorkers writes the kernel's __u32[2] through a uint32 view: giouring v1.1.2 passes []uint (64-bit), which the kernel would misread (io_uring/register.c io_register_iowq_max_workers). Co-Authored-By: Claude Opus 5.5 --- pkg/io_uring/codec.go | 3 + pkg/io_uring/ring.go | 54 +++++++++- pkg/io_uring/ring_readat_test.go | 163 +++++++++++++++++++++++++++++++ 3 files changed, 219 insertions(+), 1 deletion(-) create mode 100644 pkg/io_uring/ring_readat_test.go diff --git a/pkg/io_uring/codec.go b/pkg/io_uring/codec.go index 36a5f2427..182a2fb35 100644 --- a/pkg/io_uring/codec.go +++ b/pkg/io_uring/codec.go @@ -35,6 +35,9 @@ const ( OpRecvMultishot Operation = 4 // OpCancel — the async-cancel SQE Close submits for a multishot recv. OpCancel Operation = 5 + // OpReadAt — a positioned read SQE (EnqueueReadAt), e.g. a procfs + // file such as /proc//net/sockstat re-read at offset 0. + OpReadAt Operation = 6 ) // EncodedRequest is the in-memory representation of a CQE userdata. diff --git a/pkg/io_uring/ring.go b/pkg/io_uring/ring.go index ca97bad6e..5bfefbae2 100644 --- a/pkg/io_uring/ring.go +++ b/pkg/io_uring/ring.go @@ -35,6 +35,7 @@ var requiredOps = []uint8{ giouring.OpAsyncCancel, giouring.OpSend, giouring.OpWritev, + giouring.OpRead, } // Config tunes the ring's queue depths. @@ -59,6 +60,9 @@ const maxRecvBufs = 1 << 15 // Result is what a drainer hands back to the netlinker for one CQE. type Result struct { Op Operation + // RequestID is the ID the Enqueue call returned, so a caller with + // many reads in flight can match each CQE to its request. + RequestID uint32 // Res is the kernel's CQE result: bytes transferred when positive, // -errno when negative. Res int32 @@ -469,6 +473,53 @@ func (r *Ring) EnqueueRecvMultishot(fd int) (uint32, error) { return reqID, nil } +// EnqueueReadAt builds a pread(2)-style SQE: read up to len(*buf) bytes +// from fd at offset off into buf. buf stays pinned in the in-flight map +// until its CQE. async sets IOSQE_ASYNC, which skips the inline +// non-blocking attempt: for files without FMODE_NOWAIT, such as procfs, +// that attempt always fails and the kernel hands the read to an io-wq +// worker anyway (io_uring/rw.c io_file_supports_nowait). +func (r *Ring) EnqueueReadAt(fd int, buf *[]byte, off uint64, async bool) (uint32, error) { + if buf == nil || len(*buf) == 0 { + return 0, errors.New("io_uring.EnqueueReadAt: empty buffer") + } + if len(r.inFlight) >= r.inFlightCap { + return 0, fmt.Errorf("io_uring in-flight cap exceeded (%d) — SQEs submitted faster than CQEs drained", r.inFlightCap) + } + sqe := r.r.GetSQE() + if sqe == nil { + return 0, errors.New("io_uring.EnqueueReadAt: SQ full (GetSQE returned nil)") + } + sqe.PrepareRead(fd, uintptr(unsafe.Pointer(&(*buf)[0])), uint32(len(*buf)), off) + if async { + sqe.Flags |= giouring.SqeAsync + } + reqID := r.NextRequestID() + sqe.SetData64(serialize(EncodedRequest{Operation: OpReadAt, RequestID: reqID})) + + r.inFlight[reqID] = inFlight{op: OpReadAt, buf: buf} + return reqID, nil +} + +// SetIOWQMaxWorkers caps this ring's io-wq worker threads (bounded and +// unbounded; 0 leaves a limit unchanged), so a batch of async reads can't +// spawn one kernel thread per SQE. It returns the previous limits. +// +// The kernel reads and writes back __u32[2] (io_uring/register.c +// io_register_iowq_max_workers). giouring v1.1.2 passes a []uint, which is +// at least 32-bit, so the limits are written through a [2]uint32 view of +// the slice's memory: right for any word size and byte order. +// TODO: fix the signature in the giouring fork. +func (r *Ring) SetIOWQMaxWorkers(bounded, unbounded uint32) (prevBounded, prevUnbounded uint32, err error) { + val := make([]uint, 2) // >= 8 bytes on every GOARCH + limits := (*[2]uint32)(unsafe.Pointer(&val[0])) + limits[0], limits[1] = bounded, unbounded + if _, err := r.r.RegisterIOWQMaxWorkers(val); err != nil { + return 0, 0, fmt.Errorf("io_uring.SetIOWQMaxWorkers(%d, %d): %w", bounded, unbounded, err) + } + return limits[0], limits[1], nil +} + // EnqueueSend builds a `send(2)` SQE. For UDP / unixgram destinations the // kernel preserves the message boundary. Op is one of OpSendUDP or // OpSendUnixGram. @@ -590,7 +641,8 @@ func (r *Ring) drainOnce() ([]Result, int) { delete(r.inFlight, req.RequestID) } res := Result{ - Op: req.Operation, + Op: req.Operation, + RequestID: req.RequestID, Res: cqe.Res, Buf: entry.buf, HdrBytes: entry.wvHdr, diff --git a/pkg/io_uring/ring_readat_test.go b/pkg/io_uring/ring_readat_test.go new file mode 100644 index 000000000..f04f6c98e --- /dev/null +++ b/pkg/io_uring/ring_readat_test.go @@ -0,0 +1,163 @@ +package io_uring + +import ( + "bytes" + "os" + "path/filepath" + "testing" +) + +// submitAndCollect submits everything queued and reaps exactly want CQEs, +// keyed by RequestID. +func submitAndCollect(t *testing.T, r *Ring, want int) map[uint32]Result { + t.Helper() + got := make(map[uint32]Result, want) + if _, err := r.SubmitAndWait(uint32(want)); err != nil { + t.Fatalf("SubmitAndWait: %v", err) + } + for len(got) < want { + res := r.DrainBatch() + if len(res) == 0 { + more, err := r.WaitOne() + if err != nil { + t.Fatalf("WaitOne: %v", err) + } + res = more + } + for _, x := range res { + got[x.RequestID] = x + } + } + return got +} + +// TestEnqueueReadAt covers the positioned read the sockstat gate batches. +func TestEnqueueReadAt(t *testing.T) { + content := []byte("0123456789abcdef") + path := filepath.Join(t.TempDir(), "f") + if err := os.WriteFile(path, content, 0o600); err != nil { + t.Fatal(err) + } + + tests := []struct { + name string + category string + description string + off uint64 + async bool + nilBuf bool + expected []byte // nil: Enqueue must fail + }{ + {name: "reads_file", category: "P", description: "temp file at offset 0", expected: content}, + {name: "reads_at_offset", category: "P", description: "offset 5 returns bytes from 5", off: 5, expected: content[5:]}, + {name: "async_flag", category: "P", description: "IOSQE_ASYNC still completes with the same bytes", async: true, expected: content}, + {name: "past_eof", category: "B", description: "offset at EOF returns 0 bytes", off: uint64(len(content)), expected: []byte{}}, + {name: "nil_buf", category: "N", description: "nil buffer is refused and nothing is queued", nilBuf: true}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + r := newTestRing(t, 0) + f, err := os.Open(path) + if err != nil { + t.Fatal(err) + } + defer f.Close() + + var buf *[]byte + if !tc.nilBuf { + b := make([]byte, 64) + buf = &b + } + id, err := r.EnqueueReadAt(int(f.Fd()), buf, tc.off, tc.async) + if tc.expected == nil { + if err == nil || r.SQReady() != 0 || r.InFlightLen() != 0 { + t.Fatalf("%s: err=%v sqReady=%d inFlight=%d, expected an error and nothing queued", + tc.description, err, r.SQReady(), r.InFlightLen()) + } + return + } + if err != nil { + t.Fatalf("%s: EnqueueReadAt: %v", tc.description, err) + } + res := submitAndCollect(t, r, 1)[id] + if res.Op != OpReadAt || res.Res < 0 { + t.Fatalf("%s: op=%d res=%d", tc.description, res.Op, res.Res) + } + if got := (*res.Buf)[:res.Res]; !bytes.Equal(got, tc.expected) { + t.Errorf("%s: got %q, expected %q", tc.description, got, tc.expected) + } + if r.InFlightLen() != 0 { + t.Errorf("%s: %d still in flight", tc.description, r.InFlightLen()) + } + }) + } +} + +// TestEnqueueReadAtSQFull: queueing past the SQ size fails cleanly and +// every ID handed out still completes (none lost). +func TestEnqueueReadAtSQFull(t *testing.T) { + r := newTestRing(t, 0) + f, err := os.Open("/proc/self/stat") + if err != nil { + t.Skip(err) + } + defer f.Close() + var ids []uint32 + var enqErr error + for i := 0; i < 1024; i++ { + b := make([]byte, 512) + id, err := r.EnqueueReadAt(int(f.Fd()), &b, 0, true) + if err != nil { + enqErr = err + break + } + ids = append(ids, id) + } + if enqErr == nil { + t.Fatal("expected SQ full before 1024 SQEs") + } + got := submitAndCollect(t, r, len(ids)) + for _, id := range ids { + if _, ok := got[id]; !ok { + t.Errorf("request %d lost", id) + } + } +} + +// TestEnqueueReadAtProcfsReread: the same procfs fd read twice at offset 0 +// returns the whole file both times (the sockstat fd is reused each poll). +func TestEnqueueReadAtProcfsReread(t *testing.T) { + r := newTestRing(t, 0) + f, err := os.Open("/proc/self/net/sockstat") + if err != nil { + t.Skip(err) + } + defer f.Close() + for i := range 2 { + b := make([]byte, 4096) + id, err := r.EnqueueReadAt(int(f.Fd()), &b, 0, true) + if err != nil { + t.Fatal(err) + } + res := submitAndCollect(t, r, 1)[id] + if res.Res <= 0 || !bytes.Contains((*res.Buf)[:res.Res], []byte("TCP: inuse")) { + t.Fatalf("read %d: res=%d %q, expected the full sockstat file", i, res.Res, (*res.Buf)[:max(res.Res, 0)]) + } + } +} + +// TestSetIOWQMaxWorkers: limits set are read back as the previous limits +// on the next call (checks the __u32[2] packing). +func TestSetIOWQMaxWorkers(t *testing.T) { + r := newTestRing(t, 0) + if _, _, err := r.SetIOWQMaxWorkers(3, 5); err != nil { + t.Fatalf("SetIOWQMaxWorkers: %v", err) + } + b, u, err := r.SetIOWQMaxWorkers(0, 0) // 0 = query, unchanged + if err != nil { + t.Fatal(err) + } + if b != 3 || u != 5 { + t.Errorf("limits read back %d/%d, expected 3/5", b, u) + } +} From c1bb184614092244d4ed604285eb11272b2b6c11 Mon Sep 17 00:00:00 2001 From: "randomizedcoder dave.seddon.ca@gmail.com" Date: Fri, 13 Nov 2026 09:29:48 -0800 Subject: [PATCH 07/19] style(io_uring): gofmt Co-Authored-By: Claude Opus 5.5 --- pkg/io_uring/ring.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/io_uring/ring.go b/pkg/io_uring/ring.go index 5bfefbae2..8875c0986 100644 --- a/pkg/io_uring/ring.go +++ b/pkg/io_uring/ring.go @@ -643,10 +643,10 @@ func (r *Ring) drainOnce() ([]Result, int) { res := Result{ Op: req.Operation, RequestID: req.RequestID, - Res: cqe.Res, - Buf: entry.buf, - HdrBytes: entry.wvHdr, - More: more, + Res: cqe.Res, + Buf: entry.buf, + HdrBytes: entry.wvHdr, + More: more, } if cqe.Flags&giouring.CQEFBuffer != 0 && r.recvBufs != nil { res.BufID = uint16(cqe.Flags >> giouring.CQEBufferShift) From d3b87cbef5eba313bbb8344eb7fb2f4b99f33132 Mon Sep 17 00:00:00 2001 From: "randomizedcoder dave.seddon.ca@gmail.com" Date: Fri, 13 Nov 2026 09:37:28 -0800 Subject: [PATCH 08/19] feat(xtcp): socket-count gate before each poll (-maxRecordsPerPoll) Each namespace's sockstat fd is opened in the namespace next to its netlink socket and re-read at offset 0 before every poll (pread, or an io_uring batch of -ioUringSockstatBatchSize with IOSQE_ASYNC and capped io-wq workers). Over the budget, a max-min fair share degrades only the heavy namespaces: first drop TIME_WAIT/SYN_RECV, then sample one of K port shards per poll with audited inet_diag bytecode. xtcp_poll_sockets, xtcp_poll_degraded_total{level}; netns_dropped_total gains reason. Co-Authored-By: Claude Opus 5.5 --- pkg/xtcp/caps.go | 7 + pkg/xtcp/caps_test.go | 2 +- pkg/xtcp/ns_add.go | 1 + pkg/xtcp/ns_createNetlinkersAndStore.go | 3 +- pkg/xtcp/ns_extra_test.go | 4 +- pkg/xtcp/ns_map_count.go | 21 ++ pkg/xtcp/ns_net_namespace.go | 36 ++- pkg/xtcp/ns_reconcile.go | 2 +- pkg/xtcp/poller.go | 19 +- pkg/xtcp/pollgate.go | 154 ++++++++++ pkg/xtcp/pollplan.go | 235 +++++++++++++++ pkg/xtcp/prometheus.go | 28 +- pkg/xtcp/sockstat.go | 372 ++++++++++++++++++++++++ pkg/xtcp/sockstat_test.go | 370 +++++++++++++++++++++++ pkg/xtcp/xtcp.go | 12 +- 15 files changed, 1255 insertions(+), 11 deletions(-) create mode 100644 pkg/xtcp/pollgate.go create mode 100644 pkg/xtcp/pollplan.go create mode 100644 pkg/xtcp/sockstat.go create mode 100644 pkg/xtcp/sockstat_test.go diff --git a/pkg/xtcp/caps.go b/pkg/xtcp/caps.go index b602d7709..add18e200 100644 --- a/pkg/xtcp/caps.go +++ b/pkg/xtcp/caps.go @@ -18,6 +18,13 @@ const ( dumpDropRecordsCst = "records" ) +// Reasons for xtcp_netns_dropped_total. +const ( + netnsDropMaxNetnsCst = "max_netns" + netnsDropOwnerQuotaCst = "owner_quota" + netnsDropAddRateCst = "add_rate" +) + // dumpTruncated counts a dump cut short by the cap named by reason, and logs // it. Callers make it once per dump, so it is at most one line per // namespace per poll. diff --git a/pkg/xtcp/caps_test.go b/pkg/xtcp/caps_test.go index f310ad8a2..dd142fb70 100644 --- a/pkg/xtcp/caps_test.go +++ b/pkg/xtcp/caps_test.go @@ -173,7 +173,7 @@ func newCapsXTCP(tb testing.TB) *XTCP { x := newTestDeserializeXTCP(tb) x.fdToNsMap = &sync.Map{} x.pDumpDropped = prometheus.NewCounterVec(prometheus.CounterOpts{Name: "dump_dropped_total"}, []string{"reason"}) - x.pNetnsDropped = prometheus.NewCounter(prometheus.CounterOpts{Name: "netns_dropped_total"}) + x.pNetnsDropped = prometheus.NewCounterVec(prometheus.CounterOpts{Name: "netns_dropped_total"}, []string{"reason"}) return x } diff --git a/pkg/xtcp/ns_add.go b/pkg/xtcp/ns_add.go index ef9a8040a..672b28171 100644 --- a/pkg/xtcp/ns_add.go +++ b/pkg/xtcp/ns_add.go @@ -34,6 +34,7 @@ func (x *XTCP) nsAdd(ctx context.Context, id nsIdentity) { ctx: nsCtx, cancel: nsCancel, socketFD: -1, // not opened yet; netNamespaceInstance fills it in + statFD: -1, }); loaded { // Already tracked — release the context we just made and bail. nsCancel() diff --git a/pkg/xtcp/ns_createNetlinkersAndStore.go b/pkg/xtcp/ns_createNetlinkersAndStore.go index e8277c6c2..69afc62fb 100644 --- a/pkg/xtcp/ns_createNetlinkersAndStore.go +++ b/pkg/xtcp/ns_createNetlinkersAndStore.go @@ -13,7 +13,7 @@ import ( // leaving netNamespaceInstance blocked on the parent (daemon-lifetime) // context — its deferred closeSocket(fd) never fired on a delete, leaking // one netlink fd + one goroutine per namespace removed. -func (x *XTCP) createNetlinkersAndStore(nsCtx context.Context, nsCancel context.CancelFunc, inode uint64, pid int, name *string, fd int) { +func (x *XTCP) createNetlinkersAndStore(nsCtx context.Context, nsCancel context.CancelFunc, inode uint64, pid int, name *string, fd, statFD int) { x.pC.WithLabelValues("createWorksAndStore", "start", "counter").Inc() @@ -40,6 +40,7 @@ func (x *XTCP) createNetlinkersAndStore(nsCtx context.Context, nsCancel context. cancel: nsCancel, wg: wg, socketFD: fd, + statFD: statFD, } wg.Add(1) diff --git a/pkg/xtcp/ns_extra_test.go b/pkg/xtcp/ns_extra_test.go index c9f4a34e6..b97eef49a 100644 --- a/pkg/xtcp/ns_extra_test.go +++ b/pkg/xtcp/ns_extra_test.go @@ -81,7 +81,7 @@ func TestCreateNetlinkersAndStore_zeroNetlinkers(t *testing.T) { const inode = uint64(4026531111) nsCtx, nsCancel := context.WithCancel(context.Background()) defer nsCancel() - x.createNetlinkersAndStore(nsCtx, nsCancel, inode, 100, &nsName, fds[0]) + x.createNetlinkersAndStore(nsCtx, nsCancel, inode, 100, &nsName, fds[0], -1) if _, ok := x.nsMap.Load(inode); !ok { t.Error("nsMap should contain the new ns entry") @@ -152,7 +152,7 @@ func TestCreateNetlinkersAndStore_spawnsNetlinkers(t *testing.T) { const inode = uint64(4026531112) nsCtx, nsCancel := context.WithCancel(context.Background()) defer nsCancel() - x.createNetlinkersAndStore(nsCtx, nsCancel, inode, 100, &nsName, fds[0]) + x.createNetlinkersAndStore(nsCtx, nsCancel, inode, 100, &nsName, fds[0], -1) ran.Wait() if _, ok := x.nsMap.Load(inode); !ok { diff --git a/pkg/xtcp/ns_map_count.go b/pkg/xtcp/ns_map_count.go index fe035675c..032f64d37 100644 --- a/pkg/xtcp/ns_map_count.go +++ b/pkg/xtcp/ns_map_count.go @@ -89,6 +89,27 @@ func (x *XTCP) GetNetlinkSocketFDs() (fds []int) { return getNetlinkSocketFDs(x.nsMap) } +// nsPollFDs is one tracked namespace's netlink socket and sockstat fd. +type nsPollFDs struct { + socketFD int + statFD int +} + +// getPollFDs appends every tracked namespace's fds to dst (reused across +// polls) and returns it. +func getPollFDs(m *sync.Map, dst []nsPollFDs) []nsPollFDs { + dst = dst[:0] + m.Range(func(k, v interface{}) bool { + item, ok := v.(netNSitem) + if !ok { + return true + } + dst = append(dst, nsPollFDs{socketFD: item.socketFD, statFD: item.statFD}) + return true + }) + return dst +} + // getNetlinkSocketFDs returns the current active set of // netlink file descriptors func getNetlinkSocketFDs(m *sync.Map) (fds []int) { diff --git a/pkg/xtcp/ns_net_namespace.go b/pkg/xtcp/ns_net_namespace.go index d553478e0..77625561c 100644 --- a/pkg/xtcp/ns_net_namespace.go +++ b/pkg/xtcp/ns_net_namespace.go @@ -149,6 +149,13 @@ func (x *XTCP) netNamespaceInstance(nsCtx context.Context, nsCancel context.Canc defer x.closeSocket(socketFD) + // The sockstat fd for the socket-count gate, opened here so it is bound + // to this namespace. Closed with the socket when the namespace goes. + statFD := x.openSockstatFD() + if statFD > 0 { + defer x.closeFD(statFD) + } + // https://godoc.org/golang.org/x/sys/unix#Bind // https://godoc.org/golang.org/x/sys/unix#SockaddrNetlink err = unix.Bind(socketFD, &unix.SockaddrNetlink{Family: syscall.AF_NETLINK}) @@ -171,7 +178,7 @@ func (x *XTCP) netNamespaceInstance(nsCtx context.Context, nsCancel context.Canc // (see nsAdd). createNetlinkersAndStore fills in the socketFD and starts // the netlinkers; it no-ops if the namespace was already deleted during // the setns/socket init above. - x.createNetlinkersAndStore(nsCtx, nsCancel, inode, pid, name, socketFD) + x.createNetlinkersAndStore(nsCtx, nsCancel, inode, pid, name, socketFD, statFD) x.pH.WithLabelValues("netNamespaceInstance", "store", "counter").Observe(time.Since(startTime).Seconds()) @@ -185,6 +192,29 @@ func (x *XTCP) netNamespaceInstance(nsCtx context.Context, nsCancel context.Canc x.pC.WithLabelValues("netNamespaceInstance", "ctx.Done", "count").Inc() } +// openSockstat is the seam tests swap to fake or fail the sockstat open. +var openSockstat = func() (int, error) { + return unix.Open(sockstatPath, unix.O_RDONLY|unix.O_CLOEXEC, 0) +} + +// openSockstatFD opens the calling thread's namespace's sockstat when the +// socket-count gate is on (-maxRecordsPerPoll > 0). It returns -1 when the +// gate is off or the open fails; that namespace's count is then unknown. +func (x *XTCP) openSockstatFD() int { + if x.config.GetMaxRecordsPerPoll() == 0 { + return -1 + } + fd, err := openSockstat() + if err != nil { + x.pC.WithLabelValues("netNamespaceInstance", "openSockstat", "error").Inc() + if x.debugLevel > 10 { + log.Printf("openSockstatFD %s: %v", sockstatPath, err) + } + return -1 + } + return fd +} + func (x *XTCP) closeSocket(socketFD int) { if err := unix.Close(socketFD); err != nil { x.pC.WithLabelValues("netNamespaceInstance", "closeSocketFD", "error").Inc() @@ -227,7 +257,9 @@ func (x *XTCP) openDefaultNetLinkSocket(ctx context.Context) { // backward compatibility. df := "default" nsCtx, nsCancel := context.WithCancel(ctx) - x.createNetlinkersAndStore(nsCtx, nsCancel, x.selfNsInode, os.Getpid(), &df, socketFD) + // xtcp2's own namespace: any unlocked thread is in it, and both fds live + // as long as the daemon. + x.createNetlinkersAndStore(nsCtx, nsCancel, x.selfNsInode, os.Getpid(), &df, socketFD, x.openSockstatFD()) // The host namespace has no netNamespaceInstance to run its locality // listener; any unlocked thread is in it. diff --git a/pkg/xtcp/ns_reconcile.go b/pkg/xtcp/ns_reconcile.go index 419875a41..f2d1af3cb 100644 --- a/pkg/xtcp/ns_reconcile.go +++ b/pkg/xtcp/ns_reconcile.go @@ -146,7 +146,7 @@ func (x *XTCP) reconcile(ctx context.Context) (dels, stores int) { if dropped > 0 { x.pC.WithLabelValues("reconcile", "maxNetns", "drop").Add(float64(dropped)) if x.pNetnsDropped != nil { - x.pNetnsDropped.Add(float64(dropped)) + x.pNetnsDropped.WithLabelValues(netnsDropMaxNetnsCst).Add(float64(dropped)) } log.Printf("reconcile: %d namespaces not tracked: -maxNetns=%d reached", dropped, limit) } diff --git a/pkg/xtcp/poller.go b/pkg/xtcp/poller.go index 5f4251fbf..029a60546 100644 --- a/pkg/xtcp/poller.go +++ b/pkg/xtcp/poller.go @@ -29,6 +29,7 @@ func (x *XTCP) Poller(ctx context.Context, wg *sync.WaitGroup) { // in-flight envelope. The destination's own Close() drains pending // produces with a 5s flush window. defer x.flushEnvelope(context.WithoutCancel(ctx), "shutdown") + defer x.closeGate() if x.debugLevel > 10 { log.Printf("Poller started") @@ -393,6 +394,17 @@ func (x *XTCP) pollAllNetlinkSockets(pollingLoops uint64) (count int) { x.pollStartTime = startTime x.envelopeMu.Unlock() + if x.gateEnabled() { + polled := 0 + for _, s := range x.planGatedPoll(pollingLoops) { + x.setRequestSeq(s.req, pollingLoops) + x.pollWith(s.fd, s.req) + polled++ + } + x.pollTimeoutTimer.Reset(x.config.PollTimeout.AsDuration()) + return polled + } + x.updateNetlinkRequestSequenceNumber(pollingLoops) socketFDs := x.GetNetlinkSocketFDs() @@ -426,12 +438,17 @@ func (x *XTCP) updateNetlinkRequestSequenceNumber(pollingLoops uint64) { } func (x *XTCP) poll(fd int) { + x.pollWith(fd, x.nlRequest) +} + +// pollWith sends req, the request planned for this namespace, on fd. +func (x *XTCP) pollWith(fd int, req *[]byte) { startTime := time.Now() x.pollTime.Store(fd, startTime) - x.sendNetlinkDumpRequest(fd, x.nlRequest) + x.sendNetlinkDumpRequest(fd, req) // x.SendNetlinkDumpRequestPtr(x.socketFD, x.socketAddress, x.nlRequest) // x.SendNetlinkDumpRequestPtrIOUring(x.socketFD, x.nlRequest) diff --git a/pkg/xtcp/pollgate.go b/pkg/xtcp/pollgate.go new file mode 100644 index 000000000..8b45c33db --- /dev/null +++ b/pkg/xtcp/pollgate.go @@ -0,0 +1,154 @@ +package xtcp + +import ( + "encoding/binary" + "log" +) + +// pollGate is the socket-count gate's per-poller state: the sockstat +// reader, the planner and the request cache. It is created on the first +// gated poll and used only by the poller goroutine. +type pollGate struct { + reader sockstatReader + planner pollPlanner + reqs *pollRequests + + pairs []nsPollFDs + ready []nsPollFDs + statFDs []int + counts []sockstatCount + sendTo []nsSend +} + +// nsSend is one namespace's socket and the request planned for it. +type nsSend struct { + fd int + req *[]byte +} + +// newSockstatRingReader is the seam tests swap to make ring setup fail. +var newSockstatRingReader = func(batch, workers uint32) (sockstatReader, error) { + return newRingSockstatReader(batch, workers) +} + +// gateEnabled reports whether -maxRecordsPerPoll is set. +func (x *XTCP) gateEnabled() bool { + return x.config.GetMaxRecordsPerPoll() > 0 +} + +// newPollGate picks the sockstat reader as the netlinkers pick theirs: the +// io_uring one with -ioUring, falling back to pread if the ring can't be +// set up (counted). +func (x *XTCP) newPollGate() *pollGate { + g := &pollGate{reqs: newPollRequests(x.nlRequest)} + if x.config.GetIoUring() { + r, err := newSockstatRingReader(x.config.GetIoUringSockstatBatchSize(), x.config.GetIoUringSockstatWorkers()) + if err == nil { + g.reader = r + return g + } + x.pC.WithLabelValues("poller", "sockstatRing", "fallback").Inc() + log.Printf("sockstat io_uring reader unavailable, using pread: %v", err) + } + g.reader = newSyscallSockstatReader() + return g +} + +// closeGate releases the gate's reader (the ring's goroutine and thread). +func (x *XTCP) closeGate() { + if x.gate != nil { + x.gate.reader.close() + x.gate = nil + } +} + +// planGatedPoll reads every ready namespace's sockstat, plans the poll, +// and returns each ready socket with the request to send it. +func (x *XTCP) planGatedPoll(pollingLoops uint64) []nsSend { + if x.gate == nil { + x.gate = x.newPollGate() + } + g := x.gate + g.pairs = getPollFDs(x.nsMap, g.pairs) + g.ready = g.ready[:0] + g.statFDs = g.statFDs[:0] + for _, p := range g.pairs { + // Skip slots reserved by nsAdd whose socket isn't open yet. + if p.socketFD < 0 { + continue + } + g.ready = append(g.ready, p) + g.statFDs = append(g.statFDs, p.statFD) + } + if cap(g.counts) < len(g.ready) { + g.counts = make([]sockstatCount, len(g.ready)) + } + g.counts = g.counts[:len(g.ready)] + + failed, err := g.reader.read(g.statFDs, g.counts) + if err != nil { + // The ring is unusable: fall back to pread for this and later polls. + x.pC.WithLabelValues("poller", "sockstatRing", "fallback").Inc() + log.Printf("sockstat io_uring reader failed, using pread: %v", err) + g.reader.close() + g.reader = newSyscallSockstatReader() + failed, _ = g.reader.read(g.statFDs, g.counts) + } + if failed > 0 { + x.pC.WithLabelValues("poller", "sockstat", "error").Add(float64(failed)) + } + + plans := g.planner.plan(g.counts, x.config.GetMaxRecordsPerPoll(), x.config.GetMaxRecordsPerNetns(), pollingLoops) + g.sendTo = g.sendTo[:0] + var total uint64 + var unknown, states, sample int + for i, pl := range plans { + total += g.planner.demand[i] + if pl.unknown { + unknown++ + } + req, err := g.reqs.get(pl) + if err != nil { + // Can't happen for the fixed shard shape (it is audited); if it + // does, a full request is still bounded by the receiver caps. + x.pC.WithLabelValues("poller", "planPoll", "requestError").Inc() + log.Printf("planPoll: %v; sending the full request", err) + req = g.reqs.full + pl.level = pollFull + } + switch pl.level { + case pollStates: + states++ + case pollSample: + sample++ + } + g.sendTo = append(g.sendTo, nsSend{fd: g.ready[i].socketFD, req: req}) + } + x.recordGate(total, unknown, states, sample) + return g.sendTo +} + +// recordGate publishes one gated poll's counts and logs a poll that +// degraded anything (one line per poll). +func (x *XTCP) recordGate(total uint64, unknown, states, sample int) { + if x.pPollSockets != nil { + x.pPollSockets.Set(float64(total)) + } + if unknown > 0 { + x.pC.WithLabelValues("poller", "planPoll", "unknownCount").Add(float64(unknown)) + } + if states == 0 && sample == 0 { + return + } + if x.pPollDegraded != nil { + x.pPollDegraded.WithLabelValues(pollStates.String()).Add(float64(states)) + x.pPollDegraded.WithLabelValues(pollSample.String()).Add(float64(sample)) + } + log.Printf("poll degraded by -maxRecordsPerPoll=%d: sockets:%d states:%d sample:%d unknown:%d", + x.config.GetMaxRecordsPerPoll(), total, states, sample, unknown) +} + +// setRequestSeq stamps this poll's sequence number into req. +func (x *XTCP) setRequestSeq(req *[]byte, pollingLoops uint64) { + binary.LittleEndian.PutUint32((*req)[8:12], x.config.NlmsgSeq+uint32(pollingLoops)) +} diff --git a/pkg/xtcp/pollplan.go b/pkg/xtcp/pollplan.go new file mode 100644 index 000000000..ebf246451 --- /dev/null +++ b/pkg/xtcp/pollplan.go @@ -0,0 +1,235 @@ +package xtcp + +import ( + "encoding/binary" + "fmt" + "slices" + + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" +) + +// The socket-count gate. Before each poll, every tracked namespace's +// sockstat says roughly how many records its dump will return. When the +// total is over -maxRecordsPerPoll, planPoll gives each namespace a max-min +// fair share of the budget and degrades only the namespaces over it: +// +// 1. pollStates: stop asking for TIME_WAIT and SYN_RECV/NEW_SYN_RECV. +// The kernel drops them before building a record (tcp_diag.c, the +// idiag_states check), so the dump is about sockstat's inuse. +// 2. pollSample: also split the namespace's sockets into K port shards and +// ask for shard (pollingLoops mod K) each poll, with inet_diag bytecode +// (sport in R_k) OR (dport in R_k). Every socket's dport is in exactly +// one range, so K consecutive polls see every socket at least once. +// +// Port ops need no CAP_NET_ADMIN (only MARK_COND does; inet_diag.c +// inet_diag_bc_audit), so the shard filter works wherever xtcp2 does. + +type pollLevel uint8 + +const ( + pollFull pollLevel = iota + pollStates + pollSample +) + +func (l pollLevel) String() string { + switch l { + case pollStates: + return "states" + case pollSample: + return "sample" + default: + return "full" + } +} + +// maxShardsCst bounds K. With a share of s records, K = ceil(inuse/s); a +// tiny share against a huge namespace would otherwise ask for thousands of +// one-port shards. Past this the namespace's per-poll dump can exceed its +// share; the per-namespace record cap (-maxRecordsPerNetns) still holds. +const maxShardsCst = 1024 + +// statesDegradeMask is the idiag_states bits pollStates clears. +const statesDegradeMask = 1<<3 | 1<<6 | 1<<12 // TCP_SYN_RECV, TCP_TIME_WAIT, TCP_NEW_SYN_RECV + +// nsPlan is what one namespace is asked for this poll. +type nsPlan struct { + level pollLevel + shard uint32 // k, for pollSample + shards uint32 // K, for pollSample + planned uint64 // records expected + unknown bool // the sockstat count was unknown +} + +// pollPlanner holds planPoll's scratch so a poll allocates nothing once +// warmed up. Owned by the poller goroutine. +type pollPlanner struct { + demand []uint64 + sorted []uint64 + plans []nsPlan +} + +// fairShare is the max-min fair share of budget over the demands in +// sorted (ascending): demands at or under the share are met in full, and +// the rest get the share. limited is false when every demand fits. +func fairShare(sorted []uint64, budget uint64) (share uint64, limited bool) { + remaining := budget + for i, d := range sorted { + n := uint64(len(sorted) - i) + if d <= remaining/n { + remaining -= d + continue + } + return remaining / n, true + } + if len(sorted) == 0 { + return budget, false + } + return sorted[len(sorted)-1], false +} + +// plan returns each namespace's plan, parallel to counts. budget 0 turns +// the gate off. An unknown count is taken as unknownAs (the per-namespace +// record cap; budget when that is off too), so a namespace whose sockstat +// can't be read is assumed heavy rather than free. +func (p *pollPlanner) plan(counts []sockstatCount, budget, unknownAs, pollingLoops uint64) []nsPlan { + n := len(counts) + p.plans = slices.Grow(p.plans[:0], n)[:n] + if budget == 0 { + clear(p.plans) + return p.plans + } + if unknownAs == 0 { + unknownAs = budget + } + p.demand = slices.Grow(p.demand[:0], n)[:n] + for i, c := range counts { + if c.known { + p.demand[i] = c.total() + } else { + p.demand[i] = unknownAs + } + } + p.sorted = append(p.sorted[:0], p.demand...) + slices.Sort(p.sorted) + share, limited := fairShare(p.sorted, budget) + + for i, c := range counts { + d := p.demand[i] + pl := nsPlan{level: pollFull, planned: d, unknown: !c.known} + if limited && d > share { + pl = degrade(c, d, share, pollingLoops) + pl.unknown = !c.known + } + p.plans[i] = pl + } + return p.plans +} + +// degrade picks the lightest level that fits a namespace into share. +func degrade(c sockstatCount, demand, share, pollingLoops uint64) nsPlan { + if c.known && c.inuse <= share { + return nsPlan{level: pollStates, planned: c.inuse} + } + base := demand + if c.known { + base = c.inuse + } + s := max(share, 1) + k := min((base+s-1)/s, maxShardsCst) + if k < 2 { + k = 2 // inuse > share >= 1, so at least two shards + } + return nsPlan{ + level: pollSample, + shard: uint32(pollingLoops % k), + shards: uint32(k), + planned: (base + k - 1) / k, + } +} + +// shardRange is the k-th of K equal slices of the port space 0..65535. +func shardRange(k, shards uint32) (lo, hi uint16) { + const space = 1 << 16 + l := uint64(k) * space / uint64(shards) + h := uint64(k+1)*space/uint64(shards) - 1 + return uint16(l), uint16(h) +} + +// shardBytecode is inet_diag bytecode for (sport in [lo,hi]) OR +// (dport in [lo,hi]), shaped as iproute2's ssfilter builds an OR (a; JMP; +// b) so every jump target is on the yes-chain, as the kernel's valid_cc +// requires: +// +// 0 S_GE lo yes 8 no 20 ┐ sport range; a miss goes to the dport range +// 8 S_LE hi yes 8 no 12 ┘ +// 16 JMP yes 4 no 20 sport matched: jump to the end (accept) +// 20 D_GE lo yes 8 no 20 ┐ dport range; a miss jumps past the end +// 28 D_LE hi yes 8 no 12 ┘ (reject) +func shardBytecode(lo, hi uint16) []byte { + op := func(b []byte, code, yes uint8, no uint16) []byte { + b = append(b, code, yes) + return binary.LittleEndian.AppendUint16(b, no) + } + port := func(b []byte, p uint16) []byte { return op(b, 0, 0, p) } + bc := make([]byte, 0, 36) + bc = port(op(bc, xtcpnl.InetDiagBcSGe, 8, 20), lo) + bc = port(op(bc, xtcpnl.InetDiagBcSLe, 8, 12), hi) + bc = op(bc, xtcpnl.InetDiagBcJmp, 4, 20) + bc = port(op(bc, xtcpnl.InetDiagBcDGe, 8, 20), lo) + bc = port(op(bc, xtcpnl.InetDiagBcDLe, 8, 12), hi) + return bc +} + +// nlattrHdrSize is struct nlattr. +const nlattrHdrSize = 4 + +// maxCachedShardRequests bounds the shard request cache; past it the cache +// is cleared (K changes rarely, so this only trims stale sizes). +const maxCachedShardRequests = 4 * maxShardsCst + +// pollRequests builds and caches the request each level sends. full is the +// startup request (x.nlRequest), shared, not copied. +type pollRequests struct { + full *[]byte + states *[]byte + shards map[uint64]*[]byte // shards<<32 | shard +} + +func newPollRequests(full *[]byte) *pollRequests { + st := slices.Clone(*full) + states := binary.LittleEndian.Uint32(st[20:24]) &^ statesDegradeMask + binary.LittleEndian.PutUint32(st[20:24], states) + return &pollRequests{full: full, states: &st, shards: make(map[uint64]*[]byte)} +} + +// get returns the request for pl, building and auditing a shard request +// the first time it is needed. +func (r *pollRequests) get(pl nsPlan) (*[]byte, error) { + switch pl.level { + case pollFull: + return r.full, nil + case pollStates: + return r.states, nil + } + key := uint64(pl.shards)<<32 | uint64(pl.shard) + if req, ok := r.shards[key]; ok { + return req, nil + } + lo, hi := shardRange(pl.shard, pl.shards) + bc := shardBytecode(lo, hi) + if err := xtcpnl.InetDiagBcAudit(bc, false); err != nil { + return nil, fmt.Errorf("shard %d/%d bytecode: %w", pl.shard, pl.shards, err) + } + req := make([]byte, 0, len(*r.states)+nlattrHdrSize+len(bc)) + req = append(req, *r.states...) + req = binary.LittleEndian.AppendUint16(req, uint16(nlattrHdrSize+len(bc))) + req = binary.LittleEndian.AppendUint16(req, xtcpnl.InetDiagReqBytecode) + req = append(req, bc...) + binary.LittleEndian.PutUint32(req[0:4], uint32(len(req))) // nlmsg_len + if len(r.shards) >= maxCachedShardRequests { + clear(r.shards) + } + r.shards[key] = &req + return &req, nil +} diff --git a/pkg/xtcp/prometheus.go b/pkg/xtcp/prometheus.go index 584c8a453..9fb6e9dfb 100644 --- a/pkg/xtcp/prometheus.go +++ b/pkg/xtcp/prometheus.go @@ -98,12 +98,36 @@ func (x *XTCP) InitPromethus(wg *sync.WaitGroup) { }, []string{"reason"}, ) - x.pNetnsDropped = factory.NewCounter( + x.pNetnsDropped = factory.NewCounterVec( prometheus.CounterOpts{ Subsystem: promSubsystemXTCP, Name: "netns_dropped_total", - Help: "Live namespaces a reconcile left untracked because -maxNetns was reached, counted per reconcile.", + Help: "Live namespaces a reconcile left untracked, counted per reconcile: reason=max_netns (-maxNetns reached), owner_quota (-maxNetnsPerOwner), add_rate (-maxNetnsAddsPerReconcile).", }, + []string{"reason"}, + ) + x.pPollSockets = factory.NewGauge( + prometheus.GaugeOpts{ + Subsystem: promSubsystemXTCP, + Name: "poll_sockets", + Help: "TCP sockets (inuse + TIME_WAIT, from each namespace's sockstat) counted before the last poll; unknown counts are taken as -maxRecordsPerNetns.", + }, + ) + x.pPollDegraded = factory.NewCounterVec( + prometheus.CounterOpts{ + Subsystem: promSubsystemXTCP, + Name: "poll_degraded_total", + Help: "Namespace polls degraded by -maxRecordsPerPoll: level=states (TIME_WAIT and SYN_RECV not asked for), sample (one port shard of K).", + }, + []string{"level"}, + ) + x.pReconcileIncomplete = factory.NewCounterVec( + prometheus.CounterOpts{ + Subsystem: promSubsystemXTCP, + Name: "reconcile_incomplete_total", + Help: "Reconciles whose namespace scan stopped early: reason=timeout (-reconcileTimeout), scan_cap (4 x -maxNetns namespaces). An incomplete scan deletes nothing.", + }, + []string{"reason"}, ) x.publishCompiledInEnrichers() diff --git a/pkg/xtcp/sockstat.go b/pkg/xtcp/sockstat.go new file mode 100644 index 000000000..32f726322 --- /dev/null +++ b/pkg/xtcp/sockstat.go @@ -0,0 +1,372 @@ +package xtcp + +import ( + "bytes" + "errors" + "fmt" + "runtime" + + xio "github.com/randomizedcoder/xtcp2/pkg/io_uring" + "golang.org/x/sys/unix" +) + +// The socket-count gate reads each tracked namespace's +// /proc//net/sockstat before the dump. The file is opened once, on the +// thread that is in the namespace (netNamespaceInstance), so the fd is bound +// to that namespace for its lifetime (proc_create_net_single); each poll only +// re-reads it at offset 0. +// +// sockstat_seq_show (net/ipv4/proc.c) prints, per namespace: +// +// TCP: inuse %d orphan %d tw %d alloc %d mem %ld +// +// inuse is sock_prot_inuse_get(net, &tcp_prot): hashed TCP sockets in this +// namespace (listeners and established; never negative). tw is that +// namespace's tw_refcount - 1 (TIME_WAIT). orphan, alloc and mem are +// host-wide. Request sockets (SYN_RECV) are in neither, so a SYN flood isn't +// visible here; the per-namespace record cap (-maxRecordsPerNetns) still +// bounds it. + +// sockstatBufSize holds the whole file (about 200 bytes) with room to spare. +const sockstatBufSize = 1024 + +// sockstatPath is the per-thread sockstat: after Setns, the calling thread's +// namespace. /proc/self/net would follow the thread-group leader instead. +const sockstatPath = "/proc/thread-self/net/sockstat" + +// sockstatCount is one namespace's TCP socket count. +type sockstatCount struct { + inuse uint64 + tw uint64 + known bool +} + +// total is the number of records a full-state dump would return, at least +// (request sockets aren't counted). +func (c sockstatCount) total() uint64 { return c.inuse + c.tw } + +var sockstatTCPPrefix = []byte("TCP:") + +// parseSockstat returns the TCP inuse and tw counts from a sockstat file. +// It allocates nothing. ok is false when the TCP line, or either field, is +// missing or malformed. A negative tw (tw_refcount - 1 = -1 while a +// namespace is being torn down) reads as 0. +func parseSockstat(b []byte) (inuse, tw uint64, ok bool) { + line := b + for { + if bytes.HasPrefix(line, sockstatTCPPrefix) { + break + } + i := bytes.IndexByte(line, '\n') + if i < 0 { + return 0, 0, false + } + line = line[i+1:] + } + // The kernel always ends the line; without the newline a short read + // may have cut a number. + i := bytes.IndexByte(line, '\n') + if i < 0 { + return 0, 0, false + } + line = line[:i] + fields := line[len(sockstatTCPPrefix):] + var haveInuse, haveTW bool + for len(fields) > 0 { + var key, val []byte + key, fields = nextField(fields) + if key == nil { + break + } + val, fields = nextField(fields) + if val == nil { + return 0, 0, false + } + switch string(key) { // no allocation: compiler-recognised conversion + case "inuse": + n, neg, good := parseDecimal(val) + if !good || neg { + return 0, 0, false + } + inuse, haveInuse = n, true + case "tw": + n, neg, good := parseDecimal(val) + if !good { + return 0, 0, false + } + if neg { + n = 0 + } + tw, haveTW = n, true + } + } + return inuse, tw, haveInuse && haveTW +} + +// nextField returns the next space-separated token and the rest. +func nextField(b []byte) (tok, rest []byte) { + for len(b) > 0 && (b[0] == ' ' || b[0] == '\t') { + b = b[1:] + } + if len(b) == 0 { + return nil, nil + } + end := 0 + for end < len(b) && b[end] != ' ' && b[end] != '\t' { + end++ + } + return b[:end], b[end:] +} + +// parseDecimal parses an optionally negative decimal of at most 19 digits. +func parseDecimal(b []byte) (n uint64, neg, ok bool) { + if len(b) > 0 && b[0] == '-' { + neg = true + b = b[1:] + } + if len(b) == 0 || len(b) > 19 { + return 0, false, false + } + for _, c := range b { + if c < '0' || c > '9' { + return 0, false, false + } + n = n*10 + uint64(c-'0') + } + return n, neg, true +} + +// sockstatReader fills counts[i] from fds[i]. An fd <= 0 (never opened; 0 +// is stdin and never a sockstat fd) or a failed read leaves counts[i] +// unknown. It returns how many reads failed, and an error when the reader +// itself is no longer usable (the caller falls back to the syscall reader). +type sockstatReader interface { + read(fds []int, counts []sockstatCount) (failed int, err error) + close() +} + +// errSockstatRingBroken: a submit or wait on the sockstat ring failed, so +// reads may still be in flight into its buffers; it is not used again. +var errSockstatRingBroken = errors.New("sockstat ring: submit/wait failed") + +// readSockstatInto parses buf[:n] into c. +func readSockstatInto(c *sockstatCount, buf []byte, n int) bool { + if n <= 0 { + return false + } + inuse, tw, ok := parseSockstat(buf[:n]) + if !ok { + return false + } + *c = sockstatCount{inuse: inuse, tw: tw, known: true} + return true +} + +// syscallSockstatReader does one pread per namespace. +type syscallSockstatReader struct { + buf []byte + pread func(fd int, p []byte, off int64) (int, error) +} + +func newSyscallSockstatReader() *syscallSockstatReader { + return &syscallSockstatReader{buf: make([]byte, sockstatBufSize), pread: unix.Pread} +} + +func (r *syscallSockstatReader) read(fds []int, counts []sockstatCount) (failed int, err error) { + for i, fd := range fds { + counts[i] = sockstatCount{} + if fd <= 0 { + continue + } + n, err := r.pread(fd, r.buf, 0) + if err != nil || !readSockstatInto(&counts[i], r.buf, n) { + failed++ + } + } + return failed, nil +} + +func (*syscallSockstatReader) close() {} + +// ringSockstatReader batches the reads through an io_uring: one +// io_uring_enter per batch. procfs files can't be read without blocking +// (no FMODE_NOWAIT; io_uring/rw.c), so each read goes to an io-wq worker; +// the SQEs set IOSQE_ASYNC to skip the doomed inline attempt, and the +// ring caps its io-wq workers so a batch doesn't spawn a thread per read. +// +// The ring is SINGLE_ISSUER, so one goroutine, locked to its thread, +// owns it and serves read calls over a channel. +type ringSockstatReader struct { + reqs chan ringSockstatReq + reply chan ringSockstatReply + done chan struct{} +} + +type ringSockstatReq struct { + fds []int + counts []sockstatCount + reply chan ringSockstatReply +} + +type ringSockstatReply struct { + failed int + submits int + err error +} + +// newRingSockstatReader starts the ring's owner goroutine. It returns an +// error, and starts nothing, if the ring can't be set up. +func newRingSockstatReader(batch, workers uint32) (*ringSockstatReader, error) { + if batch == 0 { + return nil, errors.New("sockstat ring: batch size 0") + } + r := &ringSockstatReader{ + reqs: make(chan ringSockstatReq), + reply: make(chan ringSockstatReply, 1), + done: make(chan struct{}), + } + ready := make(chan error, 1) + go r.serve(int(batch), workers, ready) + if err := <-ready; err != nil { + return nil, err + } + return r, nil +} + +func (r *ringSockstatReader) serve(batch int, workers uint32, ready chan<- error) { + defer close(r.done) + // The ring must be used from the task that created it (SINGLE_ISSUER). + // This goroutine never changes namespace, so the thread is reusable. + runtime.LockOSThread() + defer runtime.UnlockOSThread() //nolint:forbidigo // safe: this thread never calls setns; the lock only pins the SINGLE_ISSUER ring to one task + + ring, err := xio.New(xio.Config{RecvBatchSize: batch, CQEBatchSize: batch}) + if err != nil { + ready <- fmt.Errorf("sockstat ring: %w", err) + return + } + defer ring.Close(0, nil) + if workers > 0 { + if _, _, err := ring.SetIOWQMaxWorkers(workers, workers); err != nil { + ready <- err + return + } + } + ready <- nil + + b := newRingBatcher(ring, batch) + for req := range r.reqs { + failed, submits, err := b.read(req.fds, req.counts) + req.reply <- ringSockstatReply{failed: failed, submits: submits, err: err} + } +} + +func (r *ringSockstatReader) read(fds []int, counts []sockstatCount) (failed int, err error) { + r.reqs <- ringSockstatReq{fds: fds, counts: counts, reply: r.reply} + rep := <-r.reply + return rep.failed, rep.err +} + +func (r *ringSockstatReader) close() { + close(r.reqs) + <-r.done +} + +// sockstatRing is the part of *xio.Ring the batcher uses (a seam for +// tests). +type sockstatRing interface { + EnqueueReadAt(fd int, buf *[]byte, off uint64, async bool) (uint32, error) + SubmitAndWait(waitNr uint32) (int, error) + DrainBatch() []xio.Result + WaitOne() ([]xio.Result, error) +} + +// ringBatcher queues up to batch reads, submits them in one +// io_uring_enter, and matches each CQE to its namespace by request ID. +type ringBatcher struct { + ring sockstatRing + batch int + bufs []*[]byte + slot map[uint32]ringSlot // request ID → namespace index and buffer + broken bool +} + +type ringSlot struct { + idx int + buf *[]byte +} + +func newRingBatcher(ring sockstatRing, batch int) *ringBatcher { + b := &ringBatcher{ring: ring, batch: batch, bufs: make([]*[]byte, batch), slot: make(map[uint32]ringSlot, batch)} + for i := range b.bufs { + buf := make([]byte, sockstatBufSize) + b.bufs[i] = &buf + } + return b +} + +// read returns the failed-read count, the number of io_uring_enter +// submits it made, and errSockstatRingBroken once a submit or wait fails. +func (b *ringBatcher) read(fds []int, counts []sockstatCount) (failed, submits int, err error) { + for start := 0; start < len(fds); start += b.batch { + end := min(start+b.batch, len(fds)) + if b.broken { + clear(counts[start:]) + return failed + len(fds) - start, submits, errSockstatRingBroken + } + f, s := b.readBatch(fds[start:end], counts[start:end]) + failed += f + submits += s + } + if b.broken { + return failed, submits, errSockstatRingBroken + } + return failed, submits, nil +} + +func (b *ringBatcher) readBatch(fds []int, counts []sockstatCount) (failed, submits int) { + clear(b.slot) + for i, fd := range fds { + counts[i] = sockstatCount{} + if fd <= 0 { + continue + } + buf := b.bufs[len(b.slot)] + id, err := b.ring.EnqueueReadAt(fd, buf, 0, true) + if err != nil { + failed++ + continue + } + b.slot[id] = ringSlot{idx: i, buf: buf} + } + want := len(b.slot) + if want == 0 { + return failed, 0 + } + if _, err := b.ring.SubmitAndWait(uint32(want)); err != nil { + b.broken = true + return failed + want, 1 + } + for got := 0; got < want; { + res := b.ring.DrainBatch() + if len(res) == 0 { + var err error + if res, err = b.ring.WaitOne(); err != nil { + b.broken = true + return failed + want - got, 1 + } + } + for _, x := range res { + sl, ok := b.slot[x.RequestID] + if !ok || x.Op != xio.OpReadAt { + continue + } + delete(b.slot, x.RequestID) + got++ + if !readSockstatInto(&counts[sl.idx], *sl.buf, int(x.Res)) { + failed++ + } + } + } + return failed, 1 +} diff --git a/pkg/xtcp/sockstat_test.go b/pkg/xtcp/sockstat_test.go new file mode 100644 index 000000000..63645a62f --- /dev/null +++ b/pkg/xtcp/sockstat_test.go @@ -0,0 +1,370 @@ +package xtcp + +import ( + "errors" + "os" + "runtime" + "slices" + "testing" + + "github.com/prometheus/client_golang/prometheus/testutil" + + "github.com/randomizedcoder/xtcp2/gen/go/xtcp_config" + xio "github.com/randomizedcoder/xtcp2/pkg/io_uring" +) + +const sockstatHostStyle = `sockets: used 1234 +TCP: inuse 107 orphan 0 tw 4 alloc 120 mem 9 +UDP: inuse 3 mem 2 +UDPLITE: inuse 0 +RAW: inuse 0 +FRAG: inuse 0 memory 0 +` + +func sockstatFile(inuse, tw string) string { + return "sockets: used 1\nTCP: inuse " + inuse + " orphan 0 tw " + tw + " alloc 0 mem 0\nUDP: inuse 0 mem 0\n" +} + +// TestParseSockstat covers the sockstat TCP line parser. +func TestParseSockstat(t *testing.T) { + tests := []struct { + name string + category string + description string + in string + expectedInuse uint64 + expectedTW uint64 + expectedOK bool + }{ + {name: "normal", category: "P", description: "host-style file", in: sockstatHostStyle, expectedInuse: 107, expectedTW: 4, expectedOK: true}, + {name: "fresh_netns", category: "P", description: "all zeros", in: sockstatFile("0", "0"), expectedOK: true}, + {name: "half_million", category: "P", description: "500k inuse, 20k TIME_WAIT", in: sockstatFile("500000", "20000"), expectedInuse: 500000, expectedTW: 20000, expectedOK: true}, + {name: "int32_max", category: "B", description: "counters at INT_MAX (the kernel prints %d)", in: sockstatFile("2147483647", "2147483647"), expectedInuse: 2147483647, expectedTW: 2147483647, expectedOK: true}, + {name: "first_line", category: "B", description: "TCP line first in the buffer", in: "TCP: inuse 5 orphan 0 tw 1 alloc 0 mem 0\n", expectedInuse: 5, expectedTW: 1, expectedOK: true}, + {name: "missing_tcp_line", category: "N", description: "no TCP: line", in: "sockets: used 1\nUDP: inuse 0 mem 0\n"}, + {name: "truncated", category: "N", description: "short read cut mid-number", in: "sockets: used 1\nTCP: inuse 10"}, + {name: "truncated_mid_line", category: "N", description: "short read cut after tw", in: "sockets: used 1\nTCP: inuse 10 orphan 0 tw 3"}, + {name: "garbage_digits", category: "N", description: "non-digit in a count", in: sockstatFile("12a4", "0")}, + {name: "negative_inuse", category: "N", description: "inuse is never negative (clamped by the kernel)", in: sockstatFile("-5", "0")}, + {name: "missing_value", category: "N", description: "key without a value", in: "TCP: inuse\n"}, + {name: "too_long", category: "N", description: "20 digits would overflow", in: sockstatFile("99999999999999999999", "0")}, + {name: "empty", category: "N", description: "empty read", in: ""}, + {name: "extra_whitespace", category: "C", description: "doubled spaces and tabs", in: "TCP: inuse 7\torphan 0 tw 2 alloc 0 mem 0\n", expectedInuse: 7, expectedTW: 2, expectedOK: true}, + {name: "tw_minus_one", category: "C", description: "tw -1 during namespace teardown", in: sockstatFile("3", "-1"), expectedInuse: 3, expectedOK: true}, + {name: "tcp6_not_tcp", category: "C", description: "a TCP6: line (sockstat6) is not TCP:", in: "TCP6: inuse 9\n"}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + inuse, tw, ok := parseSockstat([]byte(tc.in)) + if ok != tc.expectedOK || inuse != tc.expectedInuse || tw != tc.expectedTW { + t.Errorf("%s: got (%d, %d, %v), expected (%d, %d, %v)", + tc.description, inuse, tw, ok, tc.expectedInuse, tc.expectedTW, tc.expectedOK) + } + }) + } +} + +// TestParseSockstatAllocs: the parser runs per namespace per poll. +func TestParseSockstatAllocs(t *testing.T) { + b := []byte(sockstatHostStyle) + if n := testing.AllocsPerRun(100, func() { parseSockstat(b) }); n != 0 { + t.Errorf("parseSockstat allocates %v per call, expected 0", n) + } +} + +// openSockstatFDs opens n fds on this process's sockstat. +func openSockstatFDs(t *testing.T, n int) []int { + t.Helper() + fds := make([]int, n) + for i := range fds { + f, err := os.Open("/proc/self/net/sockstat") + if err != nil { + t.Skipf("sockstat: %v", err) + } + t.Cleanup(func() { f.Close() }) + fds[i] = int(f.Fd()) + } + return fds +} + +// directSockstat is the count a plain read gives, for comparison. +func directSockstat(t *testing.T) sockstatCount { + t.Helper() + b, err := os.ReadFile("/proc/self/net/sockstat") + if err != nil { + t.Skip(err) + } + inuse, tw, ok := parseSockstat(b) + if !ok { + t.Fatalf("unparsable sockstat %q", b) + } + return sockstatCount{inuse: inuse, tw: tw, known: true} +} + +// lockedRing makes a real ring for the batcher, owned by this test's +// thread (SINGLE_ISSUER). +func lockedRing(t *testing.T, batch int) *xio.Ring { + t.Helper() + runtime.LockOSThread() + t.Cleanup(func() { + runtime.UnlockOSThread() //nolint:forbidigo // safe: test pins the SINGLE_ISSUER ring to one thread; no netns change + }) + r, err := xio.New(xio.Config{RecvBatchSize: batch, CQEBatchSize: batch}) + if err != nil { + t.Skipf("io_uring unavailable: %v", err) + } + t.Cleanup(func() { r.Close(0, nil) }) + return r +} + +// TestSockstatReader runs the same table through the pread reader and the +// io_uring batcher. Counts are checked on a quiet test process, so the +// direct read and the reader's read see the same sockets. +func TestSockstatReader(t *testing.T) { + const badFD = 1 << 20 // EBADF + tests := []struct { + name string + category string + description string + n int + batch int + bad []int // indexes given a bad fd + minusOne []int // indexes given fd -1 + expectedSubmits int // io_uring only + }{ + {name: "one_ns", category: "P", description: "one real sockstat fd", n: 1, batch: 64, expectedSubmits: 1}, + {name: "batch_exact", category: "P", description: "128 fds, batch 64", n: 128, batch: 64, expectedSubmits: 2}, + {name: "batch_remainder", category: "B", description: "130 fds, batch 64: the last batch has 2", n: 130, batch: 64, expectedSubmits: 3}, + {name: "batch_one", category: "B", description: "batch 1: one submit per namespace", n: 5, batch: 1, expectedSubmits: 5}, + {name: "batch_over_n", category: "B", description: "10 fds, batch 128", n: 10, batch: 128, expectedSubmits: 1}, + {name: "zero_ns", category: "B", description: "no namespaces", n: 0, batch: 64, expectedSubmits: 0}, + {name: "bad_fd", category: "N", description: "one bad fd: only it is unknown", n: 8, batch: 4, bad: []int{5}, expectedSubmits: 2}, + {name: "statfd_minus_one", category: "N", description: "fd -1 is skipped, unknown, and queues no SQE", n: 4, batch: 4, minusOne: []int{0, 3}, expectedSubmits: 1}, + {name: "all_minus_one", category: "C", description: "every fd -1: no submit at all", n: 3, batch: 4, minusOne: []int{0, 1, 2}, expectedSubmits: 0}, + } + want := directSockstat(t) + for _, tc := range tests { + build := func(t *testing.T) []int { + fds := openSockstatFDs(t, tc.n) + for _, i := range tc.bad { + fds[i] = badFD + } + for _, i := range tc.minusOne { + fds[i] = -1 + } + return fds + } + check := func(t *testing.T, kind string, counts []sockstatCount, failed int) { + t.Helper() + for i, c := range counts { + unknown := slices.Contains(tc.bad, i) || slices.Contains(tc.minusOne, i) + if unknown && c.known { + t.Errorf("%s %s: ns %d known, expected unknown", kind, tc.description, i) + } + if !unknown && c != want { + t.Errorf("%s %s: ns %d = %+v, expected %+v", kind, tc.description, i, c, want) + } + } + if failed != len(tc.bad) { + t.Errorf("%s %s: failed=%d, expected %d", kind, tc.description, failed, len(tc.bad)) + } + } + t.Run(tc.name+"/syscall", func(t *testing.T) { + fds := build(t) + counts := make([]sockstatCount, len(fds)) + failed, err := newSyscallSockstatReader().read(fds, counts) + if err != nil { + t.Fatal(err) + } + check(t, "syscall", counts, failed) + }) + t.Run(tc.name+"/io_uring", func(t *testing.T) { + fds := build(t) + b := newRingBatcher(lockedRing(t, tc.batch), tc.batch) + counts := make([]sockstatCount, len(fds)) + failed, submits, err := b.read(fds, counts) + if err != nil { + t.Fatal(err) + } + check(t, "io_uring", counts, failed) + if submits != tc.expectedSubmits { + t.Errorf("%s: %d submits, expected %d", tc.description, submits, tc.expectedSubmits) + } + }) + } +} + +// TestRingSockstatReader runs the goroutine-owned reader end to end. +func TestRingSockstatReader(t *testing.T) { + r, err := newRingSockstatReader(16, 2) + if err != nil { + t.Skipf("io_uring unavailable: %v", err) + } + defer r.close() + fds := openSockstatFDs(t, 40) + counts := make([]sockstatCount, len(fds)) + for range 3 { // reused across polls + failed, err := r.read(fds, counts) + if err != nil || failed != 0 { + t.Fatalf("failed=%d err=%v", failed, err) + } + for i, c := range counts { + if !c.known { + t.Fatalf("ns %d unknown", i) + } + } + } +} + +// fakeSockstatRing completes reads from a fd → file table, in an order +// the test picks. +type fakeSockstatRing struct { + files map[int]string + queued []fakeRead + next uint32 + reverse bool + failWait bool + completed []xio.Result +} + +type fakeRead struct { + id uint32 + fd int + buf *[]byte +} + +func (f *fakeSockstatRing) EnqueueReadAt(fd int, buf *[]byte, _ uint64, _ bool) (uint32, error) { + f.next++ + f.queued = append(f.queued, fakeRead{id: f.next, fd: fd, buf: buf}) + return f.next, nil +} + +func (f *fakeSockstatRing) SubmitAndWait(uint32) (int, error) { + if f.failWait { + return 0, errors.New("EINTR") + } + n := len(f.queued) + for _, q := range f.queued { + res := int32(copy(*q.buf, f.files[q.fd])) + if _, ok := f.files[q.fd]; !ok { + res = -9 // -EBADF + } + f.completed = append(f.completed, xio.Result{Op: xio.OpReadAt, RequestID: q.id, Res: res}) + } + f.queued = f.queued[:0] + if f.reverse { + slices.Reverse(f.completed) + } + return n, nil +} + +func (f *fakeSockstatRing) DrainBatch() []xio.Result { + out := f.completed + f.completed = nil + return out +} + +func (f *fakeSockstatRing) WaitOne() ([]xio.Result, error) { return nil, errors.New("nothing pending") } + +// TestRingBatcherCorners uses the fake ring for completions a real kernel +// won't produce on demand. +func TestRingBatcherCorners(t *testing.T) { + files := map[int]string{ + 10: sockstatFile("1", "0"), 11: sockstatFile("2", "0"), 12: sockstatFile("3", "0"), + 13: sockstatFile("4", "0"), 14: "garbage", + } + tests := []struct { + name string + category string + description string + fds []int + reverse bool + failWait bool + expectedInuse []int64 // -1: unknown + expectedFailed int + expectedErr bool + }{ + {name: "cqe_out_of_order", category: "C", description: "CQEs complete in reverse: each lands on its own namespace", + fds: []int{10, 11, 12, 13}, reverse: true, expectedInuse: []int64{1, 2, 3, 4}}, + {name: "in_order", category: "P", description: "CQEs in order", fds: []int{13, 12, 11, 10}, expectedInuse: []int64{4, 3, 2, 1}}, + {name: "negative_res", category: "N", description: "a CQE with -EBADF marks only its namespace unknown", + fds: []int{10, 99, 12}, expectedInuse: []int64{1, -1, 3}, expectedFailed: 1}, + {name: "unparsable", category: "N", description: "a short or garbage read is unknown", + fds: []int{14, 11}, expectedInuse: []int64{-1, 2}, expectedFailed: 1}, + {name: "submit_fails", category: "N", description: "a failed submit marks the batch unknown and the ring broken", + fds: []int{10, 11, 12}, failWait: true, expectedInuse: []int64{-1, -1, -1}, expectedFailed: 3, expectedErr: true}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + ring := &fakeSockstatRing{files: files, reverse: tc.reverse, failWait: tc.failWait} + b := newRingBatcher(ring, 2) + counts := make([]sockstatCount, len(tc.fds)) + failed, _, err := b.read(tc.fds, counts) + if (err != nil) != tc.expectedErr || failed != tc.expectedFailed { + t.Errorf("%s: failed=%d err=%v, expected failed=%d err=%v", tc.description, failed, err, tc.expectedFailed, tc.expectedErr) + } + for i, c := range counts { + got := int64(-1) + if c.known { + got = int64(c.inuse) + } + if got != tc.expectedInuse[i] { + t.Errorf("%s: ns %d inuse=%d, expected %d", tc.description, i, got, tc.expectedInuse[i]) + } + } + }) + } +} + +// TestNewPollGateFallback: the reader choice, and the counted pread +// fallback when the ring can't be set up. +func TestNewPollGateFallback(t *testing.T) { + tests := []struct { + name string + category string + description string + ioUring bool + ringErr error + expectedSyscall bool + expectedFallback float64 + }{ + {name: "syscall_default", category: "P", description: "without -ioUring the pread reader is used", expectedSyscall: true}, + {name: "ring", category: "P", description: "with -ioUring the ring reader is used", ioUring: true}, + {name: "ring_setup_fails", category: "N", description: "ring setup error falls back to pread, counted", ioUring: true, + ringErr: errors.New("ENOSYS"), expectedSyscall: true, expectedFallback: 1}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + prev := newSockstatRingReader + t.Cleanup(func() { newSockstatRingReader = prev }) + newSockstatRingReader = func(uint32, uint32) (sockstatReader, error) { + if tc.ringErr != nil { + return nil, tc.ringErr + } + return &syscallSockstatReader{}, nil // stand-in: any non-pread-default value + } + x := newCapsXTCP(t) + x.config = &xtcp_config.XtcpConfig{IoUring: tc.ioUring, MaxRecordsPerPoll: 1} + req := make([]byte, 72) + x.nlRequest = &req + g := x.newPollGate() + _, isDefault := g.reader.(*syscallSockstatReader) + isDefault = isDefault && g.reader.(*syscallSockstatReader).pread != nil + if isDefault != tc.expectedSyscall { + t.Errorf("%s: pread reader=%v, expected %v", tc.description, isDefault, tc.expectedSyscall) + } + got := testutil.ToFloat64(x.pC.WithLabelValues("poller", "sockstatRing", "fallback")) + if got != tc.expectedFallback { + t.Errorf("%s: fallback=%v, expected %v", tc.description, got, tc.expectedFallback) + } + }) + } +} + +// TestSockstatPathIsThreadSelf guards the path: /proc/self/net follows the +// thread-group leader, not the thread that just called Setns. +func TestSockstatPathIsThreadSelf(t *testing.T) { + if sockstatPath != "/proc/thread-self/net/sockstat" { + t.Errorf("sockstatPath=%q: must follow the calling thread's namespace after Setns", sockstatPath) + } +} diff --git a/pkg/xtcp/xtcp.go b/pkg/xtcp/xtcp.go index cfc964b8d..190351a6f 100644 --- a/pkg/xtcp/xtcp.go +++ b/pkg/xtcp/xtcp.go @@ -235,7 +235,13 @@ type XTCP struct { // "records"); pNetnsDropped counts namespaces reconcile left untracked // at -maxNetns. See caps.go. nil until InitPromethus. pDumpDropped *prometheus.CounterVec - pNetnsDropped prometheus.Counter + pNetnsDropped *prometheus.CounterVec + // The socket-count gate and reconcile limits (pollgate.go, + // ns_reconcile.go). + pPollSockets prometheus.Gauge + pPollDegraded *prometheus.CounterVec + pReconcileIncomplete *prometheus.CounterVec + gate *pollGate debugLevel uint32 } @@ -272,6 +278,10 @@ type netNSitem struct { cancel context.CancelFunc wg *sync.WaitGroup socketFD int + // statFD is this namespace's sockstat, opened in the namespace for the + // socket-count gate (sockstat.go). <= 0 means not open: the gate is off, + // the open failed, or the slot is still reserved. + statFD int } type netlinkerDone struct { From df16161867149ae814d9bd323f0252d07376b7b0 Mon Sep 17 00:00:00 2001 From: "randomizedcoder dave.seddon.ca@gmail.com" Date: Fri, 13 Nov 2026 09:42:29 -0800 Subject: [PATCH 09/19] fix(xtcp): sockstat fd lifetime and broken-ring buffers; shard on the ephemeral side - statHandle: the poller reads each sockstat fd under a read lock and the namespace teardown closes it under the write lock, so a poll never reads an fd number after close (and reuse). - A sockstat ring whose submit/wait fails is never closed and its buffers stay reachable (io-wq reads may still write into them); EINTR retried. - Shard key is the ephemeral side (sport if >= 32768, else dport) and the ranges split 32768-65535: an exact partition, and a busy listener's sockets spread over every shard instead of all landing in one. - Planner, bytecode, request and end-to-end gate tests. Co-Authored-By: Claude Opus 5.5 --- pkg/xtcp/ns_add.go | 1 - pkg/xtcp/ns_createNetlinkersAndStore.go | 4 +- pkg/xtcp/ns_extra_test.go | 4 +- pkg/xtcp/ns_map_count.go | 6 +- pkg/xtcp/ns_net_namespace.go | 10 +- pkg/xtcp/poller.go | 13 +- pkg/xtcp/pollgate.go | 10 +- pkg/xtcp/pollgate_test.go | 267 ++++++++++++++++++ pkg/xtcp/pollplan.go | 72 +++-- pkg/xtcp/pollplan_test.go | 361 ++++++++++++++++++++++++ pkg/xtcp/sockstat.go | 92 +++++- pkg/xtcp/xtcp.go | 8 +- 12 files changed, 802 insertions(+), 46 deletions(-) create mode 100644 pkg/xtcp/pollgate_test.go create mode 100644 pkg/xtcp/pollplan_test.go diff --git a/pkg/xtcp/ns_add.go b/pkg/xtcp/ns_add.go index 672b28171..ef9a8040a 100644 --- a/pkg/xtcp/ns_add.go +++ b/pkg/xtcp/ns_add.go @@ -34,7 +34,6 @@ func (x *XTCP) nsAdd(ctx context.Context, id nsIdentity) { ctx: nsCtx, cancel: nsCancel, socketFD: -1, // not opened yet; netNamespaceInstance fills it in - statFD: -1, }); loaded { // Already tracked — release the context we just made and bail. nsCancel() diff --git a/pkg/xtcp/ns_createNetlinkersAndStore.go b/pkg/xtcp/ns_createNetlinkersAndStore.go index 69afc62fb..91c16eb45 100644 --- a/pkg/xtcp/ns_createNetlinkersAndStore.go +++ b/pkg/xtcp/ns_createNetlinkersAndStore.go @@ -13,7 +13,7 @@ import ( // leaving netNamespaceInstance blocked on the parent (daemon-lifetime) // context — its deferred closeSocket(fd) never fired on a delete, leaking // one netlink fd + one goroutine per namespace removed. -func (x *XTCP) createNetlinkersAndStore(nsCtx context.Context, nsCancel context.CancelFunc, inode uint64, pid int, name *string, fd, statFD int) { +func (x *XTCP) createNetlinkersAndStore(nsCtx context.Context, nsCancel context.CancelFunc, inode uint64, pid int, name *string, fd int, stat *statHandle) { x.pC.WithLabelValues("createWorksAndStore", "start", "counter").Inc() @@ -40,7 +40,7 @@ func (x *XTCP) createNetlinkersAndStore(nsCtx context.Context, nsCancel context. cancel: nsCancel, wg: wg, socketFD: fd, - statFD: statFD, + stat: stat, } wg.Add(1) diff --git a/pkg/xtcp/ns_extra_test.go b/pkg/xtcp/ns_extra_test.go index b97eef49a..f59033769 100644 --- a/pkg/xtcp/ns_extra_test.go +++ b/pkg/xtcp/ns_extra_test.go @@ -81,7 +81,7 @@ func TestCreateNetlinkersAndStore_zeroNetlinkers(t *testing.T) { const inode = uint64(4026531111) nsCtx, nsCancel := context.WithCancel(context.Background()) defer nsCancel() - x.createNetlinkersAndStore(nsCtx, nsCancel, inode, 100, &nsName, fds[0], -1) + x.createNetlinkersAndStore(nsCtx, nsCancel, inode, 100, &nsName, fds[0], nil) if _, ok := x.nsMap.Load(inode); !ok { t.Error("nsMap should contain the new ns entry") @@ -152,7 +152,7 @@ func TestCreateNetlinkersAndStore_spawnsNetlinkers(t *testing.T) { const inode = uint64(4026531112) nsCtx, nsCancel := context.WithCancel(context.Background()) defer nsCancel() - x.createNetlinkersAndStore(nsCtx, nsCancel, inode, 100, &nsName, fds[0], -1) + x.createNetlinkersAndStore(nsCtx, nsCancel, inode, 100, &nsName, fds[0], nil) ran.Wait() if _, ok := x.nsMap.Load(inode); !ok { diff --git a/pkg/xtcp/ns_map_count.go b/pkg/xtcp/ns_map_count.go index 032f64d37..f0da46f36 100644 --- a/pkg/xtcp/ns_map_count.go +++ b/pkg/xtcp/ns_map_count.go @@ -89,10 +89,10 @@ func (x *XTCP) GetNetlinkSocketFDs() (fds []int) { return getNetlinkSocketFDs(x.nsMap) } -// nsPollFDs is one tracked namespace's netlink socket and sockstat fd. +// nsPollFDs is one tracked namespace's netlink socket and sockstat. type nsPollFDs struct { socketFD int - statFD int + stat *statHandle } // getPollFDs appends every tracked namespace's fds to dst (reused across @@ -104,7 +104,7 @@ func getPollFDs(m *sync.Map, dst []nsPollFDs) []nsPollFDs { if !ok { return true } - dst = append(dst, nsPollFDs{socketFD: item.socketFD, statFD: item.statFD}) + dst = append(dst, nsPollFDs{socketFD: item.socketFD, stat: item.stat}) return true }) return dst diff --git a/pkg/xtcp/ns_net_namespace.go b/pkg/xtcp/ns_net_namespace.go index 77625561c..c51a70dc1 100644 --- a/pkg/xtcp/ns_net_namespace.go +++ b/pkg/xtcp/ns_net_namespace.go @@ -151,10 +151,8 @@ func (x *XTCP) netNamespaceInstance(nsCtx context.Context, nsCancel context.Canc // The sockstat fd for the socket-count gate, opened here so it is bound // to this namespace. Closed with the socket when the namespace goes. - statFD := x.openSockstatFD() - if statFD > 0 { - defer x.closeFD(statFD) - } + stat := newStatHandle(x.openSockstatFD()) + defer stat.close(x.closeFD) // https://godoc.org/golang.org/x/sys/unix#Bind // https://godoc.org/golang.org/x/sys/unix#SockaddrNetlink @@ -178,7 +176,7 @@ func (x *XTCP) netNamespaceInstance(nsCtx context.Context, nsCancel context.Canc // (see nsAdd). createNetlinkersAndStore fills in the socketFD and starts // the netlinkers; it no-ops if the namespace was already deleted during // the setns/socket init above. - x.createNetlinkersAndStore(nsCtx, nsCancel, inode, pid, name, socketFD, statFD) + x.createNetlinkersAndStore(nsCtx, nsCancel, inode, pid, name, socketFD, stat) x.pH.WithLabelValues("netNamespaceInstance", "store", "counter").Observe(time.Since(startTime).Seconds()) @@ -259,7 +257,7 @@ func (x *XTCP) openDefaultNetLinkSocket(ctx context.Context) { nsCtx, nsCancel := context.WithCancel(ctx) // xtcp2's own namespace: any unlocked thread is in it, and both fds live // as long as the daemon. - x.createNetlinkersAndStore(nsCtx, nsCancel, x.selfNsInode, os.Getpid(), &df, socketFD, x.openSockstatFD()) + x.createNetlinkersAndStore(nsCtx, nsCancel, x.selfNsInode, os.Getpid(), &df, socketFD, newStatHandle(x.openSockstatFD())) // The host namespace has no netNamespaceInstance to run its locality // listener; any unlocked thread is in it. diff --git a/pkg/xtcp/poller.go b/pkg/xtcp/poller.go index 029a60546..9350e4583 100644 --- a/pkg/xtcp/poller.go +++ b/pkg/xtcp/poller.go @@ -458,15 +458,16 @@ func (x *XTCP) pollWith(fd int, req *[]byte) { } } +// sendDumpRequest is the seam tests swap to capture the request each +// namespace is sent. +var sendDumpRequest = func(fd int, b []byte) error { + return unix.Sendto(fd, b, 0, &unix.SockaddrNetlink{Family: syscall.AF_NETLINK}) +} + func (x *XTCP) sendNetlinkDumpRequest(fd int, packetBytes *[]byte) { // Send the netlink dump request // https://godoc.org/golang.org/x/sys/unix#Sendto - err := unix.Sendto( - fd, - *packetBytes, - 0, - &unix.SockaddrNetlink{Family: syscall.AF_NETLINK}, - ) + err := sendDumpRequest(fd, *packetBytes) if err != nil { x.pC.WithLabelValues("SendNetlinkDumpRequest", "Sendto", "error").Inc() if x.debugLevel > 10 { diff --git a/pkg/xtcp/pollgate.go b/pkg/xtcp/pollgate.go index 8b45c33db..259638a0e 100644 --- a/pkg/xtcp/pollgate.go +++ b/pkg/xtcp/pollgate.go @@ -78,8 +78,16 @@ func (x *XTCP) planGatedPoll(pollingLoops uint64) []nsSend { continue } g.ready = append(g.ready, p) - g.statFDs = append(g.statFDs, p.statFD) + g.statFDs = append(g.statFDs, p.stat.acquire()) } + // Hold every handle's read lock until the reads are done, so a + // namespace torn down meanwhile can't close (and the kernel reuse) an + // fd the reader is about to use. A teardown waits at most this read. + defer func() { + for _, p := range g.ready { + p.stat.release() + } + }() if cap(g.counts) < len(g.ready) { g.counts = make([]sockstatCount, len(g.ready)) } diff --git a/pkg/xtcp/pollgate_test.go b/pkg/xtcp/pollgate_test.go new file mode 100644 index 000000000..7cc136e83 --- /dev/null +++ b/pkg/xtcp/pollgate_test.go @@ -0,0 +1,267 @@ +package xtcp + +import ( + "encoding/binary" + "math/rand/v2" + "os" + "path/filepath" + "testing" + "time" + + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/testutil" + + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" +) + +// fakeKernelDump applies a captured request the way tcp_diag_dump does to +// a synthetic socket table: the idiag_states check, then the bytecode +// (xtcpnl's model of inet_diag_bc_run). It returns the records the dump +// would hold. +func fakeKernelDump(t *testing.T, req []byte, table []fakeSock) int { + t.Helper() + r, err := xtcpnl.ParseInetDiagRequest(req[16:]) + if err != nil { + t.Fatalf("request: %v", err) + } + // The collector writes idiag_states big-endian (see init.go); the kernel + // reads it host order, which is what the degraded requests write. + states := binary.LittleEndian.Uint32(req[20:24]) + if states&(1<<3) != 0 { + states |= 1 << 12 // tcp_diag.c: SYN_RECV implies NEW_SYN_RECV + } + n := 0 + for _, s := range table { + if states&(1< n.wantRecMax { + t.Errorf("%s: fd %d dump has %d records, expected <= %d", tc.description, fd, rec, n.wantRecMax) + } + } + for level, want := range map[string]float64{"sample": tc.expectedSample, "states": tc.expectedStates} { + if got := testutil.ToFloat64(x.pPollDegraded.WithLabelValues(level)); got != want { + t.Errorf("%s: poll_degraded{%s}=%v, expected %v", tc.description, level, got, want) + } + } + if got := testutil.ToFloat64(x.pC.WithLabelValues("poller", "planPoll", "unknownCount")); got != tc.expectedUnknown { + t.Errorf("%s: unknownCount=%v, expected %v", tc.description, got, tc.expectedUnknown) + } + }) + } +} + +// TestPollGateOffUnchanged: with -maxRecordsPerPoll 0 every namespace is +// sent the startup request and no sockstat is read. +func TestPollGateOffUnchanged(t *testing.T) { + x := newPollerFixture(t) + req := make([]byte, xtcpnl.InetDiagRequestSizeCst) + x.nlRequest = &req + var got [][]byte + prev := sendDumpRequest + t.Cleanup(func() { sendDumpRequest = prev }) + sendDumpRequest = func(_ int, b []byte) error { got = append(got, b); return nil } + x.nsMap.Store(uint64(1), netNSitem{inode: 1, socketFD: 5, stat: newStatHandle(1 << 20)}) + x.pollAllNetlinkSockets(0) + if len(got) != 1 || &got[0][0] != &req[0] || x.gate != nil { + t.Errorf("gate off: sent %d requests (startup buffer=%v), gate=%v", len(got), len(got) == 1 && &got[0][0] == &req[0], x.gate) + } +} + +// TestStatHandle: the poller's read lock and the teardown's close. +func TestStatHandle(t *testing.T) { + tests := []struct { + name string + category string + description string + run func(t *testing.T) + }{ + {name: "nil_handle", category: "B", description: "fd <= 0 gives a nil handle; acquire is -1 and release/close are no-ops", run: func(t *testing.T) { + for _, fd := range []int{-1, 0} { + h := newStatHandle(fd) + if h != nil || h.acquire() != -1 { + t.Fatalf("fd %d: handle %v", fd, h) + } + h.release() + h.close(func(int) { t.Fatal("closed a nil handle") }) + } + }}, + {name: "acquire_open", category: "P", description: "an open handle gives its fd", run: func(t *testing.T) { + h := newStatHandle(42) + if fd := h.acquire(); fd != 42 { + t.Errorf("fd %d, expected 42", fd) + } + h.release() + }}, + {name: "close_waits_for_read", category: "C", description: "close blocks until the poll's read releases, then closes once", run: func(t *testing.T) { + h := newStatHandle(42) + fd := h.acquire() + closed := make(chan int, 2) + go h.close(func(fd int) { closed <- fd }) + select { + case <-closed: + t.Fatal("closed while a read held the handle") + case <-time.After(50 * time.Millisecond): + } + h.release() + if got := <-closed; got != fd { + t.Errorf("closed %d, expected %d", got, fd) + } + h.close(func(int) { t.Error("closed twice") }) + if h.acquire() != -1 { + t.Error("acquire after close is not -1") + } + h.release() + }}, + } + for _, tc := range tests { + t.Run(tc.name, tc.run) + } +} diff --git a/pkg/xtcp/pollplan.go b/pkg/xtcp/pollplan.go index ebf246451..6a9d0609e 100644 --- a/pkg/xtcp/pollplan.go +++ b/pkg/xtcp/pollplan.go @@ -18,8 +18,10 @@ import ( // idiag_states check), so the dump is about sockstat's inuse. // 2. pollSample: also split the namespace's sockets into K port shards and // ask for shard (pollingLoops mod K) each poll, with inet_diag bytecode -// (sport in R_k) OR (dport in R_k). Every socket's dport is in exactly -// one range, so K consecutive polls see every socket at least once. +// matching shardKey(sport, dport) in R_k. The K ranges partition the +// port space, so K consecutive polls see every socket exactly once. +// Sockets that share both ports (differing only by address) share a +// shard; -maxRecordsPerNetns still bounds that. // // Port ops need no CAP_NET_ADMIN (only MARK_COND does; inet_diag.c // inet_diag_bc_audit), so the shard filter works wherever xtcp2 does. @@ -148,39 +150,75 @@ func degrade(c sockstatCount, demand, share, pollingLoops uint64) nsPlan { } } -// shardRange is the k-th of K equal slices of the port space 0..65535. +// shardRange is shard k of K's range of shard keys. Keys are almost all +// ephemeral ports (>= ephemeralLoCst), so the ranges split 32768..65535 +// evenly and shard 0 also takes every key below it (listeners, whose dport +// is 0, and the rare socket with no ephemeral side). func shardRange(k, shards uint32) (lo, hi uint16) { - const space = 1 << 16 - l := uint64(k) * space / uint64(shards) - h := uint64(k+1)*space/uint64(shards) - 1 + const span = 1<<16 - ephemeralLoCst + l := ephemeralLoCst + uint64(k)*span/uint64(shards) + h := ephemeralLoCst + uint64(k+1)*span/uint64(shards) - 1 + if k == 0 { + l = 0 + } return uint16(l), uint16(h) } -// shardBytecode is inet_diag bytecode for (sport in [lo,hi]) OR -// (dport in [lo,hi]), shaped as iproute2's ssfilter builds an OR (a; JMP; -// b) so every jump target is on the yes-chain, as the kernel's valid_cc -// requires: +// ephemeralLoCst splits the port space for sharding: a socket's shard key +// is its sport when sport >= ephemeralLoCst (a client-side ephemeral port, +// or a listener's accepted socket seen from the client) and its dport +// otherwise (a server-side socket: dport is the peer's ephemeral port). +// It covers Linux's default ip_local_port_range (32768-60999) and IANA's +// (49152-65535). Keying on the varying side spreads a busy listener's +// sockets over every shard, where keying on either port would put them all +// in the shard holding the listener's port. The split only affects the +// spread: the shards partition every socket either way. +const ephemeralLoCst = 32768 + +// shardKey is the port shardBytecode filters on. +func shardKey(sport, dport uint16) uint16 { + if sport >= ephemeralLoCst { + return sport + } + return dport +} + +// shardBytecode is inet_diag bytecode for shardKey(sport, dport) in +// [lo,hi]: +// +// (sport >= 32768 AND sport >= lo AND sport <= hi) OR +// (sport <= 32767 AND dport >= lo AND dport <= hi) // -// 0 S_GE lo yes 8 no 20 ┐ sport range; a miss goes to the dport range -// 8 S_LE hi yes 8 no 12 ┘ -// 16 JMP yes 4 no 20 sport matched: jump to the end (accept) -// 20 D_GE lo yes 8 no 20 ┐ dport range; a miss jumps past the end -// 28 D_LE hi yes 8 no 12 ┘ (reject) +// shaped as iproute2's ssfilter builds an OR (a; JMP; b) so every jump +// target is on the yes-chain, as the kernel's valid_cc requires: +// +// 0 S_GE 32768 yes 8 no 28 ┐ a: a miss goes to b (offset 28) +// 8 S_GE lo yes 8 no 20 │ +// 16 S_LE hi yes 8 no 12 ┘ +// 24 JMP yes 4 no 28 a matched: jump to the end (accept) +// 28 S_LE 32767 yes 8 no 28 ┐ b: a miss jumps past the end (reject) +// 36 D_GE lo yes 8 no 20 │ +// 44 D_LE hi yes 8 no 12 ┘ falling off the end accepts func shardBytecode(lo, hi uint16) []byte { op := func(b []byte, code, yes uint8, no uint16) []byte { b = append(b, code, yes) return binary.LittleEndian.AppendUint16(b, no) } port := func(b []byte, p uint16) []byte { return op(b, 0, 0, p) } - bc := make([]byte, 0, 36) + bc := make([]byte, 0, shardBytecodeLen) + bc = port(op(bc, xtcpnl.InetDiagBcSGe, 8, 28), ephemeralLoCst) bc = port(op(bc, xtcpnl.InetDiagBcSGe, 8, 20), lo) bc = port(op(bc, xtcpnl.InetDiagBcSLe, 8, 12), hi) - bc = op(bc, xtcpnl.InetDiagBcJmp, 4, 20) + bc = op(bc, xtcpnl.InetDiagBcJmp, 4, 28) + bc = port(op(bc, xtcpnl.InetDiagBcSLe, 8, 28), ephemeralLoCst-1) bc = port(op(bc, xtcpnl.InetDiagBcDGe, 8, 20), lo) bc = port(op(bc, xtcpnl.InetDiagBcDLe, 8, 12), hi) return bc } +// shardBytecodeLen is shardBytecode's length: six port ops and a JMP. +const shardBytecodeLen = 6*2*xtcpnl.InetDiagBcOpSizeCst + xtcpnl.InetDiagBcOpSizeCst + // nlattrHdrSize is struct nlattr. const nlattrHdrSize = 4 diff --git a/pkg/xtcp/pollplan_test.go b/pkg/xtcp/pollplan_test.go new file mode 100644 index 000000000..996e62688 --- /dev/null +++ b/pkg/xtcp/pollplan_test.go @@ -0,0 +1,361 @@ +package xtcp + +import ( + "encoding/binary" + "math/rand/v2" + "testing" + + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" +) + +func known(inuse, tw uint64) sockstatCount { return sockstatCount{inuse: inuse, tw: tw, known: true} } + +func repeatCount(c sockstatCount, n int) []sockstatCount { + out := make([]sockstatCount, n) + for i := range out { + out[i] = c + } + return out +} + +// TestFairShare covers the max-min water-filling. +func TestFairShare(t *testing.T) { + tests := []struct { + name string + category string + description string + sorted []uint64 + budget uint64 + expectedShare uint64 + expectedLimited bool + }{ + {name: "all_fit", category: "P", description: "total under budget", sorted: []uint64{1, 2, 3}, budget: 10, expectedShare: 3}, + {name: "one_heavy", category: "P", description: "small ones met, heavy one gets the rest", sorted: []uint64{10, 10, 500}, budget: 100, expectedShare: 80, expectedLimited: true}, + {name: "exact", category: "B", description: "total equals budget", sorted: []uint64{50, 50}, budget: 100, expectedShare: 50}, + {name: "plus_one", category: "B", description: "total is budget+1", sorted: []uint64{100, 100, 101}, budget: 300, expectedShare: 100, expectedLimited: true}, + {name: "empty", category: "B", description: "no namespaces", budget: 5, expectedShare: 5}, + {name: "all_equal_heavy", category: "C", description: "4096 x 1000 over 1M", sorted: func() []uint64 { + s := make([]uint64, 4096) + for i := range s { + s[i] = 1000 + } + return s + }(), budget: 1_000_000, expectedShare: 244, expectedLimited: true}, + {name: "budget_under_n", category: "C", description: "budget smaller than the namespace count", sorted: []uint64{5, 5, 5}, budget: 2, expectedShare: 0, expectedLimited: true}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + s, l := fairShare(tc.sorted, tc.budget) + if s != tc.expectedShare || l != tc.expectedLimited { + t.Errorf("%s: (%d, %v), expected (%d, %v)", tc.description, s, l, tc.expectedShare, tc.expectedLimited) + } + }) + } +} + +// TestPlanPoll simulates the kernel reporting large counts: the counts are +// inputs, so 500k sockets cost nothing to test. +func TestPlanPoll(t *testing.T) { + small := repeatCount(known(1000, 0), 10) + tests := []struct { + name string + category string + description string + counts []sockstatCount + budget uint64 + unknownAs uint64 + loop uint64 + // expected + levels map[int]pollLevel // index → level; others pollFull + shards map[int]uint32 + maxSum uint64 // planned total must not exceed (0: unchecked) + unknown int + }{ + {name: "under_budget", category: "P", description: "10 x 1k, budget 200k: all full", + counts: small, budget: 200_000, maxSum: 10_000}, + {name: "budget_zero", category: "P", description: "gate off: all full even at 500k", + counts: []sockstatCount{known(500_000, 0)}, budget: 0}, + {name: "one_heavy_500k", category: "N", description: "500k + ten at 1k, budget 200k: heavy one sampled, total within budget", + counts: append([]sockstatCount{known(500_000, 0)}, small...), budget: 200_000, + levels: map[int]pollLevel{0: pollSample}, shards: map[int]uint32{0: 3}, maxSum: 200_000}, + {name: "tw_heavy", category: "N", description: "inuse 50k, tw 450k: drop states only", + counts: append([]sockstatCount{known(50_000, 450_000)}, small...), budget: 200_000, + levels: map[int]pollLevel{0: pollStates}, maxSum: 200_000}, + {name: "two_heavy", category: "N", description: "500k + 400k, budget 200k: both sampled with equal shares", + counts: []sockstatCount{known(500_000, 0), known(400_000, 0)}, budget: 200_000, + levels: map[int]pollLevel{0: pollSample, 1: pollSample}, shards: map[int]uint32{0: 5, 1: 4}, maxSum: 200_000}, + {name: "exact_budget", category: "B", description: "total equals the budget: all full", + counts: []sockstatCount{known(100_000, 0), known(100_000, 0)}, budget: 200_000, maxSum: 200_000}, + {name: "budget_plus_one", category: "B", description: "total budget+1: one level drop, on the largest", + counts: []sockstatCount{known(100, 0), known(100, 0), known(100, 1)}, budget: 300, + levels: map[int]pollLevel{2: pollStates}, maxSum: 300}, + {name: "all_equal_heavy", category: "C", description: "4096 x 1k, budget 1M: share 244, all sampled K=5", + counts: repeatCount(known(1000, 0), 4096), budget: 1_000_000, maxSum: 1_000_000}, + {name: "unknown_count", category: "C", description: "an unreadable sockstat is taken as the per-netns cap", + counts: []sockstatCount{{}, known(10, 0)}, budget: 100_000, unknownAs: 262_144, + levels: map[int]pollLevel{0: pollSample}, shards: map[int]uint32{0: 3}, unknown: 1}, + {name: "unknown_no_cap", category: "C", description: "unknown with the per-netns cap off is taken as the budget", + counts: []sockstatCount{{}}, budget: 1000, unknown: 1}, + {name: "huge_vs_tiny_share", category: "C", description: "K is capped at maxShardsCst", + counts: []sockstatCount{known(50_000_000, 0), known(1, 0)}, budget: 1000, + levels: map[int]pollLevel{0: pollSample}, shards: map[int]uint32{0: maxShardsCst}}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + var p pollPlanner + plans := p.plan(tc.counts, tc.budget, tc.unknownAs, tc.loop) + if len(plans) != len(tc.counts) { + t.Fatalf("%s: %d plans for %d namespaces", tc.description, len(plans), len(tc.counts)) + } + var sum uint64 + unknown := 0 + for i, pl := range plans { + want := tc.levels[i] + if tc.name == "all_equal_heavy" { + want = pollSample + } + if pl.level != want { + t.Errorf("%s: ns %d level %s, expected %s", tc.description, i, pl.level, want) + } + if k, ok := tc.shards[i]; ok && pl.shards != k { + t.Errorf("%s: ns %d K=%d, expected %d", tc.description, i, pl.shards, k) + } + if tc.name == "all_equal_heavy" && pl.shards != 5 { + t.Errorf("%s: ns %d K=%d, expected 5", tc.description, i, pl.shards) + } + if pl.level == pollSample && pl.shard >= pl.shards { + t.Errorf("%s: ns %d shard %d >= K %d", tc.description, i, pl.shard, pl.shards) + } + if pl.unknown { + unknown++ + } + sum += pl.planned + } + if tc.maxSum > 0 && sum > tc.maxSum { + t.Errorf("%s: planned %d, expected <= %d", tc.description, sum, tc.maxSum) + } + if unknown != tc.unknown { + t.Errorf("%s: %d unknown, expected %d", tc.description, unknown, tc.unknown) + } + }) + } +} + +// TestPlanPollShardRotation: shard index follows pollingLoops mod K and +// stays below K when K changes. +func TestPlanPollShardRotation(t *testing.T) { + tests := []struct { + name string + category string + description string + inuse uint64 + loops []uint64 + expected []uint32 + expectedK uint32 + }{ + {name: "k3", category: "C", description: "K=3 over polls 0..5", inuse: 300, loops: []uint64{0, 1, 2, 3, 4, 5}, expected: []uint32{0, 1, 2, 0, 1, 2}, expectedK: 3}, + {name: "k_changes", category: "C", description: "K drops 4 -> 3 at poll 7: index stays < K", inuse: 300, loops: []uint64{7}, expected: []uint32{1}, expectedK: 3}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + var p pollPlanner + for i, loop := range tc.loops { + pl := p.plan([]sockstatCount{known(tc.inuse, 0), known(0, 0)}, 100, 0, loop)[0] + if pl.shards != tc.expectedK || pl.shard != tc.expected[i] { + t.Errorf("%s: loop %d shard %d/%d, expected %d/%d", tc.description, loop, pl.shard, pl.shards, tc.expected[i], tc.expectedK) + } + } + }) + } +} + +// TestPlanPollAllocs: no allocation once the planner is warm. +func TestPlanPollAllocs(t *testing.T) { + counts := repeatCount(known(1000, 0), 4096) + var p pollPlanner + p.plan(counts, 1_000_000, 0, 0) + if n := testing.AllocsPerRun(20, func() { p.plan(counts, 1_000_000, 0, 1) }); n != 0 { + t.Errorf("plan allocates %v per poll, expected 0", n) + } +} + +// TestShardBytecode runs the shard filter through xtcpnl's model of the +// kernel's audit and bytecode run. +func TestShardBytecode(t *testing.T) { + // 500k synthetic (sport, dport) pairs, fixed seed. + rng := rand.New(rand.NewPCG(1, 2)) + pairs := make([][2]uint16, 500_000) + for i := range pairs { + pairs[i] = [2]uint16{uint16(rng.Uint32()), uint16(rng.Uint32())} + } + match := func(bc []byte, sport, dport uint16) bool { + return xtcpnl.InetDiagBcRun(bc, &xtcpnl.InetDiagEntry{Family: 2, Sport: sport, Dport: dport}) + } + + tests := []struct { + name string + category string + description string + run func(t *testing.T) + }{ + {name: "audit_ok", category: "P", description: "every shard of K in {2,3,7,64,1024} passes the kernel audit without CAP_NET_ADMIN", run: func(t *testing.T) { + for _, k := range []uint32{2, 3, 7, 64, maxShardsCst} { + for i := range k { + lo, hi := shardRange(i, k) + if err := xtcpnl.InetDiagBcAudit(shardBytecode(lo, hi), false); err != nil { + t.Fatalf("K=%d k=%d: %v", k, i, err) + } + } + } + }}, + {name: "partition_500k", category: "P", description: "K=7 over 500k pairs: every pair matched by exactly one shard, the one holding its key", run: func(t *testing.T) { + const k = 7 + bcs := make([][]byte, k) + for i := range uint32(k) { + bcs[i] = shardBytecode(shardRange(i, k)) + } + for _, p := range pairs { + hits := 0 + for i, bc := range bcs { + if match(bc, p[0], p[1]) { + hits++ + if lo, hi := shardRange(uint32(i), k); shardKey(p[0], p[1]) < lo || shardKey(p[0], p[1]) > hi { + t.Fatalf("pair %v matched shard %d, key outside [%d,%d]", p, i, lo, hi) + } + } + } + if hits != 1 { + t.Fatalf("pair %v: %d shard hits, expected exactly 1", p, hits) + } + } + }}, + {name: "k_full_range", category: "B", description: "the [0,65535] range matches everything", run: func(t *testing.T) { + bc := shardBytecode(0, 65535) + for _, p := range pairs[:1000] { + if !match(bc, p[0], p[1]) { + t.Fatalf("pair %v missed", p) + } + } + }}, + {name: "range_edges", category: "B", description: "keys 0, 65535, 32767/32768 and K=3 boundaries (43690/43691, 54613/54614) land in exactly one shard", run: func(t *testing.T) { + const k = 3 + cases := [][2]uint16{ + {80, 0}, {80, 65535}, {65535, 80}, {32768, 1}, {32767, 32767}, {80, 32768}, + {80, 43690}, {80, 43691}, {54613, 443}, {54614, 443}, + } + for _, c := range cases { + n := 0 + for i := range uint32(k) { + lo, hi := shardRange(i, k) + key := shardKey(c[0], c[1]) + in := key >= lo && key <= hi + if got := match(shardBytecode(lo, hi), c[0], c[1]); got != in { + t.Errorf("sport %d dport %d shard %d: match=%v, key %d in range=%v", c[0], c[1], i, got, key, in) + } + if in { + n++ + } + } + if n != 1 { + t.Errorf("sport %d dport %d in %d shards, expected 1", c[0], c[1], n) + } + } + }}, + {name: "outside", category: "N", description: "server socket whose client port is outside the range: no match", run: func(t *testing.T) { + if match(shardBytecode(100, 200), 443, 50000) { + t.Error("matched") + } + }}, + {name: "single_listener", category: "C", description: "100k accepted sockets on sport 443, client ports ephemeral: spread within 10% of even over K=4", run: func(t *testing.T) { + const k = 4 + per := make([]int, k) + for _, p := range pairs[:100_000] { + dport := ephemeralLoCst + p[1]%(65536-ephemeralLoCst) + for i := range uint32(k) { + if match(shardBytecode(shardRange(i, k)), 443, dport) { + per[i]++ + } + } + } + t.Logf("per-shard records, one listener on 443: %v", per) + for i, n := range per { + if n < 22_500 || n > 27_500 { + t.Errorf("shard %d has %d of 100000, expected 25000 +-10%%: %v", i, n, per) + } + } + }}, + {name: "same_port_pair", category: "C", description: "sockets differing only by address share one shard (bounded by -maxRecordsPerNetns)", run: func(t *testing.T) { + n := 0 + for i := range uint32(4) { + if match(shardBytecode(shardRange(i, 4)), 443, 443) { + n++ + } + } + if n != 1 { + t.Errorf("%d shards, expected 1", n) + } + }}, + } + for _, tc := range tests { + t.Run(tc.name, tc.run) + } +} + +// TestPollRequests: the request each level sends. +func TestPollRequests(t *testing.T) { + full := make([]byte, xtcpnl.InetDiagRequestSizeCst) + binary.LittleEndian.PutUint32(full[0:4], xtcpnl.InetDiagRequestSizeCst) + binary.LittleEndian.PutUint32(full[20:24], 0x3fff) + r := newPollRequests(&full) + + tests := []struct { + name string + category string + description string + plan nsPlan + expectedLen int + expectedStates uint32 + expectedShared bool // same buffer as the startup request + }{ + {name: "full", category: "P", description: "full is the startup request itself", plan: nsPlan{level: pollFull}, + expectedLen: 72, expectedStates: 0x3fff, expectedShared: true}, + {name: "states", category: "P", description: "states clears TIME_WAIT, SYN_RECV, NEW_SYN_RECV", plan: nsPlan{level: pollStates}, + expectedLen: 72, expectedStates: 0x3fff &^ statesDegradeMask}, + {name: "sample", category: "P", description: "sample = states + a 56-byte bytecode attribute", plan: nsPlan{level: pollSample, shard: 1, shards: 3}, + expectedLen: 128, expectedStates: 0x3fff &^ statesDegradeMask}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + req, err := r.get(tc.plan) + if err != nil { + t.Fatal(err) + } + b := *req + if len(b) != tc.expectedLen || int(binary.LittleEndian.Uint32(b[0:4])) != tc.expectedLen { + t.Errorf("%s: len %d nlmsg_len %d, expected %d", tc.description, len(b), binary.LittleEndian.Uint32(b[0:4]), tc.expectedLen) + } + if s := binary.LittleEndian.Uint32(b[20:24]); s != tc.expectedStates { + t.Errorf("%s: states %#x, expected %#x", tc.description, s, tc.expectedStates) + } + if (req == &full) != tc.expectedShared { + t.Errorf("%s: shared=%v, expected %v", tc.description, req == &full, tc.expectedShared) + } + if tc.plan.level == pollSample { + parsed, err := xtcpnl.ParseInetDiagRequest(b[16:]) + if err != nil { + t.Fatalf("%s: kernel-model parse: %v", tc.description, err) + } + if err := xtcpnl.InetDiagBcAudit(parsed.Bytecode, false); err != nil { + t.Errorf("%s: audit: %v", tc.description, err) + } + again, _ := r.get(tc.plan) + if again != req { + t.Errorf("%s: not cached", tc.description) + } + } + }) + } + if binary.LittleEndian.Uint32(full[20:24]) != 0x3fff { + t.Error("building the degraded requests modified the startup request") + } +} diff --git a/pkg/xtcp/sockstat.go b/pkg/xtcp/sockstat.go index 32f726322..0497e7464 100644 --- a/pkg/xtcp/sockstat.go +++ b/pkg/xtcp/sockstat.go @@ -5,6 +5,8 @@ import ( "errors" "fmt" "runtime" + "sync" + "syscall" xio "github.com/randomizedcoder/xtcp2/pkg/io_uring" "golang.org/x/sys/unix" @@ -34,6 +36,53 @@ const sockstatBufSize = 1024 // namespace. /proc/self/net would follow the thread-group leader instead. const sockstatPath = "/proc/thread-self/net/sockstat" +// statHandle owns one namespace's sockstat fd. The poller reads it under +// the read lock; the namespace's teardown closes it under the write lock. +// So the poller never reads an fd number after it is closed, when it may +// already be reused for another file or socket. +type statHandle struct { + mu sync.RWMutex + fd int +} + +// newStatHandle wraps fd; nil for an fd that isn't open (<= 0). +func newStatHandle(fd int) *statHandle { + if fd <= 0 { + return nil + } + return &statHandle{fd: fd} +} + +// acquire read-locks h and returns its fd, or -1 once closed. Every +// acquire on a non-nil handle needs a release. nil-safe. +func (h *statHandle) acquire() int { + if h == nil { + return -1 + } + h.mu.RLock() + return h.fd +} + +func (h *statHandle) release() { + if h != nil { + h.mu.RUnlock() + } +} + +// close waits out a poll's read, then closes the fd. nil-safe, idempotent. +func (h *statHandle) close(closeFD func(int)) { + if h == nil { + return + } + h.mu.Lock() + fd := h.fd + h.fd = -1 + h.mu.Unlock() + if fd > 0 { + closeFD(fd) + } +} + // sockstatCount is one namespace's TCP socket count. type sockstatCount struct { inuse uint64 @@ -245,9 +294,9 @@ func (r *ringSockstatReader) serve(batch int, workers uint32, ready chan<- error ready <- fmt.Errorf("sockstat ring: %w", err) return } - defer ring.Close(0, nil) if workers > 0 { if _, _, err := ring.SetIOWQMaxWorkers(workers, workers); err != nil { + ring.Close(0, nil) // nothing submitted yet ready <- err return } @@ -255,6 +304,16 @@ func (r *ringSockstatReader) serve(batch int, workers uint32, ready chan<- error ready <- nil b := newRingBatcher(ring, batch) + defer func() { + if b.broken { + brokenSockstatRingsMu.Lock() + brokenSockstatRings = append(brokenSockstatRings, b) + brokenSockstatRingsMu.Unlock() + return + } + // Every batch waited for all its completions: nothing in flight. + ring.Close(0, nil) + }() for req := range r.reqs { failed, submits, err := b.read(req.fds, req.counts) req.reply <- ringSockstatReply{failed: failed, submits: submits, err: err} @@ -281,6 +340,27 @@ type sockstatRing interface { WaitOne() ([]xio.Result, error) } +// retryEINTR retries f while a signal interrupts the io_uring_enter. +func retryEINTR(f func() error) error { + for { + err := f() + if !errors.Is(err, syscall.EINTR) { + return err + } + } +} + +// brokenSockstatRings keeps a broken ring and its buffers reachable for +// the life of the process. Reads may still be running in io-wq workers +// and will write into the buffers; closing the ring or letting the GC +// reuse the buffers would let the kernel write into freed memory. The +// gate falls back to pread for good after a break, so this holds at most +// one ring. +var ( + brokenSockstatRingsMu sync.Mutex + brokenSockstatRings []*ringBatcher +) + // ringBatcher queues up to batch reads, submits them in one // io_uring_enter, and matches each CQE to its namespace by request ID. type ringBatcher struct { @@ -343,15 +423,19 @@ func (b *ringBatcher) readBatch(fds []int, counts []sockstatCount) (failed, subm if want == 0 { return failed, 0 } - if _, err := b.ring.SubmitAndWait(uint32(want)); err != nil { + if err := retryEINTR(func() error { _, err := b.ring.SubmitAndWait(uint32(want)); return err }); err != nil { b.broken = true return failed + want, 1 } for got := 0; got < want; { res := b.ring.DrainBatch() if len(res) == 0 { - var err error - if res, err = b.ring.WaitOne(); err != nil { + err := retryEINTR(func() error { + var err error + res, err = b.ring.WaitOne() + return err + }) + if err != nil { b.broken = true return failed + want - got, 1 } diff --git a/pkg/xtcp/xtcp.go b/pkg/xtcp/xtcp.go index 190351a6f..302ef4149 100644 --- a/pkg/xtcp/xtcp.go +++ b/pkg/xtcp/xtcp.go @@ -278,10 +278,10 @@ type netNSitem struct { cancel context.CancelFunc wg *sync.WaitGroup socketFD int - // statFD is this namespace's sockstat, opened in the namespace for the - // socket-count gate (sockstat.go). <= 0 means not open: the gate is off, - // the open failed, or the slot is still reserved. - statFD int + // stat is this namespace's sockstat fd, opened in the namespace for the + // socket-count gate (sockstat.go). nil: the gate is off, the open + // failed, or the slot is still reserved. + stat *statHandle } type netlinkerDone struct { From 28141320d347a37068c56ef8fa9a285464aa81f5 Mon Sep 17 00:00:00 2001 From: "randomizedcoder dave.seddon.ca@gmail.com" Date: Fri, 13 Nov 2026 09:48:20 -0800 Subject: [PATCH 10/19] feat(xtcp): bound reconcile in time and count; per-owner netns quota and add rate - Scanner.ScanLimited: -reconcileTimeout deadline (checked every 256 pids) and a 4 x -maxNetns namespace cap, shared with the bind-mount pass. After an incomplete scan a tracked namespace is deleted only when confirmed gone (its pid left it / its bind mount went), so a flood can neither get monitored namespaces deleted nor keep dead ones' slots. - -maxNetnsPerOwner: owner = outermost container id of the pid's cgroup (tenants can't leave it); bind-mount-only namespaces exempt; owners of waiting candidates cached; reads stop at the deadline. - -maxNetnsAddsPerReconcile bounds adds per reconcile. - Names (cgroup reads) resolved only for admitted namespaces. - xtcp_reconcile_incomplete_total{reason}; netns_dropped_total{reason}. Co-Authored-By: Claude Opus 5.5 --- pkg/nsdiscover/resolve.go | 29 +++ pkg/nsdiscover/scanner.go | 88 +++++++-- pkg/nsdiscover/scanner_limits_test.go | 80 ++++++++ pkg/xtcp/caps.go | 68 +++++-- pkg/xtcp/caps_test.go | 85 ++++++++- pkg/xtcp/ns_add.go | 1 + pkg/xtcp/ns_createNetlinkersAndStore.go | 6 + pkg/xtcp/ns_discover.go | 16 +- pkg/xtcp/ns_reconcile.go | 234 +++++++++++++++++++++--- pkg/xtcp/ns_reconcile_limits_test.go | 173 ++++++++++++++++++ pkg/xtcp/xtcp.go | 10 + 11 files changed, 731 insertions(+), 59 deletions(-) create mode 100644 pkg/nsdiscover/scanner_limits_test.go create mode 100644 pkg/xtcp/ns_reconcile_limits_test.go diff --git a/pkg/nsdiscover/resolve.go b/pkg/nsdiscover/resolve.go index 717a7e514..5a5d6c1e9 100644 --- a/pkg/nsdiscover/resolve.go +++ b/pkg/nsdiscover/resolve.go @@ -92,6 +92,35 @@ func (r *Resolver) Name(inode uint64, pid int) string { return "netns:[" + strconv.FormatUint(inode, 10) + "]" } +// NameFor is Name with the container id already read (ContainerID), so a +// caller that needs both reads the cgroup file once. +func (r *Resolver) NameFor(inode uint64, containerID string) string { + if name, ok := r.byInode[inode]; ok { + return name + } + if containerID != "" { + return containerID + } + return "netns:[" + strconv.FormatUint(inode, 10) + "]" +} + +// ContainerID is the container id in pid's cgroup path: the first, so +// outermost, 64-hex run. A process can make sub-cgroups (with any name) +// below its own but can't leave it, so the outermost id is the owner a +// tenant can't change. "" when there is none or pid is gone. +func (r *Resolver) ContainerID(pid int) string { + if pid <= 0 { + return "" + } + return r.containerID(pid) +} + +// BindMountPath is the bind-mount path of inode from the last Refresh. +func (r *Resolver) BindMountPath(inode uint64) (string, bool) { + p, ok := r.pathByIno[inode] + return p, ok +} + // containerID reads /proc//cgroup and returns the first container id found // (a 64-char lowercase-hex run), or "" if none. Covers the common docker / // containerd / cri-o / kubernetes cgroup layouts, whose paths embed the 64-hex diff --git a/pkg/nsdiscover/scanner.go b/pkg/nsdiscover/scanner.go index c4157dbcb..5c9204925 100644 --- a/pkg/nsdiscover/scanner.go +++ b/pkg/nsdiscover/scanner.go @@ -13,6 +13,8 @@ package nsdiscover import ( "bytes" + "strconv" + "time" "unsafe" "golang.org/x/sys/unix" @@ -40,6 +42,7 @@ type Scanner struct { lbuf []byte // readlink target buffer seen map[uint64]struct{} // per-scan dedup set (cleared, not reallocated) skip int // pid Scan ignores (0: none); see SkipPid + nbuf []byte // pid formatting scratch for PidInNetns } // NewScanner opens procRoot (typically "/proc"). If the open fails the scanner @@ -55,6 +58,7 @@ func NewScanner(procRoot string) *Scanner { pbuf: make([]byte, 0, 32), lbuf: make([]byte, 64), seen: make(map[uint64]struct{}, scannerMapHint), + nbuf: make([]byte, 0, 20), } } @@ -76,18 +80,52 @@ func (s *Scanner) Close() error { // looks gone and is never deleted. pid 0 (the default) skips nothing. func (s *Scanner) SkipPid(pid int) { s.skip = pid } +// ScanLimits bounds one Scan. The zero value is unlimited. +type ScanLimits struct { + // Deadline stops the scan once passed (checked every + // scanDeadlineEvery pids). Zero: none. + Deadline time.Time + // MaxNamespaces stops the scan after this many distinct namespaces. + // 0: none. + MaxNamespaces int +} + +// scanDeadlineEvery is how many pids pass between deadline checks. +const scanDeadlineEvery = 256 + +// ScanStop says why a limited Scan stopped early. +type ScanStop uint8 + +const ( + // ScanComplete: every pid was seen. + ScanComplete ScanStop = iota + // ScanTimeout: ScanLimits.Deadline passed. + ScanTimeout + // ScanCap: ScanLimits.MaxNamespaces namespaces were found. + ScanCap +) + // Scan rewinds procfs and calls fn exactly once per distinct network namespace. // It returns the number of pids skipped (the pid exited mid-scan, or readlinkat // returned EACCES when unprivileged). Zero steady-state allocation. fn receives // a Namespace by value; it may copy it but must not assume any ordering. func (s *Scanner) Scan(fn func(Namespace)) (skipped int) { + skipped, _ = s.ScanLimited(ScanLimits{}, fn) + return skipped +} + +// ScanLimited is Scan within lim. stop is ScanComplete only when every pid +// was seen; otherwise fn has seen only some namespaces, and a namespace it +// didn't see may still be live. +func (s *Scanner) ScanLimited(lim ScanLimits, fn func(Namespace)) (skipped int, stop ScanStop) { clear(s.seen) if s.fd < 0 { - return 0 + return 0, ScanComplete } if _, err := unix.Seek(s.fd, 0, unix.SEEK_SET); err != nil { - return 0 + return 0, ScanComplete } + pids := 0 for { n, gerr := unix.Getdents(s.fd, s.dbuf) if gerr != nil || n <= 0 { @@ -109,28 +147,52 @@ func (s *Scanner) Scan(fn func(Namespace)) (skipped int) { if !ok || pid == s.skip { continue } - - // Relative path "/ns/net\0" resolved against the procfs fd. - s.pbuf = append(s.pbuf[:0], name...) - s.pbuf = append(s.pbuf, "/ns/net\x00"...) - - m, ok := rawReadlinkat(s.fd, s.pbuf, s.lbuf) - if !ok { - skipped++ - continue + pids++ + if pids%scanDeadlineEvery == 0 && !lim.Deadline.IsZero() && time.Now().After(lim.Deadline) { + return skipped, ScanTimeout } - ino, ok := parseNetInode(s.lbuf[:m]) + + ino, ok := s.pidNetns(pid, name) if !ok { skipped++ continue } if _, dup := s.seen[ino]; !dup { + if lim.MaxNamespaces > 0 && len(s.seen) >= lim.MaxNamespaces { + return skipped, ScanCap + } s.seen[ino] = struct{}{} fn(Namespace{Inode: ino, Pid: pid}) } } } - return skipped + return skipped, ScanComplete +} + +// pidNetns reads /proc//ns/net's inode. name is pid's decimal form. +func (s *Scanner) pidNetns(pid int, name []byte) (uint64, bool) { + if name == nil { + name = strconv.AppendInt(s.nbuf[:0], int64(pid), 10) + } + // Relative path "/ns/net\0" resolved against the procfs fd. + s.pbuf = append(s.pbuf[:0], name...) + s.pbuf = append(s.pbuf, "/ns/net\x00"...) + m, ok := rawReadlinkat(s.fd, s.pbuf, s.lbuf) + if !ok { + return 0, false + } + return parseNetInode(s.lbuf[:m]) +} + +// PidInNetns reports whether pid is still in the namespace inode. Reconcile +// uses it after an incomplete scan, to tell a tracked namespace the scan +// didn't reach from one that is gone. +func (s *Scanner) PidInNetns(pid int, inode uint64) bool { + if s.fd < 0 || pid <= 0 { + return false + } + ino, ok := s.pidNetns(pid, nil) + return ok && ino == inode } // direntName returns the NUL-terminated name of a getdents64 record as a byte diff --git a/pkg/nsdiscover/scanner_limits_test.go b/pkg/nsdiscover/scanner_limits_test.go new file mode 100644 index 000000000..e916c0936 --- /dev/null +++ b/pkg/nsdiscover/scanner_limits_test.go @@ -0,0 +1,80 @@ +package nsdiscover + +import ( + "testing" + "time" +) + +// TestScanLimits: the deadline and namespace cap stop a scan and report +// why; the result is complete only when every pid was seen. +func TestScanLimits(t *testing.T) { + pidsN := func(pids, distinct int) map[int]uint64 { + m := make(map[int]uint64, pids) + for i := range pids { + m[1000+i] = 4026531000 + uint64(i%distinct) + } + return m + } + tests := []struct { + name string + category string + description string + pids map[int]uint64 + lim ScanLimits + expectedStop ScanStop + expectedFound int // -1: at most the cap, unchecked + }{ + {name: "completes", category: "P", description: "1000 pids, generous limits", + pids: pidsN(1000, 100), lim: ScanLimits{Deadline: time.Now().Add(time.Hour), MaxNamespaces: 1000}, + expectedStop: ScanComplete, expectedFound: 100}, + {name: "unlimited", category: "P", description: "zero limits: unlimited", + pids: pidsN(300, 300), expectedStop: ScanComplete, expectedFound: 300}, + {name: "deadline", category: "N", description: "deadline already passed: stops at the first check (256 pids)", + pids: pidsN(1000, 1000), lim: ScanLimits{Deadline: time.Now().Add(-time.Second)}, + expectedStop: ScanTimeout, expectedFound: 255}, + {name: "scan_cap", category: "N", description: "100 namespaces, cap 10", + pids: pidsN(100, 100), lim: ScanLimits{MaxNamespaces: 10}, expectedStop: ScanCap, expectedFound: 10}, + {name: "cap_exact", category: "B", description: "10 namespaces, cap 10: complete", + pids: pidsN(50, 10), lim: ScanLimits{MaxNamespaces: 10}, expectedStop: ScanComplete, expectedFound: 10}, + {name: "under_deadline_check", category: "B", description: "255 pids never reach a deadline check", + pids: pidsN(255, 255), lim: ScanLimits{Deadline: time.Now().Add(-time.Second)}, expectedStop: ScanComplete, expectedFound: 255}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + s := NewScanner(writeProc(t, tc.pids)) + defer s.Close() + found := 0 + _, stop := s.ScanLimited(tc.lim, func(Namespace) { found++ }) + if stop != tc.expectedStop || (tc.expectedFound >= 0 && found != tc.expectedFound) { + t.Errorf("%s: stop=%d found=%d, expected stop=%d found=%d", tc.description, stop, found, tc.expectedStop, tc.expectedFound) + } + }) + } +} + +// TestPidInNetns: the direct check reconcile makes after an incomplete +// scan. +func TestPidInNetns(t *testing.T) { + s := NewScanner(writeProc(t, map[int]uint64{42: 4026531999})) + defer s.Close() + tests := []struct { + name string + category string + description string + pid int + inode uint64 + expected bool + }{ + {name: "in_it", category: "P", description: "pid still in the namespace", pid: 42, inode: 4026531999, expected: true}, + {name: "moved", category: "N", description: "pid now in another namespace", pid: 42, inode: 4026531998}, + {name: "gone", category: "N", description: "pid exited", pid: 43, inode: 4026531999}, + {name: "pid_zero", category: "B", description: "pid 0 (bind mount only) is never confirmed this way", pid: 0, inode: 4026531999}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + if got := s.PidInNetns(tc.pid, tc.inode); got != tc.expected { + t.Errorf("%s: %v, expected %v", tc.description, got, tc.expected) + } + }) + } +} diff --git a/pkg/xtcp/caps.go b/pkg/xtcp/caps.go index add18e200..0bcebb15b 100644 --- a/pkg/xtcp/caps.go +++ b/pkg/xtcp/caps.go @@ -36,17 +36,41 @@ func (x *XTCP) dumpTruncated(reason string, fd int, limit uint64) { log.Printf("dump truncated: fd:%d inode:%v cap:%s=%d; the rest of this poll's dump is dropped", fd, inode, reason, limit) } -// admitNamespaces applies -maxNetns (limit, 0 for no cap) to the live, -// untracked candidates, given tracked namespaces already holding slots. A -// tracked namespace keeps its slot until it dies: evicting by any key a -// tenant can influence (a pid wraps; a namespace's scanned pid changes) -// would let it push monitored workloads out. Waiting candidates are -// admitted in the order reconcile first saw them (waiting, maintained by -// queueWaiting), then by pid and inode, and xtcp2's own namespace (self) -// always. It returns the candidates to add and how many stay out. -func admitNamespaces(candidates []nsIdentity, tracked int, limit uint32, self uint64, waiting map[uint64]uint64) (admit []nsIdentity, dropped int) { - if limit == 0 { - return candidates, 0 +// admitLimits are the admission caps; 0 turns one off. +type admitLimits struct { + maxNetns uint32 // -maxNetns: tracked namespaces + maxPerOwner uint32 // -maxNetnsPerOwner: tracked namespaces per owner + maxAdds uint32 // -maxNetnsAddsPerReconcile: adds per reconcile + self uint64 // xtcp2's own namespace, always admitted +} + +func (l admitLimits) any() bool { return l.maxNetns != 0 || l.maxPerOwner != 0 || l.maxAdds != 0 } + +// admitDrops counts the candidates each cap left out. +type admitDrops struct { + maxNetns, ownerQuota, addRate int +} + +func (d admitDrops) total() int { return d.maxNetns + d.ownerQuota + d.addRate } + +// admitNamespaces applies the admission caps to the live, untracked +// candidates, given tracked namespaces already holding slots and owners, +// the tracked count per owner (updated in place; nil when the owner quota +// is off). A tracked namespace keeps its slot until it dies: evicting by +// any key a tenant can influence (a pid wraps; a namespace's scanned pid +// changes) would let it push monitored workloads out. Waiting candidates +// are considered in the order reconcile first saw them (waiting, +// maintained by queueWaiting), then by pid and inode, and xtcp2's own +// namespace always gets in. A candidate is left out by -maxNetns when +// every slot is taken, by the add rate once this reconcile has added +// maxAdds, and by the owner quota when its owner (the outermost container +// id; see nsdiscover.Resolver.ContainerID) has maxPerOwner tracked. +// Namespaces with no pid (bind mounts only) have no owner and are exempt +// from the quota: tenants can't create host bind mounts. It returns the +// candidates to add and what each cap left out. +func admitNamespaces(candidates []nsIdentity, tracked int, owners map[string]int, lim admitLimits, waiting map[uint64]uint64) (admit []nsIdentity, drops admitDrops) { + if !lim.any() { + return candidates, drops } // A candidate not yet queued arrived this reconcile: behind every // waiting one. @@ -61,15 +85,31 @@ func admitNamespaces(candidates []nsIdentity, tracked int, limit uint32, self ui cmp.Compare(a.pid, b.pid), cmp.Compare(a.inode, b.inode)) }) admit = candidates[:0:0] + adds := 0 for _, id := range candidates { - if id.inode == self || tracked < int(limit) { + if id.inode == lim.self { admit = append(admit, id) tracked++ + adds++ continue } - dropped++ + switch { + case lim.maxNetns != 0 && tracked >= int(lim.maxNetns): + drops.maxNetns++ + case lim.maxAdds != 0 && adds >= int(lim.maxAdds): + drops.addRate++ + case lim.maxPerOwner != 0 && id.pid > 0 && owners[id.owner] >= int(lim.maxPerOwner): + drops.ownerQuota++ + default: + admit = append(admit, id) + tracked++ + adds++ + if lim.maxPerOwner != 0 && id.pid > 0 { + owners[id.owner]++ + } + } } - return admit, dropped + return admit, drops } // queueWaiting updates the -maxNetns queue after a reconcile: a candidate diff --git a/pkg/xtcp/caps_test.go b/pkg/xtcp/caps_test.go index dd142fb70..905a44ca5 100644 --- a/pkg/xtcp/caps_test.go +++ b/pkg/xtcp/caps_test.go @@ -2,7 +2,9 @@ package xtcp import ( "encoding/binary" + "maps" "slices" + "strings" "sync" "testing" "time" @@ -293,7 +295,8 @@ func TestAdmitNamespaces(t *testing.T) { } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { - admit, dropped := admitNamespaces(slices.Clone(tc.candidates), tc.tracked, tc.limit, self, tc.waiting) + admit, drops := admitNamespaces(slices.Clone(tc.candidates), tc.tracked, nil, admitLimits{maxNetns: tc.limit, self: self}, tc.waiting) + dropped := drops.total() got := make([]uint64, 0, len(admit)) for _, id := range admit { got = append(got, id.inode) @@ -306,6 +309,84 @@ func TestAdmitNamespaces(t *testing.T) { } } +// TestAdmitNamespacesQuota: the per-owner quota and the add rate. +func TestAdmitNamespacesQuota(t *testing.T) { + const self = 1 + owned := func(owner string, n int, base uint64) []nsIdentity { + out := make([]nsIdentity, n) + for i := range out { + out[i] = nsIdentity{pid: int(base) + i, inode: base + uint64(i), owner: owner} + } + return out + } + cid := func(c byte) string { return strings.Repeat(string(c), 64) } + tests := []struct { + name string + category string + description string + candidates []nsIdentity + tracked int + owners map[string]int + lim admitLimits + expectedAdmitted int + expectedPerOwner map[string]int // admitted per owner + expectedOwnerQuota int + expectedAddRate int + expectedMaxNetns int + }{ + {name: "quota_zero", category: "P", description: "quota 0: no owner limit", + candidates: owned(cid('a'), 100, 1000), owners: map[string]int{}, lim: admitLimits{maxNetns: 4096}, + expectedAdmitted: 100, expectedPerOwner: map[string]int{cid('a'): 100}}, + {name: "owner_quota", category: "N", description: "owner A brings 100, quota 64: 64 in, 36 owner_quota", + candidates: owned(cid('a'), 100, 1000), owners: map[string]int{}, lim: admitLimits{maxNetns: 4096, maxPerOwner: 64}, + expectedAdmitted: 64, expectedPerOwner: map[string]int{cid('a'): 64}, expectedOwnerQuota: 36}, + {name: "other_owner_unaffected", category: "P", description: "A already at quota; B's namespace is admitted", + candidates: append(owned(cid('a'), 5, 1000), owned(cid('b'), 1, 2000)...), owners: map[string]int{cid('a'): 64}, + lim: admitLimits{maxNetns: 4096, maxPerOwner: 64}, expectedAdmitted: 1, expectedPerOwner: map[string]int{cid('b'): 1}, expectedOwnerQuota: 5}, + {name: "quota_exact", category: "B", description: "A at 63 of 64: exactly one more", + candidates: owned(cid('a'), 3, 1000), owners: map[string]int{cid('a'): 63}, lim: admitLimits{maxPerOwner: 64}, + expectedAdmitted: 1, expectedPerOwner: map[string]int{cid('a'): 1}, expectedOwnerQuota: 2}, + {name: "pid0_exempt", category: "C", description: "bind-mount-only namespaces (pid 0) skip the quota, still bounded by -maxNetns", + candidates: func() []nsIdentity { + out := owned("", 10, 500) + for i := range out { + out[i].pid = 0 + } + return out + }(), owners: map[string]int{"": 5}, lim: admitLimits{maxNetns: 8, maxPerOwner: 1}, + expectedAdmitted: 8, expectedPerOwner: map[string]int{"": 8}, expectedMaxNetns: 2}, + {name: "no_container_id", category: "C", description: "owner \"\" (no container id) is one owner under the quota", + candidates: owned("", 5, 1000), owners: map[string]int{}, lim: admitLimits{maxPerOwner: 2}, + expectedAdmitted: 2, expectedPerOwner: map[string]int{"": 2}, expectedOwnerQuota: 3}, + {name: "add_rate", category: "N", description: "1000 candidates, rate 256: 256 in, the rest add_rate", + candidates: owned(cid('a'), 1000, 10000), owners: map[string]int{}, lim: admitLimits{maxNetns: 4096, maxAdds: 256}, + expectedAdmitted: 256, expectedPerOwner: map[string]int{cid('a'): 256}, expectedAddRate: 744}, + {name: "self_ignores_quota", category: "C", description: "xtcp2's own namespace gets in past every cap", + candidates: []nsIdentity{{pid: 7, inode: self, owner: cid('a')}}, owners: map[string]int{cid('a'): 64}, tracked: 10, + lim: admitLimits{maxNetns: 10, maxPerOwner: 64, maxAdds: 1, self: self}, expectedAdmitted: 1, expectedPerOwner: map[string]int{cid('a'): 1}}, + {name: "cap_before_quota", category: "C", description: "at -maxNetns the drop counts as max_netns, not owner_quota", + candidates: owned(cid('a'), 3, 1000), tracked: 10, owners: map[string]int{cid('a'): 64}, + lim: admitLimits{maxNetns: 10, maxPerOwner: 64}, expectedMaxNetns: 3}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + admit, drops := admitNamespaces(slices.Clone(tc.candidates), tc.tracked, tc.owners, tc.lim, nil) + per := map[string]int{} + for _, id := range admit { + per[id.owner]++ + } + if len(admit) != tc.expectedAdmitted || drops.ownerQuota != tc.expectedOwnerQuota || + drops.addRate != tc.expectedAddRate || drops.maxNetns != tc.expectedMaxNetns { + t.Errorf("%s: admitted %d drops %+v, expected %d {maxNetns:%d ownerQuota:%d addRate:%d}", + tc.description, len(admit), drops, tc.expectedAdmitted, tc.expectedMaxNetns, tc.expectedOwnerQuota, tc.expectedAddRate) + } + if tc.expectedPerOwner != nil && !maps.Equal(per, tc.expectedPerOwner) { + t.Errorf("%s: per owner %v, expected %v", tc.description, per, tc.expectedPerOwner) + } + }) + } +} + // TestNetnsCapQueue runs several reconciles' worth of admitNamespaces and // queueWaiting: a burst that fills the cap keeps its slots, a later // namespace waits, and freed slots go first come, first served, so @@ -334,7 +415,7 @@ func TestNetnsCapQueue(t *testing.T) { var waiting map[uint64]uint64 var seq uint64 for i, st := range steps { - admit, _ := admitNamespaces(slices.Clone(st.candidates), st.tracked, limit, self, waiting) + admit, _ := admitNamespaces(slices.Clone(st.candidates), st.tracked, nil, admitLimits{maxNetns: limit, self: self}, waiting) waiting, seq = queueWaiting(waiting, seq, st.candidates, admit) got := make([]uint64, 0, len(admit)) for _, id := range admit { diff --git a/pkg/xtcp/ns_add.go b/pkg/xtcp/ns_add.go index ef9a8040a..66bbed65d 100644 --- a/pkg/xtcp/ns_add.go +++ b/pkg/xtcp/ns_add.go @@ -34,6 +34,7 @@ func (x *XTCP) nsAdd(ctx context.Context, id nsIdentity) { ctx: nsCtx, cancel: nsCancel, socketFD: -1, // not opened yet; netNamespaceInstance fills it in + owner: id.owner, }); loaded { // Already tracked — release the context we just made and bail. nsCancel() diff --git a/pkg/xtcp/ns_createNetlinkersAndStore.go b/pkg/xtcp/ns_createNetlinkersAndStore.go index 91c16eb45..eabe6b3e1 100644 --- a/pkg/xtcp/ns_createNetlinkersAndStore.go +++ b/pkg/xtcp/ns_createNetlinkersAndStore.go @@ -42,6 +42,12 @@ func (x *XTCP) createNetlinkersAndStore(nsCtx context.Context, nsCancel context. socketFD: fd, stat: stat, } + // Keep the owner nsAdd reserved the slot with. + if prev, ok := x.nsMap.Load(inode); ok { + if p, ok := prev.(netNSitem); ok { + nsi.owner = p.owner + } + } wg.Add(1) go x.createNetlinkers(nsCtx, wg, name, inode, fd, x.config.Netlinkers) diff --git a/pkg/xtcp/ns_discover.go b/pkg/xtcp/ns_discover.go index ccacfbf8e..d6b2c90ba 100644 --- a/pkg/xtcp/ns_discover.go +++ b/pkg/xtcp/ns_discover.go @@ -31,7 +31,11 @@ import ( // // Not safe for concurrent use: nsScanner and nsResolver are reused single-owner // state, so only the reconcile owner (mapReconciler) may call this. -func (x *XTCP) discoverNamespaces() map[uint64]nsIdentity { +// +// lim bounds the /proc scan and the bind-mount pass together; stop says +// whether either was cut short. Names are not resolved here (that reads +// each pid's cgroup): reconcile resolves them for the namespaces it adds. +func (x *XTCP) discoverNamespaces(lim nsdiscover.ScanLimits) (map[uint64]nsIdentity, nsdiscover.ScanStop) { startTime := time.Now() defer func() { @@ -46,11 +50,10 @@ func (x *XTCP) discoverNamespaces() map[uint64]nsIdentity { out := make(map[uint64]nsIdentity) // Pass 1: /proc scan (live-pid entry). - skipped := x.nsScanner.Scan(func(ns nsdiscover.Namespace) { + skipped, stop := x.nsScanner.ScanLimited(lim, func(ns nsdiscover.Namespace) { out[ns.Inode] = nsIdentity{ inode: ns.Inode, pid: ns.Pid, - name: x.nsResolver.Name(ns.Inode, ns.Pid), } }) procFound := len(out) @@ -62,10 +65,13 @@ func (x *XTCP) discoverNamespaces() map[uint64]nsIdentity { if _, ok := out[inode]; ok { return } + if lim.MaxNamespaces > 0 && len(out) >= lim.MaxNamespaces { + stop = nsdiscover.ScanCap + return + } out[inode] = nsIdentity{ inode: inode, pid: 0, // no live pid; entered via path - name: x.nsResolver.Name(inode, 0), path: path, } bindFound++ @@ -96,5 +102,5 @@ func (x *XTCP) discoverNamespaces() map[uint64]nsIdentity { x.refreshLocality(out) } - return out + return out, stop } diff --git a/pkg/xtcp/ns_reconcile.go b/pkg/xtcp/ns_reconcile.go index f2d1af3cb..7e9ec7906 100644 --- a/pkg/xtcp/ns_reconcile.go +++ b/pkg/xtcp/ns_reconcile.go @@ -5,6 +5,8 @@ import ( "log" "sync" "time" + + "github.com/randomizedcoder/xtcp2/pkg/nsdiscover" ) // mapReconciler is a ticking loop around reconcile, which converges xtcp's set @@ -99,57 +101,239 @@ func (x *XTCP) reconcile(ctx context.Context) (dels, stores int) { }() x.pC.WithLabelValues("reconcile", "start", "count").Inc() - live := x.discoverNamespaces() + lim := x.scanLimits(startTime) + live, stop := x.discoverNamespaces(lim) + if stop != nsdiscover.ScanComplete { + x.reconcileIncomplete(stop, len(live), startTime) + } + + dels = x.deleteGone(live, stop) + stores = x.addNew(ctx, live, lim.Deadline) + return dels, stores +} - // Delete entries whose namespace is no longer live. xtcp's own netns is - // live by construction (every unlocked thread is in it), and its default - // socket belongs to openDefaultNetLinkSocket, so it is never deleted. The - // scan cannot vouch for it: it skips xtcp's own pid, and when xtcp is alone - // in its netns (a container without pid_mode:host) no other pid shows it. - x.nsMap.Range(func(key, _ interface{}) bool { +// scanLimits bounds one reconcile's scan: -reconcileTimeout from start, +// and 4 x -maxNetns namespaces (enough to see every tracked one plus a +// queue of candidates). 0 turns either off. +func (x *XTCP) scanLimits(start time.Time) nsdiscover.ScanLimits { + var lim nsdiscover.ScanLimits + if d := x.config.GetReconcileTimeout().AsDuration(); d > 0 { + lim.Deadline = start.Add(d) + } + if n := x.config.GetMaxNetns(); n > 0 { + lim.MaxNamespaces = scanCapPerMaxNetns * int(n) + } + return lim +} + +// scanCapPerMaxNetns sizes the scan cap from -maxNetns. +const scanCapPerMaxNetns = 4 + +// Reasons for xtcp_reconcile_incomplete_total. +const ( + reconcileIncompleteTimeoutCst = "timeout" + reconcileIncompleteScanCapCst = "scan_cap" +) + +func (x *XTCP) reconcileIncomplete(stop nsdiscover.ScanStop, found int, start time.Time) { + reason := reconcileIncompleteTimeoutCst + if stop == nsdiscover.ScanCap { + reason = reconcileIncompleteScanCapCst + } + if x.pReconcileIncomplete != nil { + x.pReconcileIncomplete.WithLabelValues(reason).Inc() + } + log.Printf("reconcile: scan stopped early (%s) after %d namespaces in %s; deleting only namespaces confirmed gone", + reason, found, time.Since(start).Round(time.Millisecond)) +} + +// deleteGone deletes tracked entries whose namespace is no longer live. +// xtcp's own netns is live by construction (every unlocked thread is in +// it), and its default socket belongs to openDefaultNetLinkSocket, so it is +// never deleted. The scan cannot vouch for it: it skips xtcp's own pid, +// and when xtcp is alone in its netns (a container without pid_mode:host) +// no other pid shows it. +// +// After an incomplete scan a namespace it didn't reach may still be live, +// so one is deleted only when confirmed gone: its representative pid is no +// longer in it (a bind-mount-only one: its mount is gone). Without this, a +// scan cut short by a flood of new namespaces would delete monitored ones; +// and skipping deletes altogether would let dead ones keep their slots for +// as long as the flood lasts. A live namespace whose pid has since left is +// deleted and re-added by the next complete scan. +func (x *XTCP) deleteGone(live map[uint64]nsIdentity, stop nsdiscover.ScanStop) (dels int) { + x.nsMap.Range(func(key, value interface{}) bool { inode, ok := key.(uint64) - if !ok { + if !ok || inode == x.selfNsInode { return true } - if inode == x.selfNsInode { + if _, stillLive := live[inode]; stillLive { return true } - if _, stillLive := live[inode]; !stillLive { - x.nsDelete(inode) - dels++ + if stop != nsdiscover.ScanComplete { + if item, ok := value.(netNSitem); ok && x.confirmedLive(item) { + return true + } } + x.nsDelete(inode) + dels++ return true }) + return dels +} + +// confirmedLive checks one tracked namespace directly. +func (x *XTCP) confirmedLive(item netNSitem) bool { + if item.pid > 0 { + return x.nsScanner != nil && x.nsScanner.PidInNetns(item.pid, item.inode) + } + if x.nsResolver == nil { + return false + } + _, ok := x.nsResolver.BindMountPath(item.inode) + return ok +} - // Add live namespaces not yet tracked, up to -maxNetns. Tracked ones - // keep their slots; the rest wait in the order first seen (see - // admitNamespaces) and stay candidates on every later reconcile. +// addNew adds live namespaces not yet tracked, within the admission caps +// (admitNamespaces). Tracked ones keep their slots; the rest wait in the +// order first seen and stay candidates on every later reconcile. Names are +// resolved only for the namespaces admitted. +func (x *XTCP) addNew(ctx context.Context, live map[uint64]nsIdentity, deadline time.Time) (stores int) { var candidates []nsIdentity for inode, id := range live { if _, tracked := x.nsMap.Load(inode); !tracked { candidates = append(candidates, id) } } - limit := x.config.GetMaxNetns() + lim := admitLimits{ + maxNetns: x.config.GetMaxNetns(), + maxPerOwner: x.config.GetMaxNetnsPerOwner(), + maxAdds: x.config.GetMaxNetnsAddsPerReconcile(), + self: x.selfNsInode, + } + if len(candidates) == 0 { + clear(x.nsWaiting) + clear(x.nsOwners) + return 0 + } + tracked := 0 - if limit != 0 && len(candidates) > 0 { + var owners map[string]int + if lim.maxNetns != 0 { tracked = lenSyncMap(x.nsMap) } - admit, dropped := admitNamespaces(candidates, tracked, limit, x.selfNsInode, x.nsWaiting) - if limit != 0 { + resolvable := candidates + if lim.maxPerOwner != 0 { + owners = x.trackedOwners() + resolvable = x.resolveOwners(candidates, deadline) + } + + admit, drops := admitNamespaces(resolvable, tracked, owners, lim, x.nsWaiting) + if lim.any() { + // The full candidate list: one whose owner wasn't read in time + // keeps its place too. x.nsWaiting, x.nsWaitingSeq = queueWaiting(x.nsWaiting, x.nsWaitingSeq, candidates, admit) + x.pruneOwners(candidates, admit) } for _, id := range admit { + cid := id.owner + if lim.maxPerOwner == 0 { + cid = x.nsResolver.ContainerID(id.pid) + } + id.name = x.nsResolver.NameFor(id.inode, cid) x.nsAdd(ctx, id) stores++ } - if dropped > 0 { - x.pC.WithLabelValues("reconcile", "maxNetns", "drop").Add(float64(dropped)) - if x.pNetnsDropped != nil { - x.pNetnsDropped.WithLabelValues(netnsDropMaxNetnsCst).Add(float64(dropped)) + x.recordDrops(drops, lim) + return stores +} + +// trackedOwners counts tracked namespaces per owner; xtcp2's own and +// bind-mount-only ones (no pid) are exempt from the quota. +func (x *XTCP) trackedOwners() map[string]int { + owners := make(map[string]int) + x.nsMap.Range(func(key, value interface{}) bool { + item, ok := value.(netNSitem) + if ok && item.pid > 0 && item.inode != x.selfNsInode { + owners[item.owner]++ } - log.Printf("reconcile: %d namespaces not tracked: -maxNetns=%d reached", dropped, limit) + return true + }) + return owners +} + +// resolveOwners fills each candidate's owner from the cache, or its +// cgroup, until deadline. It returns the candidates that have one; the +// rest are left for the next reconcile (they keep their queue place). +func (x *XTCP) resolveOwners(candidates []nsIdentity, deadline time.Time) []nsIdentity { + if x.nsOwners == nil { + x.nsOwners = make(map[uint64]string) } + out := candidates[:0:0] + deferred := 0 + for i := range candidates { + id := &candidates[i] + if id.pid <= 0 { + out = append(out, *id) // exempt: no owner to read + continue + } + if o, ok := x.nsOwners[id.inode]; ok { + id.owner = o + out = append(out, *id) + continue + } + if !deadline.IsZero() && time.Now().After(deadline) { + deferred++ + continue + } + id.owner = x.nsResolver.ContainerID(id.pid) + x.nsOwners[id.inode] = id.owner + out = append(out, *id) + } + if deferred > 0 { + x.pC.WithLabelValues("reconcile", "owner", "deferred").Add(float64(deferred)) + } + return out +} - return dels, stores +// pruneOwners keeps the owner cache to candidates still waiting. +func (x *XTCP) pruneOwners(candidates, admit []nsIdentity) { + if len(x.nsOwners) == 0 { + return + } + keep := make(map[uint64]struct{}, len(candidates)) + for _, id := range candidates { + keep[id.inode] = struct{}{} + } + for _, id := range admit { + delete(keep, id.inode) + } + for inode := range x.nsOwners { + if _, ok := keep[inode]; !ok { + delete(x.nsOwners, inode) + } + } +} + +// recordDrops counts and logs the candidates each cap left out (one line +// per reconcile). +func (x *XTCP) recordDrops(drops admitDrops, lim admitLimits) { + if drops.total() == 0 { + return + } + for reason, n := range map[string]int{ + netnsDropMaxNetnsCst: drops.maxNetns, + netnsDropOwnerQuotaCst: drops.ownerQuota, + netnsDropAddRateCst: drops.addRate, + } { + if n == 0 { + continue + } + x.pC.WithLabelValues("reconcile", reason, "drop").Add(float64(n)) + if x.pNetnsDropped != nil { + x.pNetnsDropped.WithLabelValues(reason).Add(float64(n)) + } + } + log.Printf("reconcile: %d namespaces not tracked yet: max_netns:%d (-maxNetns=%d) owner_quota:%d (-maxNetnsPerOwner=%d) add_rate:%d (-maxNetnsAddsPerReconcile=%d)", + drops.total(), drops.maxNetns, lim.maxNetns, drops.ownerQuota, lim.maxPerOwner, drops.addRate, lim.maxAdds) } diff --git a/pkg/xtcp/ns_reconcile_limits_test.go b/pkg/xtcp/ns_reconcile_limits_test.go new file mode 100644 index 000000000..e58516a71 --- /dev/null +++ b/pkg/xtcp/ns_reconcile_limits_test.go @@ -0,0 +1,173 @@ +package xtcp + +import ( + "context" + "os" + "path/filepath" + "strconv" + "strings" + "syscall" + "testing" + "time" + + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/testutil" + "google.golang.org/protobuf/types/known/durationpb" +) + +// procWithCgroups is a fake /proc: pid → (netns inode, cgroup file). +func procWithCgroups(t *testing.T, pids map[int]struct { + ino uint64 + cgroup string +}) string { + t.Helper() + proc := t.TempDir() + for pid, p := range pids { + dir := filepath.Join(proc, strconv.Itoa(pid)) + if err := os.MkdirAll(filepath.Join(dir, "ns"), 0o755); err != nil { + t.Fatal(err) + } + if err := os.Symlink("net:["+strconv.FormatUint(p.ino, 10)+"]", filepath.Join(dir, "ns", "net")); err != nil { + t.Fatal(err) + } + if p.cgroup != "" { + if err := os.WriteFile(filepath.Join(dir, "cgroup"), []byte(p.cgroup), 0o600); err != nil { + t.Fatal(err) + } + } + } + return proc +} + +func cgroupOf(id string) string { return "0::/system.slice/docker-" + id + ".scope\n" } + +// TestReconcileLimits runs reconcile over a fake /proc with the scan cap, +// owner quota and add rate set. +func TestReconcileLimits(t *testing.T) { + type pidNS = struct { + ino uint64 + cgroup string + } + const base = uint64(4026533000) + idA, idB := strings.Repeat("a", 64), strings.Repeat("b", 64) + + tests := []struct { + name string + category string + description string + pids map[int]pidNS + tracked map[uint64]int // tracked inode → its pid + maxNetns uint32 + perOwner uint32 + adds uint32 + // expected + expectedDeleted []uint64 + expectedKept []uint64 + expectedStores int + expectedOwners map[uint64]string // added inode → owner + expectedNames map[uint64]string + expectedReason string // reconcile_incomplete reason, "" for none + }{ + {name: "complete_deletes", category: "P", description: "complete scan: a tracked namespace no longer live is deleted", + pids: map[int]pidNS{100: {base, ""}}, tracked: map[uint64]int{base: 100, base + 1: 101}, maxNetns: 100, + expectedDeleted: []uint64{base + 1}, expectedKept: []uint64{base}}, + {name: "incomplete_no_delete", category: "C", description: "scan cut by the cap before a tracked namespace whose pid is still in it: kept", + pids: func() map[int]pidNS { + m := map[int]pidNS{} + for i := range 20 { + m[100+i] = pidNS{base + uint64(i), ""} + } + return m + }(), + tracked: map[uint64]int{base + 19: 119}, maxNetns: 1, // scan cap 4: base+19 unseen + expectedKept: []uint64{base + 19}, expectedReason: reconcileIncompleteScanCapCst}, + {name: "incomplete_confirmed_gone", category: "N", description: "incomplete scan, tracked pid gone: deleted (no slot leak under a flood), and its slot goes to a waiter", + pids: func() map[int]pidNS { + m := map[int]pidNS{} + for i := range 20 { + m[100+i] = pidNS{base + uint64(i), ""} + } + return m + }(), + tracked: map[uint64]int{base + 99: 999}, maxNetns: 1, + expectedDeleted: []uint64{base + 99}, expectedStores: 1, expectedReason: reconcileIncompleteScanCapCst}, + {name: "nested_cgroup_owner", category: "C", description: "a tenant sub-cgroup with a fake 64-hex name: the owner is the outer id", + pids: map[int]pidNS{ + 100: {base, "0::/system.slice/docker-" + idA + ".scope/" + idB + "\n"}, + }, maxNetns: 100, perOwner: 64, + expectedStores: 1, expectedOwners: map[uint64]string{base: idA}, expectedNames: map[uint64]string{base: idA}}, + {name: "owner_quota_reconcile", category: "N", description: "owner A's 5 namespaces against quota 2, B's 1: A gets 2, B 1", + pids: map[int]pidNS{ + 100: {base, cgroupOf(idA)}, 101: {base + 1, cgroupOf(idA)}, 102: {base + 2, cgroupOf(idA)}, + 103: {base + 3, cgroupOf(idA)}, 104: {base + 4, cgroupOf(idA)}, 105: {base + 5, cgroupOf(idB)}, + }, maxNetns: 100, perOwner: 2, expectedStores: 3}, + {name: "names_for_admitted_only", category: "P", description: "add rate 1: one name resolved, the waiting ones keep no name", + pids: map[int]pidNS{100: {base, cgroupOf(idA)}, 101: {base + 1, cgroupOf(idB)}}, maxNetns: 100, adds: 1, + expectedStores: 1, expectedNames: map[uint64]string{base: idA}}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + x := newReconcileTestXTCP(t, procWithCgroups(t, tc.pids)) + x.config.MaxNetns = tc.maxNetns + x.config.MaxNetnsPerOwner = tc.perOwner + x.config.MaxNetnsAddsPerReconcile = tc.adds + x.config.ReconcileTimeout = durationpb.New(time.Minute) + x.pReconcileIncomplete = prometheus.NewCounterVec(prometheus.CounterOpts{Name: "ri"}, []string{"reason"}) + x.pNetnsDropped = prometheus.NewCounterVec(prometheus.CounterOpts{Name: "nd"}, []string{"reason"}) + for ino, pid := range tc.tracked { + _, cancel := context.WithCancel(context.Background()) + name := "tracked" + x.nsMap.Store(ino, netNSitem{inode: ino, pid: pid, name: &name, cancel: cancel, socketFD: 5}) + } + + fake := openAndSetnsSyscallsT{ + open: func(string, int, uint32) (int, error) { return -1, syscall.ENOENT }, + setns: func(int, int) error { return nil }, + close: func(int) error { return nil }, + } + ctx, cancel := context.WithCancel(context.Background()) + cancel() + var stores int + withFakeSyscalls(t, fake, func() { + _, stores = x.reconcile(ctx) + waitForNsInstanceEnd(t, x, float64(stores)) + }) + + if stores != tc.expectedStores { + t.Errorf("%s: stores=%d, expected %d", tc.description, stores, tc.expectedStores) + } + for _, ino := range tc.expectedDeleted { + if _, ok := x.nsMap.Load(ino); ok { + t.Errorf("%s: %d not deleted", tc.description, ino) + } + } + for _, ino := range tc.expectedKept { + if _, ok := x.nsMap.Load(ino); !ok { + t.Errorf("%s: %d deleted", tc.description, ino) + } + } + for ino, owner := range tc.expectedOwners { + v, ok := x.nsMap.Load(ino) + if !ok || v.(netNSitem).owner != owner { + t.Errorf("%s: %d owner %v, expected %q", tc.description, ino, v, owner) + } + } + for ino, name := range tc.expectedNames { + v, ok := x.nsMap.Load(ino) + if !ok || *v.(netNSitem).name != name { + t.Errorf("%s: %d name %v, expected %q", tc.description, ino, v, name) + } + } + if tc.expectedReason != "" { + if got := testutil.ToFloat64(x.pReconcileIncomplete.WithLabelValues(tc.expectedReason)); got != 1 { + t.Errorf("%s: reconcile_incomplete{%s}=%v, expected 1", tc.description, tc.expectedReason, got) + } + } + if tc.name == "owner_quota_reconcile" { + if got := testutil.ToFloat64(x.pNetnsDropped.WithLabelValues(netnsDropOwnerQuotaCst)); got != 3 { + t.Errorf("%s: owner_quota drops %v, expected 3", tc.description, got) + } + } + }) + } +} diff --git a/pkg/xtcp/xtcp.go b/pkg/xtcp/xtcp.go index 302ef4149..72e2bf2c4 100644 --- a/pkg/xtcp/xtcp.go +++ b/pkg/xtcp/xtcp.go @@ -75,6 +75,10 @@ type XTCP struct { // (under reconcileMu); empty unless the cap is reached. nsWaiting map[uint64]uint64 nsWaitingSeq uint64 + // nsOwners caches each waiting candidate's owner (inode → owner), so a + // namespace kept out by a cap isn't re-read every reconcile. Pruned to + // the current candidates each reconcile. Owned by reconcile. + nsOwners map[uint64]string packetBufferPool xsync.Pool[*[]byte] xtcpEnvelopePool xsync.Pool[*xtcp_flat_record.Envelope] @@ -261,6 +265,9 @@ type nsIdentity struct { pid int name string path string + // owner is the outermost container id of pid's cgroup ("" for none), + // resolved for candidates only when -maxNetnsPerOwner is on. + owner string } // network namespace item @@ -282,6 +289,9 @@ type netNSitem struct { // socket-count gate (sockstat.go). nil: the gate is off, the open // failed, or the slot is still reserved. stat *statHandle + // owner is the namespace's owner for -maxNetnsPerOwner (see + // nsIdentity.owner). + owner string } type netlinkerDone struct { From bebecfb6d0000acbe01fa162a5428eb4cb3ebd31 Mon Sep 17 00:00:00 2001 From: "randomizedcoder dave.seddon.ca@gmail.com" Date: Fri, 13 Nov 2026 09:55:53 -0800 Subject: [PATCH 11/19] fix(xtcp): reconcile limits review: capped scans keep tracked, owner by runtime cgroup - Past the scan cap the scan still walks every pid and reports tracked and waiting namespaces (ScanLimits.Keep); the cap only limits new ones. A capped scan therefore still deletes gone namespaces; only a timed-out scan deletes nothing, and its waiters keep their queue places. - Owner is the cgroup v2 path cut at the runtime's container component (docker-/cri-containerd-/crio-/libpod-.scope, under docker or a kubepods/pod slice), else its first two components; not any 64-hex run, which a tenant could plant under a runtime without ids. - An unreadable cgroup (pid exited) defers the candidate instead of filing it under the "" owner. - Owners resolve oldest waiter first, at least 64 per reconcile even past the deadline, so a slow scan can't stop admission. - RLIMIT_NOFILE startup warning; gate benchmarks. Co-Authored-By: Claude Opus 5.5 --- pkg/nsdiscover/resolve.go | 107 ++++++++++++++++---- pkg/nsdiscover/scanner.go | 76 +++++++------- pkg/nsdiscover/scanner_limits_test.go | 78 +++++++++++---- pkg/xtcp/caps.go | 35 ++++--- pkg/xtcp/init.go | 1 + pkg/xtcp/ns_discover.go | 6 +- pkg/xtcp/ns_reconcile.go | 136 +++++++++++++++----------- pkg/xtcp/ns_reconcile_limits_test.go | 31 ++++-- pkg/xtcp/poller_pure_test.go | 2 +- pkg/xtcp/pollgate.go | 44 +++++++++ pkg/xtcp/pollgate_bench_test.go | 126 ++++++++++++++++++++++++ pkg/xtcp/pollgate_test.go | 35 +++++++ pkg/xtcp/xtcp.go | 4 +- 13 files changed, 523 insertions(+), 158 deletions(-) create mode 100644 pkg/xtcp/pollgate_bench_test.go diff --git a/pkg/nsdiscover/resolve.go b/pkg/nsdiscover/resolve.go index 5a5d6c1e9..6ec44a19f 100644 --- a/pkg/nsdiscover/resolve.go +++ b/pkg/nsdiscover/resolve.go @@ -4,6 +4,7 @@ import ( "os" "path/filepath" "strconv" + "strings" "golang.org/x/sys/unix" ) @@ -92,33 +93,99 @@ func (r *Resolver) Name(inode uint64, pid int) string { return "netns:[" + strconv.FormatUint(inode, 10) + "]" } -// NameFor is Name with the container id already read (ContainerID), so a -// caller that needs both reads the cgroup file once. -func (r *Resolver) NameFor(inode uint64, containerID string) string { - if name, ok := r.byInode[inode]; ok { - return name +// Owner is the quota owner of pid's namespace: the cgroup v2 path of pid +// (the "0::" line; the first line on a v1-only host), cut just after the +// first component a container runtime names by container id: +// +// docker-.scope, cri-containerd-.scope, crio-.scope, +// libpod-.scope, or a bare under /docker or a kubepods slice +// +// and with no such component, its first two components (user-1000.slice +// under user.slice, one service under system.slice). Components are +// matched from the root: a process can create sub-cgroups, named anything, +// only below its own, so it can't change where its path is cut once a +// runtime component is above it. Under a runtime that doesn't name +// cgroups by container id, a process can make new owners by making +// sub-cgroups at the second level. +// +// ok is false when pid's cgroup can't be read (it exited): the caller +// should try again later rather than file it under any owner. +func (r *Resolver) Owner(pid int) (owner string, ok bool) { + if pid <= 0 { + return "", false + } + data, err := os.ReadFile(filepath.Join(r.procRoot, strconv.Itoa(pid), "cgroup")) + if err != nil { + return "", false + } + return ownerFromCgroup(data), true +} + +// ownerFromCgroup is Owner on a /proc//cgroup file. +func ownerFromCgroup(data []byte) string { + path := cgroupPath(data) + comps := strings.Split(strings.Trim(path, "/"), "/") + for i, c := range comps { + if runtimeComponent(c, i, comps) { + return "/" + strings.Join(comps[:i+1], "/") + } } - if containerID != "" { - return containerID + if len(comps) > 2 { + comps = comps[:2] } - return "netns:[" + strconv.FormatUint(inode, 10) + "]" + return "/" + strings.Join(comps, "/") } -// ContainerID is the container id in pid's cgroup path: the first, so -// outermost, 64-hex run. A process can make sub-cgroups (with any name) -// below its own but can't leave it, so the outermost id is the owner a -// tenant can't change. "" when there is none or pid is gone. -func (r *Resolver) ContainerID(pid int) string { - if pid <= 0 { - return "" +// cgroupPath returns the v2 ("0::") path, else the first line's path. +func cgroupPath(data []byte) string { + var first string + for _, line := range strings.Split(string(data), "\n") { + if line == "" { + continue + } + parts := strings.SplitN(line, ":", 3) + if len(parts) != 3 { + continue + } + if parts[0] == "0" && parts[1] == "" { + return parts[2] + } + if first == "" { + first = parts[2] + } + } + return first +} + +var runtimeScopePrefixes = []string{"docker-", "cri-containerd-", "crio-", "libpod-"} + +// runtimeComponent reports whether comps[i] is a runtime's container +// cgroup. +func runtimeComponent(c string, i int, comps []string) bool { + for _, p := range runtimeScopePrefixes { + if id, ok := strings.CutPrefix(c, p); ok { + if id, ok = strings.CutSuffix(id, ".scope"); ok && isContainerID(id) { + return true + } + } } - return r.containerID(pid) + if i > 0 && isContainerID(c) { + parent := comps[i-1] + return parent == "docker" || strings.HasPrefix(parent, "kubepods") || strings.HasPrefix(parent, "pod") + } + return false } -// BindMountPath is the bind-mount path of inode from the last Refresh. -func (r *Resolver) BindMountPath(inode uint64) (string, bool) { - p, ok := r.pathByIno[inode] - return p, ok +func isContainerID(s string) bool { + if len(s) != 64 { + return false + } + for i := range len(s) { + if !isHexLower(s[i]) { + return false + } + } + return true } // containerID reads /proc//cgroup and returns the first container id found diff --git a/pkg/nsdiscover/scanner.go b/pkg/nsdiscover/scanner.go index 5c9204925..b23fb35e5 100644 --- a/pkg/nsdiscover/scanner.go +++ b/pkg/nsdiscover/scanner.go @@ -13,7 +13,6 @@ package nsdiscover import ( "bytes" - "strconv" "time" "unsafe" @@ -36,13 +35,13 @@ const scannerMapHint = 64 // buffer + the dedup map, so steady-state allocation is zero regardless of the // process count. Call Close at shutdown. type Scanner struct { - fd int // persistent procfs dir fd, rewound each scan - dbuf []byte // getdents buffer - pbuf []byte // NUL-terminated relative-path scratch ("/ns/net\0") - lbuf []byte // readlink target buffer - seen map[uint64]struct{} // per-scan dedup set (cleared, not reallocated) - skip int // pid Scan ignores (0: none); see SkipPid - nbuf []byte // pid formatting scratch for PidInNetns + fd int // persistent procfs dir fd, rewound each scan + dbuf []byte // getdents buffer + pbuf []byte // NUL-terminated relative-path scratch ("/ns/net\0") + lbuf []byte // readlink target buffer + seen map[uint64]struct{} // per-scan dedup set (cleared, not reallocated) + skip int // pid Scan ignores (0: none); see SkipPid + reported int // namespaces reported this scan } // NewScanner opens procRoot (typically "/proc"). If the open fails the scanner @@ -58,7 +57,6 @@ func NewScanner(procRoot string) *Scanner { pbuf: make([]byte, 0, 32), lbuf: make([]byte, 64), seen: make(map[uint64]struct{}, scannerMapHint), - nbuf: make([]byte, 0, 20), } } @@ -85,9 +83,14 @@ type ScanLimits struct { // Deadline stops the scan once passed (checked every // scanDeadlineEvery pids). Zero: none. Deadline time.Time - // MaxNamespaces stops the scan after this many distinct namespaces. - // 0: none. + // MaxNamespaces bounds the new namespaces one scan reports. Past it + // the scan still walks every pid (within Deadline) but reports only + // namespaces Keep accepts (tracked or already waiting), so a flood of + // new namespaces can't hide the ones already known. 0: none. MaxNamespaces int + // Keep reports whether a namespace is reported even past + // MaxNamespaces. nil: none are. + Keep func(inode uint64) bool } // scanDeadlineEvery is how many pids pass between deadline checks. @@ -97,11 +100,14 @@ const scanDeadlineEvery = 256 type ScanStop uint8 const ( - // ScanComplete: every pid was seen. + // ScanComplete: every pid was seen and every namespace reported. ScanComplete ScanStop = iota - // ScanTimeout: ScanLimits.Deadline passed. + // ScanTimeout: ScanLimits.Deadline passed; later pids weren't seen, + // so a namespace not reported may still be live. ScanTimeout - // ScanCap: ScanLimits.MaxNamespaces namespaces were found. + // ScanCap: every pid was seen, but past ScanLimits.MaxNamespaces new + // namespaces (not Keep) weren't reported. Every Keep namespace that is + // live was reported. ScanCap ) @@ -114,11 +120,11 @@ func (s *Scanner) Scan(fn func(Namespace)) (skipped int) { return skipped } -// ScanLimited is Scan within lim. stop is ScanComplete only when every pid -// was seen; otherwise fn has seen only some namespaces, and a namespace it -// didn't see may still be live. +// ScanLimited is Scan within lim; stop says what, if anything, it left +// out (see ScanStop). A timeout wins over the cap. func (s *Scanner) ScanLimited(lim ScanLimits, fn func(Namespace)) (skipped int, stop ScanStop) { clear(s.seen) + s.reported = 0 if s.fd < 0 { return 0, ScanComplete } @@ -126,6 +132,7 @@ func (s *Scanner) ScanLimited(lim ScanLimits, fn func(Namespace)) (skipped int, return 0, ScanComplete } pids := 0 + stop = ScanComplete for { n, gerr := unix.Getdents(s.fd, s.dbuf) if gerr != nil || n <= 0 { @@ -152,28 +159,28 @@ func (s *Scanner) ScanLimited(lim ScanLimits, fn func(Namespace)) (skipped int, return skipped, ScanTimeout } - ino, ok := s.pidNetns(pid, name) + ino, ok := s.pidNetns(name) if !ok { skipped++ continue } - if _, dup := s.seen[ino]; !dup { - if lim.MaxNamespaces > 0 && len(s.seen) >= lim.MaxNamespaces { - return skipped, ScanCap - } - s.seen[ino] = struct{}{} - fn(Namespace{Inode: ino, Pid: pid}) + if _, dup := s.seen[ino]; dup { + continue + } + if lim.MaxNamespaces > 0 && s.reported >= lim.MaxNamespaces && (lim.Keep == nil || !lim.Keep(ino)) { + stop = ScanCap + continue } + s.seen[ino] = struct{}{} + s.reported++ + fn(Namespace{Inode: ino, Pid: pid}) } } - return skipped, ScanComplete + return skipped, stop } // pidNetns reads /proc//ns/net's inode. name is pid's decimal form. -func (s *Scanner) pidNetns(pid int, name []byte) (uint64, bool) { - if name == nil { - name = strconv.AppendInt(s.nbuf[:0], int64(pid), 10) - } +func (s *Scanner) pidNetns(name []byte) (uint64, bool) { // Relative path "/ns/net\0" resolved against the procfs fd. s.pbuf = append(s.pbuf[:0], name...) s.pbuf = append(s.pbuf, "/ns/net\x00"...) @@ -184,17 +191,6 @@ func (s *Scanner) pidNetns(pid int, name []byte) (uint64, bool) { return parseNetInode(s.lbuf[:m]) } -// PidInNetns reports whether pid is still in the namespace inode. Reconcile -// uses it after an incomplete scan, to tell a tracked namespace the scan -// didn't reach from one that is gone. -func (s *Scanner) PidInNetns(pid int, inode uint64) bool { - if s.fd < 0 || pid <= 0 { - return false - } - ino, ok := s.pidNetns(pid, nil) - return ok && ino == inode -} - // direntName returns the NUL-terminated name of a getdents64 record as a byte // slice aliasing the getdents buffer (no allocation). getdents guarantees the // name is NUL-terminated within the record. diff --git a/pkg/nsdiscover/scanner_limits_test.go b/pkg/nsdiscover/scanner_limits_test.go index e916c0936..195ecdba3 100644 --- a/pkg/nsdiscover/scanner_limits_test.go +++ b/pkg/nsdiscover/scanner_limits_test.go @@ -1,6 +1,7 @@ package nsdiscover import ( + "strings" "testing" "time" ) @@ -32,8 +33,14 @@ func TestScanLimits(t *testing.T) { {name: "deadline", category: "N", description: "deadline already passed: stops at the first check (256 pids)", pids: pidsN(1000, 1000), lim: ScanLimits{Deadline: time.Now().Add(-time.Second)}, expectedStop: ScanTimeout, expectedFound: 255}, - {name: "scan_cap", category: "N", description: "100 namespaces, cap 10", + {name: "scan_cap", category: "N", description: "100 namespaces, cap 10: 10 reported, every pid still walked", pids: pidsN(100, 100), lim: ScanLimits{MaxNamespaces: 10}, expectedStop: ScanCap, expectedFound: 10}, + {name: "keep_past_cap", category: "C", description: "past the cap, tracked/waiting namespaces (Keep) are still reported", + pids: pidsN(100, 100), lim: ScanLimits{MaxNamespaces: 10, Keep: func(ino uint64) bool { return ino >= 4026531090 }}, + expectedStop: ScanCap, expectedFound: -1}, + {name: "timeout_wins", category: "C", description: "deadline and cap both hit: timeout is reported", + pids: pidsN(1000, 1000), lim: ScanLimits{Deadline: time.Now().Add(-time.Second), MaxNamespaces: 10}, + expectedStop: ScanTimeout, expectedFound: 10}, {name: "cap_exact", category: "B", description: "10 namespaces, cap 10: complete", pids: pidsN(50, 10), lim: ScanLimits{MaxNamespaces: 10}, expectedStop: ScanComplete, expectedFound: 10}, {name: "under_deadline_check", category: "B", description: "255 pids never reach a deadline check", @@ -43,38 +50,75 @@ func TestScanLimits(t *testing.T) { t.Run(tc.name, func(t *testing.T) { s := NewScanner(writeProc(t, tc.pids)) defer s.Close() - found := 0 - _, stop := s.ScanLimited(tc.lim, func(Namespace) { found++ }) + found, kept, other := 0, 0, 0 + _, stop := s.ScanLimited(tc.lim, func(ns Namespace) { + found++ + if tc.lim.Keep != nil && tc.lim.Keep(ns.Inode) { + kept++ + } else { + other++ + } + }) if stop != tc.expectedStop || (tc.expectedFound >= 0 && found != tc.expectedFound) { t.Errorf("%s: stop=%d found=%d, expected stop=%d found=%d", tc.description, stop, found, tc.expectedStop, tc.expectedFound) } + if tc.lim.Keep != nil && (kept != 10 || other > tc.lim.MaxNamespaces) { + t.Errorf("%s: %d Keep reported (expected all 10), %d others (expected <= %d)", tc.description, kept, other, tc.lim.MaxNamespaces) + } }) } } -// TestPidInNetns: the direct check reconcile makes after an incomplete -// scan. -func TestPidInNetns(t *testing.T) { - s := NewScanner(writeProc(t, map[int]uint64{42: 4026531999})) - defer s.Close() +// TestOwnerFromCgroup: the quota owner a cgroup path maps to. +func TestOwnerFromCgroup(t *testing.T) { + id := strings.Repeat("a", 64) + fake := strings.Repeat("b", 64) tests := []struct { name string category string description string - pid int - inode uint64 - expected bool + cgroup string + expected string }{ - {name: "in_it", category: "P", description: "pid still in the namespace", pid: 42, inode: 4026531999, expected: true}, - {name: "moved", category: "N", description: "pid now in another namespace", pid: 42, inode: 4026531998}, - {name: "gone", category: "N", description: "pid exited", pid: 43, inode: 4026531999}, - {name: "pid_zero", category: "B", description: "pid 0 (bind mount only) is never confirmed this way", pid: 0, inode: 4026531999}, + {name: "docker_systemd", category: "P", description: "docker with the systemd driver", + cgroup: "0::/system.slice/docker-" + id + ".scope\n", expected: "/system.slice/docker-" + id + ".scope"}, + {name: "docker_cgroupfs", category: "P", description: "docker with the cgroupfs driver", + cgroup: "0::/docker/" + id + "\n", expected: "/docker/" + id}, + {name: "kubepods", category: "P", description: "kubernetes, containerd, systemd driver", + cgroup: "0::/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod1234.slice/cri-containerd-" + id + ".scope\n", + expected: "/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod1234.slice/cri-containerd-" + id + ".scope"}, + {name: "kubepods_cgroupfs", category: "P", description: "kubernetes with the cgroupfs driver", + cgroup: "0::/kubepods/burstable/pod1234/" + id + "\n", expected: "/kubepods/burstable/pod1234/" + id}, + {name: "nested_fake_id", category: "C", description: "a tenant sub-cgroup named like a container: the outer runtime component wins", + cgroup: "0::/system.slice/docker-" + id + ".scope/docker-" + fake + ".scope/x\n", expected: "/system.slice/docker-" + id + ".scope"}, + {name: "user_slice", category: "C", description: "no runtime: first two components, so one user's sub-cgroups share an owner", + cgroup: "0::/user.slice/user-1000.slice/user@1000.service/app.slice/" + fake + "\n", expected: "/user.slice/user-1000.slice"}, + {name: "hex_not_runtime", category: "N", description: "a bare 64-hex component not under docker/kubepods/pod is not a runtime", + cgroup: "0::/" + fake + "/x/y\n", expected: "/" + fake + "/x"}, + {name: "root", category: "B", description: "the root cgroup", + cgroup: "0::/\n", expected: "/"}, + {name: "v1_hybrid", category: "B", description: "v1 lines then the v2 line: v2 is used", + cgroup: "12:pids:/docker/" + fake + "\n0::/system.slice/docker-" + id + ".scope\n", expected: "/system.slice/docker-" + id + ".scope"}, + {name: "v1_only", category: "B", description: "no v2 line: the first line", + cgroup: "12:pids:/docker/" + id + "\n11:memory:/docker/" + id + "\n", expected: "/docker/" + id}, + {name: "short_id", category: "N", description: "63 hex chars is not an id", + cgroup: "0::/system.slice/docker-" + id[:63] + ".scope\n", expected: "/system.slice/docker-" + id[:63] + ".scope"}, } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { - if got := s.PidInNetns(tc.pid, tc.inode); got != tc.expected { - t.Errorf("%s: %v, expected %v", tc.description, got, tc.expected) + if got := ownerFromCgroup([]byte(tc.cgroup)); got != tc.expected { + t.Errorf("%s: %q, expected %q", tc.description, got, tc.expected) } }) } } + +// TestOwnerUnreadable: a pid whose cgroup can't be read has no owner yet. +func TestOwnerUnreadable(t *testing.T) { + r := NewResolver(t.TempDir(), nil) + for _, pid := range []int{0, -1, 12345} { + if o, ok := r.Owner(pid); ok { + t.Errorf("pid %d: owner %q ok, expected not ok", pid, o) + } + } +} diff --git a/pkg/xtcp/caps.go b/pkg/xtcp/caps.go index 0bcebb15b..de9f38981 100644 --- a/pkg/xtcp/caps.go +++ b/pkg/xtcp/caps.go @@ -36,6 +36,22 @@ func (x *XTCP) dumpTruncated(reason string, fd int, limit uint64) { log.Printf("dump truncated: fd:%d inode:%v cap:%s=%d; the rest of this poll's dump is dropped", fd, inode, reason, limit) } +// sortByQueue orders candidates by their place in the waiting queue, then +// pid and inode. One not yet queued arrived this reconcile: behind every +// waiting one. +func sortByQueue(candidates []nsIdentity, waiting map[uint64]uint64) { + place := func(inode uint64) uint64 { + if s, ok := waiting[inode]; ok { + return s + } + return math.MaxUint64 + } + slices.SortFunc(candidates, func(a, b nsIdentity) int { + return cmp.Or(cmp.Compare(place(a.inode), place(b.inode)), + cmp.Compare(a.pid, b.pid), cmp.Compare(a.inode, b.inode)) + }) +} + // admitLimits are the admission caps; 0 turns one off. type admitLimits struct { maxNetns uint32 // -maxNetns: tracked namespaces @@ -63,27 +79,18 @@ func (d admitDrops) total() int { return d.maxNetns + d.ownerQuota + d.addRate } // maintained by queueWaiting), then by pid and inode, and xtcp2's own // namespace always gets in. A candidate is left out by -maxNetns when // every slot is taken, by the add rate once this reconcile has added -// maxAdds, and by the owner quota when its owner (the outermost container -// id; see nsdiscover.Resolver.ContainerID) has maxPerOwner tracked. +// maxAdds, and by the owner quota when its owner has maxPerOwner tracked. // Namespaces with no pid (bind mounts only) have no owner and are exempt // from the quota: tenants can't create host bind mounts. It returns the // candidates to add and what each cap left out. +// +// The owner is nsdiscover.Resolver.Owner: the cgroup path cut at the +// runtime's container component. func admitNamespaces(candidates []nsIdentity, tracked int, owners map[string]int, lim admitLimits, waiting map[uint64]uint64) (admit []nsIdentity, drops admitDrops) { if !lim.any() { return candidates, drops } - // A candidate not yet queued arrived this reconcile: behind every - // waiting one. - place := func(inode uint64) uint64 { - if s, ok := waiting[inode]; ok { - return s - } - return math.MaxUint64 - } - slices.SortFunc(candidates, func(a, b nsIdentity) int { - return cmp.Or(cmp.Compare(place(a.inode), place(b.inode)), - cmp.Compare(a.pid, b.pid), cmp.Compare(a.inode, b.inode)) - }) + sortByQueue(candidates, waiting) admit = candidates[:0:0] adds := 0 for _, id := range candidates { diff --git a/pkg/xtcp/init.go b/pkg/xtcp/init.go index 246615303..6a659901a 100644 --- a/pkg/xtcp/init.go +++ b/pkg/xtcp/init.go @@ -96,6 +96,7 @@ func (x *XTCP) Init(ctx context.Context) { // After InitPromethus, like the enrichers below: it sets a gauge. x.checkNetnsPropagation() + x.checkFDLimit() // initEnrichers runs AFTER the wait, not before it. Every enricher reports // its outcome through x.pC / x.pGV, which InitPromethus creates on one of diff --git a/pkg/xtcp/ns_discover.go b/pkg/xtcp/ns_discover.go index d6b2c90ba..eb00f3665 100644 --- a/pkg/xtcp/ns_discover.go +++ b/pkg/xtcp/ns_discover.go @@ -65,8 +65,10 @@ func (x *XTCP) discoverNamespaces(lim nsdiscover.ScanLimits) (map[uint64]nsIdent if _, ok := out[inode]; ok { return } - if lim.MaxNamespaces > 0 && len(out) >= lim.MaxNamespaces { - stop = nsdiscover.ScanCap + if lim.MaxNamespaces > 0 && len(out) >= lim.MaxNamespaces && (lim.Keep == nil || !lim.Keep(inode)) { + if stop == nsdiscover.ScanComplete { + stop = nsdiscover.ScanCap + } return } out[inode] = nsIdentity{ diff --git a/pkg/xtcp/ns_reconcile.go b/pkg/xtcp/ns_reconcile.go index 7e9ec7906..b94ca484e 100644 --- a/pkg/xtcp/ns_reconcile.go +++ b/pkg/xtcp/ns_reconcile.go @@ -3,6 +3,7 @@ package xtcp import ( "context" "log" + "maps" "sync" "time" @@ -107,14 +108,20 @@ func (x *XTCP) reconcile(ctx context.Context) (dels, stores int) { x.reconcileIncomplete(stop, len(live), startTime) } - dels = x.deleteGone(live, stop) - stores = x.addNew(ctx, live, lim.Deadline) + // After a timeout the scan didn't see every pid, so a namespace it + // didn't report may still be live: delete nothing this time. (A capped + // scan saw every pid and reported every tracked namespace still live.) + if stop != nsdiscover.ScanTimeout { + dels = x.deleteGone(live) + } + stores = x.addNew(ctx, live, stop, startTime) return dels, stores } -// scanLimits bounds one reconcile's scan: -reconcileTimeout from start, -// and 4 x -maxNetns namespaces (enough to see every tracked one plus a -// queue of candidates). 0 turns either off. +// scanLimits bounds one reconcile's scan: -reconcileTimeout from start, and +// at most 4 x -maxNetns new namespaces reported. Tracked and waiting +// namespaces are reported past that, so the cap only limits how many new +// ones a scan takes in. 0 turns either off. func (x *XTCP) scanLimits(start time.Time) nsdiscover.ScanLimits { var lim nsdiscover.ScanLimits if d := x.config.GetReconcileTimeout().AsDuration(); d > 0 { @@ -122,6 +129,13 @@ func (x *XTCP) scanLimits(start time.Time) nsdiscover.ScanLimits { } if n := x.config.GetMaxNetns(); n > 0 { lim.MaxNamespaces = scanCapPerMaxNetns * int(n) + lim.Keep = func(inode uint64) bool { + if _, ok := x.nsWaiting[inode]; ok { + return true + } + _, ok := x.nsMap.Load(inode) + return ok + } } return lim } @@ -136,15 +150,15 @@ const ( ) func (x *XTCP) reconcileIncomplete(stop nsdiscover.ScanStop, found int, start time.Time) { - reason := reconcileIncompleteTimeoutCst + reason, what := reconcileIncompleteTimeoutCst, "nothing deleted this reconcile" if stop == nsdiscover.ScanCap { - reason = reconcileIncompleteScanCapCst + reason, what = reconcileIncompleteScanCapCst, "some new namespaces not seen this reconcile" } if x.pReconcileIncomplete != nil { x.pReconcileIncomplete.WithLabelValues(reason).Inc() } - log.Printf("reconcile: scan stopped early (%s) after %d namespaces in %s; deleting only namespaces confirmed gone", - reason, found, time.Since(start).Round(time.Millisecond)) + log.Printf("reconcile: scan incomplete (%s) with %d namespaces in %s; %s", + reason, found, time.Since(start).Round(time.Millisecond), what) } // deleteGone deletes tracked entries whose namespace is no longer live. @@ -153,52 +167,31 @@ func (x *XTCP) reconcileIncomplete(stop nsdiscover.ScanStop, found int, start ti // never deleted. The scan cannot vouch for it: it skips xtcp's own pid, // and when xtcp is alone in its netns (a container without pid_mode:host) // no other pid shows it. -// -// After an incomplete scan a namespace it didn't reach may still be live, -// so one is deleted only when confirmed gone: its representative pid is no -// longer in it (a bind-mount-only one: its mount is gone). Without this, a -// scan cut short by a flood of new namespaces would delete monitored ones; -// and skipping deletes altogether would let dead ones keep their slots for -// as long as the flood lasts. A live namespace whose pid has since left is -// deleted and re-added by the next complete scan. -func (x *XTCP) deleteGone(live map[uint64]nsIdentity, stop nsdiscover.ScanStop) (dels int) { - x.nsMap.Range(func(key, value interface{}) bool { +func (x *XTCP) deleteGone(live map[uint64]nsIdentity) (dels int) { + x.nsMap.Range(func(key, _ interface{}) bool { inode, ok := key.(uint64) if !ok || inode == x.selfNsInode { return true } - if _, stillLive := live[inode]; stillLive { - return true + if _, stillLive := live[inode]; !stillLive { + x.nsDelete(inode) + dels++ } - if stop != nsdiscover.ScanComplete { - if item, ok := value.(netNSitem); ok && x.confirmedLive(item) { - return true - } - } - x.nsDelete(inode) - dels++ return true }) return dels } -// confirmedLive checks one tracked namespace directly. -func (x *XTCP) confirmedLive(item netNSitem) bool { - if item.pid > 0 { - return x.nsScanner != nil && x.nsScanner.PidInNetns(item.pid, item.inode) - } - if x.nsResolver == nil { - return false - } - _, ok := x.nsResolver.BindMountPath(item.inode) - return ok -} +// ownerResolveMinCst is how many candidates' owners a reconcile resolves +// even past its deadline, oldest waiters first, so a slow scan can't stop +// admission altogether. +const ownerResolveMinCst = 64 // addNew adds live namespaces not yet tracked, within the admission caps // (admitNamespaces). Tracked ones keep their slots; the rest wait in the // order first seen and stay candidates on every later reconcile. Names are // resolved only for the namespaces admitted. -func (x *XTCP) addNew(ctx context.Context, live map[uint64]nsIdentity, deadline time.Time) (stores int) { +func (x *XTCP) addNew(ctx context.Context, live map[uint64]nsIdentity, stop nsdiscover.ScanStop, start time.Time) (stores int) { var candidates []nsIdentity for inode, id := range live { if _, tracked := x.nsMap.Load(inode); !tracked { @@ -211,7 +204,7 @@ func (x *XTCP) addNew(ctx context.Context, live map[uint64]nsIdentity, deadline maxAdds: x.config.GetMaxNetnsAddsPerReconcile(), self: x.selfNsInode, } - if len(candidates) == 0 { + if len(candidates) == 0 && stop != nsdiscover.ScanTimeout { clear(x.nsWaiting) clear(x.nsOwners) return 0 @@ -225,22 +218,31 @@ func (x *XTCP) addNew(ctx context.Context, live map[uint64]nsIdentity, deadline resolvable := candidates if lim.maxPerOwner != 0 { owners = x.trackedOwners() + var deadline time.Time + if d := x.config.GetReconcileTimeout().AsDuration(); d > 0 { + deadline = start.Add(d) + } resolvable = x.resolveOwners(candidates, deadline) } admit, drops := admitNamespaces(resolvable, tracked, owners, lim, x.nsWaiting) if lim.any() { - // The full candidate list: one whose owner wasn't read in time - // keeps its place too. + var prev map[uint64]uint64 + if stop == nsdiscover.ScanTimeout { + prev = maps.Clone(x.nsWaiting) // queueWaiting may clear it in place + } + // The full candidate list: one whose owner wasn't read keeps its + // place too. x.nsWaiting, x.nsWaitingSeq = queueWaiting(x.nsWaiting, x.nsWaitingSeq, candidates, admit) - x.pruneOwners(candidates, admit) + if stop == nsdiscover.ScanTimeout { + // A waiter the scan didn't reach keeps its place. + x.nsWaiting = keepUnseenWaiters(x.nsWaiting, prev, live) + } else { + x.pruneOwners(candidates, admit) + } } for _, id := range admit { - cid := id.owner - if lim.maxPerOwner == 0 { - cid = x.nsResolver.ContainerID(id.pid) - } - id.name = x.nsResolver.NameFor(id.inode, cid) + id.name = x.nsResolver.Name(id.inode, id.pid) x.nsAdd(ctx, id) stores++ } @@ -248,6 +250,21 @@ func (x *XTCP) addNew(ctx context.Context, live map[uint64]nsIdentity, deadline return stores } +// keepUnseenWaiters returns next plus every entry of prev whose namespace +// the scan didn't report. +func keepUnseenWaiters(next, prev map[uint64]uint64, live map[uint64]nsIdentity) map[uint64]uint64 { + for inode, seq := range prev { + if _, seen := live[inode]; seen { + continue + } + if next == nil { + next = make(map[uint64]uint64) + } + next[inode] = seq + } + return next +} + // trackedOwners counts tracked namespaces per owner; xtcp2's own and // bind-mount-only ones (no pid) are exempt from the quota. func (x *XTCP) trackedOwners() map[string]int { @@ -263,14 +280,17 @@ func (x *XTCP) trackedOwners() map[string]int { } // resolveOwners fills each candidate's owner from the cache, or its -// cgroup, until deadline. It returns the candidates that have one; the -// rest are left for the next reconcile (they keep their queue place). +// cgroup, oldest waiter first. Past deadline it still resolves +// ownerResolveMinCst, so admission always moves. It returns the candidates +// that have an owner; the rest (out of time, or the pid exited while being +// read) wait for a later reconcile, keeping their queue place. func (x *XTCP) resolveOwners(candidates []nsIdentity, deadline time.Time) []nsIdentity { if x.nsOwners == nil { x.nsOwners = make(map[uint64]string) } + sortByQueue(candidates, x.nsWaiting) out := candidates[:0:0] - deferred := 0 + deferred, read := 0, 0 for i := range candidates { id := &candidates[i] if id.pid <= 0 { @@ -282,12 +302,18 @@ func (x *XTCP) resolveOwners(candidates []nsIdentity, deadline time.Time) []nsId out = append(out, *id) continue } - if !deadline.IsZero() && time.Now().After(deadline) { + if read >= ownerResolveMinCst && !deadline.IsZero() && time.Now().After(deadline) { + deferred++ + continue + } + read++ + o, ok := x.nsResolver.Owner(id.pid) + if !ok { deferred++ continue } - id.owner = x.nsResolver.ContainerID(id.pid) - x.nsOwners[id.inode] = id.owner + id.owner = o + x.nsOwners[id.inode] = o out = append(out, *id) } if deferred > 0 { diff --git a/pkg/xtcp/ns_reconcile_limits_test.go b/pkg/xtcp/ns_reconcile_limits_test.go index e58516a71..3dd1e7b48 100644 --- a/pkg/xtcp/ns_reconcile_limits_test.go +++ b/pkg/xtcp/ns_reconcile_limits_test.go @@ -60,6 +60,7 @@ func TestReconcileLimits(t *testing.T) { maxNetns uint32 perOwner uint32 adds uint32 + timeout time.Duration // 0: a minute // expected expectedDeleted []uint64 expectedKept []uint64 @@ -71,7 +72,7 @@ func TestReconcileLimits(t *testing.T) { {name: "complete_deletes", category: "P", description: "complete scan: a tracked namespace no longer live is deleted", pids: map[int]pidNS{100: {base, ""}}, tracked: map[uint64]int{base: 100, base + 1: 101}, maxNetns: 100, expectedDeleted: []uint64{base + 1}, expectedKept: []uint64{base}}, - {name: "incomplete_no_delete", category: "C", description: "scan cut by the cap before a tracked namespace whose pid is still in it: kept", + {name: "capped_keeps_tracked", category: "C", description: "scan cap reached before a tracked namespace in /proc order: still seen (Keep), kept", pids: func() map[int]pidNS { m := map[int]pidNS{} for i := range 20 { @@ -81,7 +82,7 @@ func TestReconcileLimits(t *testing.T) { }(), tracked: map[uint64]int{base + 19: 119}, maxNetns: 1, // scan cap 4: base+19 unseen expectedKept: []uint64{base + 19}, expectedReason: reconcileIncompleteScanCapCst}, - {name: "incomplete_confirmed_gone", category: "N", description: "incomplete scan, tracked pid gone: deleted (no slot leak under a flood), and its slot goes to a waiter", + {name: "capped_deletes_gone", category: "N", description: "a capped scan walked every pid: a gone tracked namespace is deleted (no slot leak under a flood), its slot goes to a waiter", pids: func() map[int]pidNS { m := map[int]pidNS{} for i := range 20 { @@ -91,11 +92,23 @@ func TestReconcileLimits(t *testing.T) { }(), tracked: map[uint64]int{base + 99: 999}, maxNetns: 1, expectedDeleted: []uint64{base + 99}, expectedStores: 1, expectedReason: reconcileIncompleteScanCapCst}, - {name: "nested_cgroup_owner", category: "C", description: "a tenant sub-cgroup with a fake 64-hex name: the owner is the outer id", + {name: "nested_cgroup_owner", category: "C", description: "a tenant sub-cgroup named like a container: the owner is the outer runtime component", pids: map[int]pidNS{ - 100: {base, "0::/system.slice/docker-" + idA + ".scope/" + idB + "\n"}, + 100: {base, "0::/system.slice/docker-" + idA + ".scope/docker-" + idB + ".scope\n"}, }, maxNetns: 100, perOwner: 64, - expectedStores: 1, expectedOwners: map[uint64]string{base: idA}, expectedNames: map[uint64]string{base: idA}}, + expectedStores: 1, expectedOwners: map[uint64]string{base: "/system.slice/docker-" + idA + ".scope"}, expectedNames: map[uint64]string{base: idA}}, + {name: "timeout_no_delete", category: "C", description: "a timed-out scan deletes nothing, even a gone namespace", + pids: func() map[int]pidNS { + m := map[int]pidNS{} + for i := range 300 { + m[100+i] = pidNS{base + uint64(i), ""} + } + return m + }(), + tracked: map[uint64]int{base + 999: 9999}, maxNetns: 4096, timeout: time.Nanosecond, + expectedKept: []uint64{base + 999}, expectedStores: -1, expectedReason: reconcileIncompleteTimeoutCst}, + {name: "unreadable_owner_deferred", category: "N", description: "a candidate whose cgroup can't be read is deferred, not filed under an owner", + pids: map[int]pidNS{100: {base, ""}}, maxNetns: 100, perOwner: 1}, {name: "owner_quota_reconcile", category: "N", description: "owner A's 5 namespaces against quota 2, B's 1: A gets 2, B 1", pids: map[int]pidNS{ 100: {base, cgroupOf(idA)}, 101: {base + 1, cgroupOf(idA)}, 102: {base + 2, cgroupOf(idA)}, @@ -111,7 +124,11 @@ func TestReconcileLimits(t *testing.T) { x.config.MaxNetns = tc.maxNetns x.config.MaxNetnsPerOwner = tc.perOwner x.config.MaxNetnsAddsPerReconcile = tc.adds - x.config.ReconcileTimeout = durationpb.New(time.Minute) + timeout := tc.timeout + if timeout == 0 { + timeout = time.Minute + } + x.config.ReconcileTimeout = durationpb.New(timeout) x.pReconcileIncomplete = prometheus.NewCounterVec(prometheus.CounterOpts{Name: "ri"}, []string{"reason"}) x.pNetnsDropped = prometheus.NewCounterVec(prometheus.CounterOpts{Name: "nd"}, []string{"reason"}) for ino, pid := range tc.tracked { @@ -133,7 +150,7 @@ func TestReconcileLimits(t *testing.T) { waitForNsInstanceEnd(t, x, float64(stores)) }) - if stores != tc.expectedStores { + if tc.expectedStores >= 0 && stores != tc.expectedStores { t.Errorf("%s: stores=%d, expected %d", tc.description, stores, tc.expectedStores) } for _, ino := range tc.expectedDeleted { diff --git a/pkg/xtcp/poller_pure_test.go b/pkg/xtcp/poller_pure_test.go index 24950e2df..631de206c 100644 --- a/pkg/xtcp/poller_pure_test.go +++ b/pkg/xtcp/poller_pure_test.go @@ -17,7 +17,7 @@ import ( "github.com/randomizedcoder/xtcp2/pkg/nsdiscover" ) -func newPollerFixture(t *testing.T) *XTCP { +func newPollerFixture(t testing.TB) *XTCP { t.Helper() x := &XTCP{ config: &xtcp_config.XtcpConfig{ diff --git a/pkg/xtcp/pollgate.go b/pkg/xtcp/pollgate.go index 259638a0e..63cac7b03 100644 --- a/pkg/xtcp/pollgate.go +++ b/pkg/xtcp/pollgate.go @@ -3,6 +3,8 @@ package xtcp import ( "encoding/binary" "log" + + "golang.org/x/sys/unix" ) // pollGate is the socket-count gate's per-poller state: the sockstat @@ -31,6 +33,48 @@ var newSockstatRingReader = func(batch, workers uint32) (sockstatReader, error) return newRingSockstatReader(batch, workers) } +// fdsPerNetns is what one tracked namespace holds open: its netlink +// socket, plus its sockstat fd with the gate on. +func fdsPerNetns(gate bool) uint64 { + if gate { + return 2 + } + return 1 +} + +// fdLimitMarginCst covers everything else: listeners, destinations, +// enrichers, setns fds in flight. +const fdLimitMarginCst = 256 + +// getNofile is the seam tests swap for the RLIMIT_NOFILE soft limit. +var getNofile = func() (uint64, error) { + var r unix.Rlimit + if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &r); err != nil { + return 0, err + } + return r.Cur, nil +} + +// checkFDLimit warns at startup when RLIMIT_NOFILE can't hold -maxNetns +// namespaces' fds: past it, opening a namespace fails (counted per +// namespace) long before the cap is reached. It returns the fds needed, or +// 0 when the limit is enough or -maxNetns is off. +func (x *XTCP) checkFDLimit() (need uint64) { + n := uint64(x.config.GetMaxNetns()) + if n == 0 { + return 0 + } + need = n*fdsPerNetns(x.gateEnabled()) + fdLimitMarginCst + soft, err := getNofile() + if err != nil || soft >= need { + return 0 + } + x.pC.WithLabelValues("init", "nofile", "low").Inc() + log.Printf("RLIMIT_NOFILE %d is below the %d fds -maxNetns=%d needs (%d per namespace + %d); raise LimitNOFILE / ulimit -n", + soft, need, n, fdsPerNetns(x.gateEnabled()), fdLimitMarginCst) + return need +} + // gateEnabled reports whether -maxRecordsPerPoll is set. func (x *XTCP) gateEnabled() bool { return x.config.GetMaxRecordsPerPoll() > 0 diff --git a/pkg/xtcp/pollgate_bench_test.go b/pkg/xtcp/pollgate_bench_test.go new file mode 100644 index 000000000..5ccfae811 --- /dev/null +++ b/pkg/xtcp/pollgate_bench_test.go @@ -0,0 +1,126 @@ +package xtcp + +import ( + "encoding/binary" + "fmt" + "os" + "runtime" + "testing" + + xio "github.com/randomizedcoder/xtcp2/pkg/io_uring" + "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" +) + +// benchSockstatFDs opens n fds on this process's sockstat. +func benchSockstatFDs(b *testing.B, n int) []int { + b.Helper() + fds := make([]int, n) + for i := range fds { + f, err := os.Open("/proc/self/net/sockstat") + if err != nil { + b.Skipf("sockstat (n=%d; raise ulimit -n?): %v", n, err) + } + b.Cleanup(func() { f.Close() }) + fds[i] = int(f.Fd()) + } + return fds +} + +// BenchmarkReadSockstat: reading and parsing n namespaces' sockstat, by +// pread and by io_uring batches. ns/op is one poll's pre-pass; ns/netns is +// per namespace. Each read is O(CPUs) in the kernel (per-CPU sums), so run +// it on a many-core host too. +func BenchmarkReadSockstat(b *testing.B) { + for _, n := range []int{64, 1024, 4096} { + b.Run(fmt.Sprintf("syscall/n=%d", n), func(b *testing.B) { + fds := benchSockstatFDs(b, n) + counts := make([]sockstatCount, n) + r := newSyscallSockstatReader() + b.ReportAllocs() + b.ResetTimer() + for b.Loop() { + if failed, _ := r.read(fds, counts); failed != 0 { + b.Fatalf("%d failed", failed) + } + } + b.ReportMetric(float64(b.Elapsed().Nanoseconds())/float64(b.N)/float64(n), "ns/netns") + }) + for _, batch := range []int{1, 16, 64, 128} { + b.Run(fmt.Sprintf("io_uring/n=%d/batch=%d", n, batch), func(b *testing.B) { + fds := benchSockstatFDs(b, n) + counts := make([]sockstatCount, n) + runtime.LockOSThread() + defer runtime.UnlockOSThread() //nolint:forbidigo // safe: benchmark pins the SINGLE_ISSUER ring to one thread; no netns change + ring, err := xio.New(xio.Config{RecvBatchSize: batch, CQEBatchSize: batch}) + if err != nil { + b.Skipf("io_uring: %v", err) + } + defer ring.Close(0, nil) + if _, _, err := ring.SetIOWQMaxWorkers(4, 4); err != nil { + b.Fatal(err) + } + rb := newRingBatcher(ring, batch) + b.ReportAllocs() + b.ResetTimer() + var submits int + for b.Loop() { + failed, s, err := rb.read(fds, counts) + if err != nil || failed != 0 { + b.Fatalf("failed=%d err=%v", failed, err) + } + submits = s + } + b.ReportMetric(float64(b.Elapsed().Nanoseconds())/float64(b.N)/float64(n), "ns/netns") + b.ReportMetric(float64(submits), "submits/op") + }) + } + } +} + +// BenchmarkPlanPoll: planning n namespaces with mixed counts, over budget. +func BenchmarkPlanPoll(b *testing.B) { + for _, n := range []int{1, 64, 4096} { + b.Run(fmt.Sprintf("n=%d", n), func(b *testing.B) { + counts := make([]sockstatCount, n) + for i := range counts { + counts[i] = known(uint64(i*37%5000), uint64(i*11%800)) + } + counts[0] = known(500_000, 50_000) + var p pollPlanner + b.ReportAllocs() + loop := uint64(0) + for b.Loop() { + p.plan(counts, 200_000, 262_144, loop) + loop++ + } + }) + } +} + +// BenchmarkPollPrepass: the whole gate before a poll (map walk, pread of +// every sockstat, plan, requests) for n namespaces. +func BenchmarkPollPrepass(b *testing.B) { + for _, n := range []int{64, 4096} { + b.Run(fmt.Sprintf("n=%d", n), func(b *testing.B) { + fds := benchSockstatFDs(b, n) + x := newPollerFixture(b) + x.config.MaxRecordsPerPoll = 200_000 + x.config.MaxRecordsPerNetns = 262_144 + req := make([]byte, xtcpnl.InetDiagRequestSizeCst) + binary.LittleEndian.PutUint32(req[20:24], 0x3fff) + x.nlRequest = &req + for i, fd := range fds { + x.nsMap.Store(uint64(i+1), netNSitem{inode: uint64(i + 1), socketFD: 100000 + i, stat: newStatHandle(fd)}) + } + defer x.closeGate() + b.ReportAllocs() + loop := uint64(0) + for b.Loop() { + if got := len(x.planGatedPoll(loop)); got != n { + b.Fatalf("planned %d, expected %d", got, n) + } + loop++ + } + }) + } +} diff --git a/pkg/xtcp/pollgate_test.go b/pkg/xtcp/pollgate_test.go index 7cc136e83..6f577691e 100644 --- a/pkg/xtcp/pollgate_test.go +++ b/pkg/xtcp/pollgate_test.go @@ -265,3 +265,38 @@ func TestStatHandle(t *testing.T) { t.Run(tc.name, tc.run) } } + +// TestCheckFDLimit: the startup RLIMIT_NOFILE warning. +func TestCheckFDLimit(t *testing.T) { + tests := []struct { + name string + category string + description string + maxNetns uint32 + gate bool + soft uint64 + expectedNeed uint64 // 0: no warning + }{ + {name: "enough", category: "P", description: "1M fds cover 4096 namespaces with the gate", maxNetns: 4096, gate: true, soft: 1 << 20}, + {name: "low_gate", category: "N", description: "1024 fds, 4096 namespaces x 2 + 256", maxNetns: 4096, gate: true, soft: 1024, expectedNeed: 8448}, + {name: "low_no_gate", category: "N", description: "gate off: one fd per namespace", maxNetns: 4096, soft: 1024, expectedNeed: 4352}, + {name: "exact", category: "B", description: "soft limit exactly the need", maxNetns: 100, gate: true, soft: 456}, + {name: "one_short", category: "B", description: "one below the need", maxNetns: 100, gate: true, soft: 455, expectedNeed: 456}, + {name: "netns_cap_off", category: "C", description: "-maxNetns 0: unbounded, nothing to check", soft: 16}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + prev := getNofile + t.Cleanup(func() { getNofile = prev }) + getNofile = func() (uint64, error) { return tc.soft, nil } + x := newPollerFixture(t) + x.config.MaxNetns = tc.maxNetns + if tc.gate { + x.config.MaxRecordsPerPoll = 1 + } + if got := x.checkFDLimit(); got != tc.expectedNeed { + t.Errorf("%s: need %d, expected %d", tc.description, got, tc.expectedNeed) + } + }) + } +} diff --git a/pkg/xtcp/xtcp.go b/pkg/xtcp/xtcp.go index 72e2bf2c4..42307e1eb 100644 --- a/pkg/xtcp/xtcp.go +++ b/pkg/xtcp/xtcp.go @@ -265,8 +265,8 @@ type nsIdentity struct { pid int name string path string - // owner is the outermost container id of pid's cgroup ("" for none), - // resolved for candidates only when -maxNetnsPerOwner is on. + // owner is pid's quota owner (nsdiscover.Resolver.Owner), resolved for + // candidates only when -maxNetnsPerOwner is on. owner string } From 911f9105dde06fc7d1a797a859129ad494c79213 Mon Sep 17 00:00:00 2001 From: "randomizedcoder dave.seddon.ca@gmail.com" Date: Fri, 13 Nov 2026 10:01:56 -0800 Subject: [PATCH 12/19] fix(xtcp): anchor owners to runtime cgroups, bound the waiting queue, timeout liveness; docs - Owner: a runtime component counts only where runtimes put it (system.slice/machine.slice scope, /docker/, under kubelet-only kubepods parents); everything under user.slice is the user's slice. A delegated cgroup naming a sub-cgroup like a container is one owner. - Waiting queue capped at 4 x -maxNetns, so Keep can't defeat the scan cap. - After a timed-out scan, an unreached tracked namespace is deleted when the pid it was last seen through has left it (pids refreshed each scan), so a flood that times out every scan can't hold dead namespaces' slots. - Docs: socket-count gate, reconcile limits and owner quota; CHANGELOG; docs/kernel/inet-diag-all-netns.md (kernel analysis for an all-netns inet_diag dump, Linux 7.3.0 @ 46fec1c3029b). Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 1 + docs/README.md | 1 + docs/kernel/inet-diag-all-netns.md | 114 ++++++++++++++++++++++++++ docs/network-namespaces.md | 22 ++++- docs/polling-and-batching.md | 18 ++++ pkg/nsdiscover/resolve.go | 85 +++++++++++-------- pkg/nsdiscover/scanner.go | 14 ++++ pkg/nsdiscover/scanner_limits_test.go | 8 ++ pkg/xtcp/caps.go | 27 ++++-- pkg/xtcp/caps_test.go | 37 ++++++++- pkg/xtcp/ns_reconcile.go | 71 +++++++++++++--- pkg/xtcp/ns_reconcile_limits_test.go | 14 +++- pkg/xtcp/xtcp.go | 3 + 13 files changed, 361 insertions(+), 54 deletions(-) create mode 100644 docs/kernel/inet-diag-all-netns.md diff --git a/CHANGELOG.md b/CHANGELOG.md index e9d62c6d3..58c7277d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ ### New - **Per-namespace caps.** `-maxDumpBytes` (default 256 MiB) and `-maxRecordsPerNetns` (default 262144) bound one namespace's dump per poll: packets past the byte cap are drained undecoded, and records past the record cap are dropped before decode. `-maxNetns` (default 4096) bounds the namespaces tracked. At the cap, tracked namespaces keep their slots, and new ones wait for a freed slot, first come, first served. Alert on `xtcp_netns_dropped_total`. Drops are counted in `xtcp_dump_dropped_total{reason}` and `xtcp_netns_dropped_total`, with one log line per truncated dump or short reconcile. `0` turns a cap off; the matching env vars are `MAX_DUMP_BYTES`, `MAX_RECORDS_PER_NETNS` and `MAX_NETNS`. The caps are startup-only: `ConfigService.Set` keeps the running values. No healthy host should reach the defaults; a host that does now loses that namespace's excess rows, where it used to collect them all ([polling and batching](docs/polling-and-batching.md#per-namespace-caps)). +- **Socket-count gate, reconcile limits, per-owner quota.** Before each poll xtcp2 reads each namespace's sockstat (an fd opened in the namespace; `pread`, or io_uring batches with `-ioUring`) and, when the total is over `-maxRecordsPerPoll` (default 1,048,576), degrades only the namespaces over their fair share: first TIME_WAIT/SYN_RECV are not asked for, then one of K port shards is dumped per poll. `-maxNetnsPerOwner` (default 64) caps namespaces tracked per owner (the container runtime's cgroup), `-maxNetnsAddsPerReconcile` (256) the adds per reconcile, and `-reconcileTimeout` (1s) the namespace scan; a timed-out scan deletes nothing. New metrics `xtcp_poll_sockets`, `xtcp_poll_degraded_total{level}` and `xtcp_reconcile_incomplete_total{reason}`; `xtcp_netns_dropped_total` gains `reason`. `0` turns each off; all are startup-only. Each tracked namespace now holds two fds ([polling and batching](docs/polling-and-batching.md#socket-count-gate), [network namespaces](docs/network-namespaces.md#configuration)). The analysis behind an upstream all-namespace dump is in [docs/kernel](docs/kernel/inet-diag-all-netns.md). - **Vulnerability check.** `checks.govulncheck` runs govulncheck against a pinned snapshot of the Go vulnerability database, with no tags and with every flavor tag, and fails on a reachable finding not in its accepted list. One is accepted: GO-2026-6859 in `net/http`, fixed in go1.27.4, until the toolchain moves. `nix run .#govulncheck-fresh` checks against the live database and runs `go mod verify`; `nix build .#sbom-` writes a CycloneDX SBOM for any binary package. ## 0.2.1 (2026-11) diff --git a/docs/README.md b/docs/README.md index cbcebe542..95b967107 100644 --- a/docs/README.md +++ b/docs/README.md @@ -91,6 +91,7 @@ See **[CONTRIBUTING.md](../CONTRIBUTING.md)** for the development environment, t - [Investigations](investigations/) — write-ups of production problems with evidence, hypotheses and reproduction plans; currently [records dropped after the poll-end flush](investigations/envelope-post-flush-drop.md) (~19% of prod records). - [Socket analysis](socket-analysis.md) — finding RTT bands and other socket groupings by clustering (data-team methodology). - [Netlink documentation](netlink/) — the whole netlink cluster: the [production read path](netlink/collection.md), the [coverage audit](netlink/parsing-comparison.md) against `vishvananda/netlink`, the [expansion roadmap](netlink/coverage-expansion.md) (read-only constraint, target subpackage layout, generalising the `nlmon` capture harness to every protocol family, the multicast listener), and its [status tracker](netlink/coverage-status.md). +- [One inet_diag dump for every namespace](kernel/inet-diag-all-netns.md) — why per-namespace dumps each walk the host's whole TCP table, and where an all-namespace dump would go in the kernel. - [Non-blocking netlink](netlink/nonblocking.md) — replacing the blocking `recvmsg` read path, and why it bounds OS-thread scaling. - [Build flavors](build-flavors.md) — the build-variant × destination-flavor matrix. - [Integration testing](integration-testing.md) — the QEMU microVM test harness. diff --git a/docs/kernel/inet-diag-all-netns.md b/docs/kernel/inet-diag-all-netns.md new file mode 100644 index 000000000..f9469a20a --- /dev/null +++ b/docs/kernel/inet-diag-all-netns.md @@ -0,0 +1,114 @@ +# One inet_diag dump for every network namespace + +An analysis of how `SOCK_DIAG_BY_FAMILY` dumps TCP sockets today, and where a dump covering every network namespace would go. It is written so it can become the body of a netdev RFC, but it proposes nothing on its own. Every reference is to Linux 7.3.0 at `46fec1c3029b` (2026-11-01). + +## Objective + +A privileged process should be able to get the TCP sockets of every network namespace from one `SOCK_DIAG_BY_FAMILY` dump, with each record tagged with its namespace. + +Today a host-wide socket monitor has to do this for every namespace: + +1. find it (scan `/proc//ns/net`, or bind mounts under `/run/netns`); +2. `setns()` a locked thread into it and open a `NETLINK_SOCK_DIAG` socket there; +3. send a dump request on that socket every poll. + +`ip -all netns exec ss` does the same, one namespace at a time. On a host with thousands of containers, that is thousands of sockets, threads entering namespaces, and dumps per poll. Visibility also depends on finding every namespace, which a tenant creating namespaces quickly can make harder. + +## How a dump works today + +### Every dump walks the shared table + +`tcp_diag_dump()` (`net/ipv4/tcp_diag.c:314`) reads the table from the requester's namespace: + +```c +hashinfo = net->ipv4.tcp_death_row.hashinfo; /* tcp_diag.c:325 */ +``` + +That is the global `tcp_hashinfo` for every namespace, unless the namespace was created while its parent had `net.ipv4.tcp_child_ehash_entries` set (`tcp_set_hashinfo()`, `net/ipv4/tcp_ipv4.c:3415-3432`; sysctl in `net/ipv4/sysctl_net_ipv4.c:1527`). Few hosts set it. + +The dump makes three walks over the table, resumable across `recvmsg()` calls through `cb->args[0]` (phase), `cb->args[1]` (bucket) and `cb->args[2]` (position in bucket) (`tcp_diag.c:328-331`, `:557-558`): + +| Phase | Table | Skips other namespaces' sockets at | +|---|---|---| +| 0 | listening hash `lhash2` | `tcp_diag.c:350` `net_eq(sock_net(sk), net)` | +| 1 | bound-inactive `bhash2` | `tcp_diag.c:416` `net_eq(ib2_net(tb2), net)` | +| 2 | established hash `ehash` (incl. TIME_WAIT, request sockets) | `tcp_diag.c:501` `net_eq(sock_net(sk), net)` | + +Empty `ehash` buckets are skipped without taking the lock (`tcp_diag.c:488`). Every non-empty bucket is locked and its chain walked, and other namespaces' sockets are skipped one by one. + +So **one namespace's dump costs O(sockets on the host)**, and polling N namespaces walks the shared table N times. A namespace holding a large socket table slows every other namespace's dump, even if those namespaces have no sockets at all. + +### Filters run before a record is built + +For each socket of the requester's namespace: + +- the state filter (`tcp_diag.c:507`), where SYN_RECV implies NEW_SYN_RECV (`:326`); +- the family filter (`:509`); +- the bytecode filter, `inet_diag_bc_sk()` (`:520`, `net/ipv4/inet_diag.c:599`). + +Bytecode is audited when the dump starts (`inet_diag_bc_audit()`, `inet_diag.c:728`). Only `INET_DIAG_BC_MARK_COND` needs `CAP_NET_ADMIN` (`inet_diag.c:769`; `net_admin = netlink_net_capable(skb, CAP_NET_ADMIN)` at `:742`). + +### Dumps are paced by the reader + +`netlink_recvmsg()` continues a running dump only once the socket's receive queue has drained to half of `sk_rcvbuf` (`net/netlink/af_netlink.c:2000`). The kernel builds the dump only as fast as userspace reads it. + +### Other interfaces are per-namespace too + +- The BPF `iter/tcp` iterator binds to the namespace of the task that creates it (`bpf_iter_init_seq_net()`, `fs/proc/proc_net.c:95`) and filters with `net_eq` (`seq_sk_match()`, `net/ipv4/tcp_ipv4.c:2478`). +- `/proc/net/sockstat` is per namespace for `inuse` and `tw` (`sockstat_seq_show()`, `net/ipv4/proc.c:51`). + +## Where an all-namespace dump would go + +### uapi + +- A request attribute, after `INET_DIAG_REQ_PROTOCOL` in the request enum (`include/uapi/linux/inet_diag.h:65-69`): `INET_DIAG_REQ_ALL_NETNS` (flag). +- A record attribute, after `INET_DIAG_SOCKOPT` (`inet_diag.h:172`): `INET_DIAG_NETNS_COOKIE` (u64). The cookie is `net->net_cookie` (`include/net/net_namespace.h:178`, assigned once in `net/core/net_namespace.c:440`). Userspace already maps sockets to cookies with `SO_NETNS_COOKIE` (`include/uapi/asm-generic/socket.h:125`). + +### Request parsing + +`inet_diag_parse_attrs()` (`net/ipv4/inet_diag.c:181`, attribute checks at `:190`) fills `inet_diag_dump_data.req_nlas[]` (`include/linux/inet_diag.h:35`), so the flag is available to the handler as `cb_data->req_nlas[INET_DIAG_REQ_ALL_NETNS]` with no new plumbing. `__inet_diag_dump_start()` (`inet_diag.c:845`) is where to reject it. + +### Permission + +The dump exposes every tenant's sockets, so the request should be refused unless the requester: + +- has `CAP_NET_ADMIN` in the initial user namespace (`capable()`, not `netlink_net_capable()`, which only checks the requester's own namespace, `inet_diag.c:742`); and +- sends it from a socket in `init_net`. + +Check this in `__inet_diag_dump_start()`, so a refused request fails before any walk. + +### The loop + +In `tcp_diag_dump()` (`net/ipv4/tcp_diag.c:314`), with the flag set: + +1. **Shared table.** Walk `tcp_hashinfo` as today, but don't apply the three namespace checks (`:350`, `:416`, `:501`). Every socket in the shared table is reported, whatever its namespace. +2. **Namespaces with their own table.** Then, under `rcu_read_lock()`, go over namespaces with `for_each_net_rcu()` (`include/net/net_namespace.h:447`) and, for each `net` where `net->ipv4.tcp_death_row.hashinfo != &tcp_hashinfo`, do the same three walks over that table. + +Resuming across `recvmsg()` calls needs one more cursor: which namespace's table the walk is in. The `net` can't be held across calls without a reference. Cookies only grow, but the list isn't in cookie order: `setup_net()` takes the cookie (`net/core/net_namespace.c:440`), runs every pernet init, and only then appends the namespace under `net_rwsem` (`:446-448`). `pernet_ops_rwsem` is held for read there, so two namespaces being set up at once can be appended in either order. Two ways to resume: + +- keep the cookie of the namespace being walked in `cb->args[3]` and, on the next call, find it again in the list (if it has gone, the walk can't tell which namespaces it already covered); or +- take a reference (`maybe_get_net()`) on the namespace being walked, kept in `cb->data`, and drop it when the dump moves on or ends. + +### Record tagging + +`inet_diag_msg_attrs_fill()` (`net/ipv4/inet_diag.c:97`) is the common attribute fill for full sockets; it would add `INET_DIAG_NETNS_COOKIE` from `sock_net(sk)->net_cookie`. TIME_WAIT and request sockets have their own fills, `tcp_twsk_diag_fill()` (`tcp_diag.c:192`) and `tcp_req_diag_fill()` (`tcp_diag.c:233`), and need it too, as does the reply size estimate for the new attribute. + +## Open questions for netdev + +1. **Cookie or inode.** The cookie is stable and already exposed (`SO_NETNS_COOKIE`). Tools key namespaces by `/proc//ns/net` inode (`net->ns.inum`). Both, or one? +2. **inet_diag or BPF.** An `iter/tcp` variant that isn't bound to a namespace (`bpf_iter_init_seq_net()`, `seq_sk_match()`) might be the smaller change, but requires BPF where `SOCK_DIAG` doesn't. +3. **UDP, raw and the other diag handlers.** A flag that only TCP honours is surprising; should every inet handler check it, or reject it? +4. **Visibility.** Who should be allowed this, and should a namespace be able to opt out? +5. **Per-namespace tables.** Is the second loop needed, or should the flag only apply to the shared table (and be refused when any namespace has its own)? + +## Precedents + +- `IFLA_TARGET_NETNSID` (`include/uapi/linux/if_link.h:354`) lets rtnetlink act on another namespace, checked by `rtnl_get_net_ns_capable()` (`net/core/rtnetlink.c:2493`). +- `NETLINK_LISTEN_ALL_NSID` (`include/uapi/linux/netlink.h:172`) lets one socket receive notifications from every namespace with an nsid. +- `SO_NETNS_COOKIE` exposes a namespace's cookie to userspace. + +## Before any RFC + +- Search lore.kernel.org/netdev for earlier attempts at an all-namespace dump. +- Measure the shared-walk cost: a small namespace's `ss` time against the socket count in another namespace, with and without `tcp_child_ehash_entries` (the `microvm-x86_64-socket-scale` scenario). +- Re-check every reference here against the tree the RFC is based on. diff --git a/docs/network-namespaces.md b/docs/network-namespaces.md index 8b1e6efd8..97401f763 100644 --- a/docs/network-namespaces.md +++ b/docs/network-namespaces.md @@ -60,10 +60,30 @@ Rapid namespace churn (e.g. Kubernetes pods cycling) is the hard case: each `set | `-reconcileFrequency` | `6h` | Background reconcile fallback; `0` disables the ticker. | | `-maxThreads` | `2000` | Cap on Go runtime OS threads (`debug.SetMaxThreads`); `0` = Go default (10000). | | `-maxNetns` | `4096` | Cap on namespaces tracked, xtcp2's own included; `0` = unlimited. `MAX_NETNS`. | +| `-maxNetnsPerOwner` | `64` | Cap on namespaces tracked per owner (below); `0` = off. `MAX_NETNS_PER_OWNER`. | +| `-maxNetnsAddsPerReconcile` | `256` | Cap on namespaces added by one reconcile; `0` = off. `MAX_NETNS_ADDS_PER_RECONCILE`. | +| `-reconcileTimeout` | `1s` | Deadline for one reconcile's scan; `0` = none. `RECONCILE_TIMEOUT`. | Each tracked namespace costs a netlink socket, a receiver and its decoders, so `-maxNetns` bounds them. At the cap, a tracked namespace keeps its slot until it is deleted; nothing is evicted, because any ranking a tenant can influence (a pid wraps) would let it push monitored workloads out. New namespaces wait. When a slot frees, they get it in the order xtcp2 first saw them, so recreating a namespace does not jump the queue. xtcp2's own namespace is always tracked. Each waiting namespace counts in `xtcp_netns_dropped_total` once per reconcile and logs a line. -**Alert on any increase:** it means some namespaces are not monitored. A workload that can create namespaces faster than others can fill the cap. The container's pids limit bounds how many namespaces it can hold open (each needs a process), and a per-owner quota is planned. `ConfigService.Set` keeps the running cap. The per-namespace dump caps are in [polling and batching](polling-and-batching.md#per-namespace-caps). +**Alert on any increase:** it means some namespaces are not monitored. The reason label says which cap: `max_netns`, `owner_quota` or `add_rate`. + +**Per-owner quota.** So one workload can't take every slot, `-maxNetnsPerOwner` caps the namespaces tracked per owner. The owner comes from the cgroup path of the namespace's process: + +- a container: the path down to the runtime's own component, where runtimes put it (`/system.slice/docker-.scope`, `/machine.slice/libpod-.scope`, `/docker/`, or a `cri-containerd-`/`crio-` scope or bare id under kubepods with only kubelet components above it); +- under `user.slice`: the user's slice, so one user's processes and rootless containers are one owner; +- anything else: the first two components (one system service). + +A process can create sub-cgroups only below its own, and a component is only taken as a container where the components above it are the runtime's, so naming a sub-cgroup like a container doesn't make a new owner. A service that delegates its cgroup is one owner. Namespaces with no process (bind mounts only) are exempt, since only the host can make them; they still count toward `-maxNetns`. A namespace kept out by the quota keeps its place in the queue; one whose process exits before its cgroup is read waits for the next reconcile. + +**Bounded reconcile.** A reconcile runs before every poll, so it is bounded so that a burst of namespaces can't hold up polling: + +- `-reconcileTimeout` bounds the `/proc` scan. After a timeout, a tracked namespace the scan didn't reach is deleted only if the last process it was seen through has left it. (That can drop a namespace whose other processes remain; a later scan re-queues it. Keeping every unreached namespace would let a flood that times out every scan hold dead namespaces' slots.) Waiting namespaces keep their places. +- One scan takes in at most 4 × `-maxNetns` new namespaces. Past that it keeps walking `/proc` but reports only namespaces already tracked or waiting, so deletes stay correct; the waiting queue is capped at the same size. +- `-maxNetnsAddsPerReconcile` bounds the namespaces entered per reconcile. +- Names and owners (a read of `/proc//cgroup` each) are resolved only for namespaces being added; owners oldest waiter first, at least 64 per reconcile even after the deadline. + +Each scan cut short adds 1 to `xtcp_reconcile_incomplete_total{reason="timeout"|"scan_cap"}` and logs a line. The container's pids limit also bounds how many namespaces a workload can hold open (each needs a process). `ConfigService.Set` keeps the running caps. The per-namespace dump caps and the poll-wide socket gate are in [polling and batching](polling-and-batching.md#per-namespace-caps). The bind-mount directories (`/run/netns/`, `/run/docker/netns/`) are built in, not flags. diff --git a/docs/polling-and-batching.md b/docs/polling-and-batching.md index 0338ead6d..0a49580c6 100644 --- a/docs/polling-and-batching.md +++ b/docs/polling-and-batching.md @@ -47,6 +47,21 @@ One namespace's dump is bounded per poll, so a workload with a huge socket table Each dump cut short adds 1 to `xtcp_dump_dropped_total{reason="bytes"|"records"}` and logs one line naming the namespace's inode. The packets and records dropped are counted in `xtcp_counts{function="Netlinker",variable="dumpBytesCap"}` and `{function="Netlinker",variable="recordsCap"}`. `0` turns a cap off. The caps are startup-only: `ConfigService.Set` keeps the running values. The defaults are deliberately generous and will be revisited against a measured fleet baseline. The namespace count has its own cap, `-maxNetns` ([network namespaces](network-namespaces.md#configuration)). +## Socket-count gate + +The per-namespace caps bound each dump; `-maxRecordsPerPoll` (default 1,048,576) bounds the whole poll. Before each poll xtcp2 reads every namespace's `/proc/net/sockstat` (TCP `inuse` + `tw`) through an fd opened in that namespace when it was first entered, so the check needs no `setns`. Each read costs a few microseconds: the kernel sums per-CPU counters, so it grows with the CPU count. + +When the counts add up to more than the budget, each namespace gets a max-min fair share: namespaces under the share are dumped in full, and only those over it are degraded, lightest step first: + +1. **states** — stop asking for TIME_WAIT and SYN_RECV. The kernel drops them before building a record, so a namespace full of TIME_WAIT (or one being SYN-flooded) costs little. +2. **sample** — also split the namespace's sockets into K port shards and ask for one per poll (shard `poll mod K`), with an inet_diag bytecode filter. A socket's shard is set by its ephemeral port (its source port if that is ≥ 32768, else its destination port), so a busy listener's connections spread over every shard, and K polls see each socket once. Sockets that share both ports, differing only by address, share a shard; `-maxRecordsPerNetns` still bounds them. + +A namespace whose sockstat can't be read is assumed to be at `-maxRecordsPerNetns`. Each degraded namespace-poll adds 1 to `xtcp_poll_degraded_total{level="states"|"sample"}`, a poll that degrades anything logs one line, and `xtcp_poll_sockets` is the total counted. Sockstat doesn't count request sockets (SYN_RECV), so a SYN flood isn't visible to the gate; the per-namespace record cap still applies. + +With `-ioUring`, the reads are batched: `-ioUringSockstatBatchSize` (default 64) reads per `io_uring_enter`, run by at most `-ioUringSockstatWorkers` (default 4) kernel io-wq threads, since procfs reads can't be done non-blocking. On a 24-core host, a read costs about 3.3 µs by `pread` and 1.8 µs batched (4096 namespaces: 15 ms and 7 ms per poll). If the ring can't be set up, or a submit fails, xtcp2 falls back to `pread` and counts `xtcp_counts{function="poller",variable="sockstatRing"}`. + +Each tracked namespace holds a second fd for its sockstat; xtcp2 warns at startup if `RLIMIT_NOFILE` is below 2 × `-maxNetns` + 256. `0` turns the gate off (no sockstat fds, no reads). The settings are startup-only, like the caps above. + ## Timeouts - `-frequency` (default `10s`) is the interval between dumps. @@ -63,6 +78,9 @@ Each dump cut short adds 1 to `xtcp_dump_dropped_total{reason="bytes"|"records"} | `-maxLoops` | `0` | Maximum cycles, or `0` for forever. | | `-maxDumpBytes` | 256 MiB | Bytes of one namespace's dump per poll; `0` = unlimited. `MAX_DUMP_BYTES`. | | `-maxRecordsPerNetns` | 262144 | Records of one namespace per poll; `0` = unlimited. `MAX_RECORDS_PER_NETNS`. | +| `-maxRecordsPerPoll` | 1048576 | Sockets one poll may ask for, across namespaces; over it, heavy namespaces are degraded. `0` = off. `MAX_RECORDS_PER_POLL`. | +| `-ioUringSockstatBatchSize` | 64 | Sockstat reads per io_uring submit (1–1024); with `-ioUring` only. `IO_URING_SOCKSTAT_BATCH_SIZE`. | +| `-ioUringSockstatWorkers` | 4 | Cap on io-wq threads for those reads. `IO_URING_SOCKSTAT_WORKERS`. | ## See also diff --git a/pkg/nsdiscover/resolve.go b/pkg/nsdiscover/resolve.go index 6ec44a19f..abf410d5c 100644 --- a/pkg/nsdiscover/resolve.go +++ b/pkg/nsdiscover/resolve.go @@ -93,20 +93,23 @@ func (r *Resolver) Name(inode uint64, pid int) string { return "netns:[" + strconv.FormatUint(inode, 10) + "]" } -// Owner is the quota owner of pid's namespace: the cgroup v2 path of pid -// (the "0::" line; the first line on a v1-only host), cut just after the -// first component a container runtime names by container id: +// Owner is the quota owner of pid's namespace, from its cgroup v2 path +// (the "0::" line; the first line on a v1-only host): // -// docker-.scope, cri-containerd-.scope, crio-.scope, -// libpod-.scope, or a bare under /docker or a kubepods slice +// - under user.slice: the user's slice, /user.slice/user-.slice. +// Everything below is delegated to the user (rootless containers +// included), so it is all one owner. +// - else the path cut just after a container runtime's component, where +// runtimes put it: /system.slice or /machine.slice + +// -.scope (docker-, cri-containerd-, crio-, libpod-), +// /docker/, or a container under kubepods with only kubelet +// components (kubepods*, burstable, besteffort, pod*) above it. +// - else its first two components (one system service). // -// and with no such component, its first two components (user-1000.slice -// under user.slice, one service under system.slice). Components are -// matched from the root: a process can create sub-cgroups, named anything, -// only below its own, so it can't change where its path is cut once a -// runtime component is above it. Under a runtime that doesn't name -// cgroups by container id, a process can make new owners by making -// sub-cgroups at the second level. +// A process can create sub-cgroups, named anything, only below its own. A +// runtime component is only accepted where the components above it are the +// runtime's, so a sub-cgroup named like a container doesn't make a new +// owner. A service that delegates its cgroup (Delegate=yes) is one owner. // // ok is false when pid's cgroup can't be read (it exited): the caller // should try again later rather than file it under any owner. @@ -123,17 +126,26 @@ func (r *Resolver) Owner(pid int) (owner string, ok bool) { // ownerFromCgroup is Owner on a /proc//cgroup file. func ownerFromCgroup(data []byte) string { - path := cgroupPath(data) - comps := strings.Split(strings.Trim(path, "/"), "/") - for i, c := range comps { - if runtimeComponent(c, i, comps) { - return "/" + strings.Join(comps[:i+1], "/") + comps := strings.Split(strings.Trim(cgroupPath(data), "/"), "/") + cut := func(n int) string { return "/" + strings.Join(comps[:min(n, len(comps))], "/") } + switch { + case comps[0] == "user.slice": + return cut(2) + case len(comps) >= 2 && (comps[0] == "system.slice" || comps[0] == "machine.slice") && runtimeScope(comps[1]): + return cut(2) + case len(comps) >= 2 && comps[0] == "docker" && isContainerID(comps[1]): + return cut(2) + case strings.HasPrefix(comps[0], "kubepods"): + for i := 1; i < len(comps); i++ { + if runtimeScope(comps[i]) || isContainerID(comps[i]) { + return cut(i + 1) + } + if !kubeParent(comps[i]) { + break + } } } - if len(comps) > 2 { - comps = comps[:2] - } - return "/" + strings.Join(comps, "/") + return cut(2) } // cgroupPath returns the v2 ("0::") path, else the first line's path. @@ -157,22 +169,25 @@ func cgroupPath(data []byte) string { return first } +// kubeParent reports whether c is a kubelet cgroup above a container: a +// kubepods* slice, a QoS class (cgroupfs driver), or a pod. +func kubeParent(c string) bool { + return strings.HasPrefix(c, "kubepods") || strings.HasPrefix(c, "pod") || c == "burstable" || c == "besteffort" +} + var runtimeScopePrefixes = []string{"docker-", "cri-containerd-", "crio-", "libpod-"} -// runtimeComponent reports whether comps[i] is a runtime's container -// cgroup. -func runtimeComponent(c string, i int, comps []string) bool { +// runtimeScope reports whether c is -.scope. +func runtimeScope(c string) bool { + id, ok := strings.CutSuffix(c, ".scope") + if !ok { + return false + } for _, p := range runtimeScopePrefixes { - if id, ok := strings.CutPrefix(c, p); ok { - if id, ok = strings.CutSuffix(id, ".scope"); ok && isContainerID(id) { - return true - } + if rest, ok := strings.CutPrefix(id, p); ok && isContainerID(rest) { + return true } } - if i > 0 && isContainerID(c) { - parent := comps[i-1] - return parent == "docker" || strings.HasPrefix(parent, "kubepods") || strings.HasPrefix(parent, "pod") - } return false } @@ -188,6 +203,12 @@ func isContainerID(s string) bool { return true } +// BindMountPath is the bind-mount path of inode from the last Refresh. +func (r *Resolver) BindMountPath(inode uint64) (string, bool) { + p, ok := r.pathByIno[inode] + return p, ok +} + // containerID reads /proc//cgroup and returns the first container id found // (a 64-char lowercase-hex run), or "" if none. Covers the common docker / // containerd / cri-o / kubernetes cgroup layouts, whose paths embed the 64-hex diff --git a/pkg/nsdiscover/scanner.go b/pkg/nsdiscover/scanner.go index b23fb35e5..3c57e2865 100644 --- a/pkg/nsdiscover/scanner.go +++ b/pkg/nsdiscover/scanner.go @@ -13,6 +13,7 @@ package nsdiscover import ( "bytes" + "strconv" "time" "unsafe" @@ -42,6 +43,7 @@ type Scanner struct { seen map[uint64]struct{} // per-scan dedup set (cleared, not reallocated) skip int // pid Scan ignores (0: none); see SkipPid reported int // namespaces reported this scan + nbuf []byte // pid formatting scratch for PidInNetns } // NewScanner opens procRoot (typically "/proc"). If the open fails the scanner @@ -57,6 +59,7 @@ func NewScanner(procRoot string) *Scanner { pbuf: make([]byte, 0, 32), lbuf: make([]byte, 64), seen: make(map[uint64]struct{}, scannerMapHint), + nbuf: make([]byte, 0, 20), } } @@ -179,6 +182,17 @@ func (s *Scanner) ScanLimited(lim ScanLimits, fn func(Namespace)) (skipped int, return skipped, stop } +// PidInNetns reports whether pid is still in the namespace inode. +// Reconcile uses it after a timed-out scan for tracked namespaces the scan +// didn't reach. +func (s *Scanner) PidInNetns(pid int, inode uint64) bool { + if s.fd < 0 || pid <= 0 { + return false + } + ino, ok := s.pidNetns(strconv.AppendInt(s.nbuf[:0], int64(pid), 10)) + return ok && ino == inode +} + // pidNetns reads /proc//ns/net's inode. name is pid's decimal form. func (s *Scanner) pidNetns(name []byte) (uint64, bool) { // Relative path "/ns/net\0" resolved against the procfs fd. diff --git a/pkg/nsdiscover/scanner_limits_test.go b/pkg/nsdiscover/scanner_limits_test.go index 195ecdba3..0661dcfbb 100644 --- a/pkg/nsdiscover/scanner_limits_test.go +++ b/pkg/nsdiscover/scanner_limits_test.go @@ -101,6 +101,14 @@ func TestOwnerFromCgroup(t *testing.T) { cgroup: "12:pids:/docker/" + fake + "\n0::/system.slice/docker-" + id + ".scope\n", expected: "/system.slice/docker-" + id + ".scope"}, {name: "v1_only", category: "B", description: "no v2 line: the first line", cgroup: "12:pids:/docker/" + id + "\n11:memory:/docker/" + id + "\n", expected: "/docker/" + id}, + {name: "rootless_under_user", category: "C", description: "rootless containers under a user's slice are that user's (all one owner)", + cgroup: "0::/user.slice/user-1000.slice/user@1000.service/user.slice/libpod-" + id + ".scope\n", expected: "/user.slice/user-1000.slice"}, + {name: "delegated_service", category: "N", description: "a delegated service naming a sub-cgroup like a container: still the service", + cgroup: "0::/system.slice/ci.service/docker-" + fake + ".scope\n", expected: "/system.slice/ci.service"}, + {name: "kube_tenant_subcgroup", category: "C", description: "under kubepods, a sub-cgroup below the container doesn't count", + cgroup: "0::/kubepods/besteffort/pod1/" + id + "/pod2/" + fake + "\n", expected: "/kubepods/besteffort/pod1/" + id}, + {name: "kube_non_kubelet_parent", category: "N", description: "a container id under a non-kubelet component of kubepods is not accepted", + cgroup: "0::/kubepods/evil/" + fake + "\n", expected: "/kubepods/evil"}, {name: "short_id", category: "N", description: "63 hex chars is not an id", cgroup: "0::/system.slice/docker-" + id[:63] + ".scope\n", expected: "/system.slice/docker-" + id[:63] + ".scope"}, } diff --git a/pkg/xtcp/caps.go b/pkg/xtcp/caps.go index de9f38981..def73de1e 100644 --- a/pkg/xtcp/caps.go +++ b/pkg/xtcp/caps.go @@ -124,16 +124,20 @@ func admitNamespaces(candidates []nsIdentity, tracked int, owners map[string]int // one admitted or gone leaves the queue. Candidates first seen in the same // reconcile share a sequence and are ordered by pid. It returns the queue // and the sequence counter, both owned by reconcile. -func queueWaiting(waiting map[uint64]uint64, seq uint64, candidates, admit []nsIdentity) (map[uint64]uint64, uint64) { +// +// maxQueue (0: unbounded) caps the queue: waiters keep their places, and +// new arrivals past it aren't queued (overflow), so the namespaces a +// reconcile keeps reporting past its scan cap stay bounded. +func queueWaiting(waiting map[uint64]uint64, seq uint64, candidates, admit []nsIdentity, maxQueue int) (next map[uint64]uint64, nextSeq uint64, overflow int) { if len(candidates) == len(admit) { clear(waiting) - return waiting, seq + return waiting, seq, 0 } admitted := make(map[uint64]struct{}, len(admit)) for _, id := range admit { admitted[id.inode] = struct{}{} } - next := make(map[uint64]uint64, len(candidates)-len(admit)) + next = make(map[uint64]uint64, len(candidates)-len(admit)) seq++ for _, id := range candidates { if _, in := admitted[id.inode]; in { @@ -141,9 +145,20 @@ func queueWaiting(waiting map[uint64]uint64, seq uint64, candidates, admit []nsI } if s, ok := waiting[id.inode]; ok { next[id.inode] = s - } else { - next[id.inode] = seq } } - return next, seq + for _, id := range candidates { + if _, in := admitted[id.inode]; in { + continue + } + if _, ok := next[id.inode]; ok { + continue + } + if maxQueue > 0 && len(next) >= maxQueue { + overflow++ + continue + } + next[id.inode] = seq + } + return next, seq, overflow } diff --git a/pkg/xtcp/caps_test.go b/pkg/xtcp/caps_test.go index 905a44ca5..d0516650e 100644 --- a/pkg/xtcp/caps_test.go +++ b/pkg/xtcp/caps_test.go @@ -309,6 +309,41 @@ func TestAdmitNamespaces(t *testing.T) { } } +// TestQueueWaitingBound: the queue cap keeps waiters and turns new +// arrivals away past it. +func TestQueueWaitingBound(t *testing.T) { + ns := func(inode uint64) nsIdentity { return nsIdentity{pid: int(inode), inode: inode} } + tests := []struct { + name string + category string + description string + waiting map[uint64]uint64 + candidates []nsIdentity + maxQueue int + expectedQueued []uint64 + expectedOverflow int + }{ + {name: "unbounded", category: "P", description: "maxQueue 0 queues every candidate", + candidates: []nsIdentity{ns(1), ns(2), ns(3)}, expectedQueued: []uint64{1, 2, 3}}, + {name: "full_turns_new_away", category: "N", description: "queue of 2: two queued, one overflows", + candidates: []nsIdentity{ns(1), ns(2), ns(3)}, maxQueue: 2, expectedQueued: []uint64{1, 2}, expectedOverflow: 1}, + {name: "waiters_keep_places", category: "C", description: "existing waiters stay even when they fill the queue; newcomers overflow", + waiting: map[uint64]uint64{5: 1, 6: 1}, candidates: []nsIdentity{ns(1), ns(5), ns(6)}, maxQueue: 2, + expectedQueued: []uint64{5, 6}, expectedOverflow: 1}, + {name: "exact", category: "B", description: "candidates equal the cap", + candidates: []nsIdentity{ns(1), ns(2)}, maxQueue: 2, expectedQueued: []uint64{1, 2}}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + next, _, overflow := queueWaiting(tc.waiting, 1, tc.candidates, nil, tc.maxQueue) + got := slices.Sorted(maps.Keys(next)) + if !slices.Equal(got, tc.expectedQueued) || overflow != tc.expectedOverflow { + t.Errorf("%s: queued %v overflow %d, expected %v overflow %d", tc.description, got, overflow, tc.expectedQueued, tc.expectedOverflow) + } + }) + } +} + // TestAdmitNamespacesQuota: the per-owner quota and the add rate. func TestAdmitNamespacesQuota(t *testing.T) { const self = 1 @@ -416,7 +451,7 @@ func TestNetnsCapQueue(t *testing.T) { var seq uint64 for i, st := range steps { admit, _ := admitNamespaces(slices.Clone(st.candidates), st.tracked, nil, admitLimits{maxNetns: limit, self: self}, waiting) - waiting, seq = queueWaiting(waiting, seq, st.candidates, admit) + waiting, seq, _ = queueWaiting(waiting, seq, st.candidates, admit, 0) got := make([]uint64, 0, len(admit)) for _, id := range admit { got = append(got, id.inode) diff --git a/pkg/xtcp/ns_reconcile.go b/pkg/xtcp/ns_reconcile.go index b94ca484e..6f87cdaea 100644 --- a/pkg/xtcp/ns_reconcile.go +++ b/pkg/xtcp/ns_reconcile.go @@ -108,12 +108,8 @@ func (x *XTCP) reconcile(ctx context.Context) (dels, stores int) { x.reconcileIncomplete(stop, len(live), startTime) } - // After a timeout the scan didn't see every pid, so a namespace it - // didn't report may still be live: delete nothing this time. (A capped - // scan saw every pid and reported every tracked namespace still live.) - if stop != nsdiscover.ScanTimeout { - dels = x.deleteGone(live) - } + x.refreshRepPids(live) + dels = x.deleteGone(live, stop) stores = x.addNew(ctx, live, stop, startTime) return dels, stores } @@ -161,27 +157,74 @@ func (x *XTCP) reconcileIncomplete(stop nsdiscover.ScanStop, found int, start ti reason, found, time.Since(start).Round(time.Millisecond), what) } +// refreshRepPids records, for each tracked namespace the scan saw, the pid +// it was seen through, so a timed-out scan can check a recent one. +func (x *XTCP) refreshRepPids(live map[uint64]nsIdentity) { + if x.nsRepPid == nil { + x.nsRepPid = make(map[uint64]int) + } + for inode, id := range live { + if id.pid <= 0 { + continue + } + if _, tracked := x.nsMap.Load(inode); tracked { + x.nsRepPid[inode] = id.pid + } + } +} + // deleteGone deletes tracked entries whose namespace is no longer live. // xtcp's own netns is live by construction (every unlocked thread is in // it), and its default socket belongs to openDefaultNetLinkSocket, so it is // never deleted. The scan cannot vouch for it: it skips xtcp's own pid, // and when xtcp is alone in its netns (a container without pid_mode:host) // no other pid shows it. -func (x *XTCP) deleteGone(live map[uint64]nsIdentity) (dels int) { - x.nsMap.Range(func(key, _ interface{}) bool { +// +// A capped scan walked every pid, so it saw every tracked namespace that is +// still live. A timed-out scan didn't: a tracked namespace it didn't reach +// is deleted only if the last pid it was seen through has left it (a +// bind-mount-only one, if its mount is gone). That can delete a namespace +// whose other processes remain; a later scan that reaches it queues it +// again. Keeping every unreached namespace instead would let a flood that +// times out every scan keep dead namespaces' slots indefinitely. +func (x *XTCP) deleteGone(live map[uint64]nsIdentity, stop nsdiscover.ScanStop) (dels int) { + x.nsMap.Range(func(key, value interface{}) bool { inode, ok := key.(uint64) if !ok || inode == x.selfNsInode { return true } - if _, stillLive := live[inode]; !stillLive { - x.nsDelete(inode) - dels++ + if _, stillLive := live[inode]; stillLive { + return true + } + if stop == nsdiscover.ScanTimeout { + if item, ok := value.(netNSitem); ok && x.stillInNetns(item) { + return true + } } + x.nsDelete(inode) + delete(x.nsRepPid, inode) + dels++ return true }) return dels } +// stillInNetns checks one tracked namespace the scan didn't reach. +func (x *XTCP) stillInNetns(item netNSitem) bool { + pid := item.pid + if p, ok := x.nsRepPid[item.inode]; ok { + pid = p + } + if pid > 0 { + return x.nsScanner != nil && x.nsScanner.PidInNetns(pid, item.inode) + } + if x.nsResolver == nil { + return false + } + _, ok := x.nsResolver.BindMountPath(item.inode) + return ok +} + // ownerResolveMinCst is how many candidates' owners a reconcile resolves // even past its deadline, oldest waiters first, so a slow scan can't stop // admission altogether. @@ -233,7 +276,11 @@ func (x *XTCP) addNew(ctx context.Context, live map[uint64]nsIdentity, stop nsdi } // The full candidate list: one whose owner wasn't read keeps its // place too. - x.nsWaiting, x.nsWaitingSeq = queueWaiting(x.nsWaiting, x.nsWaitingSeq, candidates, admit) + var overflow int + x.nsWaiting, x.nsWaitingSeq, overflow = queueWaiting(x.nsWaiting, x.nsWaitingSeq, candidates, admit, scanCapPerMaxNetns*int(lim.maxNetns)) + if overflow > 0 { + x.pC.WithLabelValues("reconcile", "queue", "full").Add(float64(overflow)) + } if stop == nsdiscover.ScanTimeout { // A waiter the scan didn't reach keeps its place. x.nsWaiting = keepUnseenWaiters(x.nsWaiting, prev, live) diff --git a/pkg/xtcp/ns_reconcile_limits_test.go b/pkg/xtcp/ns_reconcile_limits_test.go index 3dd1e7b48..5665a4bbb 100644 --- a/pkg/xtcp/ns_reconcile_limits_test.go +++ b/pkg/xtcp/ns_reconcile_limits_test.go @@ -97,7 +97,17 @@ func TestReconcileLimits(t *testing.T) { 100: {base, "0::/system.slice/docker-" + idA + ".scope/docker-" + idB + ".scope\n"}, }, maxNetns: 100, perOwner: 64, expectedStores: 1, expectedOwners: map[uint64]string{base: "/system.slice/docker-" + idA + ".scope"}, expectedNames: map[uint64]string{base: idA}}, - {name: "timeout_no_delete", category: "C", description: "a timed-out scan deletes nothing, even a gone namespace", + {name: "timeout_keeps_present", category: "C", description: "a timed-out scan keeps a tracked namespace whose pid is still in it, reached or not", + pids: func() map[int]pidNS { + m := map[int]pidNS{} + for i := range 300 { + m[100+i] = pidNS{base + uint64(i), ""} + } + return m + }(), + tracked: map[uint64]int{base + 299: 399}, maxNetns: 4096, timeout: time.Nanosecond, + expectedKept: []uint64{base + 299}, expectedStores: -1, expectedReason: reconcileIncompleteTimeoutCst}, + {name: "timeout_deletes_left", category: "N", description: "a timed-out scan deletes a tracked namespace its pid has left (no slot leak under a flood that times out every scan)", pids: func() map[int]pidNS { m := map[int]pidNS{} for i := range 300 { @@ -106,7 +116,7 @@ func TestReconcileLimits(t *testing.T) { return m }(), tracked: map[uint64]int{base + 999: 9999}, maxNetns: 4096, timeout: time.Nanosecond, - expectedKept: []uint64{base + 999}, expectedStores: -1, expectedReason: reconcileIncompleteTimeoutCst}, + expectedDeleted: []uint64{base + 999}, expectedStores: -1, expectedReason: reconcileIncompleteTimeoutCst}, {name: "unreadable_owner_deferred", category: "N", description: "a candidate whose cgroup can't be read is deferred, not filed under an owner", pids: map[int]pidNS{100: {base, ""}}, maxNetns: 100, perOwner: 1}, {name: "owner_quota_reconcile", category: "N", description: "owner A's 5 namespaces against quota 2, B's 1: A gets 2, B 1", diff --git a/pkg/xtcp/xtcp.go b/pkg/xtcp/xtcp.go index 42307e1eb..32eff2828 100644 --- a/pkg/xtcp/xtcp.go +++ b/pkg/xtcp/xtcp.go @@ -79,6 +79,9 @@ type XTCP struct { // namespace kept out by a cap isn't re-read every reconcile. Pruned to // the current candidates each reconcile. Owned by reconcile. nsOwners map[uint64]string + // nsRepPid is, per tracked namespace, the pid the last scan saw it + // through (owned by reconcile; see refreshRepPids). + nsRepPid map[uint64]int packetBufferPool xsync.Pool[*[]byte] xtcpEnvelopePool xsync.Pool[*xtcp_flat_record.Envelope] From 6a986408858c026400690a78beefaf6fdec4b83c Mon Sep 17 00:00:00 2001 From: "randomizedcoder dave.seddon.ca@gmail.com" Date: Fri, 13 Nov 2026 10:09:09 -0800 Subject: [PATCH 13/19] fix(xtcp): timed-out scans delete nothing; over-quota owners get no queue place Deleting on a last-seen pid leaving lets ordinary churn during a flood evict live monitored namespaces; keep the approved rule (a timed-out scan deletes nothing) and document the slot cost. A namespace whose owner is at quota isn't queued, so one owner can't fill the waiting queue or ride Keep past the scan cap. Co-Authored-By: Claude Opus 5.5 --- docs/network-namespaces.md | 4 +- pkg/nsdiscover/resolve.go | 6 -- pkg/nsdiscover/scanner.go | 14 ----- pkg/xtcp/caps.go | 11 ++-- pkg/xtcp/caps_test.go | 8 ++- pkg/xtcp/ns_reconcile.go | 84 ++++++++++------------------ pkg/xtcp/ns_reconcile_limits_test.go | 4 +- pkg/xtcp/xtcp.go | 3 - 8 files changed, 46 insertions(+), 88 deletions(-) diff --git a/docs/network-namespaces.md b/docs/network-namespaces.md index 97401f763..29d32b75a 100644 --- a/docs/network-namespaces.md +++ b/docs/network-namespaces.md @@ -78,8 +78,8 @@ A process can create sub-cgroups only below its own, and a component is only tak **Bounded reconcile.** A reconcile runs before every poll, so it is bounded so that a burst of namespaces can't hold up polling: -- `-reconcileTimeout` bounds the `/proc` scan. After a timeout, a tracked namespace the scan didn't reach is deleted only if the last process it was seen through has left it. (That can drop a namespace whose other processes remain; a later scan re-queues it. Keeping every unreached namespace would let a flood that times out every scan hold dead namespaces' slots.) Waiting namespaces keep their places. -- One scan takes in at most 4 × `-maxNetns` new namespaces. Past that it keeps walking `/proc` but reports only namespaces already tracked or waiting, so deletes stay correct; the waiting queue is capped at the same size. +- `-reconcileTimeout` bounds the `/proc` scan. A scan that times out deletes nothing, since a namespace it didn't reach may still be live, and waiting namespaces keep their places. While scans keep timing out, a namespace that died keeps its slot; alert on `xtcp_reconcile_incomplete_total{reason="timeout"}`. +- One scan takes in at most 4 × `-maxNetns` new namespaces. Past that it keeps walking `/proc` but reports only namespaces already tracked or waiting, so deletes stay correct. The waiting queue is capped at the same size, and a namespace whose owner is at quota gets no place in it, so one owner can't fill it. - `-maxNetnsAddsPerReconcile` bounds the namespaces entered per reconcile. - Names and owners (a read of `/proc//cgroup` each) are resolved only for namespaces being added; owners oldest waiter first, at least 64 per reconcile even after the deadline. diff --git a/pkg/nsdiscover/resolve.go b/pkg/nsdiscover/resolve.go index abf410d5c..f954cbe29 100644 --- a/pkg/nsdiscover/resolve.go +++ b/pkg/nsdiscover/resolve.go @@ -203,12 +203,6 @@ func isContainerID(s string) bool { return true } -// BindMountPath is the bind-mount path of inode from the last Refresh. -func (r *Resolver) BindMountPath(inode uint64) (string, bool) { - p, ok := r.pathByIno[inode] - return p, ok -} - // containerID reads /proc//cgroup and returns the first container id found // (a 64-char lowercase-hex run), or "" if none. Covers the common docker / // containerd / cri-o / kubernetes cgroup layouts, whose paths embed the 64-hex diff --git a/pkg/nsdiscover/scanner.go b/pkg/nsdiscover/scanner.go index 3c57e2865..b23fb35e5 100644 --- a/pkg/nsdiscover/scanner.go +++ b/pkg/nsdiscover/scanner.go @@ -13,7 +13,6 @@ package nsdiscover import ( "bytes" - "strconv" "time" "unsafe" @@ -43,7 +42,6 @@ type Scanner struct { seen map[uint64]struct{} // per-scan dedup set (cleared, not reallocated) skip int // pid Scan ignores (0: none); see SkipPid reported int // namespaces reported this scan - nbuf []byte // pid formatting scratch for PidInNetns } // NewScanner opens procRoot (typically "/proc"). If the open fails the scanner @@ -59,7 +57,6 @@ func NewScanner(procRoot string) *Scanner { pbuf: make([]byte, 0, 32), lbuf: make([]byte, 64), seen: make(map[uint64]struct{}, scannerMapHint), - nbuf: make([]byte, 0, 20), } } @@ -182,17 +179,6 @@ func (s *Scanner) ScanLimited(lim ScanLimits, fn func(Namespace)) (skipped int, return skipped, stop } -// PidInNetns reports whether pid is still in the namespace inode. -// Reconcile uses it after a timed-out scan for tracked namespaces the scan -// didn't reach. -func (s *Scanner) PidInNetns(pid int, inode uint64) bool { - if s.fd < 0 || pid <= 0 { - return false - } - ino, ok := s.pidNetns(strconv.AppendInt(s.nbuf[:0], int64(pid), 10)) - return ok && ino == inode -} - // pidNetns reads /proc//ns/net's inode. name is pid's decimal form. func (s *Scanner) pidNetns(name []byte) (uint64, bool) { // Relative path "/ns/net\0" resolved against the procfs fd. diff --git a/pkg/xtcp/caps.go b/pkg/xtcp/caps.go index def73de1e..689950fb0 100644 --- a/pkg/xtcp/caps.go +++ b/pkg/xtcp/caps.go @@ -127,8 +127,9 @@ func admitNamespaces(candidates []nsIdentity, tracked int, owners map[string]int // // maxQueue (0: unbounded) caps the queue: waiters keep their places, and // new arrivals past it aren't queued (overflow), so the namespaces a -// reconcile keeps reporting past its scan cap stay bounded. -func queueWaiting(waiting map[uint64]uint64, seq uint64, candidates, admit []nsIdentity, maxQueue int) (next map[uint64]uint64, nextSeq uint64, overflow int) { +// reconcile keeps reporting past its scan cap stay bounded. A candidate +// skip accepts (nil: none) isn't queued, or leaves the queue. +func queueWaiting(waiting map[uint64]uint64, seq uint64, candidates, admit []nsIdentity, maxQueue int, skip func(nsIdentity) bool) (next map[uint64]uint64, nextSeq uint64, overflow int) { if len(candidates) == len(admit) { clear(waiting) return waiting, seq, 0 @@ -139,8 +140,10 @@ func queueWaiting(waiting map[uint64]uint64, seq uint64, candidates, admit []nsI } next = make(map[uint64]uint64, len(candidates)-len(admit)) seq++ - for _, id := range candidates { - if _, in := admitted[id.inode]; in { + for i := range candidates { + id := candidates[i] + if _, in := admitted[id.inode]; in || (skip != nil && skip(id)) { + admitted[id.inode] = struct{}{} // not queued below either continue } if s, ok := waiting[id.inode]; ok { diff --git a/pkg/xtcp/caps_test.go b/pkg/xtcp/caps_test.go index d0516650e..12bbbd4f3 100644 --- a/pkg/xtcp/caps_test.go +++ b/pkg/xtcp/caps_test.go @@ -320,6 +320,7 @@ func TestQueueWaitingBound(t *testing.T) { waiting map[uint64]uint64 candidates []nsIdentity maxQueue int + skip func(nsIdentity) bool expectedQueued []uint64 expectedOverflow int }{ @@ -330,12 +331,15 @@ func TestQueueWaitingBound(t *testing.T) { {name: "waiters_keep_places", category: "C", description: "existing waiters stay even when they fill the queue; newcomers overflow", waiting: map[uint64]uint64{5: 1, 6: 1}, candidates: []nsIdentity{ns(1), ns(5), ns(6)}, maxQueue: 2, expectedQueued: []uint64{5, 6}, expectedOverflow: 1}, + {name: "over_quota_not_queued", category: "N", description: "an owner at quota gets no place, and a waiter of it leaves", + waiting: map[uint64]uint64{5: 1}, candidates: []nsIdentity{ns(1), ns(5), ns(7)}, maxQueue: 10, + skip: func(id nsIdentity) bool { return id.inode != 1 }, expectedQueued: []uint64{1}}, {name: "exact", category: "B", description: "candidates equal the cap", candidates: []nsIdentity{ns(1), ns(2)}, maxQueue: 2, expectedQueued: []uint64{1, 2}}, } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { - next, _, overflow := queueWaiting(tc.waiting, 1, tc.candidates, nil, tc.maxQueue) + next, _, overflow := queueWaiting(tc.waiting, 1, tc.candidates, nil, tc.maxQueue, tc.skip) got := slices.Sorted(maps.Keys(next)) if !slices.Equal(got, tc.expectedQueued) || overflow != tc.expectedOverflow { t.Errorf("%s: queued %v overflow %d, expected %v overflow %d", tc.description, got, overflow, tc.expectedQueued, tc.expectedOverflow) @@ -451,7 +455,7 @@ func TestNetnsCapQueue(t *testing.T) { var seq uint64 for i, st := range steps { admit, _ := admitNamespaces(slices.Clone(st.candidates), st.tracked, nil, admitLimits{maxNetns: limit, self: self}, waiting) - waiting, seq, _ = queueWaiting(waiting, seq, st.candidates, admit, 0) + waiting, seq, _ = queueWaiting(waiting, seq, st.candidates, admit, 0, nil) got := make([]uint64, 0, len(admit)) for _, id := range admit { got = append(got, id.inode) diff --git a/pkg/xtcp/ns_reconcile.go b/pkg/xtcp/ns_reconcile.go index 6f87cdaea..4dd52d6da 100644 --- a/pkg/xtcp/ns_reconcile.go +++ b/pkg/xtcp/ns_reconcile.go @@ -108,8 +108,17 @@ func (x *XTCP) reconcile(ctx context.Context) (dels, stores int) { x.reconcileIncomplete(stop, len(live), startTime) } - x.refreshRepPids(live) - dels = x.deleteGone(live, stop) + // After a timeout the scan didn't see every pid, so a namespace it + // didn't report may still be live: delete nothing this time. (A capped + // scan saw every pid and reported every tracked namespace still live.) + // The cost: while scans keep timing out, a namespace that died keeps + // its slot. Checking a tracked namespace's last-seen pid instead would + // let ordinary process churn during a flood evict live, monitored + // namespaces; xtcp_reconcile_incomplete_total{reason="timeout"} shows + // either way. + if stop != nsdiscover.ScanTimeout { + dels = x.deleteGone(live) + } stores = x.addNew(ctx, live, stop, startTime) return dels, stores } @@ -157,74 +166,27 @@ func (x *XTCP) reconcileIncomplete(stop nsdiscover.ScanStop, found int, start ti reason, found, time.Since(start).Round(time.Millisecond), what) } -// refreshRepPids records, for each tracked namespace the scan saw, the pid -// it was seen through, so a timed-out scan can check a recent one. -func (x *XTCP) refreshRepPids(live map[uint64]nsIdentity) { - if x.nsRepPid == nil { - x.nsRepPid = make(map[uint64]int) - } - for inode, id := range live { - if id.pid <= 0 { - continue - } - if _, tracked := x.nsMap.Load(inode); tracked { - x.nsRepPid[inode] = id.pid - } - } -} - // deleteGone deletes tracked entries whose namespace is no longer live. // xtcp's own netns is live by construction (every unlocked thread is in // it), and its default socket belongs to openDefaultNetLinkSocket, so it is // never deleted. The scan cannot vouch for it: it skips xtcp's own pid, // and when xtcp is alone in its netns (a container without pid_mode:host) // no other pid shows it. -// -// A capped scan walked every pid, so it saw every tracked namespace that is -// still live. A timed-out scan didn't: a tracked namespace it didn't reach -// is deleted only if the last pid it was seen through has left it (a -// bind-mount-only one, if its mount is gone). That can delete a namespace -// whose other processes remain; a later scan that reaches it queues it -// again. Keeping every unreached namespace instead would let a flood that -// times out every scan keep dead namespaces' slots indefinitely. -func (x *XTCP) deleteGone(live map[uint64]nsIdentity, stop nsdiscover.ScanStop) (dels int) { - x.nsMap.Range(func(key, value interface{}) bool { +func (x *XTCP) deleteGone(live map[uint64]nsIdentity) (dels int) { + x.nsMap.Range(func(key, _ interface{}) bool { inode, ok := key.(uint64) if !ok || inode == x.selfNsInode { return true } - if _, stillLive := live[inode]; stillLive { - return true + if _, stillLive := live[inode]; !stillLive { + x.nsDelete(inode) + dels++ } - if stop == nsdiscover.ScanTimeout { - if item, ok := value.(netNSitem); ok && x.stillInNetns(item) { - return true - } - } - x.nsDelete(inode) - delete(x.nsRepPid, inode) - dels++ return true }) return dels } -// stillInNetns checks one tracked namespace the scan didn't reach. -func (x *XTCP) stillInNetns(item netNSitem) bool { - pid := item.pid - if p, ok := x.nsRepPid[item.inode]; ok { - pid = p - } - if pid > 0 { - return x.nsScanner != nil && x.nsScanner.PidInNetns(pid, item.inode) - } - if x.nsResolver == nil { - return false - } - _, ok := x.nsResolver.BindMountPath(item.inode) - return ok -} - // ownerResolveMinCst is how many candidates' owners a reconcile resolves // even past its deadline, oldest waiters first, so a slow scan can't stop // admission altogether. @@ -277,7 +239,19 @@ func (x *XTCP) addNew(ctx context.Context, live map[uint64]nsIdentity, stop nsdi // The full candidate list: one whose owner wasn't read keeps its // place too. var overflow int - x.nsWaiting, x.nsWaitingSeq, overflow = queueWaiting(x.nsWaiting, x.nsWaitingSeq, candidates, admit, scanCapPerMaxNetns*int(lim.maxNetns)) + // A namespace whose owner is at quota gets no queue place: one owner + // can't fill the queue, or keep its namespaces reported past the + // scan cap. Its place only matters once the owner is under quota. + overQuota := func(id nsIdentity) bool { + if lim.maxPerOwner == 0 || id.pid <= 0 { + return false + } + if _, resolved := x.nsOwners[id.inode]; !resolved { + return false + } + return owners[id.owner] >= int(lim.maxPerOwner) + } + x.nsWaiting, x.nsWaitingSeq, overflow = queueWaiting(x.nsWaiting, x.nsWaitingSeq, candidates, admit, scanCapPerMaxNetns*int(lim.maxNetns), overQuota) if overflow > 0 { x.pC.WithLabelValues("reconcile", "queue", "full").Add(float64(overflow)) } diff --git a/pkg/xtcp/ns_reconcile_limits_test.go b/pkg/xtcp/ns_reconcile_limits_test.go index 5665a4bbb..74b497155 100644 --- a/pkg/xtcp/ns_reconcile_limits_test.go +++ b/pkg/xtcp/ns_reconcile_limits_test.go @@ -107,7 +107,7 @@ func TestReconcileLimits(t *testing.T) { }(), tracked: map[uint64]int{base + 299: 399}, maxNetns: 4096, timeout: time.Nanosecond, expectedKept: []uint64{base + 299}, expectedStores: -1, expectedReason: reconcileIncompleteTimeoutCst}, - {name: "timeout_deletes_left", category: "N", description: "a timed-out scan deletes a tracked namespace its pid has left (no slot leak under a flood that times out every scan)", + {name: "timeout_no_delete", category: "C", description: "a timed-out scan deletes nothing, even a namespace that is gone", pids: func() map[int]pidNS { m := map[int]pidNS{} for i := range 300 { @@ -116,7 +116,7 @@ func TestReconcileLimits(t *testing.T) { return m }(), tracked: map[uint64]int{base + 999: 9999}, maxNetns: 4096, timeout: time.Nanosecond, - expectedDeleted: []uint64{base + 999}, expectedStores: -1, expectedReason: reconcileIncompleteTimeoutCst}, + expectedKept: []uint64{base + 999}, expectedStores: -1, expectedReason: reconcileIncompleteTimeoutCst}, {name: "unreadable_owner_deferred", category: "N", description: "a candidate whose cgroup can't be read is deferred, not filed under an owner", pids: map[int]pidNS{100: {base, ""}}, maxNetns: 100, perOwner: 1}, {name: "owner_quota_reconcile", category: "N", description: "owner A's 5 namespaces against quota 2, B's 1: A gets 2, B 1", diff --git a/pkg/xtcp/xtcp.go b/pkg/xtcp/xtcp.go index 32eff2828..42307e1eb 100644 --- a/pkg/xtcp/xtcp.go +++ b/pkg/xtcp/xtcp.go @@ -79,9 +79,6 @@ type XTCP struct { // namespace kept out by a cap isn't re-read every reconcile. Pruned to // the current candidates each reconcile. Owned by reconcile. nsOwners map[uint64]string - // nsRepPid is, per tracked namespace, the pid the last scan saw it - // through (owned by reconcile; see refreshRepPids). - nsRepPid map[uint64]int packetBufferPool xsync.Pool[*[]byte] xtcpEnvelopePool xsync.Pool[*xtcp_flat_record.Envelope] From 9af699d423473fe8a59a1c90c360544cd1be5b29 Mon Sep 17 00:00:00 2001 From: "randomizedcoder dave.seddon.ca@gmail.com" Date: Fri, 13 Nov 2026 10:26:13 -0800 Subject: [PATCH 14/19] perf(xtcp): keep FP-5 fields off the pools' cache lines; lint fixes nsOwners was added just above packetBufferPool and the record pools, shifting the fields 4-8 concurrent decoders hit: +5-10% on NetlinkerDump at 4/8 netlinkers (both receivers, reproduced on a quiet host). Moved to the tail of XTCP: back within noise of the #301 head (geomean -1.5%, 8 interleaved runs). Lint: exhaustive switches, loop condition, misspelling, label constants, unchecked errors in tests. Co-Authored-By: Claude Opus 5.5 --- pkg/xtcp/caps.go | 6 ++++++ pkg/xtcp/pollgate.go | 5 ++++- pkg/xtcp/pollgate_bench_test.go | 2 +- pkg/xtcp/pollgate_test.go | 2 +- pkg/xtcp/pollplan.go | 1 + pkg/xtcp/prometheus.go | 8 ++++---- pkg/xtcp/sockstat.go | 7 ++----- pkg/xtcp/sockstat_test.go | 2 +- pkg/xtcp/xtcp.go | 10 ++++++---- 9 files changed, 26 insertions(+), 17 deletions(-) diff --git a/pkg/xtcp/caps.go b/pkg/xtcp/caps.go index 689950fb0..f7b2c010f 100644 --- a/pkg/xtcp/caps.go +++ b/pkg/xtcp/caps.go @@ -12,6 +12,12 @@ import ( // the namespaces tracked. Each drop is counted, so a namespace past a cap // costs a metric rather than the collector's CPU or memory. 0 turns a cap off. +// Label names of the cap metrics. +const ( + promLabelReasonCst = "reason" + promLabelLevelCst = "level" +) + // Reasons for xtcp_dump_dropped_total. const ( dumpDropBytesCst = "bytes" diff --git a/pkg/xtcp/pollgate.go b/pkg/xtcp/pollgate.go index 63cac7b03..43ab7b6aa 100644 --- a/pkg/xtcp/pollgate.go +++ b/pkg/xtcp/pollgate.go @@ -144,7 +144,9 @@ func (x *XTCP) planGatedPoll(pollingLoops uint64) []nsSend { log.Printf("sockstat io_uring reader failed, using pread: %v", err) g.reader.close() g.reader = newSyscallSockstatReader() - failed, _ = g.reader.read(g.statFDs, g.counts) + if failed, err = g.reader.read(g.statFDs, g.counts); err != nil { + log.Printf("sockstat pread reader: %v", err) // never: pread has no reader-level error + } } if failed > 0 { x.pC.WithLabelValues("poller", "sockstat", "error").Add(float64(failed)) @@ -169,6 +171,7 @@ func (x *XTCP) planGatedPoll(pollingLoops uint64) []nsSend { pl.level = pollFull } switch pl.level { + case pollFull: case pollStates: states++ case pollSample: diff --git a/pkg/xtcp/pollgate_bench_test.go b/pkg/xtcp/pollgate_bench_test.go index 5ccfae811..573c50a1b 100644 --- a/pkg/xtcp/pollgate_bench_test.go +++ b/pkg/xtcp/pollgate_bench_test.go @@ -20,7 +20,7 @@ func benchSockstatFDs(b *testing.B, n int) []int { if err != nil { b.Skipf("sockstat (n=%d; raise ulimit -n?): %v", n, err) } - b.Cleanup(func() { f.Close() }) + b.Cleanup(func() { _ = f.Close() }) fds[i] = int(f.Fd()) } return fds diff --git a/pkg/xtcp/pollgate_test.go b/pkg/xtcp/pollgate_test.go index 6f577691e..2586cec99 100644 --- a/pkg/xtcp/pollgate_test.go +++ b/pkg/xtcp/pollgate_test.go @@ -76,7 +76,7 @@ func writeSockstat(t *testing.T, inuse, tw string) int { if err != nil { t.Fatal(err) } - t.Cleanup(func() { f.Close() }) + t.Cleanup(func() { _ = f.Close() }) return int(f.Fd()) } diff --git a/pkg/xtcp/pollplan.go b/pkg/xtcp/pollplan.go index 6a9d0609e..5d1827258 100644 --- a/pkg/xtcp/pollplan.go +++ b/pkg/xtcp/pollplan.go @@ -249,6 +249,7 @@ func (r *pollRequests) get(pl nsPlan) (*[]byte, error) { return r.full, nil case pollStates: return r.states, nil + case pollSample: } key := uint64(pl.shards)<<32 | uint64(pl.shard) if req, ok := r.shards[key]; ok { diff --git a/pkg/xtcp/prometheus.go b/pkg/xtcp/prometheus.go index 9fb6e9dfb..876f09c0c 100644 --- a/pkg/xtcp/prometheus.go +++ b/pkg/xtcp/prometheus.go @@ -96,7 +96,7 @@ func (x *XTCP) InitPromethus(wg *sync.WaitGroup) { Name: "dump_dropped_total", Help: "Namespace dumps cut short by -maxDumpBytes (reason=bytes) or -maxRecordsPerNetns (reason=records), at most one per reason per dump.", }, - []string{"reason"}, + []string{promLabelReasonCst}, ) x.pNetnsDropped = factory.NewCounterVec( prometheus.CounterOpts{ @@ -104,7 +104,7 @@ func (x *XTCP) InitPromethus(wg *sync.WaitGroup) { Name: "netns_dropped_total", Help: "Live namespaces a reconcile left untracked, counted per reconcile: reason=max_netns (-maxNetns reached), owner_quota (-maxNetnsPerOwner), add_rate (-maxNetnsAddsPerReconcile).", }, - []string{"reason"}, + []string{promLabelReasonCst}, ) x.pPollSockets = factory.NewGauge( prometheus.GaugeOpts{ @@ -119,7 +119,7 @@ func (x *XTCP) InitPromethus(wg *sync.WaitGroup) { Name: "poll_degraded_total", Help: "Namespace polls degraded by -maxRecordsPerPoll: level=states (TIME_WAIT and SYN_RECV not asked for), sample (one port shard of K).", }, - []string{"level"}, + []string{promLabelLevelCst}, ) x.pReconcileIncomplete = factory.NewCounterVec( prometheus.CounterOpts{ @@ -127,7 +127,7 @@ func (x *XTCP) InitPromethus(wg *sync.WaitGroup) { Name: "reconcile_incomplete_total", Help: "Reconciles whose namespace scan stopped early: reason=timeout (-reconcileTimeout), scan_cap (4 x -maxNetns namespaces). An incomplete scan deletes nothing.", }, - []string{"reason"}, + []string{promLabelReasonCst}, ) x.publishCompiledInEnrichers() diff --git a/pkg/xtcp/sockstat.go b/pkg/xtcp/sockstat.go index 0497e7464..17641a8f6 100644 --- a/pkg/xtcp/sockstat.go +++ b/pkg/xtcp/sockstat.go @@ -102,10 +102,7 @@ var sockstatTCPPrefix = []byte("TCP:") // namespace is being torn down) reads as 0. func parseSockstat(b []byte) (inuse, tw uint64, ok bool) { line := b - for { - if bytes.HasPrefix(line, sockstatTCPPrefix) { - break - } + for !bytes.HasPrefix(line, sockstatTCPPrefix) { i := bytes.IndexByte(line, '\n') if i < 0 { return 0, 0, false @@ -131,7 +128,7 @@ func parseSockstat(b []byte) (inuse, tw uint64, ok bool) { if val == nil { return 0, 0, false } - switch string(key) { // no allocation: compiler-recognised conversion + switch string(key) { // no allocation: compiler-recognized conversion case "inuse": n, neg, good := parseDecimal(val) if !good || neg { diff --git a/pkg/xtcp/sockstat_test.go b/pkg/xtcp/sockstat_test.go index 63645a62f..0e5beac7e 100644 --- a/pkg/xtcp/sockstat_test.go +++ b/pkg/xtcp/sockstat_test.go @@ -81,7 +81,7 @@ func openSockstatFDs(t *testing.T, n int) []int { if err != nil { t.Skipf("sockstat: %v", err) } - t.Cleanup(func() { f.Close() }) + t.Cleanup(func() { _ = f.Close() }) fds[i] = int(f.Fd()) } return fds diff --git a/pkg/xtcp/xtcp.go b/pkg/xtcp/xtcp.go index 42307e1eb..3175ebb2d 100644 --- a/pkg/xtcp/xtcp.go +++ b/pkg/xtcp/xtcp.go @@ -75,10 +75,6 @@ type XTCP struct { // (under reconcileMu); empty unless the cap is reached. nsWaiting map[uint64]uint64 nsWaitingSeq uint64 - // nsOwners caches each waiting candidate's owner (inode → owner), so a - // namespace kept out by a cap isn't re-read every reconcile. Pruned to - // the current candidates each reconcile. Owned by reconcile. - nsOwners map[uint64]string packetBufferPool xsync.Pool[*[]byte] xtcpEnvelopePool xsync.Pool[*xtcp_flat_record.Envelope] @@ -246,6 +242,12 @@ type XTCP struct { pPollDegraded *prometheus.CounterVec pReconcileIncomplete *prometheus.CounterVec gate *pollGate + // nsOwners caches each waiting candidate's owner (inode → owner), so a + // namespace kept out by a cap isn't re-read every reconcile. Pruned to + // the current candidates each reconcile. Owned by reconcile. Kept down + // here, with the other FP-5 additions: a field added above the pools + // shifts the hot pool fields and cost 5-10% at 4-8 decoders. + nsOwners map[uint64]string debugLevel uint32 } From 109ff105c794f94690b36f2f467eff00a1b4043b Mon Sep 17 00:00:00 2001 From: "randomizedcoder dave.seddon.ca@gmail.com" Date: Fri, 13 Nov 2026 15:36:28 -0800 Subject: [PATCH 15/19] fix(xtcp): rotate shards per gated poll; count origNs in the fd check - Shard rotation used pollingLoops, which advances on every poller event (ticks, poll requests, one netlinkerDone per namespace). A poll stepping it by a multiple of K dumped the same shard forever. The gate now counts its own polls. TestPollGateShardRotation fails on the old code. - Each namespace goroutine keeps its origNs snapshot open for its life, so a tracked namespace holds 3 fds with the gate (2 without), not 2 (1). The RLIMIT_NOFILE warning now uses that. Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 2 +- docs/polling-and-batching.md | 4 +- pkg/xtcp/poller.go | 2 +- pkg/xtcp/pollgate.go | 20 +++++++--- pkg/xtcp/pollgate_bench_test.go | 4 +- pkg/xtcp/pollgate_test.go | 70 +++++++++++++++++++++++++++++++-- pkg/xtcp/pollplan.go | 10 ++--- 7 files changed, 90 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58c7277d2..3de46d14e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ ### New - **Per-namespace caps.** `-maxDumpBytes` (default 256 MiB) and `-maxRecordsPerNetns` (default 262144) bound one namespace's dump per poll: packets past the byte cap are drained undecoded, and records past the record cap are dropped before decode. `-maxNetns` (default 4096) bounds the namespaces tracked. At the cap, tracked namespaces keep their slots, and new ones wait for a freed slot, first come, first served. Alert on `xtcp_netns_dropped_total`. Drops are counted in `xtcp_dump_dropped_total{reason}` and `xtcp_netns_dropped_total`, with one log line per truncated dump or short reconcile. `0` turns a cap off; the matching env vars are `MAX_DUMP_BYTES`, `MAX_RECORDS_PER_NETNS` and `MAX_NETNS`. The caps are startup-only: `ConfigService.Set` keeps the running values. No healthy host should reach the defaults; a host that does now loses that namespace's excess rows, where it used to collect them all ([polling and batching](docs/polling-and-batching.md#per-namespace-caps)). -- **Socket-count gate, reconcile limits, per-owner quota.** Before each poll xtcp2 reads each namespace's sockstat (an fd opened in the namespace; `pread`, or io_uring batches with `-ioUring`) and, when the total is over `-maxRecordsPerPoll` (default 1,048,576), degrades only the namespaces over their fair share: first TIME_WAIT/SYN_RECV are not asked for, then one of K port shards is dumped per poll. `-maxNetnsPerOwner` (default 64) caps namespaces tracked per owner (the container runtime's cgroup), `-maxNetnsAddsPerReconcile` (256) the adds per reconcile, and `-reconcileTimeout` (1s) the namespace scan; a timed-out scan deletes nothing. New metrics `xtcp_poll_sockets`, `xtcp_poll_degraded_total{level}` and `xtcp_reconcile_incomplete_total{reason}`; `xtcp_netns_dropped_total` gains `reason`. `0` turns each off; all are startup-only. Each tracked namespace now holds two fds ([polling and batching](docs/polling-and-batching.md#socket-count-gate), [network namespaces](docs/network-namespaces.md#configuration)). The analysis behind an upstream all-namespace dump is in [docs/kernel](docs/kernel/inet-diag-all-netns.md). +- **Socket-count gate, reconcile limits, per-owner quota.** Before each poll xtcp2 reads each namespace's sockstat (an fd opened in the namespace; `pread`, or io_uring batches with `-ioUring`) and, when the total is over `-maxRecordsPerPoll` (default 1,048,576), degrades only the namespaces over their fair share: first TIME_WAIT/SYN_RECV are not asked for, then one of K port shards is dumped per poll. `-maxNetnsPerOwner` (default 64) caps namespaces tracked per owner (the container runtime's cgroup), `-maxNetnsAddsPerReconcile` (256) the adds per reconcile, and `-reconcileTimeout` (1s) the namespace scan; a timed-out scan deletes nothing. New metrics `xtcp_poll_sockets`, `xtcp_poll_degraded_total{level}` and `xtcp_reconcile_incomplete_total{reason}`; `xtcp_netns_dropped_total` gains `reason`. `0` turns each off; all are startup-only. Each tracked namespace now holds three fds (was two), and xtcp2 warns at startup when `RLIMIT_NOFILE` can't cover them ([polling and batching](docs/polling-and-batching.md#socket-count-gate), [network namespaces](docs/network-namespaces.md#configuration)). The analysis behind an upstream all-namespace dump is in [docs/kernel](docs/kernel/inet-diag-all-netns.md). - **Vulnerability check.** `checks.govulncheck` runs govulncheck against a pinned snapshot of the Go vulnerability database, with no tags and with every flavor tag, and fails on a reachable finding not in its accepted list. One is accepted: GO-2026-6859 in `net/http`, fixed in go1.27.4, until the toolchain moves. `nix run .#govulncheck-fresh` checks against the live database and runs `go mod verify`; `nix build .#sbom-` writes a CycloneDX SBOM for any binary package. ## 0.2.1 (2026-11) diff --git a/docs/polling-and-batching.md b/docs/polling-and-batching.md index 0a49580c6..7cfa77b41 100644 --- a/docs/polling-and-batching.md +++ b/docs/polling-and-batching.md @@ -54,13 +54,13 @@ The per-namespace caps bound each dump; `-maxRecordsPerPoll` (default 1,048,576) When the counts add up to more than the budget, each namespace gets a max-min fair share: namespaces under the share are dumped in full, and only those over it are degraded, lightest step first: 1. **states** — stop asking for TIME_WAIT and SYN_RECV. The kernel drops them before building a record, so a namespace full of TIME_WAIT (or one being SYN-flooded) costs little. -2. **sample** — also split the namespace's sockets into K port shards and ask for one per poll (shard `poll mod K`), with an inet_diag bytecode filter. A socket's shard is set by its ephemeral port (its source port if that is ≥ 32768, else its destination port), so a busy listener's connections spread over every shard, and K polls see each socket once. Sockets that share both ports, differing only by address, share a shard; `-maxRecordsPerNetns` still bounds them. +2. **sample** — also split the namespace's sockets into K port shards and ask for one per poll (shard `n mod K` on the gate's n-th poll), with an inet_diag bytecode filter. A socket's shard is set by its ephemeral port (its source port if that is ≥ 32768, else its destination port), so a busy listener's connections spread over every shard, and K polls see each socket once. Sockets that share both ports, differing only by address, share a shard; `-maxRecordsPerNetns` still bounds them. A namespace whose sockstat can't be read is assumed to be at `-maxRecordsPerNetns`. Each degraded namespace-poll adds 1 to `xtcp_poll_degraded_total{level="states"|"sample"}`, a poll that degrades anything logs one line, and `xtcp_poll_sockets` is the total counted. Sockstat doesn't count request sockets (SYN_RECV), so a SYN flood isn't visible to the gate; the per-namespace record cap still applies. With `-ioUring`, the reads are batched: `-ioUringSockstatBatchSize` (default 64) reads per `io_uring_enter`, run by at most `-ioUringSockstatWorkers` (default 4) kernel io-wq threads, since procfs reads can't be done non-blocking. On a 24-core host, a read costs about 3.3 µs by `pread` and 1.8 µs batched (4096 namespaces: 15 ms and 7 ms per poll). If the ring can't be set up, or a submit fails, xtcp2 falls back to `pread` and counts `xtcp_counts{function="poller",variable="sockstatRing"}`. -Each tracked namespace holds a second fd for its sockstat; xtcp2 warns at startup if `RLIMIT_NOFILE` is below 2 × `-maxNetns` + 256. `0` turns the gate off (no sockstat fds, no reads). The settings are startup-only, like the caps above. +Each tracked namespace holds a third fd for its sockstat (besides its netlink socket and its goroutine's saved original namespace); xtcp2 warns at startup if `RLIMIT_NOFILE` is below 3 × `-maxNetns` + 256 (2 × with the gate off). `0` turns the gate off (no sockstat fds, no reads). The settings are startup-only, like the caps above. ## Timeouts diff --git a/pkg/xtcp/poller.go b/pkg/xtcp/poller.go index 9350e4583..50cfad3ca 100644 --- a/pkg/xtcp/poller.go +++ b/pkg/xtcp/poller.go @@ -396,7 +396,7 @@ func (x *XTCP) pollAllNetlinkSockets(pollingLoops uint64) (count int) { if x.gateEnabled() { polled := 0 - for _, s := range x.planGatedPoll(pollingLoops) { + for _, s := range x.planGatedPoll() { x.setRequestSeq(s.req, pollingLoops) x.pollWith(s.fd, s.req) polled++ diff --git a/pkg/xtcp/pollgate.go b/pkg/xtcp/pollgate.go index 43ab7b6aa..841749f41 100644 --- a/pkg/xtcp/pollgate.go +++ b/pkg/xtcp/pollgate.go @@ -20,6 +20,12 @@ type pollGate struct { statFDs []int counts []sockstatCount sendTo []nsSend + + // polls counts gated polls; it picks each sampled namespace's shard. + // Not pollingLoops: that advances on every poller event (ticks, poll + // requests, one netlinkerDone per namespace), so a poll could step it + // by a multiple of K and dump the same shard forever. + polls uint64 } // nsSend is one namespace's socket and the request planned for it. @@ -33,13 +39,14 @@ var newSockstatRingReader = func(batch, workers uint32) (sockstatReader, error) return newRingSockstatReader(batch, workers) } -// fdsPerNetns is what one tracked namespace holds open: its netlink -// socket, plus its sockstat fd with the gate on. +// fdsPerNetns is what one tracked namespace holds open for its life: its +// netlink socket and the origNs snapshot its goroutine restores on exit +// (netNamespaceInstance), plus its sockstat fd with the gate on. func fdsPerNetns(gate bool) uint64 { if gate { - return 2 + return 3 } - return 1 + return 2 } // fdLimitMarginCst covers everything else: listeners, destinations, @@ -108,7 +115,7 @@ func (x *XTCP) closeGate() { // planGatedPoll reads every ready namespace's sockstat, plans the poll, // and returns each ready socket with the request to send it. -func (x *XTCP) planGatedPoll(pollingLoops uint64) []nsSend { +func (x *XTCP) planGatedPoll() []nsSend { if x.gate == nil { x.gate = x.newPollGate() } @@ -152,7 +159,8 @@ func (x *XTCP) planGatedPoll(pollingLoops uint64) []nsSend { x.pC.WithLabelValues("poller", "sockstat", "error").Add(float64(failed)) } - plans := g.planner.plan(g.counts, x.config.GetMaxRecordsPerPoll(), x.config.GetMaxRecordsPerNetns(), pollingLoops) + plans := g.planner.plan(g.counts, x.config.GetMaxRecordsPerPoll(), x.config.GetMaxRecordsPerNetns(), g.polls) + g.polls++ g.sendTo = g.sendTo[:0] var total uint64 var unknown, states, sample int diff --git a/pkg/xtcp/pollgate_bench_test.go b/pkg/xtcp/pollgate_bench_test.go index 573c50a1b..b6a434e79 100644 --- a/pkg/xtcp/pollgate_bench_test.go +++ b/pkg/xtcp/pollgate_bench_test.go @@ -114,12 +114,10 @@ func BenchmarkPollPrepass(b *testing.B) { } defer x.closeGate() b.ReportAllocs() - loop := uint64(0) for b.Loop() { - if got := len(x.planGatedPoll(loop)); got != n { + if got := len(x.planGatedPoll()); got != n { b.Fatalf("planned %d, expected %d", got, n) } - loop++ } }) } diff --git a/pkg/xtcp/pollgate_test.go b/pkg/xtcp/pollgate_test.go index 2586cec99..be95102bb 100644 --- a/pkg/xtcp/pollgate_test.go +++ b/pkg/xtcp/pollgate_test.go @@ -198,6 +198,68 @@ func TestPollGateEndToEnd(t *testing.T) { } } +// TestPollGateShardRotation: a sampled namespace's shard advances once per +// gated poll, whatever pollingLoops does between polls (it advances on +// every poller event, so steps of K must not pin one shard). +func TestPollGateShardRotation(t *testing.T) { + tests := []struct { + name string + category string + description string + loops []uint64 + expectedShards int + }{ + {name: "consecutive", category: "P", description: "pollingLoops 1,2,3: each poll a new shard", loops: []uint64{1, 2, 3}, expectedShards: 3}, + {name: "step_k", category: "C", description: "pollingLoops step by K=3 (N netlinkerDone events per poll): still every shard", loops: []uint64{3, 6, 9}, expectedShards: 3}, + {name: "repeat_loop", category: "C", description: "the same pollingLoops value three times: still every shard", loops: []uint64{5, 5, 5}, expectedShards: 3}, + {name: "wraps", category: "B", description: "K+1 polls: the first shard comes round again", loops: []uint64{3, 6, 9, 12}, expectedShards: 3}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + x := newPollerFixture(t) + x.config.MaxRecordsPerPoll = 200_000 + x.config.MaxRecordsPerNetns = 262_144 + req := make([]byte, xtcpnl.InetDiagRequestSizeCst) + binary.LittleEndian.PutUint32(req[0:4], xtcpnl.InetDiagRequestSizeCst) + binary.LittleEndian.PutUint32(req[20:24], 0x3fff) + x.nlRequest = &req + defer x.closeGate() + + var heavy [][]byte + prev := sendDumpRequest + t.Cleanup(func() { sendDumpRequest = prev }) + sendDumpRequest = func(fd int, b []byte) error { + if fd == 1000 { + c := append([]byte(nil), b...) + binary.LittleEndian.PutUint32(c[8:12], 0) // seq differs per poll + heavy = append(heavy, c) + } + return nil + } + // 500k against a ~199k share: K = 3. + x.nsMap.Store(uint64(1), netNSitem{inode: 1, socketFD: 1000, stat: newStatHandle(writeSockstat(t, "500000", "0"))}) + x.nsMap.Store(uint64(2), netNSitem{inode: 2, socketFD: 1001, stat: newStatHandle(writeSockstat(t, "1000", "0"))}) + + for _, l := range tc.loops { + x.pollAllNetlinkSockets(l) + } + seen := map[string]bool{} + for _, b := range heavy { + if r, _ := xtcpnl.ParseInetDiagRequest(b[16:]); !r.HasBytecode { + t.Fatalf("%s: heavy namespace sent an unsampled request", tc.description) + } + seen[string(b)] = true + } + if len(seen) != tc.expectedShards { + t.Errorf("%s: %d distinct shards over %d polls, expected %d", tc.description, len(seen), len(heavy), tc.expectedShards) + } + if len(heavy) > tc.expectedShards && string(heavy[tc.expectedShards]) != string(heavy[0]) { + t.Errorf("%s: poll %d did not return to the first shard", tc.description, tc.expectedShards) + } + }) + } +} + // TestPollGateOffUnchanged: with -maxRecordsPerPoll 0 every namespace is // sent the startup request and no sockstat is read. func TestPollGateOffUnchanged(t *testing.T) { @@ -278,10 +340,10 @@ func TestCheckFDLimit(t *testing.T) { expectedNeed uint64 // 0: no warning }{ {name: "enough", category: "P", description: "1M fds cover 4096 namespaces with the gate", maxNetns: 4096, gate: true, soft: 1 << 20}, - {name: "low_gate", category: "N", description: "1024 fds, 4096 namespaces x 2 + 256", maxNetns: 4096, gate: true, soft: 1024, expectedNeed: 8448}, - {name: "low_no_gate", category: "N", description: "gate off: one fd per namespace", maxNetns: 4096, soft: 1024, expectedNeed: 4352}, - {name: "exact", category: "B", description: "soft limit exactly the need", maxNetns: 100, gate: true, soft: 456}, - {name: "one_short", category: "B", description: "one below the need", maxNetns: 100, gate: true, soft: 455, expectedNeed: 456}, + {name: "low_gate", category: "N", description: "1024 fds, 4096 namespaces x 3 (socket, origNs, sockstat) + 256", maxNetns: 4096, gate: true, soft: 1024, expectedNeed: 12544}, + {name: "low_no_gate", category: "N", description: "gate off: socket and origNs per namespace", maxNetns: 4096, soft: 1024, expectedNeed: 8448}, + {name: "exact", category: "B", description: "soft limit exactly the need", maxNetns: 100, gate: true, soft: 556}, + {name: "one_short", category: "B", description: "one below the need", maxNetns: 100, gate: true, soft: 555, expectedNeed: 556}, {name: "netns_cap_off", category: "C", description: "-maxNetns 0: unbounded, nothing to check", soft: 16}, } for _, tc := range tests { diff --git a/pkg/xtcp/pollplan.go b/pkg/xtcp/pollplan.go index 5d1827258..0d55b7fd6 100644 --- a/pkg/xtcp/pollplan.go +++ b/pkg/xtcp/pollplan.go @@ -17,7 +17,7 @@ import ( // The kernel drops them before building a record (tcp_diag.c, the // idiag_states check), so the dump is about sockstat's inuse. // 2. pollSample: also split the namespace's sockets into K port shards and -// ask for shard (pollingLoops mod K) each poll, with inet_diag bytecode +// ask for shard (poll mod K) each poll, counting gated polls, with inet_diag bytecode // matching shardKey(sport, dport) in R_k. The K ranges partition the // port space, so K consecutive polls see every socket exactly once. // Sockets that share both ports (differing only by address) share a @@ -94,7 +94,7 @@ func fairShare(sorted []uint64, budget uint64) (share uint64, limited bool) { // the gate off. An unknown count is taken as unknownAs (the per-namespace // record cap; budget when that is off too), so a namespace whose sockstat // can't be read is assumed heavy rather than free. -func (p *pollPlanner) plan(counts []sockstatCount, budget, unknownAs, pollingLoops uint64) []nsPlan { +func (p *pollPlanner) plan(counts []sockstatCount, budget, unknownAs, poll uint64) []nsPlan { n := len(counts) p.plans = slices.Grow(p.plans[:0], n)[:n] if budget == 0 { @@ -120,7 +120,7 @@ func (p *pollPlanner) plan(counts []sockstatCount, budget, unknownAs, pollingLoo d := p.demand[i] pl := nsPlan{level: pollFull, planned: d, unknown: !c.known} if limited && d > share { - pl = degrade(c, d, share, pollingLoops) + pl = degrade(c, d, share, poll) pl.unknown = !c.known } p.plans[i] = pl @@ -129,7 +129,7 @@ func (p *pollPlanner) plan(counts []sockstatCount, budget, unknownAs, pollingLoo } // degrade picks the lightest level that fits a namespace into share. -func degrade(c sockstatCount, demand, share, pollingLoops uint64) nsPlan { +func degrade(c sockstatCount, demand, share, poll uint64) nsPlan { if c.known && c.inuse <= share { return nsPlan{level: pollStates, planned: c.inuse} } @@ -144,7 +144,7 @@ func degrade(c sockstatCount, demand, share, pollingLoops uint64) nsPlan { } return nsPlan{ level: pollSample, - shard: uint32(pollingLoops % k), + shard: uint32(poll % k), shards: uint32(k), planned: (base + k - 1) / k, } From 1b027067680f8fc54d37dbe9fb22ac80d59f7314 Mon Sep 17 00:00:00 2001 From: "randomizedcoder dave.seddon.ca@gmail.com" Date: Fri, 13 Nov 2026 16:02:47 -0800 Subject: [PATCH 16/19] test(xtcp): make the thread-churn test independent of host CPU count TestNamespaceChurn_threadBoundedUnderRestoreFailure started 400 goroutines that each lock an M and sleep. With GOMAXPROCS >= 64 they ran together and passed the test's 150-thread cap (reproduced on main 9949ee66 at GOMAXPROCS=64 and 256). Run at most 16 at once and pin GOMAXPROCS to 8; leaked Ms still pile up over all 400 iterations. Worst delta over 100 runs at GOMAXPROCS 1/64/256 is now 5-6 (was up to 74, or the cap). Co-Authored-By: Claude Opus 5.5 --- pkg/xtcp/ns_thread_leak_test.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkg/xtcp/ns_thread_leak_test.go b/pkg/xtcp/ns_thread_leak_test.go index 765ac1dd6..a400c49d5 100644 --- a/pkg/xtcp/ns_thread_leak_test.go +++ b/pkg/xtcp/ns_thread_leak_test.go @@ -58,6 +58,12 @@ func TestNamespaceChurn_threadBoundedUnderRestoreFailure(t *testing.T) { prevCap := runtimeDebug.SetMaxThreads(150) t.Cleanup(func() { runtimeDebug.SetMaxThreads(prevCap) }) + // The runtime also starts spinning Ms for idle Ps; on a 256-CPU host + // those alone took the delta to ~75. Pin Ps so the count measures M + // recycling, not the host's core count. + prevProcs := runtime.GOMAXPROCS(8) + t.Cleanup(func() { runtime.GOMAXPROCS(prevProcs) }) + baseline := readSelfThreads(t) // N iterations of the LockOSThread + restore-fails + exit pattern. @@ -66,12 +72,21 @@ func TestNamespaceChurn_threadBoundedUnderRestoreFailure(t *testing.T) { // exactly the same sequence: lock, snapshot origNs, simulate // state-modifying work, defer a conditional-restore-then-unlock, // exit. + // + // At most inFlight run at once: each holds a locked M while it sleeps, + // so with all N started together the live M count followed GOMAXPROCS + // and passed the 150 cap on hosts with 64+ CPUs. Leaked Ms still pile + // up across all N iterations, so a leak still trips the cap. const N = 400 + const inFlight = 16 + sem := make(chan struct{}, inFlight) var wg sync.WaitGroup for i := 0; i < N; i++ { wg.Add(1) + sem <- struct{}{} go func() { defer wg.Done() + defer func() { <-sem }() runtime.LockOSThread() origNs, err := os.Open("/proc/thread-self/ns/net") if err != nil { From 7076e2744a1f7aa7ba770f85cbe2133deca8bf6d Mon Sep 17 00:00:00 2001 From: "randomizedcoder dave.seddon.ca@gmail.com" Date: Fri, 13 Nov 2026 17:41:49 -0800 Subject: [PATCH 17/19] test(nix): socket-scale microVM for the socket-count gate and floods New microvm-x86_64-socket-scale (8 GiB, 4 vCPU) runs four phases on boot and prints SOCKSCALE_* lines; the host runner exits 0 on OVERALL_PASS: - walk: a small namespace's ss time as another grows to 500k sockets, on the shared TCP table and with tcp_child_ehash_entries - gate: xtcp2 with -maxRecordsPerPoll 200k against a 500k-socket namespace (sampled, no drops, RSS steady), gate on vs off - synflood: hping3 against a non-accepting listener; -maxRecordsPerNetns bounds the dump that sockstat can't see - nsflood: a docker- scope creates 2000 namespaces; the owner quota holds it at 64 and another owner's namespace is still admitted tools/sockfill holds N loopback pairs (or a never-accepting listener) and resets them on exit so no TIME_WAIT is left behind. Co-Authored-By: Claude Opus 5.5 --- docs/polling-and-batching.md | 2 + flake.nix | 1 + nix/binaries.nix | 5 + nix/default.nix | 10 + nix/microvms/constants.nix | 5 + nix/microvms/default.nix | 29 ++ nix/microvms/lib.nix | 129 ++++++++ nix/microvms/mkVm.nix | 58 +++- nix/microvms/scripts/socket-scale-run.sh | 359 +++++++++++++++++++++++ tools/sockfill/sockfill.go | 244 +++++++++++++++ tools/sockfill/sockfill_test.go | 160 ++++++++++ 11 files changed, 999 insertions(+), 3 deletions(-) create mode 100644 nix/microvms/scripts/socket-scale-run.sh create mode 100644 tools/sockfill/sockfill.go create mode 100644 tools/sockfill/sockfill_test.go diff --git a/docs/polling-and-batching.md b/docs/polling-and-batching.md index 7cfa77b41..2a0c79392 100644 --- a/docs/polling-and-batching.md +++ b/docs/polling-and-batching.md @@ -62,6 +62,8 @@ With `-ioUring`, the reads are batched: `-ioUringSockstatBatchSize` (default 64) Each tracked namespace holds a third fd for its sockstat (besides its netlink socket and its goroutine's saved original namespace); xtcp2 warns at startup if `RLIMIT_NOFILE` is below 3 × `-maxNetns` + 256 (2 × with the gate off). `0` turns the gate off (no sockstat fds, no reads). The settings are startup-only, like the caps above. +`nix run .#microvm-x86_64-socket-scale` exercises the gate against a real kernel: a small namespace's `ss` time as another namespace grows to 500k sockets (shared TCP table, then the other namespace on its own table), xtcp2 with `-maxRecordsPerPoll` below a 500k-socket namespace, a SYN flood against a capped namespace, and one owner creating 2000 namespaces. The sockets come from `tools/sockfill`. + ## Timeouts - `-frequency` (default `10s`) is the interval between dumps. diff --git a/flake.nix b/flake.nix index 018dffdba..e26172c78 100644 --- a/flake.nix +++ b/flake.nix @@ -42,6 +42,7 @@ # nix build path:.#test-linkmonitor -L # focused monitor gates; includes untracked files # nix run .#microvm-x86_64-lifecycle # boot xtcp2 in a VM, run 3-check self-test # nix run .#microvm-x86_64-discovery-bench # ns-discovery A/B (dir vs /proc scan) +# nix run .#microvm-x86_64-socket-scale # socket-count gate, SYN + netns floods # nix run .#microvm-x86_64-goip-parity # ip vs goip netlink comparison (needs /dev/kvm) # # Capturing netlink fixtures — use the microVM, not the host: diff --git a/nix/binaries.nix b/nix/binaries.nix index 871a3d2ab..28929369d 100644 --- a/nix/binaries.nix +++ b/nix/binaries.nix @@ -221,6 +221,10 @@ let # snapshots and events. Rides xtcp2AllPackage into every lifecycle microvm, # where the self-test runs it as the RTNL_EVENTS check. "rtnlmon-probe" + # sockfill: holds N loopback TCP pairs (or a never-accepting listener) + # open in its namespace. Rides xtcp2AllPackage into the socket-scale + # microvm, which builds 100k-500k socket tables with it. + "sockfill" ]; toolBinaries = lib.genAttrs toolBinaryNames ( name: @@ -331,6 +335,7 @@ defaultBinaries tcp_client discovery-bench rtnlmon-probe + sockfill ; # Internal nested sets for downstream consumers (containers/). diff --git a/nix/default.nix b/nix/default.nix index f3939d3ab..caaaee7b1 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -1428,6 +1428,16 @@ in program = "${microvms.discoveryBench.x86_64.runner}/bin/xtcp2-discovery-bench-x86_64"; }; + # Socket-scale: xtcp2's socket-count gate, dump caps and per-owner + # namespace quota against real kernel load (shared-table walk cost, + # 250k-pair namespace, SYN flood, namespace flood). Prints SOCKSCALE_* + # lines; exits 0 on OVERALL_PASS. Not in `nix flake check` (~15 min, + # 8 GiB guest). + microvm-x86_64-socket-scale = { + type = "app"; + program = "${microvms.socketScale.x86_64.runner}/bin/xtcp2-socket-scale-x86_64"; + }; + # rtnetlink EVENT capture: boots a quiet root microvm (no xtcp2 daemon), # triggers link up/down + addr add/del + route add/del + neigh add/del on a # veth pair, records them off an nlmon device, and writes the pcap plus the diff --git a/nix/microvms/constants.nix b/nix/microvms/constants.nix index f0a97fe0a..c20127e71 100644 --- a/nix/microvms/constants.nix +++ b/nix/microvms/constants.nix @@ -100,6 +100,11 @@ # shared libc pages) plus the created namespaces; 4096 MiB leaves clear # headroom for the largest (pids=3000) cell and the page cache. memDiscoveryBench = 4096; + # sink="socket-scale": up to 500k TCP sockets at once (~2 KiB of kernel + # memory each) plus xtcp2 decoding a 200k-record poll. 4 vCPUs so the + # fill, hping3 and xtcp2 don't serialize on one another. + memSocketScale = 8192; + vcpuSocketScale = 4; vcpu = 2; serialPort = 12055; virtioPort = 12056; diff --git a/nix/microvms/default.nix b/nix/microvms/default.nix index 118b8b9c7..843a64807 100644 --- a/nix/microvms/default.nix +++ b/nix/microvms/default.nix @@ -503,6 +503,24 @@ let sink = "discovery-bench"; }; + # socket-scale: root VM that runs xtcp2 against namespaces with 10^5 + # sockets, a SYN flood and a namespace flood, then powers off. + mkOneSocketScale = + arch: + import ./mkVm.nix { + inherit + pkgs + lib + microvm + nixpkgs + arch + xtcp2Package + xtcp2AllPackage + ipfeedCollectorPackage + ; + sink = "socket-scale"; + }; + # nlmon-capture: root VM that triggers a scripted sequence of real kernel # network events, captures them off an nlmon device, emits the pcap + # sidecars over the serial console, then powers off. No xtcp2 daemon — a @@ -725,6 +743,8 @@ let vmsDiscoveryBench = lib.genAttrs constants.supportedArchs mkOneDiscoveryBench; + vmsSocketScale = lib.genAttrs constants.supportedArchs mkOneSocketScale; + vmsNlmonCapture = lib.genAttrs constants.supportedArchs mkOneNlmonCapture; vmsNetlinkDumpCapture = lib.genAttrs constants.supportedArchs mkOneNetlinkDumpCapture; @@ -988,6 +1008,13 @@ let }; }); + socketScale = lib.genAttrs constants.supportedArchs (arch: { + runner = microvmLib.mkSocketScaleRunner { + inherit arch; + vm = vmsSocketScale.${arch}; + }; + }); + # rtnetlink event-capture runner: boots the nlmon-capture VM, waits for # NLCAP_DONE (or --timeout), scrapes the base64 pcap blob off the serial # console and writes it into pkg/xtcpnl/testdata//. Must be a @@ -1264,6 +1291,7 @@ in vmsS3ParquetLowfreq vmsCapCheckFail vmsDiscoveryBench + vmsSocketScale vmsNlmonCapture vmsNetlinkDumpCapture vmsGoipParity @@ -1275,6 +1303,7 @@ in vmsIpmetaBootstrap s3parquetLong discoveryBench + socketScale nlmonCapture netlinkDumpCapture goipParity diff --git a/nix/microvms/lib.nix b/nix/microvms/lib.nix index 26a8e18e8..e248c7610 100644 --- a/nix/microvms/lib.nix +++ b/nix/microvms/lib.nix @@ -857,6 +857,135 @@ rec { ''; }; + # Host runner for the socket-scale flavor: same shape as + # mkDiscoveryBenchRunner. Streams SOCKSCALE_* lines as they arrive, waits for + # SOCKSCALE_DONE, and exits 0 iff the guest printed OVERALL_PASS. + mkSocketScaleRunner = + { + arch, + vm, + }: + let + cfg = constants.architectures.${arch}; + in + pkgs.writeShellApplication { + name = "xtcp2-socket-scale-${arch}"; + runtimeInputs = with pkgs; [ + coreutils + gawk + gnugrep + netcat-gnu + procps + ]; + text = '' + set -u + + TIMEOUT_SEC=2400 + while [ $# -gt 0 ]; do + case "$1" in + --timeout) TIMEOUT_SEC="$2"; shift 2 ;; + --timeout=*) TIMEOUT_SEC="''${1#--timeout=}"; shift ;; + -h|--help) + echo "usage: $0 [--timeout ]" + echo " Boots the socket-scale microvm: shared-table walk cost," + echo " xtcp2's socket-count gate at 500k sockets, a SYN flood and" + echo " a namespace flood. Prints SOCKSCALE_* lines, then powers off." + exit 0 + ;; + *) echo "unknown arg: $1" >&2; exit 1 ;; + esac + done + + SERIAL_PORT=${toString cfg.serialPort} + VIRTCON_PORT=${toString cfg.virtioPort} + LOG=$(mktemp -t xtcp2-socket-scale-XXXX.log) + + echo "================================================" + echo " xtcp2 microvm socket-scale — arch=${arch}" + echo " timeout: $TIMEOUT_SEC s" + echo " transcript: $LOG" + echo "================================================" + + QEMU_LOG="''${LOG}.qemu" + ${vm}/bin/microvm-run > "$QEMU_LOG" 2>&1 & + vm_pid=$! + + nc_serial_pid="" + nc_virtcon_pid="" + for _ in $(seq 1 30); do + if nc -z 127.0.0.1 "$SERIAL_PORT" 2>/dev/null; then + nc 127.0.0.1 "$SERIAL_PORT" >> "$LOG" 2>&1 & + nc_serial_pid=$! + break + fi + sleep 1 + done + for _ in $(seq 1 30); do + if nc -z 127.0.0.1 "$VIRTCON_PORT" 2>/dev/null; then + nc 127.0.0.1 "$VIRTCON_PORT" >> "$LOG" 2>&1 & + nc_virtcon_pid=$! + break + fi + sleep 1 + done + + trap ' + if kill -0 "$vm_pid" 2>/dev/null; then + ( printf "systemctl poweroff\n" | nc -q 1 127.0.0.1 "$SERIAL_PORT" ) >/dev/null 2>&1 || true + sleep 10 + kill "$vm_pid" 2>/dev/null || true + wait "$vm_pid" 2>/dev/null || true + fi + if [ -n "$nc_serial_pid" ] && kill -0 "$nc_serial_pid" 2>/dev/null; then + kill "$nc_serial_pid" 2>/dev/null || true + fi + if [ -n "$nc_virtcon_pid" ] && kill -0 "$nc_virtcon_pid" 2>/dev/null; then + kill "$nc_virtcon_pid" 2>/dev/null || true + fi + ' EXIT + + # Both consoles carry the service output; print each line once. + elapsed=0 + done_seen=0 + shown=0 + while [ "$elapsed" -lt "$TIMEOUT_SEC" ]; do + if ! kill -0 "$vm_pid" 2>/dev/null; then + echo "FATAL: qemu died at t=$elapsed s; tail of transcript:" + tail -n 40 "$LOG" + exit 2 + fi + lines=$(grep -aoE 'SOCKSCALE_[A-Z_]+.*' "$LOG" 2>/dev/null | tr -d '\r' | awk '!seen[$0]++' || true) + n=$(printf '%s\n' "$lines" | grep -c . || true) + if [ "$n" -gt "$shown" ]; then + printf '%s\n' "$lines" | tail -n "+$((shown + 1))" + shown=$n + fi + if grep -q 'SOCKSCALE_DONE' "$LOG" 2>/dev/null; then + done_seen=1 + break + fi + sleep 5 + elapsed=$((elapsed + 5)) + done + + if [ "$done_seen" -ne 1 ]; then + echo "FATAL: SOCKSCALE_DONE not seen within $TIMEOUT_SEC s" + tail -n 40 "$LOG" 2>/dev/null || true + exit 2 + fi + + rc=1 + if grep -q 'SOCKSCALE_OVERALL_PASS' "$LOG" 2>/dev/null; then + echo "PASS: socket-scale" + rc=0 + else + echo "FAIL: socket-scale (see SOCKSCALE_*_FAIL lines above)" + fi + echo "Full transcript kept at: $LOG" + exit "$rc" + ''; + }; + # mkNlmonCaptureRunner — host runner for the nlmon-capture flavor. # # Same shape as mkDiscoveryBenchRunner (boot, tail both consoles, wait for a diff --git a/nix/microvms/mkVm.nix b/nix/microvms/mkVm.nix index 37185db49..2ecb5e093 100644 --- a/nix/microvms/mkVm.nix +++ b/nix/microvms/mkVm.nix @@ -249,6 +249,11 @@ let # (tools/discovery-bench -mode grid) against a real kernel, then powers off. # No downstream/dockerd — it only needs ip netns + many cheap processes. isDiscoveryBench = sink == "discovery-bench"; + # socket-scale = a root VM that drives xtcp2's socket-count gate, dump caps + # and per-owner namespace quota with real kernel load: namespaces holding + # 10^5 sockets (tools/sockfill), a SYN flood, and a namespace flood. The run + # script starts and stops xtcp2 itself, so services.xtcp2 is off. + isSocketScale = sink == "socket-scale"; # nlmon-capture = a root VM whose only job is to record REAL rtnetlink # NOTIFICATIONS (link up/down, addr add/del, route add/del, neigh add/del) # into a pcap, base64 it out over the serial console, and power off. @@ -510,6 +515,9 @@ let else if isDiscoveryBench then # The grid sweep spawns up to a few thousand processes per cell. cfg.memDiscoveryBench + else if isSocketScale then + # ~2 KiB of kernel memory per TCP socket, 500k sockets at once. + cfg.memSocketScale else cfg.mem; @@ -2053,6 +2061,25 @@ let ''; }; + # socket-scale flavor: phases and pass rules are in the script's header. + socketScaleRunScript = pkgs.writeShellApplication { + name = "socket-scale-run"; + runtimeInputs = with pkgs; [ + xtcp2AllPackage # sockfill + xtcp2Package + iproute2 + procps + curl + gawk + gnugrep + coreutils + util-linux + hping + systemd + ]; + text = builtins.readFile ./scripts/socket-scale-run.sh; + }; + # nlmon-capture flavor: record REAL rtnetlink notifications into a pcap. # # The guest is quiet by construction — services.xtcp2 is disabled for this @@ -2679,7 +2706,13 @@ in # The workbench runs `-j N` rows at once, each a tcpdump, the # command and the helper's filtering; at 2 vCPUs -j 4 measured # 0.95 s a row. See constants.nix nlcapWs. - vcpu = if isNlcapWorkbench then cfg.nlcapWs.vcpu else cfg.vcpu; + vcpu = + if isNlcapWorkbench then + cfg.nlcapWs.vcpu + else if isSocketScale then + cfg.vcpuSocketScale + else + cfg.vcpu; cpu = if cfg.useKvm then null else cfg.qemuCpu; # Default: no disk. /var/lib/docker lives on the root tmpfs. # For clickhouse-pipeline this proved a problem at hour ~1 @@ -3066,7 +3099,7 @@ in # the isolation should be the second line of defense rather than the # only one. services.xtcp2 = { - enable = !isNetlinkQuiet; + enable = !isNetlinkQuiet && !isSocketScale; package = xtcp2Package; configFile = vmConfig; extraArgs = @@ -3248,7 +3281,7 @@ in # on the netlink-quiet flavors, which have no xtcp2 to test and whose # whole point is a netlink-silent guest. systemd.services.xtcp2-self-test = - lib.mkIf (!isSoak && !isS3ParquetLong && !isClickPipeRate && !isNetlinkQuiet) + lib.mkIf (!isSoak && !isS3ParquetLong && !isClickPipeRate && !isNetlinkQuiet && !isSocketScale) { description = "xtcp2 microvm self-test"; after = [ @@ -4091,6 +4124,25 @@ in }; }; + # socket-scale flavor: run the scale phases on boot, emit SOCKSCALE_* + # lines and a SOCKSCALE_DONE sentinel to the console; the host runner + # powers the VM off. + systemd.services.socket-scale-run = lib.mkIf isSocketScale { + description = "xtcp2 — socket-count gate, SYN flood and namespace flood at scale"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + # 500k sockets in sockfill, thousands of flood namespaces. + LimitNOFILE = 1048576; + TasksMax = "infinity"; + ExecStart = "${socketScaleRunScript}/bin/socket-scale-run"; + StandardOutput = "journal+console"; + StandardError = "journal+console"; + }; + }; + # All three netlink-quiet flavors: the nlmon monitor device and the # veth/dummy/bridge links the capture scripts drive are all kernel # modules that a minimal microvm does not autoload. Name them so the diff --git a/nix/microvms/scripts/socket-scale-run.sh b/nix/microvms/scripts/socket-scale-run.sh new file mode 100644 index 000000000..70f18891e --- /dev/null +++ b/nix/microvms/scripts/socket-scale-run.sh @@ -0,0 +1,359 @@ +# socket-scale-run: the socket-scale microVM scenario (FP-5.7). +# +# Runs as root in the guest; every result is a SOCKSCALE_* line on the +# console, which the host runner (mkSocketScaleRunner) collects. +# +# 1. walk A small namespace B's `ss` time against the socket count in +# another namespace A: on the shared TCP table, then with A on +# its own table (net.ipv4.tcp_child_ehash_entries). +# 2. gate xtcp2 with -maxRecordsPerPoll below A's 500k sockets: A is +# sampled, nothing is dropped, memory holds steady. +# 3. synflood half-open connections against a listener in S: sockstat +# doesn't see them; -maxRecordsPerNetns bounds the dump. +# 4. nsflood one owner (a docker-.scope) makes 2000 namespaces: +# -maxNetnsPerOwner holds it to 64 and another owner's +# namespace is still admitted. +# +# Sizes come from SOCKSCALE_* env (see the defaults below). + +# `socket-scale-run flood N` is the namespace-flood child: run inside the +# owner's scope, it starts N sleepers, each in a new network namespace. +if [ "${1:-}" = flood ]; then + for _ in $(seq 1 "$2"); do + unshare -n sleep infinity & + done + wait + exit 0 +fi + +WALK_PAIRS="${SOCKSCALE_WALK_PAIRS:-0 50000 250000}" +GATE_PAIRS="${SOCKSCALE_GATE_PAIRS:-250000}" +GATE_BUDGET="${SOCKSCALE_GATE_BUDGET:-200000}" +FLOOD_NS="${SOCKSCALE_FLOOD_NS:-2000}" +SS_ITERS="${SOCKSCALE_SS_ITERS:-15}" +PROM=127.0.0.1:9188 + +say() { echo "SOCKSCALE_$*"; } +fail() { + say "FAIL $*" + FAILED=1 +} +FAILED=0 + +# netns_new NAME: a namespace with lo up and a wide ephemeral port range +# (sockfill puts 50k clients on each listener port). +netns_new() { + ip netns add "$1" + ip -n "$1" link set lo up + ip netns exec "$1" sysctl -qw net.ipv4.ip_local_port_range="10000 65000" +} + +# fill NAME PAIRS: start sockfill in NAME; sets FILL_PID. Returns non-zero +# if it didn't report ready. +fill() { + local ns="$1" pairs="$2" log="/tmp/fill-$1.log" + ip netns exec "$ns" sockfill -pairs "$pairs" >"$log" 2>&1 & + FILL_PID=$! + local i + for i in $(seq 1 600); do + if grep -q SOCKFILL_READY "$log"; then + say "FILL ns=$ns $(grep -o 'pairs=.*' "$log")" + return 0 + fi + if grep -q SOCKFILL_ERR "$log" || ! kill -0 "$FILL_PID" 2>/dev/null; then + break + fi + sleep 1 + done + fail "fill ns=$ns pairs=$pairs after ${i}s: $(tail -n 3 "$log" | tr '\n' ' ')" + return 1 +} + +unfill() { + if [ -n "${FILL_PID:-}" ]; then + kill -TERM "$FILL_PID" 2>/dev/null || true + wait "$FILL_PID" 2>/dev/null || true + FILL_PID="" + fi +} + +# ss_us NAME: median microseconds of `ss -tan` in NAME over SS_ITERS runs +# (ss -N enters the namespace itself; the exec cost is the same every run). +ss_us() { + local s e + for _ in $(seq 1 "$SS_ITERS"); do + s=$(date +%s%N) + ss -N "$1" -tan >/dev/null + e=$(date +%s%N) + echo $(((e - s) / 1000)) + done | sort -n | awk '{v[NR]=$1} END {print v[int((NR+1)/2)]}' +} + +# sockets NAME: TCP sockets in NAME (inuse + tw from its sockstat). +sockets() { + ip netns exec "$1" cat /proc/net/sockstat | awk '/^TCP:/ {print $3 + $7}' +} + +# metric REGEX: the sum of the /metrics samples whose line matches REGEX. +metric() { + curl -sf "http://$PROM/metrics" | awk -v re="$1" '$0 ~ re && $0 !~ /^#/ {s += $NF} END {printf "%d\n", s}' +} + +# xtcp2_start ARGS...: run xtcp2 with a loopback metrics listener; sets +# XTCP_PID once /metrics answers. +xtcp2_start() { + LISTENER_AUTH_MODE=disabled xtcp2 -dest null: -frequency 2s -timeout 1s \ + -listener "name=prometheus,serves=health+metrics+metrics-detail,address=$PROM,network=tcp" \ + "$@" >/tmp/xtcp2-scale.log 2>&1 & + XTCP_PID=$! + local i + for i in $(seq 1 60); do + if curl -sf "http://$PROM/metrics" >/dev/null 2>&1; then + return 0 + fi + sleep 1 + done + fail "xtcp2 $* did not serve /metrics: $(tail -n 5 /tmp/xtcp2-scale.log | tr '\n' ' ')" + return 1 +} + +xtcp2_stop() { + if [ -n "${XTCP_PID:-}" ]; then + kill -TERM "$XTCP_PID" 2>/dev/null || true + wait "$XTCP_PID" 2>/dev/null || true + XTCP_PID="" + fi +} + +rss_kb() { awk '/^VmRSS:/ {print $2}' "/proc/$1/status"; } +threads() { awk '/^Threads:/ {print $2}' "/proc/$1/status"; } + +# --- 1. walk ---------------------------------------------------------------- + +phase_walk() { + say "PHASE walk" + sysctl -qw net.ipv4.tcp_child_ehash_entries=0 + netns_new B + fill B 10 || return + B_FILL=$FILL_PID + FILL_PID="" + + local p a us base=0 top=0 + for p in $WALK_PAIRS; do + a="A$p" + netns_new "$a" + if [ "$p" -gt 0 ]; then + fill "$a" "$p" || { + ip netns del "$a" + continue + } + fi + us=$(ss_us B) + say "WALK table=shared a_sockets=$(sockets "$a") b_sockets=$(sockets B) b_ss_us=$us" + [ "$p" -eq 0 ] && base=$us + top=$us + unfill + ip netns del "$a" + done + + # A on its own table: children of a namespace with tcp_child_ehash_entries + # set get a private ehash (tcp_set_hashinfo), so B's walk doesn't see A. + local own=0 p_top + p_top=$(echo "$WALK_PAIRS" | awk '{print $NF}') + sysctl -qw net.ipv4.tcp_child_ehash_entries=65536 + netns_new Aown + sysctl -qw net.ipv4.tcp_child_ehash_entries=0 + say "WALK_OWN_TABLE ehash_entries=$(ip netns exec Aown sysctl -n net.ipv4.tcp_ehash_entries)" + if fill Aown "$p_top"; then + own=$(ss_us B) + say "WALK table=own a_sockets=$(sockets Aown) b_sockets=$(sockets B) b_ss_us=$own" + fi + unfill + ip netns del Aown + + kill -TERM "$B_FILL" 2>/dev/null || true + wait "$B_FILL" 2>/dev/null || true + ip netns del B + + # Shared: B's dump walks A's sockets too, so it grows with A. Own table: + # it doesn't (allow 2x + 2 ms for noise). + if [ "$base" -gt 0 ] && [ "$top" -ge $((base * 2)) ]; then + say "WALK_SHARED_PASS base_us=$base top_us=$top ratio=$((top / base))x" + else + fail "WALK_SHARED base_us=$base top_us=$top: B's dump did not grow with A" + fi + if [ "$own" -gt 0 ] && [ "$own" -le $((base * 2 + 2000)) ]; then + say "WALK_OWN_PASS base_us=$base own_us=$own" + else + fail "WALK_OWN base_us=$base own_us=$own: B's dump grew with A on its own table" + fi +} + +# --- 2. gate ---------------------------------------------------------------- + +phase_gate() { + say "PHASE gate" + netns_new B + fill B 10 || return + B_FILL=$FILL_PID + FILL_PID="" + netns_new A + fill A "$GATE_PAIRS" || return + + local mode budget + for mode in on off; do + budget=$GATE_BUDGET + [ "$mode" = off ] && budget=0 + xtcp2_start -maxRecordsPerPoll "$budget" || continue + sleep 20 + local rss1 thr1 + rss1=$(rss_kb "$XTCP_PID") + thr1=$(threads "$XTCP_PID") + sleep 40 + local rss2 thr2 sample states sockets drops polls p50 + rss2=$(rss_kb "$XTCP_PID") + thr2=$(threads "$XTCP_PID") + sample=$(metric '^xtcp_poll_degraded_total\{level="sample"\}') + states=$(metric '^xtcp_poll_degraded_total\{level="states"\}') + sockets=$(metric '^xtcp_poll_sockets ') + drops=$(metric '^xtcp_dump_dropped_total\{reason="records"\}') + polls=$(metric '^xtcp_histograms_count\{.*variable="pollToDoneDuration"') + p50=$(curl -sf "http://$PROM/metrics" | awk '/pollToDoneDuration/ && /quantile="0.5"/ {print $NF; exit}') + say "GATE mode=$mode budget=$budget a_sockets=$(sockets A) poll_sockets=$sockets sample=$sample states=$states records_dropped=$drops polls=$polls poll_p50_s=$p50 rss_kb=$rss1->$rss2 threads=$thr1->$thr2" + xtcp2_stop + if [ "$mode" = on ]; then + [ "$sample" -gt 0 ] || fail "GATE A was never sampled" + [ "$drops" -eq 0 ] || fail "GATE sampled polls still hit the record cap ($drops dropped)" + [ "$sockets" -ge $((GATE_PAIRS * 2 * 8 / 10)) ] || fail "GATE poll_sockets $sockets below A's $((GATE_PAIRS * 2))" + [ "$rss2" -le $((rss1 * 3 / 2)) ] || fail "GATE RSS grew $rss1 -> $rss2 kB" + if [ "$sample" -gt 0 ] && [ "$drops" -eq 0 ]; then + say "GATE_PASS" + fi + fi + done + + unfill + ip netns del A + kill -TERM "$B_FILL" 2>/dev/null || true + wait "$B_FILL" 2>/dev/null || true + ip netns del B +} + +# --- 3. synflood ------------------------------------------------------------ + +phase_synflood() { + say "PHASE synflood" + netns_new S + netns_new F + ip link add vS netns S type veth peer name vF netns F + ip -n S addr add 10.250.0.1/24 dev vS + ip -n F addr add 10.250.0.2/24 dev vF + ip -n S link set vS up + ip -n F link set vF up + # SYN-ACKs to the spoofed sources leave via F, which doesn't forward them. + ip -n S route add default via 10.250.0.2 + ip netns exec S sysctl -qw net.ipv4.tcp_syncookies=0 net.ipv4.tcp_max_syn_backlog=65535 \ + net.core.somaxconn=65535 net.ipv4.conf.all.rp_filter=0 net.ipv4.conf.vS.rp_filter=0 + + ip netns exec S sockfill -listen 10.250.0.1:8080 >/tmp/fill-S.log 2>&1 & + local listen_pid=$! + sleep 1 + + xtcp2_start -maxRecordsPerNetns 5000 || return + ip netns exec F timeout 20 hping3 -q -S -p 8080 --flood --rand-source 10.250.0.1 >/dev/null 2>&1 || true + local synrecv inuse + synrecv=$(ip netns exec S ss -Htan state syn-recv | wc -l) + inuse=$(sockets S) + sleep 6 + local drops + drops=$(metric '^xtcp_dump_dropped_total\{reason="records"\}') + say "SYNFLOOD syn_recv=$synrecv sockstat_tcp=$inuse records_dropped=$drops" + xtcp2_stop + kill -TERM "$listen_pid" 2>/dev/null || true + wait "$listen_pid" 2>/dev/null || true + ip netns del S + ip netns del F + + if [ "$synrecv" -le 5000 ]; then + fail "SYNFLOOD only $synrecv half-open connections; the flood didn't take" + elif [ "$drops" -gt 0 ]; then + say "SYNFLOOD_PASS sockstat_blind=$([ "$inuse" -lt 100 ] && echo yes || echo no)" + else + fail "SYNFLOOD $synrecv SYN_RECV but -maxRecordsPerNetns 5000 dropped nothing" + fi +} + +# --- 4. nsflood ------------------------------------------------------------- + +phase_nsflood() { + say "PHASE nsflood" + local owner other + owner=$(printf 'socket-scale-flood' | sha256sum | cut -c1-64) + other=$(printf 'socket-scale-other' | sha256sum | cut -c1-64) + + xtcp2_start || return + sleep 4 + local before + before=$(metric '^xtcp_gauge ') + + local start=$SECONDS + systemd-run --quiet --scope --slice=system.slice --unit="docker-$owner" -p TasksMax=infinity \ + "$0" flood "$FLOOD_NS" & + local flood_pid=$! + local made=0 + for _ in $(seq 1 120); do + made=$(pgrep -c -f '^sleep infinity$' || true) + [ "$made" -ge "$FLOOD_NS" ] && break + sleep 1 + done + say "NSFLOOD spawned=$made in $((SECONDS - start))s cgroup=$(awk -F: '{print $3}' "/proc/$(pgrep -f -n '^sleep infinity$')/cgroup")" + sleep 20 + + local tracked quota timeouts + tracked=$(metric '^xtcp_gauge ') + quota=$(metric '^xtcp_netns_dropped_total\{reason="owner_quota"\}') + timeouts=$(metric '^xtcp_reconcile_incomplete_total\{reason="timeout"\}') + + # A late namespace from another owner must still get in. + systemd-run --quiet --scope --slice=system.slice --unit="docker-$other" \ + unshare -n sleep 3600 & + local other_pid=$! + sleep 8 + local after + after=$(metric '^xtcp_gauge ') + say "NSFLOOD tracked_before=$before tracked_flood=$tracked tracked_late=$after owner_quota_dropped=$quota reconcile_timeouts=$timeouts xtcp2_threads=$(threads "$XTCP_PID") rss_kb=$(rss_kb "$XTCP_PID")" + + xtcp2_stop + systemctl stop "docker-$owner.scope" "docker-$other.scope" 2>/dev/null || true + kill "$flood_pid" "$other_pid" 2>/dev/null || true + wait 2>/dev/null || true + + local ok=1 + [ "$quota" -gt 0 ] || { + fail "NSFLOOD no owner_quota drops" + ok=0 + } + [ "$tracked" -le $((before + 64)) ] || { + fail "NSFLOOD tracked $tracked > $before + quota 64" + ok=0 + } + [ "$after" -eq $((tracked + 1)) ] || { + fail "NSFLOOD the other owner's namespace was not admitted ($tracked -> $after)" + ok=0 + } + [ "$ok" -eq 1 ] && say "NSFLOOD_PASS" + return 0 +} + +say "START walk_pairs='$WALK_PAIRS' gate_pairs=$GATE_PAIRS gate_budget=$GATE_BUDGET flood_ns=$FLOOD_NS kernel=$(uname -r) cpus=$(nproc) mem_mb=$(awk '/MemTotal/ {print int($2/1024)}' /proc/meminfo)" +for phase in ${SOCKSCALE_PHASES:-walk gate synflood nsflood}; do + "phase_$phase" || fail "phase $phase aborted" + unfill + xtcp2_stop +done +if [ "$FAILED" -eq 0 ]; then + say "OVERALL_PASS" +else + say "OVERALL_FAIL" +fi +say "DONE" diff --git a/tools/sockfill/sockfill.go b/tools/sockfill/sockfill.go new file mode 100644 index 000000000..bee94aa44 --- /dev/null +++ b/tools/sockfill/sockfill.go @@ -0,0 +1,244 @@ +// sockfill holds TCP sockets open in its network namespace, for tests that +// need a namespace with a known, large socket table (the socket-scale microVM). +// +// Modes: +// +// -pairs N open N loopback connections (2N sockets: the client end and +// the accepted end), print SOCKFILL_READY, and hold them until +// SIGTERM/SIGINT. Clients are spread over ceil(N/-perPort) +// listener ports so the ephemeral range doesn't run out; set +// net.ipv4.ip_local_port_range wide enough for -perPort. +// -listen A listen on A and never accept (a SYN flood target: half-open +// connections stay in SYN_RECV). The backlog is the namespace's +// net.core.somaxconn. +// +// On exit every socket is closed with SO_LINGER 0, so it is reset rather than +// left in TIME_WAIT: TIME_WAIT sockets stay in the host-wide TCP table and +// would skew the next measurement. +package main + +import ( + "context" + "errors" + "flag" + "fmt" + "io" + "net" + "os" + "os/signal" + "strconv" + "sync" + "syscall" + "time" + + "golang.org/x/sys/unix" +) + +const ( + defaultPerPort = 50000 + defaultListenBase = 2000 + defaultDialers = 128 + fdMargin = 256 +) + +// listenersNeeded is how many listener ports N client connections need when +// one port can take perPort of them. +func listenersNeeded(pairs, perPort int) int { + if pairs <= 0 || perPort <= 0 { + return 0 + } + return (pairs + perPort - 1) / perPort +} + +// fdsNeeded is the RLIMIT_NOFILE pairs mode needs: two fds per pair, one per +// listener, and a margin. +func fdsNeeded(pairs, perPort int) uint64 { + return uint64(2*pairs+listenersNeeded(pairs, perPort)) + fdMargin +} + +// raiseNofile lifts the soft (and, if needed, hard) RLIMIT_NOFILE to need. +func raiseNofile(need uint64) error { + var r unix.Rlimit + if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &r); err != nil { + return err + } + if r.Cur >= need { + return nil + } + r.Cur = need + if r.Max < need { + r.Max = need + } + return unix.Setrlimit(unix.RLIMIT_NOFILE, &r) +} + +// filler holds every socket it opened. +type filler struct { + mu sync.Mutex + listeners []net.Listener + conns []*net.TCPConn +} + +func (f *filler) add(c net.Conn) { + tc, ok := c.(*net.TCPConn) + if !ok { + closeQuiet(c) + return + } + f.mu.Lock() + f.conns = append(f.conns, tc) + f.mu.Unlock() +} + +// count is the number of connection sockets held (both ends). +func (f *filler) count() int { + f.mu.Lock() + defer f.mu.Unlock() + return len(f.conns) +} + +// fill opens pairs loopback connections on host, over listener ports from +// base. It returns once every client is connected and every connection +// accepted. +func (f *filler) fill(ctx context.Context, host string, base, pairs, perPort, dialers int) error { + n := listenersNeeded(pairs, perPort) + addrs := make([]string, 0, n) + accepted := make(chan error, n) + for i := 0; i < n; i++ { + var lc net.ListenConfig + l, err := lc.Listen(ctx, "tcp4", net.JoinHostPort(host, strconv.Itoa(base+i))) + if err != nil { + return fmt.Errorf("listen %d: %w", base+i, err) + } + f.listeners = append(f.listeners, l) + addrs = append(addrs, l.Addr().String()) + want := min(perPort, pairs-i*perPort) + go func() { + for j := 0; j < want; j++ { + c, err := l.Accept() + if err != nil { + accepted <- err + return + } + f.add(c) + } + accepted <- nil + }() + } + + jobs := make(chan string) + errs := make(chan error, dialers) + var wg sync.WaitGroup + for w := 0; w < dialers; w++ { + wg.Add(1) + go func() { + defer wg.Done() + var d net.Dialer + for a := range jobs { + c, err := d.DialContext(ctx, "tcp4", a) + if err != nil { + errs <- fmt.Errorf("dial %s: %w", a, err) + return + } + f.add(c) + } + }() + } + var dialErr error +feed: + for i := 0; i < pairs; i++ { + select { + case jobs <- addrs[i/perPort]: + case dialErr = <-errs: + break feed + } + } + close(jobs) + wg.Wait() + if dialErr == nil { + select { + case dialErr = <-errs: + default: + } + } + if dialErr != nil { + return dialErr + } + for i := 0; i < n; i++ { + if err := <-accepted; err != nil { + return fmt.Errorf("accept: %w", err) + } + } + return nil +} + +// closeQuiet closes c; a close error on teardown changes nothing here. +func closeQuiet(c io.Closer) { _ = c.Close() } + +// closeAll resets every connection (SO_LINGER 0: no TIME_WAIT) and closes +// the listeners. +func (f *filler) closeAll() { + f.mu.Lock() + defer f.mu.Unlock() + for _, c := range f.conns { + if err := c.SetLinger(0); err != nil { + fmt.Fprintf(os.Stderr, "sockfill: SO_LINGER: %v\n", err) + } + closeQuiet(c) + } + f.conns = nil + for _, l := range f.listeners { + closeQuiet(l) + } + f.listeners = nil +} + +func main() { + pairs := flag.Int("pairs", 0, "loopback connections to open (2 sockets each)") + perPort := flag.Int("perPort", defaultPerPort, "connections per listener port; must fit the ephemeral port range") + base := flag.Int("listenBase", defaultListenBase, "first listener port (keep it below the ephemeral range)") + host := flag.String("host", "127.0.0.1", "loopback address to use") + dialers := flag.Int("dialers", defaultDialers, "concurrent dialers") + listen := flag.String("listen", "", "listen on this address and never accept (SYN flood target)") + flag.Parse() + + ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGTERM, syscall.SIGINT) + err := run(ctx, *pairs, *perPort, *base, *dialers, *host, *listen) + stop() + if err != nil { + fmt.Fprintf(os.Stderr, "SOCKFILL_ERR %v\n", err) + os.Exit(1) + } +} + +func run(ctx context.Context, pairs, perPort, base, dialers int, host, listen string) error { + f := &filler{} + defer f.closeAll() + start := time.Now() + switch { + case listen != "": + var lc net.ListenConfig + l, err := lc.Listen(ctx, "tcp4", listen) + if err != nil { + return err + } + f.listeners = append(f.listeners, l) + fmt.Printf("SOCKFILL_READY listen=%s\n", l.Addr()) + case pairs > 0: + if perPort <= 0 || dialers <= 0 { + return errors.New("-perPort and -dialers must be positive") + } + if err := raiseNofile(fdsNeeded(pairs, perPort)); err != nil { + return fmt.Errorf("RLIMIT_NOFILE %d: %w", fdsNeeded(pairs, perPort), err) + } + if err := f.fill(ctx, host, base, pairs, perPort, dialers); err != nil { + return err + } + fmt.Printf("SOCKFILL_READY pairs=%d sockets=%d listeners=%d elapsed=%s\n", + pairs, f.count(), len(f.listeners), time.Since(start).Round(time.Millisecond)) + default: + return errors.New("one of -pairs or -listen is required") + } + <-ctx.Done() + return nil +} diff --git a/tools/sockfill/sockfill_test.go b/tools/sockfill/sockfill_test.go new file mode 100644 index 000000000..0439ff6f4 --- /dev/null +++ b/tools/sockfill/sockfill_test.go @@ -0,0 +1,160 @@ +package main + +import ( + "context" + "net" + "strconv" + "testing" + "time" +) + +func TestListenersNeeded(t *testing.T) { + tests := []struct { + name string + category string + description string + pairs int + perPort int + expected int + }{ + {name: "one_port", category: "P", description: "fewer pairs than a port holds", pairs: 10, perPort: 50000, expected: 1}, + {name: "half_million_sockets", category: "P", description: "250k pairs at 50k per port", pairs: 250000, perPort: 50000, expected: 5}, + {name: "exact", category: "B", description: "pairs a multiple of perPort", pairs: 100000, perPort: 50000, expected: 2}, + {name: "one_over", category: "B", description: "one pair past a full port", pairs: 50001, perPort: 50000, expected: 2}, + {name: "zero_pairs", category: "N", description: "no pairs: no listeners", pairs: 0, perPort: 50000, expected: 0}, + {name: "zero_per_port", category: "N", description: "perPort 0 is rejected as none, not a divide by zero", pairs: 10, perPort: 0, expected: 0}, + {name: "per_port_one", category: "C", description: "one connection per port", pairs: 3, perPort: 1, expected: 3}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + if got := listenersNeeded(tc.pairs, tc.perPort); got != tc.expected { + t.Errorf("%s: listenersNeeded(%d, %d) = %d, expected %d", tc.description, tc.pairs, tc.perPort, got, tc.expected) + } + }) + } +} + +func TestFdsNeeded(t *testing.T) { + tests := []struct { + name string + category string + description string + pairs int + perPort int + expected uint64 + }{ + {name: "half_million_sockets", category: "P", description: "250k pairs: 500k conns + 5 listeners + margin", pairs: 250000, perPort: 50000, expected: 500000 + 5 + fdMargin}, + {name: "zero", category: "B", description: "no pairs: the margin alone", pairs: 0, perPort: 50000, expected: fdMargin}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + if got := fdsNeeded(tc.pairs, tc.perPort); got != tc.expected { + t.Errorf("%s: fdsNeeded = %d, expected %d", tc.description, got, tc.expected) + } + }) + } +} + +// TestFill opens real loopback connections on ephemeral listener ports. +func TestFill(t *testing.T) { + tests := []struct { + name string + category string + description string + pairs int + perPort int + dialers int + expected int // sockets held + }{ + {name: "one_listener", category: "P", description: "10 pairs on one port", pairs: 10, perPort: 100, dialers: 4, expected: 20}, + {name: "spread", category: "P", description: "25 pairs over 3 ports (10, 10, 5)", pairs: 25, perPort: 10, dialers: 8, expected: 50}, + {name: "one_dialer", category: "B", description: "a single dialer still connects them all", pairs: 7, perPort: 3, dialers: 1, expected: 14}, + {name: "more_dialers_than_pairs", category: "C", description: "idle dialers exit cleanly", pairs: 2, perPort: 10, dialers: 64, expected: 4}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + base := freePortRun(t, listenersNeeded(tc.pairs, tc.perPort)) + ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) + defer cancel() + f := &filler{} + defer f.closeAll() + if err := f.fill(ctx, "127.0.0.1", base, tc.pairs, tc.perPort, tc.dialers); err != nil { + t.Fatalf("%s: fill: %v", tc.description, err) + } + if got := f.count(); got != tc.expected { + t.Errorf("%s: %d sockets, expected %d", tc.description, got, tc.expected) + } + f.closeAll() + if f.count() != 0 || len(f.listeners) != 0 { + t.Errorf("%s: closeAll left %d conns, %d listeners", tc.description, f.count(), len(f.listeners)) + } + }) + } +} + +// TestFillErrors: a port already taken fails the fill instead of hanging. +func TestFillErrors(t *testing.T) { + busy, err := net.Listen("tcp4", "127.0.0.1:0") + if err != nil { + t.Fatal(err) + } + defer busy.Close() + port := busy.Addr().(*net.TCPAddr).Port + f := &filler{} + defer f.closeAll() + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + defer cancel() + if err := f.fill(ctx, "127.0.0.1", port, 5, 10, 2); err == nil { + t.Error("listener port in use: expected an error") + } +} + +// TestRunRequiresMode: neither -pairs nor -listen is an error. +func TestRunRequiresMode(t *testing.T) { + tests := []struct { + name string + category string + description string + pairs int + perPort int + dialers int + }{ + {name: "no_mode", category: "N", description: "neither -pairs nor -listen", perPort: 10, dialers: 1}, + {name: "bad_per_port", category: "N", description: "-perPort 0", pairs: 5, dialers: 1}, + {name: "bad_dialers", category: "N", description: "-dialers 0", pairs: 5, perPort: 10}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + if err := run(context.Background(), tc.pairs, tc.perPort, 2000, tc.dialers, "127.0.0.1", ""); err == nil { + t.Errorf("%s: expected an error", tc.description) + } + }) + } +} + +// freePortRun finds n consecutive free loopback ports. +func freePortRun(t *testing.T, n int) int { + t.Helper() + for try := 0; try < 50; try++ { + l, err := net.Listen("tcp4", "127.0.0.1:0") + if err != nil { + t.Fatal(err) + } + base := l.Addr().(*net.TCPAddr).Port + _ = l.Close() + ok := true + for i := 1; i < n; i++ { + p, err := net.Listen("tcp4", net.JoinHostPort("127.0.0.1", strconv.Itoa(base+i))) + if err != nil { + ok = false + break + } + _ = p.Close() + } + if ok && base+n < 65536 { + return base + } + } + t.Fatalf("no run of %d free ports", n) + return 0 +} From 82a598b46d4236ae34595ad1bc0d3b441ec0bbdf Mon Sep 17 00:00:00 2001 From: "randomizedcoder dave.seddon.ca@gmail.com" Date: Fri, 13 Nov 2026 19:26:44 -0800 Subject: [PATCH 18/19] fix(xtcp): shard on max(sport, dport) over the namespace's port range The socket-scale VM showed sampled polls still hitting the record cap. The shard key was sport if >= 32768, else dport, with shards splitting 32768..65535. In a namespace whose ip_local_port_range starts lower (the VM's 10000-65000, a common tuning), clients below 32768 keyed on their listener's port, so shard 0 held ~300k of 500k sockets, over the 262,144 per-namespace cap. - key is max(sport, dport), the ephemeral side whichever end the socket is; bytecode: S_LE hi AND D_LE hi AND (S_GE lo OR D_GE lo) - shards split the namespace's own ip_local_port_range, read through an fd opened in the namespace (a /proc/sys/net fd stays bound to the opener's namespace), only for sampled namespaces; the default range if it can't be read - four fds per tracked namespace with the gate on (RLIMIT_NOFILE check) - tests: parser, handle, partition and spread over default, wide, full and tiny ranges, including the VM's 250k loopback pairs - socket-scale script: count tracked namespaces from the instance counters (xtcp_gauge refreshes once a minute), require exactly the 64-namespace quota, print sockfill/ss/dmesg state with the gate lines - kernel doc: the VM's shared-walk numbers; a per-namespace table shares lhash2/bhash2 (inet_pernet_hashinfo_alloc), so the all-namespace loop needs only each own ehash Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 2 +- docs/kernel/inet-diag-all-netns.md | 19 ++- docs/polling-and-batching.md | 4 +- nix/microvms/scripts/socket-scale-run.sh | 55 +++++--- pkg/xtcp/ns_net_namespace.go | 41 +++--- pkg/xtcp/pollgate.go | 23 +++- pkg/xtcp/pollgate_bench_test.go | 2 +- pkg/xtcp/pollgate_test.go | 104 +++++++++++++-- pkg/xtcp/pollplan.go | 115 +++++++++-------- pkg/xtcp/pollplan_test.go | 155 ++++++++++++++++------- pkg/xtcp/sockstat.go | 88 +++++++++++-- 11 files changed, 443 insertions(+), 165 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3de46d14e..d5fa1d10a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ ### New - **Per-namespace caps.** `-maxDumpBytes` (default 256 MiB) and `-maxRecordsPerNetns` (default 262144) bound one namespace's dump per poll: packets past the byte cap are drained undecoded, and records past the record cap are dropped before decode. `-maxNetns` (default 4096) bounds the namespaces tracked. At the cap, tracked namespaces keep their slots, and new ones wait for a freed slot, first come, first served. Alert on `xtcp_netns_dropped_total`. Drops are counted in `xtcp_dump_dropped_total{reason}` and `xtcp_netns_dropped_total`, with one log line per truncated dump or short reconcile. `0` turns a cap off; the matching env vars are `MAX_DUMP_BYTES`, `MAX_RECORDS_PER_NETNS` and `MAX_NETNS`. The caps are startup-only: `ConfigService.Set` keeps the running values. No healthy host should reach the defaults; a host that does now loses that namespace's excess rows, where it used to collect them all ([polling and batching](docs/polling-and-batching.md#per-namespace-caps)). -- **Socket-count gate, reconcile limits, per-owner quota.** Before each poll xtcp2 reads each namespace's sockstat (an fd opened in the namespace; `pread`, or io_uring batches with `-ioUring`) and, when the total is over `-maxRecordsPerPoll` (default 1,048,576), degrades only the namespaces over their fair share: first TIME_WAIT/SYN_RECV are not asked for, then one of K port shards is dumped per poll. `-maxNetnsPerOwner` (default 64) caps namespaces tracked per owner (the container runtime's cgroup), `-maxNetnsAddsPerReconcile` (256) the adds per reconcile, and `-reconcileTimeout` (1s) the namespace scan; a timed-out scan deletes nothing. New metrics `xtcp_poll_sockets`, `xtcp_poll_degraded_total{level}` and `xtcp_reconcile_incomplete_total{reason}`; `xtcp_netns_dropped_total` gains `reason`. `0` turns each off; all are startup-only. Each tracked namespace now holds three fds (was two), and xtcp2 warns at startup when `RLIMIT_NOFILE` can't cover them ([polling and batching](docs/polling-and-batching.md#socket-count-gate), [network namespaces](docs/network-namespaces.md#configuration)). The analysis behind an upstream all-namespace dump is in [docs/kernel](docs/kernel/inet-diag-all-netns.md). +- **Socket-count gate, reconcile limits, per-owner quota.** Before each poll xtcp2 reads each namespace's sockstat (an fd opened in the namespace; `pread`, or io_uring batches with `-ioUring`) and, when the total is over `-maxRecordsPerPoll` (default 1,048,576), degrades only the namespaces over their fair share: first TIME_WAIT/SYN_RECV are not asked for, then one of K port shards is dumped per poll. `-maxNetnsPerOwner` (default 64) caps namespaces tracked per owner (the container runtime's cgroup), `-maxNetnsAddsPerReconcile` (256) the adds per reconcile, and `-reconcileTimeout` (1s) the namespace scan; a timed-out scan deletes nothing. New metrics `xtcp_poll_sockets`, `xtcp_poll_degraded_total{level}` and `xtcp_reconcile_incomplete_total{reason}`; `xtcp_netns_dropped_total` gains `reason`. `0` turns each off; all are startup-only. Each tracked namespace now holds four fds (was two: sockstat and `ip_local_port_range` are new), and xtcp2 warns at startup when `RLIMIT_NOFILE` can't cover them ([polling and batching](docs/polling-and-batching.md#socket-count-gate), [network namespaces](docs/network-namespaces.md#configuration)). The analysis behind an upstream all-namespace dump is in [docs/kernel](docs/kernel/inet-diag-all-netns.md). - **Vulnerability check.** `checks.govulncheck` runs govulncheck against a pinned snapshot of the Go vulnerability database, with no tags and with every flavor tag, and fails on a reachable finding not in its accepted list. One is accepted: GO-2026-6859 in `net/http`, fixed in go1.27.4, until the toolchain moves. `nix run .#govulncheck-fresh` checks against the live database and runs `go mod verify`; `nix build .#sbom-` writes a CycloneDX SBOM for any binary package. ## 0.2.1 (2026-11) diff --git a/docs/kernel/inet-diag-all-netns.md b/docs/kernel/inet-diag-all-netns.md index f9469a20a..7e17cd07c 100644 --- a/docs/kernel/inet-diag-all-netns.md +++ b/docs/kernel/inet-diag-all-netns.md @@ -24,7 +24,7 @@ Today a host-wide socket monitor has to do this for every namespace: hashinfo = net->ipv4.tcp_death_row.hashinfo; /* tcp_diag.c:325 */ ``` -That is the global `tcp_hashinfo` for every namespace, unless the namespace was created while its parent had `net.ipv4.tcp_child_ehash_entries` set (`tcp_set_hashinfo()`, `net/ipv4/tcp_ipv4.c:3415-3432`; sysctl in `net/ipv4/sysctl_net_ipv4.c:1527`). Few hosts set it. +That is the global `tcp_hashinfo` for every namespace, unless the namespace was created while its parent had `net.ipv4.tcp_child_ehash_entries` set (`tcp_set_hashinfo()`, `net/ipv4/tcp_ipv4.c:3415-3432`; sysctl in `net/ipv4/sysctl_net_ipv4.c:1527`). Few hosts set it. Even then only `ehash` is the namespace's own: `inet_pernet_hashinfo_alloc()` copies the parent's `inet_hashinfo` (`kmemdup()`, `net/ipv4/inet_hashtables.c:1364`) and allocates a new `ehash` alone, so `lhash2` and `bhash2` stay host-wide. The dump makes three walks over the table, resumable across `recvmsg()` calls through `cb->args[0]` (phase), `cb->args[1]` (bucket) and `cb->args[2]` (position in bucket) (`tcp_diag.c:328-331`, `:557-558`): @@ -38,6 +38,19 @@ Empty `ehash` buckets are skipped without taking the lock (`tcp_diag.c:488`). Ev So **one namespace's dump costs O(sockets on the host)**, and polling N namespaces walks the shared table N times. A namespace holding a large socket table slows every other namespace's dump, even if those namespaces have no sockets at all. +### Measured + +`microvm-x86_64-socket-scale` (Linux 7.3.1 guest, 4 vCPUs, 8 GiB): the median wall time of `ss -tan` (15 runs, including `ss`'s own start-up) in a namespace B holding 21 sockets, while another namespace A holds loopback connections: + +| A's sockets | A's table | B's `ss -tan` | +|---|---|---| +| 0 | shared | 34 ms | +| 100,001 | shared | 64 ms | +| 500,005 | shared | 159 ms | +| 500,005 | own (`tcp_child_ehash_entries=65536`) | 54 ms | + +On the shared table B pays about 0.25 µs for each of A's sockets. With A on its own `ehash` most of that goes; the 20 ms left is consistent with phase 1 still walking the shared `bhash2`, which holds the bind buckets of A's 250k connected client sockets: `ss -a` asks for every state including `TCP_BOUND_INACTIVE` (iproute2 7.2.0 `misc/ss.c:251,6024`), and so does a request with `idiag_states` `0x3fff`. + ### Filters run before a record is built For each socket of the requester's namespace: @@ -82,7 +95,7 @@ Check this in `__inet_diag_dump_start()`, so a refused request fails before any In `tcp_diag_dump()` (`net/ipv4/tcp_diag.c:314`), with the flag set: 1. **Shared table.** Walk `tcp_hashinfo` as today, but don't apply the three namespace checks (`:350`, `:416`, `:501`). Every socket in the shared table is reported, whatever its namespace. -2. **Namespaces with their own table.** Then, under `rcu_read_lock()`, go over namespaces with `for_each_net_rcu()` (`include/net/net_namespace.h:447`) and, for each `net` where `net->ipv4.tcp_death_row.hashinfo != &tcp_hashinfo`, do the same three walks over that table. +2. **Namespaces with their own table.** Then, under `rcu_read_lock()`, go over namespaces with `for_each_net_rcu()` (`include/net/net_namespace.h:447`) and, for each `net` where `net->ipv4.tcp_death_row.hashinfo != &tcp_hashinfo`, walk that table's `ehash`. Its `lhash2` and `bhash2` are the shared ones (see above), already covered by step 1. Resuming across `recvmsg()` calls needs one more cursor: which namespace's table the walk is in. The `net` can't be held across calls without a reference. Cookies only grow, but the list isn't in cookie order: `setup_net()` takes the cookie (`net/core/net_namespace.c:440`), runs every pernet init, and only then appends the namespace under `net_rwsem` (`:446-448`). `pernet_ops_rwsem` is held for read there, so two namespaces being set up at once can be appended in either order. Two ways to resume: @@ -110,5 +123,5 @@ Resuming across `recvmsg()` calls needs one more cursor: which namespace's table ## Before any RFC - Search lore.kernel.org/netdev for earlier attempts at an all-namespace dump. -- Measure the shared-walk cost: a small namespace's `ss` time against the socket count in another namespace, with and without `tcp_child_ehash_entries` (the `microvm-x86_64-socket-scale` scenario). +- Measure the shared-walk cost on a many-core host with a production-sized `ehash` (the numbers above are from a 4-vCPU guest). - Re-check every reference here against the tree the RFC is based on. diff --git a/docs/polling-and-batching.md b/docs/polling-and-batching.md index 2a0c79392..eecc004e8 100644 --- a/docs/polling-and-batching.md +++ b/docs/polling-and-batching.md @@ -54,13 +54,13 @@ The per-namespace caps bound each dump; `-maxRecordsPerPoll` (default 1,048,576) When the counts add up to more than the budget, each namespace gets a max-min fair share: namespaces under the share are dumped in full, and only those over it are degraded, lightest step first: 1. **states** — stop asking for TIME_WAIT and SYN_RECV. The kernel drops them before building a record, so a namespace full of TIME_WAIT (or one being SYN-flooded) costs little. -2. **sample** — also split the namespace's sockets into K port shards and ask for one per poll (shard `n mod K` on the gate's n-th poll), with an inet_diag bytecode filter. A socket's shard is set by its ephemeral port (its source port if that is ≥ 32768, else its destination port), so a busy listener's connections spread over every shard, and K polls see each socket once. Sockets that share both ports, differing only by address, share a shard; `-maxRecordsPerNetns` still bounds them. +2. **sample** — also split the namespace's sockets into K port shards and ask for one per poll (shard `n mod K` on the gate's n-th poll), with an inet_diag bytecode filter. A socket's shard is set by the larger of its two ports, which is its ephemeral side whichever end it is, so a busy listener's connections spread over every shard, and K polls see each socket once. The K ranges split the namespace's own `net.ipv4.ip_local_port_range` evenly (read through an fd opened in the namespace, only for sampled namespaces; the default 32768–60999 if it can't be read), so a namespace with a widened range spreads as evenly as one with the default. Sockets that share both ports, differing only by address, share a shard; `-maxRecordsPerNetns` still bounds them. A namespace whose sockstat can't be read is assumed to be at `-maxRecordsPerNetns`. Each degraded namespace-poll adds 1 to `xtcp_poll_degraded_total{level="states"|"sample"}`, a poll that degrades anything logs one line, and `xtcp_poll_sockets` is the total counted. Sockstat doesn't count request sockets (SYN_RECV), so a SYN flood isn't visible to the gate; the per-namespace record cap still applies. With `-ioUring`, the reads are batched: `-ioUringSockstatBatchSize` (default 64) reads per `io_uring_enter`, run by at most `-ioUringSockstatWorkers` (default 4) kernel io-wq threads, since procfs reads can't be done non-blocking. On a 24-core host, a read costs about 3.3 µs by `pread` and 1.8 µs batched (4096 namespaces: 15 ms and 7 ms per poll). If the ring can't be set up, or a submit fails, xtcp2 falls back to `pread` and counts `xtcp_counts{function="poller",variable="sockstatRing"}`. -Each tracked namespace holds a third fd for its sockstat (besides its netlink socket and its goroutine's saved original namespace); xtcp2 warns at startup if `RLIMIT_NOFILE` is below 3 × `-maxNetns` + 256 (2 × with the gate off). `0` turns the gate off (no sockstat fds, no reads). The settings are startup-only, like the caps above. +Each tracked namespace holds two more fds, its sockstat and its `ip_local_port_range` (besides its netlink socket and its goroutine's saved original namespace); xtcp2 warns at startup if `RLIMIT_NOFILE` is below 4 × `-maxNetns` + 256 (2 × with the gate off). `0` turns the gate off (no sockstat fds, no reads). The settings are startup-only, like the caps above. `nix run .#microvm-x86_64-socket-scale` exercises the gate against a real kernel: a small namespace's `ss` time as another namespace grows to 500k sockets (shared TCP table, then the other namespace on its own table), xtcp2 with `-maxRecordsPerPoll` below a 500k-socket namespace, a SYN flood against a capped namespace, and one owner creating 2000 namespaces. The sockets come from `tools/sockfill`. diff --git a/nix/microvms/scripts/socket-scale-run.sh b/nix/microvms/scripts/socket-scale-run.sh index 70f18891e..9b553783e 100644 --- a/nix/microvms/scripts/socket-scale-run.sh +++ b/nix/microvms/scripts/socket-scale-run.sh @@ -94,6 +94,21 @@ sockets() { ip netns exec "$1" cat /proc/net/sockstat | awk '/^TCP:/ {print $3 + $7}' } +# tracked: namespaces xtcp2 holds now (instances started minus deleted). +# xtcp_gauge would do, but it is refreshed once a minute. +tracked() { + echo $(($(metric '^xtcp_counts[{]function="netNamespaceInstance",.*variable="start"[}]') - $(metric '^xtcp_counts[{]function="delete",.*variable="delete"[}]'))) +} + +# fill_state NAME: is NAME's sockfill alive, and ss's summary of NAME. +fill_state() { + local alive=no + if [ -n "${FILL_PID:-}" ] && kill -0 "$FILL_PID" 2>/dev/null; then + alive=yes + fi + echo "fill_alive=$alive ss=[$(ss -N "$1" -s | awk '/^TCP:/ {$1 = ""; print}' | tr -s ' ')]" +} + # metric REGEX: the sum of the /metrics samples whose line matches REGEX. metric() { curl -sf "http://$PROM/metrics" | awk -v re="$1" '$0 ~ re && $0 !~ /^#/ {s += $NF} END {printf "%d\n", s}' @@ -213,13 +228,18 @@ phase_gate() { local rss2 thr2 sample states sockets drops polls p50 rss2=$(rss_kb "$XTCP_PID") thr2=$(threads "$XTCP_PID") - sample=$(metric '^xtcp_poll_degraded_total\{level="sample"\}') - states=$(metric '^xtcp_poll_degraded_total\{level="states"\}') + sample=$(metric '^xtcp_poll_degraded_total[{]level="sample"[}]') + states=$(metric '^xtcp_poll_degraded_total[{]level="states"[}]') sockets=$(metric '^xtcp_poll_sockets ') - drops=$(metric '^xtcp_dump_dropped_total\{reason="records"\}') - polls=$(metric '^xtcp_histograms_count\{.*variable="pollToDoneDuration"') + drops=$(metric '^xtcp_dump_dropped_total[{]reason="records"[}]') + polls=$(metric '^xtcp_histograms_count[{].*variable="pollToDoneDuration"') p50=$(curl -sf "http://$PROM/metrics" | awk '/pollToDoneDuration/ && /quantile="0.5"/ {print $NF; exit}') - say "GATE mode=$mode budget=$budget a_sockets=$(sockets A) poll_sockets=$sockets sample=$sample states=$states records_dropped=$drops polls=$polls poll_p50_s=$p50 rss_kb=$rss1->$rss2 threads=$thr1->$thr2" + local a_now + a_now=$(sockets A) + say "GATE mode=$mode budget=$budget a_sockets=$a_now poll_sockets=$sockets sample=$sample states=$states records_dropped=$drops polls=$polls poll_p50_s=$p50 rss_kb=$rss1->$rss2 threads=$thr1->$thr2 $(fill_state A)" + if [ "$a_now" -lt $((GATE_PAIRS * 2)) ]; then + say "GATE_DIAG sockfill: $(tail -n 3 /tmp/fill-A.log | tr '\n' ' ') dmesg: $(dmesg | grep -iE 'tcp|oom|killed' | tail -n 5 | tr '\n' ' ')" + fi xtcp2_stop if [ "$mode" = on ]; then [ "$sample" -gt 0 ] || fail "GATE A was never sampled" @@ -266,7 +286,7 @@ phase_synflood() { inuse=$(sockets S) sleep 6 local drops - drops=$(metric '^xtcp_dump_dropped_total\{reason="records"\}') + drops=$(metric '^xtcp_dump_dropped_total[{]reason="records"[}]') say "SYNFLOOD syn_recv=$synrecv sockstat_tcp=$inuse records_dropped=$drops" xtcp2_stop kill -TERM "$listen_pid" 2>/dev/null || true @@ -294,7 +314,7 @@ phase_nsflood() { xtcp2_start || return sleep 4 local before - before=$(metric '^xtcp_gauge ') + before=$(tracked) local start=$SECONDS systemd-run --quiet --scope --slice=system.slice --unit="docker-$owner" -p TasksMax=infinity \ @@ -309,10 +329,10 @@ phase_nsflood() { say "NSFLOOD spawned=$made in $((SECONDS - start))s cgroup=$(awk -F: '{print $3}' "/proc/$(pgrep -f -n '^sleep infinity$')/cgroup")" sleep 20 - local tracked quota timeouts - tracked=$(metric '^xtcp_gauge ') - quota=$(metric '^xtcp_netns_dropped_total\{reason="owner_quota"\}') - timeouts=$(metric '^xtcp_reconcile_incomplete_total\{reason="timeout"\}') + local flood quota timeouts + flood=$(tracked) + quota=$(metric '^xtcp_netns_dropped_total[{]reason="owner_quota"[}]') + timeouts=$(metric '^xtcp_reconcile_incomplete_total[{]reason="timeout"[}]') # A late namespace from another owner must still get in. systemd-run --quiet --scope --slice=system.slice --unit="docker-$other" \ @@ -320,8 +340,8 @@ phase_nsflood() { local other_pid=$! sleep 8 local after - after=$(metric '^xtcp_gauge ') - say "NSFLOOD tracked_before=$before tracked_flood=$tracked tracked_late=$after owner_quota_dropped=$quota reconcile_timeouts=$timeouts xtcp2_threads=$(threads "$XTCP_PID") rss_kb=$(rss_kb "$XTCP_PID")" + after=$(tracked) + say "NSFLOOD tracked_before=$before tracked_flood=$flood tracked_late=$after owner_quota_dropped=$quota reconcile_timeouts=$timeouts xtcp2_threads=$(threads "$XTCP_PID") rss_kb=$(rss_kb "$XTCP_PID")" xtcp2_stop systemctl stop "docker-$owner.scope" "docker-$other.scope" 2>/dev/null || true @@ -333,12 +353,13 @@ phase_nsflood() { fail "NSFLOOD no owner_quota drops" ok=0 } - [ "$tracked" -le $((before + 64)) ] || { - fail "NSFLOOD tracked $tracked > $before + quota 64" + # The quota (64) admits exactly 64 of the owner's 2000 namespaces. + [ "$flood" -eq $((before + 64)) ] || { + fail "NSFLOOD tracked $flood, expected $before + quota 64" ok=0 } - [ "$after" -eq $((tracked + 1)) ] || { - fail "NSFLOOD the other owner's namespace was not admitted ($tracked -> $after)" + [ "$after" -eq $((flood + 1)) ] || { + fail "NSFLOOD the other owner's namespace was not admitted ($flood -> $after)" ok=0 } [ "$ok" -eq 1 ] && say "NSFLOOD_PASS" diff --git a/pkg/xtcp/ns_net_namespace.go b/pkg/xtcp/ns_net_namespace.go index c51a70dc1..f67ddcf8f 100644 --- a/pkg/xtcp/ns_net_namespace.go +++ b/pkg/xtcp/ns_net_namespace.go @@ -149,9 +149,9 @@ func (x *XTCP) netNamespaceInstance(nsCtx context.Context, nsCancel context.Canc defer x.closeSocket(socketFD) - // The sockstat fd for the socket-count gate, opened here so it is bound - // to this namespace. Closed with the socket when the namespace goes. - stat := newStatHandle(x.openSockstatFD()) + // The socket-count gate's fds, opened here so they are bound to this + // namespace. Closed with the socket when the namespace goes. + stat := x.openGateHandle() defer stat.close(x.closeFD) // https://godoc.org/golang.org/x/sys/unix#Bind @@ -190,23 +190,34 @@ func (x *XTCP) netNamespaceInstance(nsCtx context.Context, nsCancel context.Canc x.pC.WithLabelValues("netNamespaceInstance", "ctx.Done", "count").Inc() } -// openSockstat is the seam tests swap to fake or fail the sockstat open. -var openSockstat = func() (int, error) { - return unix.Open(sockstatPath, unix.O_RDONLY|unix.O_CLOEXEC, 0) +// openGateFile is the seam tests swap to fake or fail the gate's opens. +var openGateFile = func(path string) (int, error) { + return unix.Open(path, unix.O_RDONLY|unix.O_CLOEXEC, 0) } -// openSockstatFD opens the calling thread's namespace's sockstat when the -// socket-count gate is on (-maxRecordsPerPoll > 0). It returns -1 when the -// gate is off or the open fails; that namespace's count is then unknown. -func (x *XTCP) openSockstatFD() int { +// openGateHandle opens the calling thread's namespace's sockstat and +// ip_local_port_range when the socket-count gate is on +// (-maxRecordsPerPoll > 0). nil when the gate is off or sockstat can't be +// opened (that namespace's count is then unknown); without the port range, +// a sampled namespace's shards split the default range. +func (x *XTCP) openGateHandle() *statHandle { if x.config.GetMaxRecordsPerPoll() == 0 { - return -1 + return nil + } + fd := x.openGateFD(sockstatPath, "openSockstat") + if fd < 0 { + return nil } - fd, err := openSockstat() + return newStatHandle(fd, x.openGateFD(portRangePath, "openPortRange")) +} + +// openGateFD opens path, counting a failure under variable; -1 on error. +func (x *XTCP) openGateFD(path, variable string) int { + fd, err := openGateFile(path) if err != nil { - x.pC.WithLabelValues("netNamespaceInstance", "openSockstat", "error").Inc() + x.pC.WithLabelValues("netNamespaceInstance", variable, "error").Inc() if x.debugLevel > 10 { - log.Printf("openSockstatFD %s: %v", sockstatPath, err) + log.Printf("openGateHandle %s: %v", path, err) } return -1 } @@ -257,7 +268,7 @@ func (x *XTCP) openDefaultNetLinkSocket(ctx context.Context) { nsCtx, nsCancel := context.WithCancel(ctx) // xtcp2's own namespace: any unlocked thread is in it, and both fds live // as long as the daemon. - x.createNetlinkersAndStore(nsCtx, nsCancel, x.selfNsInode, os.Getpid(), &df, socketFD, newStatHandle(x.openSockstatFD())) + x.createNetlinkersAndStore(nsCtx, nsCancel, x.selfNsInode, os.Getpid(), &df, socketFD, x.openGateHandle()) // The host namespace has no netNamespaceInstance to run its locality // listener; any unlocked thread is in it. diff --git a/pkg/xtcp/pollgate.go b/pkg/xtcp/pollgate.go index 841749f41..ecd7559cc 100644 --- a/pkg/xtcp/pollgate.go +++ b/pkg/xtcp/pollgate.go @@ -21,6 +21,8 @@ type pollGate struct { counts []sockstatCount sendTo []nsSend + rangeBuf []byte // a sampled namespace's ip_local_port_range + // polls counts gated polls; it picks each sampled namespace's shard. // Not pollingLoops: that advances on every poller event (ticks, poll // requests, one netlinkerDone per namespace), so a poll could step it @@ -41,10 +43,11 @@ var newSockstatRingReader = func(batch, workers uint32) (sockstatReader, error) // fdsPerNetns is what one tracked namespace holds open for its life: its // netlink socket and the origNs snapshot its goroutine restores on exit -// (netNamespaceInstance), plus its sockstat fd with the gate on. +// (netNamespaceInstance), plus its sockstat and ip_local_port_range fds +// with the gate on. func fdsPerNetns(gate bool) uint64 { if gate { - return 3 + return 4 } return 2 } @@ -91,7 +94,7 @@ func (x *XTCP) gateEnabled() bool { // io_uring one with -ioUring, falling back to pread if the ring can't be // set up (counted). func (x *XTCP) newPollGate() *pollGate { - g := &pollGate{reqs: newPollRequests(x.nlRequest)} + g := &pollGate{reqs: newPollRequests(x.nlRequest), rangeBuf: make([]byte, portRangeBufSize)} if x.config.GetIoUring() { r, err := newSockstatRingReader(x.config.GetIoUringSockstatBatchSize(), x.config.GetIoUringSockstatWorkers()) if err == nil { @@ -131,7 +134,8 @@ func (x *XTCP) planGatedPoll() []nsSend { g.ready = append(g.ready, p) g.statFDs = append(g.statFDs, p.stat.acquire()) } - // Hold every handle's read lock until the reads are done, so a + // Hold every handle's read lock until planning is done (sockstat and, + // for sampled namespaces, port-range reads), so a // namespace torn down meanwhile can't close (and the kernel reuse) an // fd the reader is about to use. A teardown waits at most this read. defer func() { @@ -169,7 +173,16 @@ func (x *XTCP) planGatedPoll() []nsSend { if pl.unknown { unknown++ } - req, err := g.reqs.get(pl) + pr := defaultPortRange + if pl.level == pollSample { + // Read under the handle's read lock, still held (see above). + if r, ok := g.ready[i].stat.portRange(g.rangeBuf); ok { + pr = r + } else { + x.pC.WithLabelValues("poller", "portRange", "error").Inc() + } + } + req, err := g.reqs.get(pl, pr) if err != nil { // Can't happen for the fixed shard shape (it is audited); if it // does, a full request is still bounded by the receiver caps. diff --git a/pkg/xtcp/pollgate_bench_test.go b/pkg/xtcp/pollgate_bench_test.go index b6a434e79..572a5c3c3 100644 --- a/pkg/xtcp/pollgate_bench_test.go +++ b/pkg/xtcp/pollgate_bench_test.go @@ -110,7 +110,7 @@ func BenchmarkPollPrepass(b *testing.B) { binary.LittleEndian.PutUint32(req[20:24], 0x3fff) x.nlRequest = &req for i, fd := range fds { - x.nsMap.Store(uint64(i+1), netNSitem{inode: uint64(i + 1), socketFD: 100000 + i, stat: newStatHandle(fd)}) + x.nsMap.Store(uint64(i+1), netNSitem{inode: uint64(i + 1), socketFD: 100000 + i, stat: newStatHandle(fd, -1)}) } defer x.closeGate() b.ReportAllocs() diff --git a/pkg/xtcp/pollgate_test.go b/pkg/xtcp/pollgate_test.go index be95102bb..8c2141c68 100644 --- a/pkg/xtcp/pollgate_test.go +++ b/pkg/xtcp/pollgate_test.go @@ -12,6 +12,7 @@ import ( "github.com/prometheus/client_golang/prometheus/testutil" "github.com/randomizedcoder/xtcp2/pkg/xtcpnl" + "golang.org/x/sys/unix" ) // fakeKernelDump applies a captured request the way tcp_diag_dump does to @@ -52,7 +53,7 @@ type fakeSock struct { // ports, plus tw TIME_WAIT and syn SYN_RECV ones. func syntheticTable(n, tw, syn int) []fakeSock { rng := rand.New(rand.NewPCG(3, 4)) - eph := func() uint16 { return uint16(ephemeralLoCst + rng.IntN(65536-ephemeralLoCst)) } + eph := func() uint16 { return defaultPortRange.lo + uint16(rng.IntN(65536-int(defaultPortRange.lo))) } out := make([]fakeSock, 0, n+tw+syn) for range n { out = append(out, fakeSock{state: 1, sport: 443, dport: eph()}) @@ -157,7 +158,7 @@ func TestPollGateEndToEnd(t *testing.T) { if stat == 0 { stat = writeSockstat(t, n.inuse, n.tw) } - x.nsMap.Store(uint64(i+1), netNSitem{inode: uint64(i + 1), socketFD: sock, stat: newStatHandle(stat)}) + x.nsMap.Store(uint64(i+1), netNSitem{inode: uint64(i + 1), socketFD: sock, stat: newStatHandle(stat, -1)}) byFD[sock] = n } @@ -237,8 +238,8 @@ func TestPollGateShardRotation(t *testing.T) { return nil } // 500k against a ~199k share: K = 3. - x.nsMap.Store(uint64(1), netNSitem{inode: 1, socketFD: 1000, stat: newStatHandle(writeSockstat(t, "500000", "0"))}) - x.nsMap.Store(uint64(2), netNSitem{inode: 2, socketFD: 1001, stat: newStatHandle(writeSockstat(t, "1000", "0"))}) + x.nsMap.Store(uint64(1), netNSitem{inode: 1, socketFD: 1000, stat: newStatHandle(writeSockstat(t, "500000", "0"), -1)}) + x.nsMap.Store(uint64(2), netNSitem{inode: 2, socketFD: 1001, stat: newStatHandle(writeSockstat(t, "1000", "0"), -1)}) for _, l := range tc.loops { x.pollAllNetlinkSockets(l) @@ -270,7 +271,7 @@ func TestPollGateOffUnchanged(t *testing.T) { prev := sendDumpRequest t.Cleanup(func() { sendDumpRequest = prev }) sendDumpRequest = func(_ int, b []byte) error { got = append(got, b); return nil } - x.nsMap.Store(uint64(1), netNSitem{inode: 1, socketFD: 5, stat: newStatHandle(1 << 20)}) + x.nsMap.Store(uint64(1), netNSitem{inode: 1, socketFD: 5, stat: newStatHandle(1<<20, -1)}) x.pollAllNetlinkSockets(0) if len(got) != 1 || &got[0][0] != &req[0] || x.gate != nil { t.Errorf("gate off: sent %d requests (startup buffer=%v), gate=%v", len(got), len(got) == 1 && &got[0][0] == &req[0], x.gate) @@ -287,7 +288,7 @@ func TestStatHandle(t *testing.T) { }{ {name: "nil_handle", category: "B", description: "fd <= 0 gives a nil handle; acquire is -1 and release/close are no-ops", run: func(t *testing.T) { for _, fd := range []int{-1, 0} { - h := newStatHandle(fd) + h := newStatHandle(fd, -1) if h != nil || h.acquire() != -1 { t.Fatalf("fd %d: handle %v", fd, h) } @@ -295,15 +296,48 @@ func TestStatHandle(t *testing.T) { h.close(func(int) { t.Fatal("closed a nil handle") }) } }}, + {name: "port_range", category: "P", description: "the port-range fd is read at offset 0 every time", run: func(t *testing.T) { + h := newStatHandle(42, writeFile(t, "ip_local_port_range", "10000\t65000\n")) + buf := make([]byte, portRangeBufSize) + for range 2 { + h.acquire() + pr, ok := h.portRange(buf) + h.release() + if !ok || pr != (portRange{lo: 10000, hi: 65000}) { + t.Fatalf("portRange %v %v, expected 10000-65000", pr, ok) + } + } + }}, + {name: "port_range_unopened", category: "N", description: "no port-range fd: not ok (the caller uses the default)", run: func(t *testing.T) { + h := newStatHandle(42, -1) + if _, ok := h.portRange(make([]byte, portRangeBufSize)); ok { + t.Error("ok without an fd") + } + }}, + {name: "port_range_bad_fd", category: "N", description: "a port-range fd that isn't open: the read fails, not ok", run: func(t *testing.T) { + h := newStatHandle(42, 1<<20) + if _, ok := h.portRange(make([]byte, portRangeBufSize)); ok { + t.Error("ok on a bad fd") + } + }}, + {name: "close_both", category: "C", description: "close closes the sockstat and port-range fds, once each", run: func(t *testing.T) { + h := newStatHandle(42, 43) + var closed []int + h.close(func(fd int) { closed = append(closed, fd) }) + h.close(func(fd int) { closed = append(closed, fd) }) + if len(closed) != 2 || closed[0] != 42 || closed[1] != 43 { + t.Errorf("closed %v, expected [42 43]", closed) + } + }}, {name: "acquire_open", category: "P", description: "an open handle gives its fd", run: func(t *testing.T) { - h := newStatHandle(42) + h := newStatHandle(42, -1) if fd := h.acquire(); fd != 42 { t.Errorf("fd %d, expected 42", fd) } h.release() }}, {name: "close_waits_for_read", category: "C", description: "close blocks until the poll's read releases, then closes once", run: func(t *testing.T) { - h := newStatHandle(42) + h := newStatHandle(42, -1) fd := h.acquire() closed := make(chan int, 2) go h.close(func(fd int) { closed <- fd }) @@ -340,10 +374,10 @@ func TestCheckFDLimit(t *testing.T) { expectedNeed uint64 // 0: no warning }{ {name: "enough", category: "P", description: "1M fds cover 4096 namespaces with the gate", maxNetns: 4096, gate: true, soft: 1 << 20}, - {name: "low_gate", category: "N", description: "1024 fds, 4096 namespaces x 3 (socket, origNs, sockstat) + 256", maxNetns: 4096, gate: true, soft: 1024, expectedNeed: 12544}, + {name: "low_gate", category: "N", description: "1024 fds, 4096 namespaces x 4 (socket, origNs, sockstat, port range) + 256", maxNetns: 4096, gate: true, soft: 1024, expectedNeed: 16640}, {name: "low_no_gate", category: "N", description: "gate off: socket and origNs per namespace", maxNetns: 4096, soft: 1024, expectedNeed: 8448}, - {name: "exact", category: "B", description: "soft limit exactly the need", maxNetns: 100, gate: true, soft: 556}, - {name: "one_short", category: "B", description: "one below the need", maxNetns: 100, gate: true, soft: 555, expectedNeed: 556}, + {name: "exact", category: "B", description: "soft limit exactly the need", maxNetns: 100, gate: true, soft: 656}, + {name: "one_short", category: "B", description: "one below the need", maxNetns: 100, gate: true, soft: 655, expectedNeed: 656}, {name: "netns_cap_off", category: "C", description: "-maxNetns 0: unbounded, nothing to check", soft: 16}, } for _, tc := range tests { @@ -362,3 +396,51 @@ func TestCheckFDLimit(t *testing.T) { }) } } + +// writeFile writes contents to a temp file and returns an fd open on it. +func writeFile(t *testing.T, name, contents string) int { + t.Helper() + p := filepath.Join(t.TempDir(), name) + if err := os.WriteFile(p, []byte(contents), 0o600); err != nil { + t.Fatal(err) + } + fd, err := unix.Open(p, unix.O_RDONLY|unix.O_CLOEXEC, 0) + if err != nil { + t.Fatal(err) + } + t.Cleanup(func() { _ = unix.Close(fd) }) + return fd +} + +// TestParsePortRange: ip_local_port_range's "lo\thi\n". +func TestParsePortRange(t *testing.T) { + tests := []struct { + name string + category string + description string + in string + expected portRange + expectedOK bool + }{ + {name: "default", category: "P", description: "Linux's default", in: "32768\t60999\n", expected: portRange{32768, 60999}, expectedOK: true}, + {name: "wide", category: "P", description: "a tuned wide range", in: "1024\t65535\n", expected: portRange{1024, 65535}, expectedOK: true}, + {name: "spaces", category: "C", description: "spaces instead of a tab, no newline", in: "10000 65000", expected: portRange{10000, 65000}, expectedOK: true}, + {name: "equal", category: "B", description: "lo == hi, which the kernel allows", in: "5000\t5000\n", expected: portRange{5000, 5000}, expectedOK: true}, + {name: "extremes", category: "B", description: "1 and 65535", in: "1\t65535\n", expected: portRange{1, 65535}, expectedOK: true}, + {name: "zero_lo", category: "N", description: "lo 0 is outside the kernel's bounds", in: "0\t65535\n"}, + {name: "inverted", category: "N", description: "lo > hi", in: "60999\t32768\n"}, + {name: "too_big", category: "N", description: "a port over 65535", in: "1024\t65536\n"}, + {name: "one_field", category: "N", description: "only one number", in: "32768\n"}, + {name: "garbage", category: "N", description: "a trailing non-digit", in: "32768\t60999x\n"}, + {name: "empty", category: "N", description: "nothing read", in: ""}, + {name: "huge_digits", category: "C", description: "a long digit run doesn't overflow", in: "99999999999999999999999\t1\n"}, + } + for _, tc := range tests { + t.Run(tc.name, func(t *testing.T) { + got, ok := parsePortRange([]byte(tc.in)) + if ok != tc.expectedOK || got != tc.expected { + t.Errorf("%s: parsePortRange(%q) = %v, %v; expected %v, %v", tc.description, tc.in, got, ok, tc.expected, tc.expectedOK) + } + }) + } +} diff --git a/pkg/xtcp/pollplan.go b/pkg/xtcp/pollplan.go index 0d55b7fd6..8af1c4d98 100644 --- a/pkg/xtcp/pollplan.go +++ b/pkg/xtcp/pollplan.go @@ -17,8 +17,9 @@ import ( // The kernel drops them before building a record (tcp_diag.c, the // idiag_states check), so the dump is about sockstat's inuse. // 2. pollSample: also split the namespace's sockets into K port shards and -// ask for shard (poll mod K) each poll, counting gated polls, with inet_diag bytecode -// matching shardKey(sport, dport) in R_k. The K ranges partition the +// ask for shard (poll mod K) each poll, counting gated polls, with +// inet_diag bytecode matching shardKey(sport, dport) in R_k. The K +// ranges split the namespace's ip_local_port_range and partition the // port space, so K consecutive polls see every socket exactly once. // Sockets that share both ports (differing only by address) share a // shard; -maxRecordsPerNetns still bounds that. @@ -150,55 +151,60 @@ func degrade(c sockstatCount, demand, share, poll uint64) nsPlan { } } +// portRange is a namespace's net.ipv4.ip_local_port_range: the ports its +// connect()s pick from. +type portRange struct{ lo, hi uint16 } + +// defaultPortRange is Linux's default ip_local_port_range, used for a +// namespace whose range can't be read. +var defaultPortRange = portRange{lo: 32768, hi: 60999} + // shardRange is shard k of K's range of shard keys. Keys are almost all -// ephemeral ports (>= ephemeralLoCst), so the ranges split 32768..65535 -// evenly and shard 0 also takes every key below it (listeners, whose dport -// is 0, and the rare socket with no ephemeral side). -func shardRange(k, shards uint32) (lo, hi uint16) { - const span = 1<<16 - ephemeralLoCst - l := ephemeralLoCst + uint64(k)*span/uint64(shards) - h := ephemeralLoCst + uint64(k+1)*span/uint64(shards) - 1 +// the namespace's ephemeral ports, so the ranges split pr evenly; shard 0 +// also takes every key below pr.lo and shard K-1 every key above pr.hi. +// The ranges partition 0..65535 for any pr; with K wider than pr some are +// empty (lo > hi), which only costs those shards' polls. +func shardRange(k, shards uint32, pr portRange) (lo, hi uint16) { + span := uint64(pr.hi) - uint64(pr.lo) + 1 + l := uint64(pr.lo) + uint64(k)*span/uint64(shards) + h := uint64(pr.lo) + uint64(k+1)*span/uint64(shards) - 1 if k == 0 { l = 0 } + if k == shards-1 { + h = 1<<16 - 1 + } return uint16(l), uint16(h) } -// ephemeralLoCst splits the port space for sharding: a socket's shard key -// is its sport when sport >= ephemeralLoCst (a client-side ephemeral port, -// or a listener's accepted socket seen from the client) and its dport -// otherwise (a server-side socket: dport is the peer's ephemeral port). -// It covers Linux's default ip_local_port_range (32768-60999) and IANA's -// (49152-65535). Keying on the varying side spreads a busy listener's -// sockets over every shard, where keying on either port would put them all -// in the shard holding the listener's port. The split only affects the -// spread: the shards partition every socket either way. -const ephemeralLoCst = 32768 - -// shardKey is the port shardBytecode filters on. +// shardKey is the port shardBytecode filters on: the larger of the two. +// That is the ephemeral side of nearly every connection, whichever end +// this socket is: a client's sport, or an accepted socket's dport. Keying +// on the varying side spreads a busy listener's sockets over every shard, +// where keying on either port would put them all in the shard holding the +// listener's port. Unlike a fixed "sport >= 32768" split it needs no +// assumption about where the namespace's ephemeral range starts. A +// connection whose peer port is above its listener's (a listener above the +// ephemeral range) keys on the listener's port; the shards still partition +// every socket. func shardKey(sport, dport uint16) uint16 { - if sport >= ephemeralLoCst { - return sport - } - return dport + return max(sport, dport) } // shardBytecode is inet_diag bytecode for shardKey(sport, dport) in -// [lo,hi]: +// [lo,hi], that is max(sport, dport) in [lo,hi]: // -// (sport >= 32768 AND sport >= lo AND sport <= hi) OR -// (sport <= 32767 AND dport >= lo AND dport <= hi) +// sport <= hi AND dport <= hi AND (sport >= lo OR dport >= lo) // -// shaped as iproute2's ssfilter builds an OR (a; JMP; b) so every jump -// target is on the yes-chain, as the kernel's valid_cc requires: +// with the OR shaped as iproute2's ssfilter builds one (a; JMP; b) so every +// jump target is on the yes-chain, as the kernel's valid_cc requires: // -// 0 S_GE 32768 yes 8 no 28 ┐ a: a miss goes to b (offset 28) -// 8 S_GE lo yes 8 no 20 │ -// 16 S_LE hi yes 8 no 12 ┘ -// 24 JMP yes 4 no 28 a matched: jump to the end (accept) -// 28 S_LE 32767 yes 8 no 28 ┐ b: a miss jumps past the end (reject) -// 36 D_GE lo yes 8 no 20 │ -// 44 D_LE hi yes 8 no 12 ┘ falling off the end accepts +// 0 S_LE hi yes 8 no 40 a miss jumps past the end (reject) +// 8 D_LE hi yes 8 no 32 a miss jumps past the end (reject) +// 16 S_GE lo yes 8 no 12 a miss goes to D_GE (offset 28) +// 24 JMP yes 4 no 12 S_GE matched: jump to the end (accept) +// 28 D_GE lo yes 8 no 12 a miss jumps past the end (reject); +// falling off the end accepts func shardBytecode(lo, hi uint16) []byte { op := func(b []byte, code, yes uint8, no uint16) []byte { b = append(b, code, yes) @@ -206,18 +212,16 @@ func shardBytecode(lo, hi uint16) []byte { } port := func(b []byte, p uint16) []byte { return op(b, 0, 0, p) } bc := make([]byte, 0, shardBytecodeLen) - bc = port(op(bc, xtcpnl.InetDiagBcSGe, 8, 28), ephemeralLoCst) - bc = port(op(bc, xtcpnl.InetDiagBcSGe, 8, 20), lo) - bc = port(op(bc, xtcpnl.InetDiagBcSLe, 8, 12), hi) - bc = op(bc, xtcpnl.InetDiagBcJmp, 4, 28) - bc = port(op(bc, xtcpnl.InetDiagBcSLe, 8, 28), ephemeralLoCst-1) - bc = port(op(bc, xtcpnl.InetDiagBcDGe, 8, 20), lo) - bc = port(op(bc, xtcpnl.InetDiagBcDLe, 8, 12), hi) + bc = port(op(bc, xtcpnl.InetDiagBcSLe, 8, 40), hi) + bc = port(op(bc, xtcpnl.InetDiagBcDLe, 8, 32), hi) + bc = port(op(bc, xtcpnl.InetDiagBcSGe, 8, 12), lo) + bc = op(bc, xtcpnl.InetDiagBcJmp, 4, 12) + bc = port(op(bc, xtcpnl.InetDiagBcDGe, 8, 12), lo) return bc } -// shardBytecodeLen is shardBytecode's length: six port ops and a JMP. -const shardBytecodeLen = 6*2*xtcpnl.InetDiagBcOpSizeCst + xtcpnl.InetDiagBcOpSizeCst +// shardBytecodeLen is shardBytecode's length: four port ops and a JMP. +const shardBytecodeLen = 4*2*xtcpnl.InetDiagBcOpSizeCst + xtcpnl.InetDiagBcOpSizeCst // nlattrHdrSize is struct nlattr. const nlattrHdrSize = 4 @@ -231,19 +235,26 @@ const maxCachedShardRequests = 4 * maxShardsCst type pollRequests struct { full *[]byte states *[]byte - shards map[uint64]*[]byte // shards<<32 | shard + shards map[shardReqKey]*[]byte +} + +// shardReqKey is one cached shard request: shard k of K over a range. +type shardReqKey struct { + shard, shards uint32 + pr portRange } func newPollRequests(full *[]byte) *pollRequests { st := slices.Clone(*full) states := binary.LittleEndian.Uint32(st[20:24]) &^ statesDegradeMask binary.LittleEndian.PutUint32(st[20:24], states) - return &pollRequests{full: full, states: &st, shards: make(map[uint64]*[]byte)} + return &pollRequests{full: full, states: &st, shards: make(map[shardReqKey]*[]byte)} } // get returns the request for pl, building and auditing a shard request -// the first time it is needed. -func (r *pollRequests) get(pl nsPlan) (*[]byte, error) { +// the first time it is needed. pr is the namespace's port range (pollSample +// only). +func (r *pollRequests) get(pl nsPlan, pr portRange) (*[]byte, error) { switch pl.level { case pollFull: return r.full, nil @@ -251,11 +262,11 @@ func (r *pollRequests) get(pl nsPlan) (*[]byte, error) { return r.states, nil case pollSample: } - key := uint64(pl.shards)<<32 | uint64(pl.shard) + key := shardReqKey{shard: pl.shard, shards: pl.shards, pr: pr} if req, ok := r.shards[key]; ok { return req, nil } - lo, hi := shardRange(pl.shard, pl.shards) + lo, hi := shardRange(pl.shard, pl.shards, pr) bc := shardBytecode(lo, hi) if err := xtcpnl.InetDiagBcAudit(bc, false); err != nil { return nil, fmt.Errorf("shard %d/%d bytecode: %w", pl.shard, pl.shards, err) diff --git a/pkg/xtcp/pollplan_test.go b/pkg/xtcp/pollplan_test.go index 996e62688..ade176128 100644 --- a/pkg/xtcp/pollplan_test.go +++ b/pkg/xtcp/pollplan_test.go @@ -1,6 +1,7 @@ package xtcp import ( + "bytes" "encoding/binary" "math/rand/v2" "testing" @@ -188,6 +189,7 @@ func TestShardBytecode(t *testing.T) { for i := range pairs { pairs[i] = [2]uint16{uint16(rng.Uint32()), uint16(rng.Uint32())} } + ranges := []portRange{defaultPortRange, {lo: 10000, hi: 65000}, {lo: 1024, hi: 65535}, {lo: 1, hi: 65535}, {lo: 40000, hi: 40001}, {lo: 5000, hi: 5000}} match := func(bc []byte, sport, dport uint16) bool { return xtcpnl.InetDiagBcRun(bc, &xtcpnl.InetDiagEntry{Family: 2, Sport: sport, Dport: dport}) } @@ -198,34 +200,38 @@ func TestShardBytecode(t *testing.T) { description string run func(t *testing.T) }{ - {name: "audit_ok", category: "P", description: "every shard of K in {2,3,7,64,1024} passes the kernel audit without CAP_NET_ADMIN", run: func(t *testing.T) { - for _, k := range []uint32{2, 3, 7, 64, maxShardsCst} { - for i := range k { - lo, hi := shardRange(i, k) - if err := xtcpnl.InetDiagBcAudit(shardBytecode(lo, hi), false); err != nil { - t.Fatalf("K=%d k=%d: %v", k, i, err) + {name: "audit_ok", category: "P", description: "every shard of K in {2,3,7,64,1024}, over default, wide and tiny port ranges, passes the kernel audit without CAP_NET_ADMIN", run: func(t *testing.T) { + for _, pr := range ranges { + for _, k := range []uint32{2, 3, 7, 64, maxShardsCst} { + for i := range k { + lo, hi := shardRange(i, k, pr) + if err := xtcpnl.InetDiagBcAudit(shardBytecode(lo, hi), false); err != nil { + t.Fatalf("range %v K=%d k=%d: %v", pr, k, i, err) + } } } } }}, - {name: "partition_500k", category: "P", description: "K=7 over 500k pairs: every pair matched by exactly one shard, the one holding its key", run: func(t *testing.T) { + {name: "partition_500k", category: "P", description: "K=7 over 500k pairs, each range: every pair matched by exactly one shard, the one holding its key", run: func(t *testing.T) { const k = 7 - bcs := make([][]byte, k) - for i := range uint32(k) { - bcs[i] = shardBytecode(shardRange(i, k)) - } - for _, p := range pairs { - hits := 0 - for i, bc := range bcs { - if match(bc, p[0], p[1]) { - hits++ - if lo, hi := shardRange(uint32(i), k); shardKey(p[0], p[1]) < lo || shardKey(p[0], p[1]) > hi { - t.Fatalf("pair %v matched shard %d, key outside [%d,%d]", p, i, lo, hi) + for _, pr := range ranges { + bcs := make([][]byte, k) + for i := range uint32(k) { + bcs[i] = shardBytecode(shardRange(i, k, pr)) + } + for _, p := range pairs { + hits := 0 + for i, bc := range bcs { + if match(bc, p[0], p[1]) { + hits++ + if lo, hi := shardRange(uint32(i), k, pr); shardKey(p[0], p[1]) < lo || shardKey(p[0], p[1]) > hi { + t.Fatalf("range %v: pair %v matched shard %d, key outside [%d,%d]", pr, p, i, lo, hi) + } } } - } - if hits != 1 { - t.Fatalf("pair %v: %d shard hits, expected exactly 1", p, hits) + if hits != 1 { + t.Fatalf("range %v: pair %v: %d shard hits, expected exactly 1", pr, p, hits) + } } } }}, @@ -237,16 +243,19 @@ func TestShardBytecode(t *testing.T) { } } }}, - {name: "range_edges", category: "B", description: "keys 0, 65535, 32767/32768 and K=3 boundaries (43690/43691, 54613/54614) land in exactly one shard", run: func(t *testing.T) { + {name: "range_edges", category: "B", description: "keys 0, 65535, the range ends and K=3 boundaries of the default range land in exactly one shard", run: func(t *testing.T) { const k = 3 + pr := defaultPortRange + b1, _ := shardRange(1, k, pr) + b2, _ := shardRange(2, k, pr) cases := [][2]uint16{ - {80, 0}, {80, 65535}, {65535, 80}, {32768, 1}, {32767, 32767}, {80, 32768}, - {80, 43690}, {80, 43691}, {54613, 443}, {54614, 443}, + {0, 0}, {80, 65535}, {65535, 80}, {32767, 1}, {32768, 1}, {1, 60999}, {61000, 1}, + {b1 - 1, 443}, {443, b1}, {b2 - 1, 80}, {80, b2}, } for _, c := range cases { n := 0 for i := range uint32(k) { - lo, hi := shardRange(i, k) + lo, hi := shardRange(i, k, pr) key := shardKey(c[0], c[1]) in := key >= lo && key <= hi if got := match(shardBytecode(lo, hi), c[0], c[1]); got != in { @@ -261,33 +270,51 @@ func TestShardBytecode(t *testing.T) { } } }}, + {name: "ranges_partition", category: "B", description: "shardRange covers 0..65535 with no gap or overlap, for every range and K", run: func(t *testing.T) { + for _, pr := range ranges { + for _, k := range []uint32{1, 2, 3, 7, 64, maxShardsCst} { + next := 0 + for i := range k { + lo, hi := shardRange(i, k, pr) + if lo > hi { // empty: K wider than the range + continue + } + if int(lo) != next { + t.Fatalf("range %v K=%d shard %d starts at %d, expected %d", pr, k, i, lo, next) + } + next = int(hi) + 1 + } + if next != 65536 { + t.Fatalf("range %v K=%d ends at %d, expected 65535", pr, k, next-1) + } + } + } + }}, {name: "outside", category: "N", description: "server socket whose client port is outside the range: no match", run: func(t *testing.T) { if match(shardBytecode(100, 200), 443, 50000) { t.Error("matched") } }}, - {name: "single_listener", category: "C", description: "100k accepted sockets on sport 443, client ports ephemeral: spread within 10% of even over K=4", run: func(t *testing.T) { - const k = 4 - per := make([]int, k) - for _, p := range pairs[:100_000] { - dport := ephemeralLoCst + p[1]%(65536-ephemeralLoCst) - for i := range uint32(k) { - if match(shardBytecode(shardRange(i, k)), 443, dport) { - per[i]++ - } - } - } - t.Logf("per-shard records, one listener on 443: %v", per) - for i, n := range per { - if n < 22_500 || n > 27_500 { - t.Errorf("shard %d has %d of 100000, expected 25000 +-10%%: %v", i, n, per) + {name: "single_listener", category: "C", description: "100k accepted sockets on sport 443, client ports over the default range: spread within 10% of even over K=4", run: func(t *testing.T) { + spreadWithin(t, defaultPortRange, 4, 100_000, func(i int, eph uint16) (uint16, uint16) { return 443, eph }) + }}, + {name: "wide_range_loopback", category: "C", description: "ip_local_port_range 10000-65000, 250k loopback pairs to 5 listener ports (the socket-scale VM's gate namespace): both ends within 10% of even over K=3", run: func(t *testing.T) { + pr := portRange{lo: 10000, hi: 65000} + spreadWithin(t, pr, 3, 500_000, func(i int, eph uint16) (uint16, uint16) { + listener := uint16(2000 + i%5) + if i%2 == 0 { + return eph, listener // client end } - } + return listener, eph // accepted end + }) + }}, + {name: "full_range", category: "C", description: "ip_local_port_range 1024-65535 with a listener on 8080 inside it: within 10% of even over K=4", run: func(t *testing.T) { + spreadWithin(t, portRange{lo: 1024, hi: 65535}, 4, 100_000, func(i int, eph uint16) (uint16, uint16) { return 8080, eph }) }}, {name: "same_port_pair", category: "C", description: "sockets differing only by address share one shard (bounded by -maxRecordsPerNetns)", run: func(t *testing.T) { n := 0 for i := range uint32(4) { - if match(shardBytecode(shardRange(i, 4)), 443, 443) { + if match(shardBytecode(shardRange(i, 4, defaultPortRange)), 443, 443) { n++ } } @@ -313,6 +340,7 @@ func TestPollRequests(t *testing.T) { category string description string plan nsPlan + pr portRange expectedLen int expectedStates uint32 expectedShared bool // same buffer as the startup request @@ -321,12 +349,14 @@ func TestPollRequests(t *testing.T) { expectedLen: 72, expectedStates: 0x3fff, expectedShared: true}, {name: "states", category: "P", description: "states clears TIME_WAIT, SYN_RECV, NEW_SYN_RECV", plan: nsPlan{level: pollStates}, expectedLen: 72, expectedStates: 0x3fff &^ statesDegradeMask}, - {name: "sample", category: "P", description: "sample = states + a 56-byte bytecode attribute", plan: nsPlan{level: pollSample, shard: 1, shards: 3}, - expectedLen: 128, expectedStates: 0x3fff &^ statesDegradeMask}, + {name: "sample", category: "P", description: "sample = states + a 40-byte bytecode attribute", plan: nsPlan{level: pollSample, shard: 1, shards: 3}, pr: defaultPortRange, + expectedLen: 112, expectedStates: 0x3fff &^ statesDegradeMask}, + {name: "sample_wide_range", category: "C", description: "the same shard over another namespace's range is its own request", plan: nsPlan{level: pollSample, shard: 1, shards: 3}, pr: portRange{lo: 10000, hi: 65000}, + expectedLen: 112, expectedStates: 0x3fff &^ statesDegradeMask}, } for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { - req, err := r.get(tc.plan) + req, err := r.get(tc.plan, tc.pr) if err != nil { t.Fatal(err) } @@ -348,10 +378,14 @@ func TestPollRequests(t *testing.T) { if err := xtcpnl.InetDiagBcAudit(parsed.Bytecode, false); err != nil { t.Errorf("%s: audit: %v", tc.description, err) } - again, _ := r.get(tc.plan) + again, _ := r.get(tc.plan, tc.pr) if again != req { t.Errorf("%s: not cached", tc.description) } + lo, hi := shardRange(tc.plan.shard, tc.plan.shards, tc.pr) + if !bytes.Equal(parsed.Bytecode, shardBytecode(lo, hi)) { + t.Errorf("%s: bytecode is not shard %d/%d of %v", tc.description, tc.plan.shard, tc.plan.shards, tc.pr) + } } }) } @@ -359,3 +393,32 @@ func TestPollRequests(t *testing.T) { t.Error("building the degraded requests modified the startup request") } } + +// spreadWithin checks that n sockets, socket i with ports from gen(i, an +// ephemeral port drawn from pr), spread over K shards within 10% of even. +// The model is the kernel's bytecode run, not shardKey. +func spreadWithin(t *testing.T, pr portRange, k uint32, n int, gen func(i int, eph uint16) (sport, dport uint16)) { + t.Helper() + rng := rand.New(rand.NewPCG(5, 6)) + bcs := make([][]byte, k) + for i := range k { + bcs[i] = shardBytecode(shardRange(i, k, pr)) + } + per := make([]int, k) + span := int(pr.hi) - int(pr.lo) + 1 + for i := range n { + sport, dport := gen(i, pr.lo+uint16(rng.IntN(span))) + for j, bc := range bcs { + if xtcpnl.InetDiagBcRun(bc, &xtcpnl.InetDiagEntry{Family: 2, Sport: sport, Dport: dport}) { + per[j]++ + } + } + } + t.Logf("range %v K=%d per-shard: %v", pr, k, per) + even := n / int(k) + for j, c := range per { + if c < even*90/100 || c > even*110/100 { + t.Errorf("range %v: shard %d has %d of %d, expected %d +-10%%: %v", pr, j, c, n, even, per) + } + } +} diff --git a/pkg/xtcp/sockstat.go b/pkg/xtcp/sockstat.go index 17641a8f6..cf0549911 100644 --- a/pkg/xtcp/sockstat.go +++ b/pkg/xtcp/sockstat.go @@ -36,21 +36,82 @@ const sockstatBufSize = 1024 // namespace. /proc/self/net would follow the thread-group leader instead. const sockstatPath = "/proc/thread-self/net/sockstat" -// statHandle owns one namespace's sockstat fd. The poller reads it under -// the read lock; the namespace's teardown closes it under the write lock. -// So the poller never reads an fd number after it is closed, when it may -// already be reused for another file or socket. +// portRangePath is the calling thread's namespace's +// net.ipv4.ip_local_port_range. A /proc/sys/net file resolves to the +// opener's namespace (net_ctl_header_lookup, net/sysctl_net.c) and the open +// file keeps that namespace's table entry (proc_sys_call_handler reads +// PROC_I(inode)->sysctl_entry), so like sockstat, a pread later reads the +// namespace it was opened in. +const portRangePath = "/proc/sys/net/ipv4/ip_local_port_range" + +// portRangeBufSize holds "65535\t65535\n" with room to spare. +const portRangeBufSize = 32 + +// statHandle owns one namespace's gate fds: its sockstat and its +// ip_local_port_range. The poller reads them under the read lock; the +// namespace's teardown closes them under the write lock. So the poller +// never reads an fd number after it is closed, when it may already be +// reused for another file or socket. type statHandle struct { - mu sync.RWMutex - fd int + mu sync.RWMutex + fd int + rangeFD int // -1: not open; shards then split the default range } -// newStatHandle wraps fd; nil for an fd that isn't open (<= 0). -func newStatHandle(fd int) *statHandle { +// newStatHandle wraps the sockstat fd and the port-range fd; nil when the +// sockstat fd isn't open (<= 0). rangeFD may be -1. +func newStatHandle(fd, rangeFD int) *statHandle { if fd <= 0 { return nil } - return &statHandle{fd: fd} + return &statHandle{fd: fd, rangeFD: rangeFD} +} + +// portRange reads the namespace's ip_local_port_range into buf. The caller +// holds the read lock (acquire). ok is false when the fd isn't open, the +// read fails or the contents don't parse. +func (h *statHandle) portRange(buf []byte) (portRange, bool) { + if h == nil || h.rangeFD <= 0 { + return portRange{}, false + } + n, err := unix.Pread(h.rangeFD, buf, 0) + if err != nil || n <= 0 { + return portRange{}, false + } + return parsePortRange(buf[:n]) +} + +// parsePortRange parses ip_local_port_range ("lo\thi\n"). The kernel +// keeps 1 <= lo <= hi <= 65535 (ipv4_local_port_range); anything else is +// rejected. +func parsePortRange(b []byte) (portRange, bool) { + var v [2]uint64 + i := 0 + for f := range v { + for i < len(b) && (b[i] == ' ' || b[i] == '\t') { + i++ + } + start := i + for i < len(b) && b[i] >= '0' && b[i] <= '9' { + v[f] = v[f]*10 + uint64(b[i]-'0') + if v[f] > 65535 { + return portRange{}, false + } + i++ + } + if i == start { + return portRange{}, false + } + } + for ; i < len(b); i++ { + if b[i] != ' ' && b[i] != '\t' && b[i] != '\n' { + return portRange{}, false + } + } + if v[0] == 0 || v[0] > v[1] { + return portRange{}, false + } + return portRange{lo: uint16(v[0]), hi: uint16(v[1])}, true } // acquire read-locks h and returns its fd, or -1 once closed. Every @@ -69,18 +130,21 @@ func (h *statHandle) release() { } } -// close waits out a poll's read, then closes the fd. nil-safe, idempotent. +// close waits out a poll's read, then closes the fds. nil-safe, idempotent. func (h *statHandle) close(closeFD func(int)) { if h == nil { return } h.mu.Lock() - fd := h.fd - h.fd = -1 + fd, rangeFD := h.fd, h.rangeFD + h.fd, h.rangeFD = -1, -1 h.mu.Unlock() if fd > 0 { closeFD(fd) } + if rangeFD > 0 { + closeFD(rangeFD) + } } // sockstatCount is one namespace's TCP socket count. From 3b1288ab97c46609643179f0bb178194a5283b8a Mon Sep 17 00:00:00 2001 From: "randomizedcoder dave.seddon.ca@gmail.com" Date: Fri, 13 Nov 2026 19:46:19 -0800 Subject: [PATCH 19/19] fix(sockfill): turn off TCP keepalive on held connections Go enables keepalive by default (15s idle, 15s interval, 9 probes). At 500k connections that is ~33k probes/s; probes lost while the host runs a full dump reset idle connections to CLOSE, so the gate-off phase of the socket-scale VM lost 211k sockets mid-measurement. TestFill now checks SO_KEEPALIVE is off on both ends. Co-Authored-By: Claude Opus 5.5 --- tools/sockfill/sockfill.go | 15 ++++++++++++--- tools/sockfill/sockfill_test.go | 25 +++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 3 deletions(-) diff --git a/tools/sockfill/sockfill.go b/tools/sockfill/sockfill.go index bee94aa44..375157111 100644 --- a/tools/sockfill/sockfill.go +++ b/tools/sockfill/sockfill.go @@ -12,6 +12,9 @@ // connections stay in SYN_RECV). The backlog is the namespace's // net.core.somaxconn. // +// Keepalive is off on every connection, so the sockets stay idle and +// established for as long as they are held. +// // On exit every socket is closed with SO_LINGER 0, so it is reset rather than // left in TIME_WAIT: TIME_WAIT sockets stay in the host-wide TCP table and // would skew the next measurement. @@ -39,6 +42,12 @@ const ( defaultListenBase = 2000 defaultDialers = 128 fdMargin = 256 + + // noKeepAlive turns off the TCP keepalive Go enables by default (15s + // idle, 15s interval, 9 probes). At 500k connections that is ~33k + // probes a second of background traffic; probes lost while the host is + // busy (a full dump of the table) reset idle connections to CLOSE. + noKeepAlive = -1 ) // listenersNeeded is how many listener ports N client connections need when @@ -105,7 +114,7 @@ func (f *filler) fill(ctx context.Context, host string, base, pairs, perPort, di addrs := make([]string, 0, n) accepted := make(chan error, n) for i := 0; i < n; i++ { - var lc net.ListenConfig + lc := net.ListenConfig{KeepAlive: noKeepAlive} l, err := lc.Listen(ctx, "tcp4", net.JoinHostPort(host, strconv.Itoa(base+i))) if err != nil { return fmt.Errorf("listen %d: %w", base+i, err) @@ -133,7 +142,7 @@ func (f *filler) fill(ctx context.Context, host string, base, pairs, perPort, di wg.Add(1) go func() { defer wg.Done() - var d net.Dialer + d := net.Dialer{KeepAlive: noKeepAlive} for a := range jobs { c, err := d.DialContext(ctx, "tcp4", a) if err != nil { @@ -217,7 +226,7 @@ func run(ctx context.Context, pairs, perPort, base, dialers int, host, listen st start := time.Now() switch { case listen != "": - var lc net.ListenConfig + lc := net.ListenConfig{KeepAlive: noKeepAlive} l, err := lc.Listen(ctx, "tcp4", listen) if err != nil { return err diff --git a/tools/sockfill/sockfill_test.go b/tools/sockfill/sockfill_test.go index 0439ff6f4..3615ffd0f 100644 --- a/tools/sockfill/sockfill_test.go +++ b/tools/sockfill/sockfill_test.go @@ -6,6 +6,8 @@ import ( "strconv" "testing" "time" + + "golang.org/x/sys/unix" ) func TestListenersNeeded(t *testing.T) { @@ -84,6 +86,11 @@ func TestFill(t *testing.T) { if got := f.count(); got != tc.expected { t.Errorf("%s: %d sockets, expected %d", tc.description, got, tc.expected) } + for _, c := range f.conns { + if keepAlive(t, c) { + t.Fatalf("%s: SO_KEEPALIVE on %v, expected off on both ends", tc.description, c.LocalAddr()) + } + } f.closeAll() if f.count() != 0 || len(f.listeners) != 0 { t.Errorf("%s: closeAll left %d conns, %d listeners", tc.description, f.count(), len(f.listeners)) @@ -158,3 +165,21 @@ func freePortRun(t *testing.T, n int) int { t.Fatalf("no run of %d free ports", n) return 0 } + +// keepAlive reports SO_KEEPALIVE on c. +func keepAlive(t *testing.T, c *net.TCPConn) bool { + t.Helper() + rc, err := c.SyscallConn() + if err != nil { + t.Fatal(err) + } + var v int + var serr error + if err := rc.Control(func(fd uintptr) { v, serr = unix.GetsockoptInt(int(fd), unix.SOL_SOCKET, unix.SO_KEEPALIVE) }); err != nil { + t.Fatal(err) + } + if serr != nil { + t.Fatal(serr) + } + return v != 0 +}