Skip to content

feat: add --aes/--no-aes CLI flags for SSH cipher control - #2364

Merged
oferchen merged 1 commit into
masterfrom
feat/aes-cipher-preference
Feb 21, 2026
Merged

oferchen merged 1 commit into
masterfrom
feat/aes-cipher-preference

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Add --aes and --no-aes CLI arguments for controlling SSH AES-GCM cipher preference
  • Wire prefer_aes_gcm through ParsedArgs, ConfigInputs, ClientConfigBuilder, and ClientConfig
  • Hardware-accelerated AES-GCM can outperform ChaCha20-Poly1305 on AES-NI/ARMv8 crypto CPUs

Test plan

  • cargo clippy -p cli -p core --no-deps -- -D warnings passes
  • cargo check -p cli compiles cleanly
  • CI: fmt+clippy, nextest, cross-platform

Wire --aes and --no-aes options through CLI parsing, config builder,
and client config to control AES-GCM cipher preference for SSH
connections. Hardware-accelerated AES-GCM can significantly outperform
ChaCha20-Poly1305 on CPUs with AES-NI or ARMv8 crypto extensions.
@github-actions github-actions Bot added the enhancement New feature or request label Feb 20, 2026
@oferchen
oferchen merged commit 8345113 into master Feb 21, 2026
25 of 31 checks passed
@oferchen
oferchen deleted the feat/aes-cipher-preference branch February 21, 2026 15:27
oferchen added a commit that referenced this pull request May 1, 2026
Wire --aes and --no-aes options through CLI parsing, config builder,
and client config to control AES-GCM cipher preference for SSH
connections. Hardware-accelerated AES-GCM can significantly outperform
ChaCha20-Poly1305 on CPUs with AES-NI or ARMv8 crypto extensions.
oferchen added a commit that referenced this pull request May 5, 2026
Wire --aes and --no-aes options through CLI parsing, config builder,
and client config to control AES-GCM cipher preference for SSH
connections. Hardware-accelerated AES-GCM can significantly outperform
ChaCha20-Poly1305 on CPUs with AES-NI or ARMv8 crypto extensions.
oferchen added a commit that referenced this pull request May 18, 2026
Add a Linux-only Criterion bench that quantifies the headroom the
iouring-data-writes cutover would close on a real NVMe mount. Two
cells exercise the same 10 x 1 GiB workload through the production
write paths:

- stdlib_write: today's Writer::Buffered fallback (BufWriter, 256 KiB,
  one flush + sync_all at end-of-file).
- iouring_write_fixed: IORING_OP_WRITE_FIXED against a four-slot
  registered-buffer pool of 1 MiB page-aligned buffers, followed by
  IORING_OP_FSYNC, matching the production
  IoUringDiskBatch::commit_file placement.

Gated by OC_RSYNC_BENCH_NVME_DATA_PATH=1 because each iteration
writes 10 GiB to disk. OC_RSYNC_BENCH_NVME_PATH optionally pins the
scratch dir to a real NVMe mount; falls back to the default TempDir
location (typically a ramdisk on CI) so the bench still produces a
ring-lifecycle and submission-cost number when no NVMe is available.

The bench is cfg-gated on target_os = "linux" + feature = "io_uring";
macOS, Windows, and feature-off builds compile to a stub main that
prints a skip line. perf stat instructions are documented in the
module doc rather than wired into the bench so Criterion's wall-time
and throughput reporting stays clean.
oferchen added a commit that referenced this pull request May 18, 2026
Add a Linux-only Criterion bench that quantifies the headroom the
iouring-data-writes cutover would close on a real NVMe mount. Two
cells exercise the same 10 x 1 GiB workload through the production
write paths:

- stdlib_write: today's Writer::Buffered fallback (BufWriter, 256 KiB,
  one flush + sync_all at end-of-file).
- iouring_write_fixed: IORING_OP_WRITE_FIXED against a four-slot
  registered-buffer pool of 1 MiB page-aligned buffers, followed by
  IORING_OP_FSYNC, matching the production
  IoUringDiskBatch::commit_file placement.

Gated by OC_RSYNC_BENCH_NVME_DATA_PATH=1 because each iteration
writes 10 GiB to disk. OC_RSYNC_BENCH_NVME_PATH optionally pins the
scratch dir to a real NVMe mount; falls back to the default TempDir
location (typically a ramdisk on CI) so the bench still produces a
ring-lifecycle and submission-cost number when no NVMe is available.

The bench is cfg-gated on target_os = "linux" + feature = "io_uring";
macOS, Windows, and feature-off builds compile to a stub main that
prints a skip line. perf stat instructions are documented in the
module doc rather than wired into the bench so Criterion's wall-time
and throughput reporting stays clean.
oferchen added a commit that referenced this pull request May 18, 2026
Add a Linux-only Criterion bench that quantifies the headroom the
iouring-data-writes cutover would close on a real NVMe mount. Two
cells exercise the same 10 x 1 GiB workload through the production
write paths:

