diff --git a/hosts/skydick/datapool.nix b/hosts/skydick/datapool.nix index e7a5aa6..d2f5768 100644 --- a/hosts/skydick/datapool.nix +++ b/hosts/skydick/datapool.nix @@ -221,13 +221,18 @@ { config, pkgs, ... }: { - # Build sambaFull with Spotlight/tracker support. + # Build sambaFull with Spotlight/tracker + SMB Direct support. # Fixes for tinysparql 3.x (tracker-sparql-3.0) compatibility: # (1) waf only checks tracker-sparql-{2.0..0.14} — add 3.0 # (2) tracker 2.x API (get_async/get_finish) removed in 3.x — replace # with bus_new_async/bus_new_finish connecting to localsearch miner # (3) disable tevent_glib_tracker test (uses same removed API, test-only) # (4) add icu for Unicode normalisation required by Spotlight + # SMB Direct: + # (5) link against rdma-core (libibverbs + librdmacm) and pass + # --with-smb-direct so smbd advertises capability 0x40 on protocol + # negotiate. Lets Sequoia 15.4+ Macs upgrade SMB3 sessions onto the + # RoCE fabric (same NIC/bond as NFS-RDMA, distinct fabric port 5445). nixpkgs.overlays = [ (final: prev: { sambaFull = prev.sambaFull.overrideAttrs (old: { @@ -235,6 +240,10 @@ final.tinysparql.dev final.glib.dev final.icu.dev + final.rdma-core + ]; + configureFlags = (old.configureFlags or []) ++ [ + "--with-smb-direct" ]; postPatch = (old.postPatch or "") + '' substituteInPlace source3/wscript \ @@ -466,13 +475,25 @@ "hosts deny" = "ALL"; # Keep Samba on Linux defaults for socket buffers and multichannel. - # skydick's active 10 GbE NIC already exposes RSS queues, so manual - # interface capability tags or fixed SO_RCVBUF/SO_SNDBUF tuning would - # add complexity without a measured benefit. + # The 2×40 GbE bond40g (ConnectX-3) already exposes RSS queues; manual + # `interfaces capability` tagging or fixed SO_RCVBUF/SO_SNDBUF tuning + # would add complexity without a measured benefit. "map to guest" = "never"; "server min protocol" = "SMB2_10"; + # SMB-Direct (SMB3 over RDMA, port 5445). Requires the sambaFull + # override above to be built --with-smb-direct AND a client that + # supports it (Win 10 Pro for Workstations, Win Server, macOS + # Sequoia 15.4+). For clients without SMB-Direct, smbd silently + # falls back to plain TCP on 445. + "smb direct" = "yes"; + # Max single RDMA read/write per call. 8 MiB matches our NFS + # rsize/wsize so SMB and NFS use comparable transfer sizes over + # the same fabric. + "smb direct max read" = "8388608"; + "smb direct max write" = "8388608"; + "load printers" = "no"; "vfs objects" = "catia fruit streams_xattr recycle"; "fruit:metadata" = "stream";