Skip to content

Commit

Permalink
feat: cryto build enable
Browse files Browse the repository at this point in the history
Signed-off-by: Diwakar Sharma <[email protected]>
  • Loading branch information
dsharma-dc committed Feb 24, 2025
1 parent 520ab75 commit 0e48462
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ fn configure_spdk() -> Result<LibraryConfig, Error> {
spdk_lib.mark_system("uuid");
spdk_lib.mark_system("rdmacm");
spdk_lib.mark_system("ibverbs");
spdk_lib.mark_system("mlx5");
spdk_lib.mark_system("keyutils");

spdk_lib.set_static_search(true);

Expand Down Expand Up @@ -294,7 +296,9 @@ fn main() {
.header("wrapper.h")
.formatter(bindgen::Formatter::Rustfmt)
.allowlist_function(".*.aio.*")
.allowlist_function("^accel.*")
.allowlist_function(".*.crypto_disk.*")
.allowlist_function(".*.crypto_opts")
.allowlist_function(".*.iscsi.*")
.allowlist_function(".*.lock_lba_range")
.allowlist_function(".*.lvol.*")
Expand Down
2 changes: 1 addition & 1 deletion build_scripts/build_spdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ function cmd_configure() {
msg_info "Target platform: $TARGET_PLATFORM"
case $TARGET_PLATFORM in
"x86_64-unknown-linux-gnu")
CONFIGURE_ARGS+=("--target-arch=nehalem" "--without-crypto")
CONFIGURE_ARGS+=("--target-arch=nehalem" "--with-crypto")
;;
"aarch64-unknown-linux-gnu")
CONFIGURE_ARGS+=(" --target-arch=armv8-a+crypto")
Expand Down
6 changes: 4 additions & 2 deletions nix/pkgs/libspdk/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
, utillinux
, zlib
, rdma-core
, keyutils
}:
let
# Suffix for debug build name.
Expand Down Expand Up @@ -85,8 +86,8 @@ let
# Derivation attributes
#
spdk = rec {
rev = "50b064f553970b0f352691530e80f19b8432f034";
sha256 = "sha256-fim71qqNjGtITeXfR7kWIRpBbI2iF47D0suny3mjcCQ=";
rev = "5ad4b3f7da32eb96543bf15df88cfd790dbd5307";
sha256 = "sha256-P3/rhhxNuNC3LJK7em+v5ES4aZsx0LSTHf8HcCaWk5Y=";
pname = "libspdk${nameSuffix}";
version = "24.05-${lib.substring 0 7 rev}";
name = "${pname}-${version}";
Expand Down Expand Up @@ -143,6 +144,7 @@ let
numactl
openssl
rdma-core
keyutils
zlib
] ++ extraBuildInputs;

Expand Down
2 changes: 2 additions & 0 deletions wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
#include <thread/thread_internal.h>
#include <bdev/bdev_internal.h>
#include <blob/blobstore.h>
#include <spdk/accel_module.h>
#include <accel/dpdk_cryptodev/accel_dpdk_cryptodev.h>

#include "helpers/logwrapper.h"
#include "helpers/nvme_helper.h"
Expand Down

0 comments on commit 0e48462

Please sign in to comment.