- stdlib_write: today's Writer::Buffered fallback (BufWriter, 256 KiB,
  one flush + sync_all at end-of-file).
- iouring_write_fixed: IORING_OP_WRITE_FIXED against a four-slot
  registered-buffer pool of 1 MiB page-aligned buffers, followed by
  IORING_OP_FSYNC, matching the production
  IoUringDiskBatch::commit_file placement.

Gated by OC_RSYNC_BENCH_NVME_DATA_PATH=1 because each iteration
writes 10 GiB to disk. OC_RSYNC_BENCH_NVME_PATH optionally pins the
scratch dir to a real NVMe mount; falls back to the default TempDir
location (typically a ramdisk on CI) so the bench still produces a
ring-lifecycle and submission-cost number when no NVMe is available.

The bench is cfg-gated on target_os = "linux" + feature = "io_uring";
macOS, Windows, and feature-off builds compile to a stub main that
prints a skip line. perf stat instructions are documented in the
module doc rather than wired into the bench so Criterion's wall-time
and throughput reporting stays clean.
oferchen added a commit that referenced this pull request May 18, 2026
Add a Linux-only Criterion bench that quantifies the headroom the
iouring-data-writes cutover would close on a real NVMe mount. Two
cells exercise the same 10 x 1 GiB workload through the production
write paths:

- stdlib_write: today's Writer::Buffered fallback (BufWriter, 256 KiB,
  one flush + sync_all at end-of-file).
- iouring_write_fixed: IORING_OP_WRITE_FIXED against a four-slot
  registered-buffer pool of 1 MiB page-aligned buffers, followed by
  IORING_OP_FSYNC, matching the production
  IoUringDiskBatch::commit_file placement.

Gated by OC_RSYNC_BENCH_NVME_DATA_PATH=1 because each iteration
writes 10 GiB to disk. OC_RSYNC_BENCH_NVME_PATH optionally pins the
scratch dir to a real NVMe mount; falls back to the default TempDir
location (typically a ramdisk on CI) so the bench still produces a
ring-lifecycle and submission-cost number when no NVMe is available.

The bench is cfg-gated on target_os = "linux" + feature = "io_uring";
macOS, Windows, and feature-off builds compile to a stub main that
prints a skip line. perf stat instructions are documented in the
module doc rather than wired into the bench so Criterion's wall-time
and throughput reporting stays clean.
oferchen added a commit that referenced this pull request May 18, 2026
Add a Linux-only Criterion bench that quantifies the headroom the
iouring-data-writes cutover would close on a real NVMe mount. Two
cells exercise the same 10 x 1 GiB workload through the production
write paths:

- stdlib_write: today's Writer::Buffered fallback (BufWriter, 256 KiB,
  one flush + sync_all at end-of-file).
- iouring_write_fixed: IORING_OP_WRITE_FIXED against a four-slot
  registered-buffer pool of 1 MiB page-aligned buffers, followed by
  IORING_OP_FSYNC, matching the production
  IoUringDiskBatch::commit_file placement.

Gated by OC_RSYNC_BENCH_NVME_DATA_PATH=1 because each iteration
writes 10 GiB to disk. OC_RSYNC_BENCH_NVME_PATH optionally pins the
scratch dir to a real NVMe mount; falls back to the default TempDir
location (typically a ramdisk on CI) so the bench still produces a
ring-lifecycle and submission-cost number when no NVMe is available.

The bench is cfg-gated on target_os = "linux" + feature = "io_uring";
macOS, Windows, and feature-off builds compile to a stub main that
prints a skip line. perf stat instructions are documented in the
module doc rather than wired into the bench so Criterion's wall-time
and throughput reporting stays clean.
oferchen added a commit that referenced this pull request Aug 24, 2026
Add a Linux-only Criterion bench that quantifies the headroom the
iouring-data-writes cutover would close on a real NVMe mount. Two
cells exercise the same 10 x 1 GiB workload through the production
write paths:

- stdlib_write: today's Writer::Buffered fallback (BufWriter, 256 KiB,
  one flush + sync_all at end-of-file).
- iouring_write_fixed: IORING_OP_WRITE_FIXED against a four-slot
  registered-buffer pool of 1 MiB page-aligned buffers, followed by
  IORING_OP_FSYNC, matching the production
  IoUringDiskBatch::commit_file placement.

Gated by OC_RSYNC_BENCH_NVME_DATA_PATH=1 because each iteration
writes 10 GiB to disk. OC_RSYNC_BENCH_NVME_PATH optionally pins the
scratch dir to a real NVMe mount; falls back to the default TempDir
location (typically a ramdisk on CI) so the bench still produces a
ring-lifecycle and submission-cost number when no NVMe is available.

The bench is cfg-gated on target_os = "linux" + feature = "io_uring";
macOS, Windows, and feature-off builds compile to a stub main that
prints a skip line. perf stat instructions are documented in the
module doc rather than wired into the bench so Criterion's wall-time
and throughput reporting stays clean.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant