From 261493682c7dc54db3a07079315e009a2e7c1573 Mon Sep 17 00:00:00 2001 From: Luca Cominardi Date: Wed, 12 Feb 2025 17:54:42 +0100 Subject: [PATCH] Adopt the different congestion control defaults as in Rust (#913) * Adopt the different congestion control defaults as in Rust * Point to eclipse/zenoh main * Fix zenoh-ext default-features import in Cargo.toml * Add internal functions to return default congestion contorl value * Set default congestion control constant to drop as in Rust * Reintroduce unstable and shared-memory features * Add default-features in build-resources/opaque-types/Cargo.toml --- Cargo.lock | 60 ++++++++++++------------- Cargo.toml | 2 +- Cargo.toml.in | 2 +- build-resources/opaque-types/Cargo.lock | 60 ++++++++++++------------- build-resources/opaque-types/Cargo.toml | 13 +++--- include/zenoh_commons.h | 15 +++++++ include/zenoh_constants.h | 2 +- src/advanced_publisher.rs | 2 +- src/commons.rs | 18 ++++++++ src/get.rs | 2 +- src/publisher.rs | 2 +- src/put.rs | 4 +- src/querier.rs | 2 +- src/queryable.rs | 4 +- 14 files changed, 111 insertions(+), 77 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cec1b9b4a..8667704c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3819,7 +3819,7 @@ dependencies = [ [[package]] name = "zenoh" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "ahash", "async-trait", @@ -3867,7 +3867,7 @@ dependencies = [ [[package]] name = "zenoh-buffers" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "zenoh-collections", ] @@ -3904,7 +3904,7 @@ dependencies = [ [[package]] name = "zenoh-codec" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "tracing", "uhlc", @@ -3916,12 +3916,12 @@ dependencies = [ [[package]] name = "zenoh-collections" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" [[package]] name = "zenoh-config" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "json5", "num_cpus", @@ -3944,7 +3944,7 @@ dependencies = [ [[package]] name = "zenoh-core" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "lazy_static", "tokio", @@ -3955,7 +3955,7 @@ dependencies = [ [[package]] name = "zenoh-crypto" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "aes", "hmac", @@ -3968,7 +3968,7 @@ dependencies = [ [[package]] name = "zenoh-ext" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "bincode", @@ -3987,7 +3987,7 @@ dependencies = [ [[package]] name = "zenoh-keyexpr" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "getrandom", "hashbrown 0.14.5", @@ -4002,7 +4002,7 @@ dependencies = [ [[package]] name = "zenoh-link" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "zenoh-config", "zenoh-link-commons", @@ -4022,7 +4022,7 @@ dependencies = [ [[package]] name = "zenoh-link-commons" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "flume", @@ -4046,7 +4046,7 @@ dependencies = [ [[package]] name = "zenoh-link-quic" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "base64 0.22.1", @@ -4073,7 +4073,7 @@ dependencies = [ [[package]] name = "zenoh-link-serial" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "tokio", @@ -4091,7 +4091,7 @@ dependencies = [ [[package]] name = "zenoh-link-tcp" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "socket2 0.5.7", @@ -4108,7 +4108,7 @@ dependencies = [ [[package]] name = "zenoh-link-tls" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "base64 0.22.1", @@ -4137,7 +4137,7 @@ dependencies = [ [[package]] name = "zenoh-link-udp" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "socket2 0.5.7", @@ -4156,7 +4156,7 @@ dependencies = [ [[package]] name = "zenoh-link-unixpipe" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "advisory-lock", "async-trait", @@ -4178,7 +4178,7 @@ dependencies = [ [[package]] name = "zenoh-link-unixsock_stream" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "nix 0.29.0", @@ -4196,7 +4196,7 @@ dependencies = [ [[package]] name = "zenoh-link-vsock" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "libc", @@ -4214,7 +4214,7 @@ dependencies = [ [[package]] name = "zenoh-link-ws" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "futures-util", @@ -4234,7 +4234,7 @@ dependencies = [ [[package]] name = "zenoh-macros" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "proc-macro2", "quote", @@ -4245,7 +4245,7 @@ dependencies = [ [[package]] name = "zenoh-plugin-trait" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "git-version", "libloading", @@ -4261,7 +4261,7 @@ dependencies = [ [[package]] name = "zenoh-protocol" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "const_format", "rand", @@ -4275,7 +4275,7 @@ dependencies = [ [[package]] name = "zenoh-result" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "anyhow", ] @@ -4283,7 +4283,7 @@ dependencies = [ [[package]] name = "zenoh-runtime" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "lazy_static", "ron", @@ -4297,7 +4297,7 @@ dependencies = [ [[package]] name = "zenoh-shm" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "advisory-lock", "async-trait", @@ -4320,7 +4320,7 @@ dependencies = [ [[package]] name = "zenoh-sync" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "event-listener 5.3.1", "futures", @@ -4333,7 +4333,7 @@ dependencies = [ [[package]] name = "zenoh-task" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "futures", "tokio", @@ -4346,7 +4346,7 @@ dependencies = [ [[package]] name = "zenoh-transport" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "crossbeam-utils", @@ -4380,7 +4380,7 @@ dependencies = [ [[package]] name = "zenoh-util" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "const_format", diff --git a/Cargo.toml b/Cargo.toml index 7c2fa762a..84e81a2c7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -75,7 +75,7 @@ tokio = "*" unwrap-infallible = "0.1.5" const_format = "0.2.32" zenoh = { version = "1.2.0", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", default-features = false, features = ["internal"] } -zenoh-ext = { version = "1.2.0", git = "https://github.com/eclipse-zenoh/zenoh.git", features=["internal"], branch = "main" } +zenoh-ext = { version = "1.2.0", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", default-features=false, features=["internal"] } zenoh-runtime = { version = "1.2.0", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main" } zenoh-util = { version = "1.2.0", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main" } flume = "*" diff --git a/Cargo.toml.in b/Cargo.toml.in index d85070f3e..6fcc8459b 100644 --- a/Cargo.toml.in +++ b/Cargo.toml.in @@ -75,7 +75,7 @@ tokio = "*" unwrap-infallible = "0.1.5" const_format = "0.2.32" zenoh = { version = "1.2.0", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", default-features = false, features = ["internal"] } -zenoh-ext = { version = "1.2.0", git = "https://github.com/eclipse-zenoh/zenoh.git", features=["internal"], branch = "main" } +zenoh-ext = { version = "1.2.0", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", default-features=false, features=["internal"] } zenoh-runtime = { version = "1.2.0", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main" } zenoh-util = { version = "1.2.0", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main" } flume = "*" diff --git a/build-resources/opaque-types/Cargo.lock b/build-resources/opaque-types/Cargo.lock index d1faf772c..0f963c210 100644 --- a/build-resources/opaque-types/Cargo.lock +++ b/build-resources/opaque-types/Cargo.lock @@ -3287,7 +3287,7 @@ dependencies = [ [[package]] name = "zenoh" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "ahash", "async-trait", @@ -3335,7 +3335,7 @@ dependencies = [ [[package]] name = "zenoh-buffers" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "zenoh-collections", ] @@ -3343,7 +3343,7 @@ dependencies = [ [[package]] name = "zenoh-codec" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "tracing", "uhlc", @@ -3355,12 +3355,12 @@ dependencies = [ [[package]] name = "zenoh-collections" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" [[package]] name = "zenoh-config" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "json5", "num_cpus", @@ -3383,7 +3383,7 @@ dependencies = [ [[package]] name = "zenoh-core" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "lazy_static", "tokio", @@ -3394,7 +3394,7 @@ dependencies = [ [[package]] name = "zenoh-crypto" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "aes", "hmac", @@ -3407,7 +3407,7 @@ dependencies = [ [[package]] name = "zenoh-ext" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "bincode", @@ -3426,7 +3426,7 @@ dependencies = [ [[package]] name = "zenoh-keyexpr" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "getrandom", "hashbrown 0.14.5", @@ -3441,7 +3441,7 @@ dependencies = [ [[package]] name = "zenoh-link" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "zenoh-config", "zenoh-link-commons", @@ -3461,7 +3461,7 @@ dependencies = [ [[package]] name = "zenoh-link-commons" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "flume", @@ -3485,7 +3485,7 @@ dependencies = [ [[package]] name = "zenoh-link-quic" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "base64 0.22.1", @@ -3512,7 +3512,7 @@ dependencies = [ [[package]] name = "zenoh-link-serial" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "tokio", @@ -3530,7 +3530,7 @@ dependencies = [ [[package]] name = "zenoh-link-tcp" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "socket2", @@ -3547,7 +3547,7 @@ dependencies = [ [[package]] name = "zenoh-link-tls" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "base64 0.22.1", @@ -3576,7 +3576,7 @@ dependencies = [ [[package]] name = "zenoh-link-udp" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "socket2", @@ -3595,7 +3595,7 @@ dependencies = [ [[package]] name = "zenoh-link-unixpipe" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "advisory-lock", "async-trait", @@ -3617,7 +3617,7 @@ dependencies = [ [[package]] name = "zenoh-link-unixsock_stream" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "nix 0.29.0", @@ -3635,7 +3635,7 @@ dependencies = [ [[package]] name = "zenoh-link-vsock" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "libc", @@ -3653,7 +3653,7 @@ dependencies = [ [[package]] name = "zenoh-link-ws" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "futures-util", @@ -3673,7 +3673,7 @@ dependencies = [ [[package]] name = "zenoh-macros" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "proc-macro2", "quote", @@ -3684,7 +3684,7 @@ dependencies = [ [[package]] name = "zenoh-plugin-trait" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "git-version", "libloading", @@ -3700,7 +3700,7 @@ dependencies = [ [[package]] name = "zenoh-protocol" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "const_format", "rand", @@ -3714,7 +3714,7 @@ dependencies = [ [[package]] name = "zenoh-result" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "anyhow", ] @@ -3722,7 +3722,7 @@ dependencies = [ [[package]] name = "zenoh-runtime" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "lazy_static", "ron", @@ -3736,7 +3736,7 @@ dependencies = [ [[package]] name = "zenoh-shm" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "advisory-lock", "async-trait", @@ -3759,7 +3759,7 @@ dependencies = [ [[package]] name = "zenoh-sync" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "event-listener", "futures", @@ -3772,7 +3772,7 @@ dependencies = [ [[package]] name = "zenoh-task" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "futures", "tokio", @@ -3785,7 +3785,7 @@ dependencies = [ [[package]] name = "zenoh-transport" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "crossbeam-utils", @@ -3819,7 +3819,7 @@ dependencies = [ [[package]] name = "zenoh-util" version = "1.2.1" -source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#3bbf6af729e38cc28769fc6869c293bfaa062326" +source = "git+https://github.com/eclipse-zenoh/zenoh.git?branch=main#024bcf52b259c04522f547864cd7746d81b21f2a" dependencies = [ "async-trait", "const_format", diff --git a/build-resources/opaque-types/Cargo.toml b/build-resources/opaque-types/Cargo.toml index c83517926..bb1582418 100644 --- a/build-resources/opaque-types/Cargo.toml +++ b/build-resources/opaque-types/Cargo.toml @@ -6,10 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [features] -shared-memory = [ - "zenoh/shared-memory", - "zenoh-protocol/shared-memory", -] +shared-memory = ["zenoh/shared-memory", "zenoh-protocol/shared-memory"] unstable = ["zenoh/unstable", "zenoh-ext/unstable"] auth_pubkey = ["zenoh/auth_pubkey"] auth_usrpwd = ["zenoh/auth_usrpwd"] @@ -30,8 +27,12 @@ panic = [ default = ["zenoh/default"] [dependencies] -zenoh = { version = "1.2.0", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", default-features = false, features = ["internal"] } -zenoh-ext = { version = "1.2.0", git = "https://github.com/eclipse-zenoh/zenoh.git", features=["internal"], branch = "main" } +zenoh = { version = "1.2.0", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", default-features = false, features = [ + "internal", +] } +zenoh-ext = { version = "1.2.0", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main", default-features = false, features = [ + "internal", +] } zenoh-protocol = { version = "1.2.0", git = "https://github.com/eclipse-zenoh/zenoh.git", branch = "main" } const_format = "0.2.32" flume = "*" diff --git a/include/zenoh_commons.h b/include/zenoh_commons.h index 1a7883660..7726af95c 100644 --- a/include/zenoh_commons.h +++ b/include/zenoh_commons.h @@ -2969,6 +2969,21 @@ ZENOHC_API bool z_internal_config_check(const struct z_owned_config_t *this_); * Constructs config in its gravestone state. */ ZENOHC_API void z_internal_config_null(struct z_owned_config_t *this_); +/** + * Returns the default congestion control value of zenoh push network messages, typically used for put operations. + */ +ZENOHC_API +enum z_congestion_control_t z_internal_congestion_control_default_push(void); +/** + * Returns the default congestion control value of zenoh request network messages, typically used for get operations. + */ +ZENOHC_API +enum z_congestion_control_t z_internal_congestion_control_default_request(void); +/** + * Returns the default congestion control value of zenoh response network messages, typically used for reply operations. + */ +ZENOHC_API +enum z_congestion_control_t z_internal_congestion_control_default_response(void); /** * Returns ``true`` if encoding is in non-default state, ``false`` otherwise. */ diff --git a/include/zenoh_constants.h b/include/zenoh_constants.h index aa108be81..a1b903175 100644 --- a/include/zenoh_constants.h +++ b/include/zenoh_constants.h @@ -12,7 +12,7 @@ // ZettaScale Zenoh Team, #pragma once -#define Z_CONGESTION_CONTROL_DEFAULT Z_CONGESTION_CONTROL_BLOCK +#define Z_CONGESTION_CONTROL_DEFAULT Z_CONGESTION_CONTROL_DROP #define Z_CONSOLIDATION_MODE_DEFAULT Z_CONSOLIDATION_MODE_AUTO #define Z_PRIORITY_DEFAULT Z_PRIORITY_DATA #define Z_QUERY_TARGET_DEFAULT Z_QUERY_TARGET_BEST_MATCHING diff --git a/src/advanced_publisher.rs b/src/advanced_publisher.rs index a571047bb..36994ff50 100644 --- a/src/advanced_publisher.rs +++ b/src/advanced_publisher.rs @@ -54,7 +54,7 @@ impl Default for ze_advanced_publisher_cache_options_t { Self { is_enabled: true, max_samples: 1, - congestion_control: CongestionControl::default().into(), + congestion_control: CongestionControl::DEFAULT_PUSH.into(), priority: Priority::default().into(), is_express: false, } diff --git a/src/commons.rs b/src/commons.rs index a932d7d1c..4428bd5db 100644 --- a/src/commons.rs +++ b/src/commons.rs @@ -519,6 +519,24 @@ pub enum z_congestion_control_t { DROP, } +/// Returns the default congestion control value of zenoh push network messages, typically used for put operations. +#[no_mangle] +pub extern "C" fn z_internal_congestion_control_default_push() -> z_congestion_control_t { + CongestionControl::DEFAULT_PUSH.into() +} + +/// Returns the default congestion control value of zenoh request network messages, typically used for get operations. +#[no_mangle] +pub extern "C" fn z_internal_congestion_control_default_request() -> z_congestion_control_t { + CongestionControl::DEFAULT_REQUEST.into() +} + +/// Returns the default congestion control value of zenoh response network messages, typically used for reply operations. +#[no_mangle] +pub extern "C" fn z_internal_congestion_control_default_response() -> z_congestion_control_t { + CongestionControl::DEFAULT_RESPONSE.into() +} + impl From for z_congestion_control_t { fn from(cc: CongestionControl) -> Self { match cc { diff --git a/src/get.rs b/src/get.rs index 90c110d63..f6a6702c2 100644 --- a/src/get.rs +++ b/src/get.rs @@ -239,7 +239,7 @@ pub extern "C" fn z_get_options_default(this_: &mut MaybeUninit this_.write(z_get_options_t { target: QueryTarget::default().into(), consolidation: QueryConsolidation::default().into(), - congestion_control: CongestionControl::default().into(), + congestion_control: CongestionControl::DEFAULT_REQUEST.into(), #[cfg(feature = "unstable")] allowed_destination: zc_locality_default(), #[cfg(feature = "unstable")] diff --git a/src/publisher.rs b/src/publisher.rs index ccb9d48dc..fc62b554f 100644 --- a/src/publisher.rs +++ b/src/publisher.rs @@ -67,7 +67,7 @@ impl Default for z_publisher_options_t { fn default() -> Self { Self { encoding: None, - congestion_control: CongestionControl::default().into(), + congestion_control: CongestionControl::DEFAULT_PUSH.into(), priority: Priority::default().into(), is_express: false, #[cfg(feature = "unstable")] diff --git a/src/put.rs b/src/put.rs index c27eb0f28..1b3422eca 100644 --- a/src/put.rs +++ b/src/put.rs @@ -67,7 +67,7 @@ pub struct z_put_options_t { pub extern "C" fn z_put_options_default(this_: &mut MaybeUninit) { this_.write(z_put_options_t { encoding: None, - congestion_control: CongestionControl::default().into(), + congestion_control: CongestionControl::DEFAULT_PUSH.into(), priority: Priority::default().into(), is_express: false, timestamp: None, @@ -164,7 +164,7 @@ pub struct z_delete_options_t { #[allow(clippy::missing_safety_doc)] pub unsafe extern "C" fn z_delete_options_default(this_: &mut MaybeUninit) { this_.write(z_delete_options_t { - congestion_control: CongestionControl::default().into(), + congestion_control: CongestionControl::DEFAULT_PUSH.into(), priority: Priority::default().into(), is_express: false, timestamp: None, diff --git a/src/querier.rs b/src/querier.rs index dca93774a..632bce671 100644 --- a/src/querier.rs +++ b/src/querier.rs @@ -75,7 +75,7 @@ pub extern "C" fn z_querier_options_default(this_: &mut MaybeUninit) { this_.write(z_query_reply_options_t { encoding: None, - congestion_control: CongestionControl::Block.into(), + congestion_control: CongestionControl::DEFAULT_RESPONSE.into(), priority: Priority::default().into(), is_express: false, timestamp: None, @@ -209,7 +209,7 @@ pub extern "C" fn z_query_reply_del_options_default( this: &mut MaybeUninit, ) { this.write(z_query_reply_del_options_t { - congestion_control: CongestionControl::Block.into(), + congestion_control: CongestionControl::DEFAULT_RESPONSE.into(), priority: Priority::default().into(), is_express: false, timestamp: None,