]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/spdk/intel-ipsec-mb/alloc.c
import 15.2.0 Octopus source
[ceph.git] / ceph / src / spdk / intel-ipsec-mb / alloc.c
index 5a0c47b7c951e89c7ff2548734fae95357db4d37..12f66d9acb789b8cbdc3017dad24fb3905ba9ddd 100644 (file)
@@ -32,6 +32,7 @@
 #include <malloc.h> /* _aligned_malloc() and aligned_free() */
 #endif
 #include "intel-ipsec-mb.h"
+#include "cpu_feature.h"
 
 /**
  * @brief Allocates memory for multi-buffer manager instance
@@ -58,9 +59,10 @@ MB_MGR *alloc_mb_mgr(uint64_t flags)
 #else
         ptr = _aligned_malloc(size, alignment);
 #endif
-        if (ptr != NULL)
+        if (ptr != NULL) {
                 ptr->flags = flags; /* save the flags for future use in init */
-
+                ptr->features = cpu_feature_adjust(flags, cpu_feature_detect());
+        }
         IMB_ASSERT(ptr != NULL);
         return ptr;
 }