Skip to content

Commit b3effe9

Browse files
committed
feat: cryto build enable
Signed-off-by: Diwakar Sharma <diwakar.sharma@datacore.com>
1 parent 520ab75 commit b3effe9

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

build.rs

+4
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ fn configure_spdk() -> Result<LibraryConfig, Error> {
150150
spdk_lib.mark_system("uuid");
151151
spdk_lib.mark_system("rdmacm");
152152
spdk_lib.mark_system("ibverbs");
153+
spdk_lib.mark_system("mlx5");
154+
spdk_lib.mark_system("keyutils");
153155

154156
spdk_lib.set_static_search(true);
155157

@@ -294,7 +296,9 @@ fn main() {
294296
.header("wrapper.h")
295297
.formatter(bindgen::Formatter::Rustfmt)
296298
.allowlist_function(".*.aio.*")
299+
.allowlist_function("^accel.*")
297300
.allowlist_function(".*.crypto_disk.*")
301+
.allowlist_function(".*.crypto_opts")
298302
.allowlist_function(".*.iscsi.*")
299303
.allowlist_function(".*.lock_lba_range")
300304
.allowlist_function(".*.lvol.*")

build_scripts/build_spdk.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ function cmd_configure() {
262262
msg_info "Target platform: $TARGET_PLATFORM"
263263
case $TARGET_PLATFORM in
264264
"x86_64-unknown-linux-gnu")
265-
CONFIGURE_ARGS+=("--target-arch=nehalem" "--without-crypto")
265+
CONFIGURE_ARGS+=("--target-arch=nehalem" "--with-crypto")
266266
;;
267267
"aarch64-unknown-linux-gnu")
268268
CONFIGURE_ARGS+=(" --target-arch=armv8-a+crypto")

nix/pkgs/libspdk/default.nix

+2
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
, utillinux
4545
, zlib
4646
, rdma-core
47+
, keyutils
4748
}:
4849
let
4950
# Suffix for debug build name.
@@ -143,6 +144,7 @@ let
143144
numactl
144145
openssl
145146
rdma-core
147+
keyutils
146148
zlib
147149
] ++ extraBuildInputs;
148150

wrapper.h

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
#include <thread/thread_internal.h>
4646
#include <bdev/bdev_internal.h>
4747
#include <blob/blobstore.h>
48+
#include <spdk/accel_module.h>
49+
#include <accel/dpdk_cryptodev/accel_dpdk_cryptodev.h>
4850

4951
#include "helpers/logwrapper.h"
5052
#include "helpers/nvme_helper.h"

0 commit comments

Comments
 (0)