From 5e7e846e52cd42411144ad2c0397deff6fb10ba5 Mon Sep 17 00:00:00 2001 From: Sven Friedrich Date: Thu, 20 Jun 2024 11:29:20 +0200 Subject: [PATCH 1/8] chore: update to 24.05 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'devshell': 'github:numtide/devshell/83cb93d6d063ad290beee669f4badf9914cc16ec' (2024-01-15) → 'github:numtide/devshell/1ebbe68d57457c8cae98145410b164b5477761f4' (2024-06-03) • Updated input 'fenix': 'github:nix-community/fenix/7e29c0af8b70147f1f23c1387a0d774209889d1b' (2024-01-31) → 'github:nix-community/fenix/ab655c627777ab5f9964652fe23bbb1dfbd687a8' (2024-06-08) • Updated input 'fenix/rust-analyzer-src': 'github:rust-lang/rust-analyzer/9a832c47e85e94496e10e1e81636d3d89afeb0d4' (2024-01-30) → 'github:rust-lang/rust-analyzer/48bbdd6a74f3176987d5c809894ac33957000d19' (2024-06-05) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/f4a8d6d5324c327dcc2d863eb7f3cc06ad630df4' (2024-01-29) → 'github:NixOS/nixpkgs/938aa157bbd6e3c6fd7dcb77998b1f92c2ad1631' (2024-06-18) • Updated input 'utils': 'github:numtide/flake-utils/1ef2e671c3b0c19053962c07dbda38332dcebf26' (2024-01-15) → 'github:numtide/flake-utils/b1d9ab70662946ef0850d488da1c9019f3a9752a' (2024-03-11) • Updated input 'xng-utils': 'github:aeronautical-informatics/xng-flake-utils/9ffb09e6b03a65aea3064af68cce13702e495018' (2023-11-23) → 'github:aeronautical-informatics/xng-flake-utils/81a02c7c9cda02670e93c31388ea26f9284578ed' (2024-05-21) --- flake.lock | 38 +++++++++++++++++++------------------- flake.nix | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/flake.lock b/flake.lock index 7850ef6..2b57fd6 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ ] }, "locked": { - "lastModified": 1705332421, - "narHash": "sha256-USpGLPme1IuqG78JNqSaRabilwkCyHmVWY0M9vYyqEA=", + "lastModified": 1717408969, + "narHash": "sha256-Q0OEFqe35fZbbRPPRdrjTUUChKVhhWXz3T9ZSKmaoVY=", "owner": "numtide", "repo": "devshell", - "rev": "83cb93d6d063ad290beee669f4badf9914cc16ec", + "rev": "1ebbe68d57457c8cae98145410b164b5477761f4", "type": "github" }, "original": { @@ -29,11 +29,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1706682087, - "narHash": "sha256-9AQQhjTRcVlqwOxM8im6wR+vDT1N0efUX7pvAyfAzLE=", + "lastModified": 1717827974, + "narHash": "sha256-ixopuTeTouxqTxfMuzs6IaRttbT8JqRW5C9Q/57WxQw=", "owner": "nix-community", "repo": "fenix", - "rev": "7e29c0af8b70147f1f23c1387a0d774209889d1b", + "rev": "ab655c627777ab5f9964652fe23bbb1dfbd687a8", "type": "github" }, "original": { @@ -114,16 +114,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1706515015, - "narHash": "sha256-eFfY5A7wlYy3jD/75lx6IJRueg4noE+jowl0a8lIlVo=", + "lastModified": 1718717462, + "narHash": "sha256-qddfQLMaWR2gxfEzUM/zFZVK6H1kTv9WBQSBQxbP3MU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f4a8d6d5324c327dcc2d863eb7f3cc06ad630df4", + "rev": "938aa157bbd6e3c6fd7dcb77998b1f92c2ad1631", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-23.11", + "ref": "nixos-24.05", "repo": "nixpkgs", "type": "github" } @@ -141,11 +141,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1706641601, - "narHash": "sha256-/4U323L9F6wlBGvGBoE3+D6Af+dLJA+mq0QXbuNxohc=", + "lastModified": 1717583671, + "narHash": "sha256-+lRAmz92CNUxorqWusgJbL9VE1eKCnQQojglRemzwkw=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "9a832c47e85e94496e10e1e81636d3d89afeb0d4", + "rev": "48bbdd6a74f3176987d5c809894ac33957000d19", "type": "github" }, "original": { @@ -190,11 +190,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -210,11 +210,11 @@ ] }, "locked": { - "lastModified": 1700751091, - "narHash": "sha256-bA3Jyq/slQg3RP4RqloAnRv6sJbIDLITsS39CsisFi0=", + "lastModified": 1716295447, + "narHash": "sha256-50p9vUIV9EHVqK+iRkC7i2MT0gOHXZHtqgvSb96Nxoc=", "owner": "aeronautical-informatics", "repo": "xng-flake-utils", - "rev": "9ffb09e6b03a65aea3064af68cce13702e495018", + "rev": "81a02c7c9cda02670e93c31388ea26f9284578ed", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 980778c..dcc052b 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "a653rs-router"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; utils.url = "github:numtide/flake-utils"; devshell = { url = "github:numtide/devshell"; From e674d0049eec0022c5b8e2b247d14d4191b9e164 Mon Sep 17 00:00:00 2001 From: Sven Friedrich Date: Thu, 20 Jun 2024 11:25:49 +0200 Subject: [PATCH 2/8] chore: update dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'hypervisor': 'github:florianhartung/a653rs-linux/6b1fe4f5ead5e1a7732a63a331bb46839dccb431' (2024-01-31) → 'github:DLR-FT/a653rs-linux/fd4869c62af9523e9e0f7fc15b86e33723d3b54d' (2024-06-20) • Updated input 'hypervisor/naersk': 'git+https://github.com/nix-community/naersk.git?ref=refs/heads/master&rev=aeb58d5e8faead8980a807c840232697982d47b9' (2023-10-27) → 'git+https://github.com/nix-community/naersk.git?ref=refs/heads/master&rev=fa19d8c135e776dc97f4dcca08656a0eeb28d5c0' (2024-05-30) --- Cargo.lock | 575 ++++++++++++++----------------------- Cargo.toml | 8 +- a653rs-router/src/ports.rs | 20 +- cargo-lock.nix | 3 - flake.lock | 19 +- flake.nix | 3 +- 6 files changed, 230 insertions(+), 398 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8beff2f..185c225 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "a653rs" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f1d0e39b5494bfd9fe7c4f3939bfa2d62f3bd05c5d8a45c3f0cf6afc24a6bc4" +checksum = "7bc01911bf2a5ee88515fc554262c751e87d7564093112a86d3c04716847e389" dependencies = [ "serde", "strum", @@ -15,7 +15,8 @@ dependencies = [ [[package]] name = "a653rs-linux" version = "0.2.0" -source = "git+https://github.com/florianhartung/a653rs-linux.git?branch=queuing-ports#6b1fe4f5ead5e1a7732a63a331bb46839dccb431" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f189c0120f4808e022cb31063db00a974975f3eb7a383639cec7c71e150fd17c" dependencies = [ "a653rs", "a653rs-linux-core", @@ -25,16 +26,17 @@ dependencies = [ "memmap2", "nix", "once_cell", + "oneshot", "polling", "procfs", - "safemem", "tinyvec", ] [[package]] name = "a653rs-linux-core" -version = "0.1.0" -source = "git+https://github.com/florianhartung/a653rs-linux.git?branch=queuing-ports#6b1fe4f5ead5e1a7732a63a331bb46839dccb431" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c163dca33227c27cb81aa02c4644ca9f15ca07aac64f53f05c653f00e26e4e7" dependencies = [ "a653rs", "anyhow", @@ -57,11 +59,11 @@ dependencies = [ [[package]] name = "a653rs-postcard" -version = "0.3.0" -source = "git+https://github.com/DLR-FT/a653rs-postcard.git?branch=main#6bf1c901857f9b9ea78c36917caa50c97964e53d" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7608d58b1e6bb34c11f482378e8e62c154f414cef20f746b1b8e9088d714ee39" dependencies = [ "a653rs", - "arrayvec", "postcard", "serde", ] @@ -129,7 +131,8 @@ dependencies = [ [[package]] name = "a653rs-xng" version = "0.1.0" -source = "git+https://github.com/DLR-FT/a653rs-xng.git?branch=main#c102c28b5fb086b56d44db9f658d34f392adef55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c949f8f67763d1339c44548d8611b5787c91ed0f4306cb4967800a6614186538" dependencies = [ "a653rs", "cty", @@ -159,15 +162,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" - -[[package]] -name = "arrayvec" -version = "0.7.4" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "atomic-polyfill" @@ -180,9 +177,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "bincode" @@ -201,15 +198,15 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" [[package]] name = "bumpalo" -version = "3.15.0" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32a994c2b3ca201d9b263612a374263f05e7adde37c4707f693dcd375076d1f" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byteorder" @@ -228,12 +225,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.83" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] +checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" [[package]] name = "cfg-if" @@ -241,16 +235,22 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chrono" -version = "0.4.34" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", - "num-traits 0.2.18", - "windows-targets 0.52.0", + "num-traits 0.2.19", + "windows-targets", ] [[package]] @@ -261,9 +261,9 @@ checksum = "67ba02a97a2bd10f4b59b25c7973101c79642302776489e030cd13cdab09ed15" [[package]] name = "concurrent-queue" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ "crossbeam-utils", ] @@ -282,9 +282,9 @@ checksum = "338089f42c427b86394a5ee60ff321da23a5c89c9d89514c829687b26359fcff" [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] @@ -297,9 +297,9 @@ checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "cty" @@ -341,9 +341,9 @@ dependencies = [ [[package]] name = "either" -version = "1.10.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" [[package]] name = "enum_primitive" @@ -362,19 +362,19 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] name = "flate2" -version = "1.0.28" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" dependencies = [ "crc32fast", "miniz_oxide", @@ -400,9 +400,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.3" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" [[package]] name = "heapless" @@ -431,15 +431,15 @@ dependencies = [ [[package]] name = "heck" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" -version = "0.3.6" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd5256b483761cd23699d0da46cc6fd2ee3be420bbe6d020ae4a091e70b7e9fd" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" [[package]] name = "hex" @@ -472,45 +472,34 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.3" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233cf39063f058ea2caae4091bf4a3ef70a653afbc026f5c4a4135d114e3c177" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown", ] -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "itertools" -version = "0.10.5" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -523,27 +512,21 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.153" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" - -[[package]] -name = "linux-raw-sys" -version = "0.1.4" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -551,9 +534,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "memfd" @@ -561,48 +544,47 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2cffa4ad52c6f791f4f8b15f0c05f9824b2ced1160e88cc393d64fff9a8ac64" dependencies = [ - "rustix 0.38.31", + "rustix", ] [[package]] name = "memmap2" -version = "0.5.10" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" dependencies = [ "libc", ] [[package]] name = "memoffset" -version = "0.6.5" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" dependencies = [ "autocfg", ] [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] [[package]] name = "nix" -version = "0.25.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f346ff70e7dbfd675fe90590b92d59ef2de15a8779ae305ebcbfd3f0caf59be4" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "autocfg", - "bitflags 1.3.2", + "bitflags 2.5.0", "cfg-if", + "cfg_aliases", "libc", "memoffset", - "pin-utils", ] [[package]] @@ -611,14 +593,14 @@ version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" dependencies = [ - "num-traits 0.2.18", + "num-traits 0.2.19", ] [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] @@ -630,31 +612,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] -name = "pin-project-lite" -version = "0.2.13" +name = "oneshot" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "e296cf87e61c9cfc1a61c3c63a0f7f286ed4554e0e22be84e8a38e1d264a2a29" [[package]] -name = "pin-utils" -version = "0.1.0" +name = "pin-project-lite" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "polling" -version = "2.8.0" +version = "3.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +checksum = "a3ed00ed3fbf728b5816498ecd316d1716eecaced9c0c8d2c5a6740ca214985b" dependencies = [ - "autocfg", - "bitflags 1.3.2", "cfg-if", "concurrent-queue", - "libc", - "log", + "hermit-abi", "pin-project-lite", - "windows-sys 0.48.0", + "rustix", + "tracing", + "windows-sys", ] [[package]] @@ -670,26 +651,37 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" dependencies = [ "unicode-ident", ] [[package]] name = "procfs" -version = "0.14.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de8dacb0873f77e6aefc6d71e044761fcc68060290f5b1089fcdf84626bb69" +checksum = "731e0d9356b0c25f16f33b5be79b1c57b562f141ebfcdb0ad8ac2c13a24293b4" dependencies = [ - "bitflags 1.3.2", - "byteorder", + "bitflags 2.5.0", "chrono", "flate2", "hex", "lazy_static", - "rustix 0.36.17", + "procfs-core", + "rustix", +] + +[[package]] +name = "procfs-core" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3554923a69f4ce04c4a754260c338f505ce22642d3830e049a399fc2059a29" +dependencies = [ + "bitflags 2.5.0", + "chrono", + "hex", ] [[package]] @@ -714,9 +706,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -732,48 +724,28 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.17" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "305efbd14fde4139eb501df5f136994bb520b033fa9fbdce287507dc23b8c7ed" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.5.0", "errno", - "io-lifetimes", "libc", - "linux-raw-sys 0.1.4", - "windows-sys 0.45.0", -] - -[[package]] -name = "rustix" -version = "0.38.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" -dependencies = [ - "bitflags 2.4.2", - "errno", - "libc", - "linux-raw-sys 0.4.13", - "windows-sys 0.52.0", + "linux-raw-sys", + "windows-sys", ] [[package]] name = "rustversion" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" - -[[package]] -name = "ryu" version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] -name = "safemem" -version = "0.3.3" +name = "ryu" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -792,35 +764,35 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.197" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.197" +version = "1.0.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.66", ] [[package]] name = "serde_yaml" -version = "0.9.32" +version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd075d994154d4a774f95b51fb96bdc2832b0ea48425c92546073816cda1f2f" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ "indexmap", "itoa", @@ -858,24 +830,24 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "strum" -version = "0.25.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.25.3" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ "heck", "proc-macro2", "quote", "rustversion", - "syn 2.0.50", + "syn 2.0.66", ] [[package]] @@ -891,9 +863,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.50" +version = "2.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f1bdc9872430ce9b75da68329d1c1746faf50ffac5f19e02b71e37ff881ffb" +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" dependencies = [ "proc-macro2", "quote", @@ -902,22 +874,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.57" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.57" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.66", ] [[package]] @@ -926,6 +898,22 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" + [[package]] name = "uart_xilinx" version = "0.2.0" @@ -944,9 +932,9 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unsafe-libyaml" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" [[package]] name = "vcell" @@ -965,9 +953,9 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", "winapi-util", @@ -975,9 +963,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -985,24 +973,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.66", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1010,79 +998,39 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.50", + "syn 2.0.66", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "winapi-util" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" dependencies = [ - "winapi", + "windows-sys", ] -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - [[package]] name = "windows-core" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.0", -] - -[[package]] -name = "windows-sys" -version = "0.45.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" -dependencies = [ - "windows-targets 0.42.2", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", + "windows-targets", ] [[package]] @@ -1091,179 +1039,72 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.0", + "windows-targets", ] [[package]] name = "windows-targets" -version = "0.42.2" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" -dependencies = [ - "windows_aarch64_gnullvm 0.52.0", - "windows_aarch64_msvc 0.52.0", - "windows_i686_gnu 0.52.0", - "windows_i686_msvc 0.52.0", - "windows_x86_64_gnu 0.52.0", - "windows_x86_64_gnullvm 0.52.0", - "windows_x86_64_msvc 0.52.0", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" [[package]] name = "windows_aarch64_msvc" -version = "0.42.2" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" [[package]] name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" [[package]] -name = "windows_i686_msvc" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" +name = "windows_i686_gnullvm" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" [[package]] name = "windows_i686_msvc" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" [[package]] name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" [[package]] name = "xng-rs-log" diff --git a/Cargo.toml b/Cargo.toml index f4d3b6c..5236d55 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ default-members = [ ] [workspace.dependencies] -a653rs = { version = "0.5", default-features = false } +a653rs = { version = "0.6", default-features = false } cobs = { version = "0.2.3", default-features = false } crc16 = { version = "0.4.0", default-features = false } heapless = { version = "0.8", default-features = false } @@ -38,9 +38,9 @@ signal-hook.version = "0.3" uart_xilinx = "0.2" volatile-register = "0.2" # These are not on crates.io -a653rs-linux = { git = "https://github.com/florianhartung/a653rs-linux.git", branch = "queuing-ports", default-features = false } -a653rs-postcard = { git = "https://github.com/DLR-FT/a653rs-postcard.git", branch = "main", default-features = false } -a653rs-xng = { git = "https://github.com/DLR-FT/a653rs-xng.git", branch = "main", default-features = false } +a653rs-linux = { version = "0.2", default-features = false } +a653rs-postcard = { version = "0.4", default-features = false } +a653rs-xng = { version = "0.1", default-features = false } xng-rs-log = { git = "https://github.com/DLR-FT/xng-rs-log.git", branch = "main", default-features = false } [profile.dev] diff --git a/a653rs-router/src/ports.rs b/a653rs-router/src/ports.rs index 2f5b562..83e0fec 100644 --- a/a653rs-router/src/ports.rs +++ b/a653rs-router/src/ports.rs @@ -195,7 +195,7 @@ impl QueuingOut { } } -impl RouterInput for SamplingPortDestination { +impl RouterInput for SamplingPortDestination { fn receive<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], PortError> { router_bench!(begin_apex_receive, self.id() as u16); let res = self.receive(buf); @@ -205,11 +205,11 @@ impl RouterInput for SamplingPortDe } fn mtu(&self) -> PayloadSize { - M as PayloadSize + self.size() as PayloadSize } } -impl RouterOutput for SamplingPortSource { +impl RouterOutput for SamplingPortSource { fn send(&self, buf: &[u8]) -> Result<(), PortError> { router_bench!(begin_apex_send, self.id() as u16); let res = self.send(buf); @@ -219,13 +219,11 @@ impl RouterOutput for SamplingPortS } fn mtu(&self) -> PayloadSize { - M as PayloadSize + self.size() as PayloadSize } } -impl RouterInput - for QueuingPortReceiver -{ +impl RouterInput for QueuingPortReceiver { fn receive<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], PortError> { let timeout = SystemTime::Normal(Duration::from_micros(10)); router_bench!(begin_apex_send, self.id() as u16); @@ -236,13 +234,11 @@ impl RouterIn } fn mtu(&self) -> PayloadSize { - M as PayloadSize + self.size() } } -impl RouterOutput - for QueuingPortSender -{ +impl RouterOutput for QueuingPortSender { fn send(&self, buf: &[u8]) -> Result<(), PortError> { let timeout = SystemTime::Normal(Duration::from_micros(10)); router_bench!(begin_apex_send, self.id() as u16); @@ -253,7 +249,7 @@ impl RouterOu } fn mtu(&self) -> PayloadSize { - M as PayloadSize + self.size() } } diff --git a/cargo-lock.nix b/cargo-lock.nix index 92eec45..4ddb80b 100644 --- a/cargo-lock.nix +++ b/cargo-lock.nix @@ -1,9 +1,6 @@ { lockFile = ./Cargo.lock; outputHashes = { - "a653rs-linux-0.2.0" = "sha256-/dOKYs3MlBh4f8Gdyd4bLE8s7t9g8utQeZtyRYrd/sg="; - "a653rs-postcard-0.3.0" = "sha256-Gb/5fz29sJYnTZebDsNIbwydZaGEPOz0VeLBYsDvcQE="; - "a653rs-xng-0.1.0" = "sha256-YOn+rUJ4k28ikOtrB61ScwV3I0etLqfxBSKbKiwJyy0="; "xng-rs-log-0.1.0" = "sha256-YIFFnjWsk6g9tQuRBqmPaXsY3s2+BpkAg5PCw2ZGYCU="; }; } diff --git a/flake.lock b/flake.lock index 2b57fd6..16f1d62 100644 --- a/flake.lock +++ b/flake.lock @@ -77,16 +77,15 @@ ] }, "locked": { - "lastModified": 1706706351, - "narHash": "sha256-/dOKYs3MlBh4f8Gdyd4bLE8s7t9g8utQeZtyRYrd/sg=", - "owner": "florianhartung", + "lastModified": 1718872602, + "narHash": "sha256-Yp0pbptwknqPS8wL6TP8CFaXP82CL3MgWrF+pRBk8mY=", + "owner": "DLR-FT", "repo": "a653rs-linux", - "rev": "6b1fe4f5ead5e1a7732a63a331bb46839dccb431", + "rev": "fd4869c62af9523e9e0f7fc15b86e33723d3b54d", "type": "github" }, "original": { - "owner": "florianhartung", - "ref": "queuing-ports", + "owner": "DLR-FT", "repo": "a653rs-linux", "type": "github" } @@ -99,11 +98,11 @@ ] }, "locked": { - "lastModified": 1698420672, - "narHash": "sha256-/TdeHMPRjjdJub7p7+w55vyABrsJlt5QkznPYy55vKA=", + "lastModified": 1717067539, + "narHash": "sha256-oIs5EF+6VpHJRvvpVWuqCYJMMVW/6h59aYUv9lABLtY=", "ref": "refs/heads/master", - "rev": "aeb58d5e8faead8980a807c840232697982d47b9", - "revCount": 333, + "rev": "fa19d8c135e776dc97f4dcca08656a0eeb28d5c0", + "revCount": 342, "type": "git", "url": "https://github.com/nix-community/naersk.git" }, diff --git a/flake.nix b/flake.nix index dcc052b..a3bf052 100644 --- a/flake.nix +++ b/flake.nix @@ -13,8 +13,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; hypervisor = { - url = "github:florianhartung/a653rs-linux/queuing-ports"; - #url = "github:DLR-FT/a653rs-linux"; + url = "github:DLR-FT/a653rs-linux"; inputs.nixpkgs.follows = "nixpkgs"; inputs.devshell.follows = "devshell"; inputs.fenix.follows = "fenix"; From 645b63cd36cf570a8ece7feebda2ab68f7bb4498 Mon Sep 17 00:00:00 2001 From: Sven Friedrich Date: Thu, 20 Jun 2024 13:33:46 +0200 Subject: [PATCH 3/8] feat: replace non-const reimplementation with a653rs ports --- a653rs-router/src/config.rs | 15 ++- a653rs-router/src/partition.rs | 2 +- a653rs-router/src/ports.rs | 193 +--------------------------- a653rs-router/src/router.rs | 50 +++++-- examples/echo-linux/src/bin/echo.rs | 10 +- examples/echo/src/lib.rs | 88 +++++++------ 6 files changed, 109 insertions(+), 249 deletions(-) diff --git a/a653rs-router/src/config.rs b/a653rs-router/src/config.rs index d89048a..897dfd8 100644 --- a/a653rs-router/src/config.rs +++ b/a653rs-router/src/config.rs @@ -1,6 +1,7 @@ -use crate::{prelude::InterfaceConfig, types::VirtualLinkId}; -use a653rs::bindings::{ - MessageRange, MessageSize, QueuingDiscipline as ApexQueuingDiscipline, StackSize, +use crate::{ports::PortError, prelude::InterfaceConfig, types::VirtualLinkId}; +use a653rs::{ + bindings::{MessageRange, MessageSize, QueuingDiscipline as ApexQueuingDiscipline, StackSize}, + prelude::Name, }; use core::{ops::Deref, str::FromStr, time::Duration}; use heapless::{LinearMap, String, Vec}; @@ -40,6 +41,14 @@ impl From> for PortName { } } +impl TryInto for PortName { + type Error = PortError; + + fn try_into(self) -> Result { + Name::from_str(&self).map_err(|_e| PortError::Create) + } +} + /// The name of a network interface or socket address. /// /// Some examples diff --git a/a653rs-router/src/partition.rs b/a653rs-router/src/partition.rs index af189ab..8e625d9 100644 --- a/a653rs-router/src/partition.rs +++ b/a653rs-router/src/partition.rs @@ -60,7 +60,7 @@ where entry_point: extern "C" fn(), ) -> Result { Ok(Self { - resources: RouterResources::::create::(interfaces, ports)?, + resources: RouterResources::::create::(ctx, interfaces, ports)?, process: RouterProcess::create(ctx, name, stack_size, entry_point) .map_err(Error::Process)?, }) diff --git a/a653rs-router/src/ports.rs b/a653rs-router/src/ports.rs index 83e0fec..fb261f1 100644 --- a/a653rs-router/src/ports.rs +++ b/a653rs-router/src/ports.rs @@ -1,198 +1,17 @@ use a653rs::{bindings::*, prelude::*}; -use core::{fmt::Display, marker::PhantomData, str::FromStr, time::Duration}; +use core::{fmt::Display, time::Duration}; use crate::{ - config::{QueuingInCfg, QueuingOutCfg, SamplingInCfg, SamplingOutCfg}, network::PayloadSize, - prelude::*, router::{RouterInput, RouterOutput}, }; #[derive(Debug)] pub(crate) enum Port { - SamplingIn(SamplingIn), - SamplingOut(SamplingOut), - QueuingIn(QueuingIn), - QueuingOut(QueuingOut), -} - -#[derive(Debug)] -pub(crate) struct PortData { - id: ApexLongInteger, - msg_size: MessageSize, -} - -/// Used for accessing a sampling port destination using the bindings -#[derive(Debug)] -pub(crate) struct SamplingIn { - _h: PhantomData, - inner: PortData, -} - -/// Used for accessing a sampling port source using the bindings -#[derive(Debug)] -pub(crate) struct SamplingOut { - _h: PhantomData, - inner: PortData, -} - -/// Used for accessing a queuing port source using the bindings -#[derive(Debug)] -pub(crate) struct QueuingOut { - _h: PhantomData, - inner: PortData, -} - -/// Used for accessing a queuing port destination using the bindings -#[derive(Debug)] -pub(crate) struct QueuingIn { - _h: PhantomData, - inner: PortData, -} - -impl RouterInput for SamplingIn { - fn receive<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], PortError> { - let buf = buf.validate_read(self.inner.msg_size)?; - let (_val, len) = unsafe { - ::read_sampling_message(self.inner.id, buf) - .map_err(|_e| PortError::Receive) - }?; - Ok(&buf[..(len as usize)]) - } - - fn mtu(&self) -> PayloadSize { - self.inner.msg_size as PayloadSize - } -} - -impl RouterInput for QueuingIn { - fn receive<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], PortError> { - let buf = buf.validate_read(self.inner.msg_size)?; - let timeout = Duration::from_micros(10).as_nanos() as ApexSystemTime; - let (val, _overflow) = unsafe { - ::receive_queuing_message(self.inner.id, timeout, buf) - .map_err(|_e| PortError::Receive) - }?; - Ok(&buf[..val as usize]) - } - - fn mtu(&self) -> PayloadSize { - self.inner.msg_size as PayloadSize - } -} - -impl RouterOutput for QueuingOut { - fn send(&self, buf: &[u8]) -> Result<(), PortError> { - let buf = buf.validate_write(self.inner.msg_size)?; - let timeout = Duration::from_micros(10).as_nanos() as ApexSystemTime; - ::send_queuing_message(self.inner.id, buf, timeout) - .map_err(|_e| PortError::Send) - } - - fn mtu(&self) -> PayloadSize { - self.inner.msg_size as PayloadSize - } -} - -impl RouterOutput for SamplingOut { - fn send(&self, buf: &[u8]) -> Result<(), PortError> { - let buf = buf.validate_write(self.inner.msg_size)?; - ::write_sampling_message(self.inner.id, buf) - .map_err(|_e| PortError::Send) - } - - fn mtu(&self) -> PayloadSize { - self.inner.msg_size as PayloadSize - } -} - -impl SamplingIn { - pub(crate) fn create(name: PortName, value: SamplingInCfg) -> Result { - let id = ::create_sampling_port( - Name::from_str(&name) - .map_err(|_e| PortError::Create)? - .into(), - value.msg_size, - PortDirection::Destination, - value.refresh_period.as_nanos() as i64, - ) - .map_err(|_e| PortError::Create)?; - Ok(Self { - _h: Default::default(), - inner: PortData { - id, - msg_size: value.msg_size, - }, - }) - } -} - -impl SamplingOut { - pub(crate) fn create(name: PortName, value: SamplingOutCfg) -> Result { - let id = ::create_sampling_port( - Name::from_str(&name) - .map_err(|_e| PortError::Create)? - .into(), - value.msg_size, - PortDirection::Source, - // Use some non-zero duration. - // While refresh_period is ignored for the source - // It may produce an error if set to zero - SystemTime::Normal(Duration::from_nanos(1)).into(), - ) - .map_err(|_e| PortError::Create)?; - Ok(Self { - _h: Default::default(), - inner: PortData { - id, - msg_size: value.msg_size, - }, - }) - } -} - -impl QueuingIn { - pub(crate) fn create(name: PortName, value: QueuingInCfg) -> Result { - let id = ::create_queuing_port( - Name::from_str(&name) - .map_err(|_e| PortError::Create)? - .into(), - value.msg_size, - value.msg_count, - PortDirection::Destination, - value.discipline.into(), - ) - .map_err(|_e| PortError::Create)?; - Ok(Self { - _h: Default::default(), - inner: PortData { - id, - msg_size: value.msg_size, - }, - }) - } -} - -impl QueuingOut { - pub(crate) fn create(name: PortName, value: QueuingOutCfg) -> Result { - let id = ::create_queuing_port( - Name::from_str(&name) - .map_err(|_e| PortError::Create)? - .into(), - value.msg_size, - value.msg_count, - PortDirection::Source, - value.discipline.into(), - ) - .map_err(|_e| PortError::Create)?; - Ok(Self { - _h: Default::default(), - inner: PortData { - id, - msg_size: value.msg_size, - }, - }) - } + SamplingIn(SamplingPortDestination), + SamplingOut(SamplingPortSource), + QueuingIn(QueuingPortReceiver), + QueuingOut(QueuingPortSender), } impl RouterInput for SamplingPortDestination { @@ -256,7 +75,7 @@ impl RouterOutput for QueuingPortSender { trait BufferExt { fn validate_read(&mut self, size: MessageSize) -> Result<&mut Self, PortError>; - /// Validate a buffer to be at most as long as the given usize. + /// Validate a buffer to be at most as long as the given usize. /// If not returns [Self] with the length of the passed buffer fn validate_write(&self, size: MessageSize) -> Result<&Self, PortError>; } diff --git a/a653rs-router/src/router.rs b/a653rs-router/src/router.rs index 1bd5906..52370c9 100644 --- a/a653rs-router/src/router.rs +++ b/a653rs-router/src/router.rs @@ -6,13 +6,16 @@ use crate::{ }, error::Error, network::{CreateNetworkInterface, NetworkInterface, PayloadSize, PlatformNetworkInterface}, - ports::{Port, PortError, QueuingIn, QueuingOut, SamplingIn, SamplingOut}, + ports::{Port, PortError}, prelude::InterfaceName, scheduler::{DeadlineRrScheduler, ScheduleError, Scheduler, TimeSource}, types::VirtualLinkId, }; -use a653rs::bindings::{ApexQueuingPortP4, ApexSamplingPortP4}; +use a653rs::{ + bindings::{ApexQueuingPortP4, ApexSamplingPortP4}, + prelude::StartContext, +}; use core::{fmt::Debug, marker::PhantomData, ops::Deref, str::FromStr, time::Duration}; use heapless::{FnvIndexMap, LinearMap, Vec}; @@ -45,6 +48,7 @@ where /// failed to create a port, the network driver failed to create a network /// interface. pub fn create>( + ctx: &mut StartContext, interfaces_cfg: InterfacesConfig, ports_cfg: PortsConfig, ) -> Result { @@ -67,18 +71,36 @@ where for (name, cfg) in ports_cfg.into_iter() { let name = PortName::from_str(name)?; let port = match cfg { - PortConfig::SamplingIn(cfg) => { - Port::SamplingIn(SamplingIn::create(name.clone(), cfg.clone())?) - } - PortConfig::SamplingOut(cfg) => { - Port::SamplingOut(SamplingOut::create(name.clone(), cfg.clone())?) - } - PortConfig::QueuingIn(cfg) => { - Port::QueuingIn(QueuingIn::create(name.clone(), cfg.clone())?) - } - PortConfig::QueuingOut(cfg) => { - Port::QueuingOut(QueuingOut::create(name.clone(), cfg.clone())?) - } + PortConfig::SamplingIn(cfg) => Port::SamplingIn( + ctx.create_sampling_port_destination( + name.clone().try_into()?, + cfg.msg_size, + cfg.refresh_period, + ) + .map_err(|_e| PortError::Create)?, + ), + PortConfig::SamplingOut(cfg) => Port::SamplingOut( + ctx.create_sampling_port_source(name.clone().try_into()?, cfg.msg_size) + .map_err(|_e| PortError::Create)?, + ), + PortConfig::QueuingIn(cfg) => Port::QueuingIn( + ctx.create_queuing_port_receiver( + name.clone().try_into()?, + cfg.msg_size, + cfg.msg_count, + cfg.discipline.clone().into(), + ) + .map_err(|_e| PortError::Create)?, + ), + PortConfig::QueuingOut(cfg) => Port::QueuingOut( + ctx.create_queuing_port_sender( + name.clone().try_into()?, + cfg.msg_size, + cfg.msg_count, + cfg.discipline.clone().into(), + ) + .map_err(|_e| PortError::Create)?, + ), }; ports .insert(name, port) diff --git a/examples/echo-linux/src/bin/echo.rs b/examples/echo-linux/src/bin/echo.rs index 0b810c1..90b4551 100644 --- a/examples/echo-linux/src/bin/echo.rs +++ b/examples/echo-linux/src/bin/echo.rs @@ -5,17 +5,19 @@ use a653rs_linux::partition::{ApexLinuxPartition, ApexLogger}; use echo::*; use log::{info, trace, LevelFilter}; -static mut ECHO_RECEIVER_SAMPLING: Option> = +static mut ECHO_RECEIVER_SAMPLING: Option< + ConstSamplingPortDestination, +> = None; +static mut ECHO_SENDER_SAMPLING: Option> = None; -static mut ECHO_SENDER_SAMPLING: Option> = None; // Not supported by a653rs-linux-hypervisor static mut ECHO_RECEIVER_QUEUING: Option< - QueuingPortReceiver, + ConstQueuingPortReceiver, > = None; static mut ECHO_SENDER_QUEUING: Option< - QueuingPortSender, + ConstQueuingPortSender, > = None; extern "C" fn client_send_sampling() { diff --git a/examples/echo/src/lib.rs b/examples/echo/src/lib.rs index 584a842..2ef02ca 100644 --- a/examples/echo/src/lib.rs +++ b/examples/echo/src/lib.rs @@ -34,9 +34,6 @@ use a653rs::bindings::ApexQueuingPortP4; use a653rs::bindings::ApexSamplingPortP4; use a653rs::prelude::*; use a653rs_postcard::prelude::*; -use a653rs_postcard::{ - prelude::QueuingPortReceiverExt, prelude::QueuingPortSenderExt, prelude::QueuingRecvError, -}; use core::fmt::Debug; use core::str::FromStr; use core::time::Duration; @@ -105,7 +102,7 @@ struct EchoMessage { } pub fn run_echo_queuing_receiver( - port: &QueuingPortReceiver, + port: &ConstQueuingPortReceiver, ) where [u8; M as usize]:, [u8; L as usize]:, @@ -114,7 +111,8 @@ pub fn run_echo_queuing_receiver(RECEIVE_TIMEOUT); + let mut buf = [0; M as usize]; + let result = port.recv_type_buf::(RECEIVE_TIMEOUT, &mut buf); let time = ::get_time(); let now = match time { @@ -145,14 +143,14 @@ pub fn run_echo_queuing_receiver { + Err(QueuingRecvBufError::Apex(Error::InvalidConfig)) => { warn!("The queue overflowed"); } - Err(QueuingRecvError::Apex(Error::NotAvailable)) - | Err(QueuingRecvError::Apex(Error::TimedOut)) => { + Err(QueuingRecvBufError::Apex(Error::NotAvailable)) + | Err(QueuingRecvBufError::Apex(Error::TimedOut)) => { debug!("No echo reply available"); } - Err(QueuingRecvError::Postcard(e, _)) => { + Err(QueuingRecvBufError::Postcard(e, _)) => { trace!("Failed to decode echo reply: {e:?}"); } Err(e) => { @@ -163,7 +161,7 @@ pub fn run_echo_queuing_receiver( - port: &QueuingPortSender, + port: &ConstQueuingPortSender, ) where [u8; M as usize]:, [u8; L as usize]:, @@ -184,7 +182,12 @@ pub fn run_echo_queuing_sender { @@ -205,8 +208,8 @@ pub fn run_echo_queuing_sender( - port_out: &QueuingPortSender, - port_in: &QueuingPortReceiver, + port_out: &ConstQueuingPortSender, + port_in: &ConstQueuingPortReceiver, ) where [u8; M as usize]:, { @@ -244,7 +247,7 @@ pub fn run_echo_queuing_server( - port: &SamplingPortDestination, + port: &ConstSamplingPortDestination, ) where [u8; M as usize]:, { @@ -253,7 +256,8 @@ pub fn run_echo_sampling_receiver(); + let mut buf = [0u8; M as usize]; + let result = port.recv_type_buf::(&mut buf); match result { Ok(data) => { small_trace!(begin_echo_reply_received); @@ -283,10 +287,10 @@ pub fn run_echo_sampling_receiver { + Err(SamplingRecvBufError::Apex(Error::NotAvailable)) => { debug!("No echo reply available"); } - Err(SamplingRecvError::Postcard(e, _, _)) => { + Err(SamplingRecvBufError::Postcard(e, _, _)) => { trace!("Failed to decode echo reply: {e:?}"); } _ => { @@ -297,7 +301,7 @@ pub fn run_echo_sampling_receiver( - port: &SamplingPortSource, + port: &ConstSamplingPortSource, ) where [u8; M as usize]:, { @@ -313,7 +317,8 @@ pub fn run_echo_sampling_sender { @@ -337,8 +342,8 @@ pub fn run_echo_sampling_sender( - port_out: &SamplingPortSource, - port_in: &SamplingPortDestination, + port_out: &ConstSamplingPortSource, + port_in: &ConstSamplingPortDestination, ) where [u8; M as usize]:, { @@ -390,10 +395,10 @@ pub struct EchoEntryFunctions { pub fn cold_start_sampling_queuing( ctx: &mut StartContext, - queuing_sender: &mut Option>, - queuing_receiver: &mut Option>, - sampling_sender: &mut Option>, - sampling_receiver: &mut Option>, + queuing_sender: &mut Option>, + queuing_receiver: &mut Option>, + sampling_sender: &mut Option>, + sampling_receiver: &mut Option>, entries: &EchoEntryFunctions, ) where H: ApexSamplingPortP4Ext + ApexQueuingPortP4 + ApexPartitionP4 + ApexProcessP4 + Debug, @@ -417,8 +422,8 @@ pub fn cold_start_sampling_queuing( pub fn cold_start_sampling( ctx: &mut StartContext, - sender: &mut Option>, - receiver: &mut Option>, + sender: &mut Option>, + receiver: &mut Option>, entries: &EchoEntryFunctions, ) where H: ApexSamplingPortP4Ext + ApexPartitionP4 + ApexProcessP4 + Debug, @@ -458,23 +463,26 @@ where fn try_init_sampling( ctx: &mut StartContext, - sender: &mut Option>, - receiver: &mut Option>, + sender: &mut Option>, + receiver: &mut Option>, ) -> Result where H: ApexSamplingPortP4Ext + Debug, { - if let Ok(port) = ctx.create_sampling_port_source(Name::from_str(CLIENT_SENDER_PORT).unwrap()) { + if let Ok(port) = + ctx.create_const_sampling_port_source(Name::from_str(CLIENT_SENDER_PORT).unwrap()) + { _ = sender.insert(port); - _ = receiver.insert(ctx.create_sampling_port_destination( + _ = receiver.insert(ctx.create_const_sampling_port_destination( Name::from_str(CLIENT_RECEIVER_PORT).unwrap(), VALIDITY, )?); Ok(EchoStation::Client) } else { - _ = sender - .insert(ctx.create_sampling_port_source(Name::from_str(SERVER_SENDER_PORT).unwrap())?); - _ = receiver.insert(ctx.create_sampling_port_destination( + _ = sender.insert( + ctx.create_const_sampling_port_source(Name::from_str(SERVER_SENDER_PORT).unwrap())?, + ); + _ = receiver.insert(ctx.create_const_sampling_port_destination( Name::from_str(SERVER_RECEIVER_PORT).unwrap(), VALIDITY, )?); @@ -484,28 +492,28 @@ where fn try_init_queuing( ctx: &mut StartContext, - sender: &mut Option>, - receiver: &mut Option>, + sender: &mut Option>, + receiver: &mut Option>, ) -> Result where H: ApexQueuingPortP4Ext + Debug, { - if let Ok(port) = ctx.create_queuing_port_sender( + if let Ok(port) = ctx.create_const_queuing_port_sender( Name::from_str(CLIENT_SENDER_PORT).unwrap(), QueuingDiscipline::Fifo, ) { _ = sender.insert(port); - _ = receiver.insert(ctx.create_queuing_port_receiver( + _ = receiver.insert(ctx.create_const_queuing_port_receiver( Name::from_str(CLIENT_RECEIVER_PORT).unwrap(), QueuingDiscipline::Fifo, )?); Ok(EchoStation::Client) } else { - _ = sender.insert(ctx.create_queuing_port_sender( + _ = sender.insert(ctx.create_const_queuing_port_sender( Name::from_str(SERVER_SENDER_PORT).unwrap(), QueuingDiscipline::Fifo, )?); - _ = receiver.insert(ctx.create_queuing_port_receiver( + _ = receiver.insert(ctx.create_const_queuing_port_receiver( Name::from_str(SERVER_RECEIVER_PORT).unwrap(), QueuingDiscipline::Fifo, )?); From f410a4447df24ee389f159678b453a4a07151cf8 Mon Sep 17 00:00:00 2001 From: Sven Friedrich Date: Thu, 20 Jun 2024 13:36:37 +0200 Subject: [PATCH 4/8] refactor: remove unused trait --- a653rs-router/src/ports.rs | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/a653rs-router/src/ports.rs b/a653rs-router/src/ports.rs index fb261f1..2c4b757 100644 --- a/a653rs-router/src/ports.rs +++ b/a653rs-router/src/ports.rs @@ -72,37 +72,6 @@ impl RouterOutput for QueuingPortSender { } } -trait BufferExt { - fn validate_read(&mut self, size: MessageSize) -> Result<&mut Self, PortError>; - - /// Validate a buffer to be at most as long as the given usize. - /// If not returns [Self] with the length of the passed buffer - fn validate_write(&self, size: MessageSize) -> Result<&Self, PortError>; -} - -impl BufferExt for [ApexByte] { - fn validate_read(&mut self, size: MessageSize) -> Result<&mut Self, PortError> { - if usize::try_from(size) - .map(|ss| self.len() < ss) - .unwrap_or(true) - { - return Err(PortError::Receive); - } - Ok(self) - } - - fn validate_write(&self, size: MessageSize) -> Result<&Self, PortError> { - if usize::try_from(size) - .map(|ss| self.len() > ss) - .unwrap_or(false) - || self.is_empty() - { - return Err(PortError::Send); - } - Ok(self) - } -} - /// An error occured while reading or writing a port of the router. #[derive(Clone, Debug, PartialEq, Eq)] pub enum PortError { From 70c2ca9bc63ae47ab9eea6e6c9ac56413141a535 Mon Sep 17 00:00:00 2001 From: Sven Friedrich Date: Thu, 20 Jun 2024 13:38:12 +0200 Subject: [PATCH 5/8] feat: impl Default for GPIO --- small-trace-gpio/src/gpio.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/small-trace-gpio/src/gpio.rs b/small-trace-gpio/src/gpio.rs index c623c87..193f8d7 100644 --- a/small-trace-gpio/src/gpio.rs +++ b/small-trace-gpio/src/gpio.rs @@ -59,6 +59,12 @@ impl GpioTracer { } } +impl Default for GpioTracer { + fn default() -> Self { + Self::new() + } +} + impl Tracer for GpioTracer { /// Writes the bits of the value to IO pins 26 to 41. Then resets the traced /// value to 0. From 64bc2be2057c9aac6fed10030fab1dc9be63b5f7 Mon Sep 17 00:00:00 2001 From: Sven Friedrich Date: Mon, 24 Jun 2024 13:43:47 +0200 Subject: [PATCH 6/8] fix: log feature compilation and log level --- a653rs-router-linux/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/a653rs-router-linux/src/main.rs b/a653rs-router-linux/src/main.rs index 3d1877f..4b2e331 100644 --- a/a653rs-router-linux/src/main.rs +++ b/a653rs-router-linux/src/main.rs @@ -57,7 +57,7 @@ extern "C" fn entry_point() { let mut state = router.router::(cfg).unwrap(); loop { let res = state.forward::(&ApexLinuxPartition); - #[cfg(feauture = "log")] + #[cfg(feature = "log")] { use a653rs_router::prelude::Error; use log::{debug, trace}; @@ -69,7 +69,7 @@ extern "C" fn entry_point() { Err(e) => debug!("Failed to forward message: {}", e), } } - #[cfg(not(feauture = "log"))] + #[cfg(not(feature = "log"))] let _res = res; } } @@ -78,7 +78,7 @@ fn main() { ApexLogger::install_panic_hook(); #[cfg(feature = "log")] { - ApexLogger::install_logger(log::LevelFilter::Trace).unwrap(); + ApexLogger::install_logger(log::LevelFilter::Debug).unwrap(); } RouterPartition.run() } From 4b9b5e77893ddde5d07cd13870096db4e2ef96b1 Mon Sep 17 00:00:00 2001 From: Tim Schubert Date: Fri, 21 Jun 2024 08:53:31 +0200 Subject: [PATCH 7/8] fix: remove Port enum from crate-public API --- a653rs-router/src/ports.rs | 8 -------- a653rs-router/src/router.rs | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/a653rs-router/src/ports.rs b/a653rs-router/src/ports.rs index 2c4b757..c4685ff 100644 --- a/a653rs-router/src/ports.rs +++ b/a653rs-router/src/ports.rs @@ -6,14 +6,6 @@ use crate::{ router::{RouterInput, RouterOutput}, }; -#[derive(Debug)] -pub(crate) enum Port { - SamplingIn(SamplingPortDestination), - SamplingOut(SamplingPortSource), - QueuingIn(QueuingPortReceiver), - QueuingOut(QueuingPortSender), -} - impl RouterInput for SamplingPortDestination { fn receive<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8], PortError> { router_bench!(begin_apex_receive, self.id() as u16); diff --git a/a653rs-router/src/router.rs b/a653rs-router/src/router.rs index 52370c9..62c3960 100644 --- a/a653rs-router/src/router.rs +++ b/a653rs-router/src/router.rs @@ -6,7 +6,7 @@ use crate::{ }, error::Error, network::{CreateNetworkInterface, NetworkInterface, PayloadSize, PlatformNetworkInterface}, - ports::{Port, PortError}, + ports::PortError, prelude::InterfaceName, scheduler::{DeadlineRrScheduler, ScheduleError, Scheduler, TimeSource}, types::VirtualLinkId, @@ -14,11 +14,22 @@ use crate::{ use a653rs::{ bindings::{ApexQueuingPortP4, ApexSamplingPortP4}, - prelude::StartContext, + prelude::{ + QueuingPortReceiver, QueuingPortSender, SamplingPortDestination, SamplingPortSource, + StartContext, + }, }; use core::{fmt::Debug, marker::PhantomData, ops::Deref, str::FromStr, time::Duration}; use heapless::{FnvIndexMap, LinearMap, Vec}; +#[derive(Debug)] +enum Port { + SamplingIn(SamplingPortDestination), + SamplingOut(SamplingPortSource), + QueuingIn(QueuingPortReceiver), + QueuingOut(QueuingPortSender), +} + /// Router resources #[derive(Debug)] pub struct RouterResources From e69fd73be82ef843ddb4dade13cd6e11e416e464 Mon Sep 17 00:00:00 2001 From: Tim Schubert Date: Fri, 21 Jun 2024 08:54:23 +0200 Subject: [PATCH 8/8] fix: do not use default features of serde_yaml --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 5236d55..bcc706e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,7 +33,7 @@ log = "0" once_cell = { version = "1.19", default-features = false } postcard = { version = "1.0", default-features = false } serde = { version = "1.0", default-features = false } -serde_yaml = { version = "0.9", default-feaures = false } +serde_yaml = { version = "0.9", default-features = false } signal-hook.version = "0.3" uart_xilinx = "0.2" volatile-register = "0.2"