From 049bb9e41fa2239c33a8b25d5c6cd92704d808ed Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Wed, 2 Mar 2022 10:40:32 -0700 Subject: [PATCH] idxd: Update register names for idxd_group_flags The names on these were changed. Signed-off-by: Ben Walker Change-Id: Ib75a60342c08f72dad39635a9244421c1cca5485 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11793 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Paul Luse Reviewed-by: Changpeng Liu Reviewed-by: Aleksey Marchuk --- include/spdk/idxd_spec.h | 16 ++++++++-------- lib/idxd/idxd_user.c | 2 +- test/unit/lib/idxd/idxd_user.c/idxd_user_ut.c | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/spdk/idxd_spec.h b/include/spdk/idxd_spec.h index d9f5ce60f..5deb81cee 100644 --- a/include/spdk/idxd_spec.h +++ b/include/spdk/idxd_spec.h @@ -540,14 +540,14 @@ SPDK_STATIC_ASSERT(sizeof(struct idxd_registers) == 0xE0, "size mismatch"); union idxd_group_flags { struct { - uint32_t tc_a: 3; - uint32_t tc_b: 3; - uint32_t rsvd: 1; - uint32_t use_token_limit: 1; - uint32_t tokens_reserved: 8; - uint32_t rsvd2: 4; - uint32_t tokens_allowed: 8; - uint32_t rsvd3: 4; + uint32_t tc_a : 3; + uint32_t tc_b : 3; + uint32_t reserved0 : 1; + uint32_t global_read_buffer_limit: 1; + uint32_t read_buffers_reserved : 8; + uint32_t reserved1: 4; + uint32_t read_buffers_allowed : 8; + uint32_t reserved2 : 4; }; uint32_t raw; }; diff --git a/lib/idxd/idxd_user.c b/lib/idxd/idxd_user.c index 4b39beb9e..779819617 100644 --- a/lib/idxd/idxd_user.c +++ b/lib/idxd/idxd_user.c @@ -240,7 +240,7 @@ idxd_group_config(struct spdk_idxd_device *idxd) idxd->groups[i].id = i; /* Divide BW tokens evenly */ - idxd->groups[i].grpcfg.flags.tokens_allowed = + idxd->groups[i].grpcfg.flags.read_buffers_allowed = user_idxd->registers.groupcap.read_bufs / g_user_dev_cfg.num_groups; } diff --git a/test/unit/lib/idxd/idxd_user.c/idxd_user_ut.c b/test/unit/lib/idxd/idxd_user.c/idxd_user_ut.c index c77bc89b4..0e8a74104 100644 --- a/test/unit/lib/idxd/idxd_user.c/idxd_user_ut.c +++ b/test/unit/lib/idxd/idxd_user.c/idxd_user_ut.c @@ -187,7 +187,7 @@ test_idxd_group_config(void) /* wqe and engine arrays are indexed by group id and are bitmaps of assigned elements. */ CU_ASSERT(wqs[0] == 0x1); CU_ASSERT(engines[0] == 0xf); - CU_ASSERT(flags[0].tokens_allowed == MAX_TOKENS / g_user_dev_cfg.num_groups); + CU_ASSERT(flags[0].read_buffers_allowed == MAX_TOKENS / g_user_dev_cfg.num_groups); /* groups allocated by code under test. */ free(idxd->groups);