Content-Type: multipart/mixed; boundary="===============4184478393308830590==" MIME-Version: 1.0 From: Li Zhang Subject: [Accel-config] [PATCH v1 01/11] accel-config/test: Move macro ADDR_ALIGNMENT to common file Date: Tue, 17 May 2022 18:48:23 +0800 Message-ID: <20220517104833.1085245-2-li4.zhang@intel.com> In-Reply-To: 20220517104833.1085245-1-li4.zhang@intel.com To: accel-config@lists.01.org List-ID: --===============4184478393308830590== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Move macro ADDR_ALIGNMENT from dsa.h to accel_test.h for aligned memory allocation. Signed-off-by: Li Zhang --- test/accel_test.h | 1 + test/dsa.h | 2 -- test/iaa.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/test/accel_test.h b/test/accel_test.h index d61e075..c461fe7 100644 --- a/test/accel_test.h +++ b/test/accel_test.h @@ -9,6 +9,7 @@ #define SHARED 1 #define DEDICATED 0 = +#define ADDR_ALIGNMENT 32 #define MAX_PATH_LENGTH 1024 = #define ACCTEST_DEVICE_ID_NO_INPUT -1 diff --git a/test/dsa.h b/test/dsa.h index 1e4c2cb..cd57b01 100644 --- a/test/dsa.h +++ b/test/dsa.h @@ -33,8 +33,6 @@ #define DIF_INVERT_CRC_SEED ((unsigned long)(1 << 2)) #define DIF_INVERT_CRC_RESULT ((unsigned long)(1 << 3)) = -#define ADDR_ALIGNMENT 32 - #define MIN_DELTA_RECORD_SIZE 80 = /* dump all sub descriptors for a batch task */ diff --git a/test/iaa.c b/test/iaa.c index e422790..ea65541 100644 --- a/test/iaa.c +++ b/test/iaa.c @@ -25,7 +25,7 @@ static int init_crc64(struct task *tsk, int tflags, int o= pcode, unsigned long sr tsk->test_flags =3D tflags; tsk->xfer_size =3D src1_xfer_size; = - tsk->src1 =3D malloc(src1_xfer_size); + tsk->src1 =3D aligned_alloc(ADDR_ALIGNMENT, src1_xfer_size); if (!tsk->src1) return -ENOMEM; memset_pattern(tsk->src1, tsk->pattern, src1_xfer_size); -- = 2.25.1 --===============4184478393308830590==--