idxd: No longer set token configuration

This has changed to control the number of read buffers allocated to the
group, but it is only valid to set this register if the device has
indicated it supports it. Further, the default value is what we want
anyway, so we can skip setting it altogether.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ic54672ea6cb16acc7613860e36d9f7033048bd98
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11484
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
This commit is contained in:
Ben Walker 2022-02-09 14:44:59 -07:00 committed by Jim Harris
parent 8c400e494a
commit 3bacd6653d
3 changed files with 9 additions and 15 deletions

View File

@ -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;
};

View File

@ -238,10 +238,6 @@ idxd_group_config(struct spdk_idxd_device *idxd)
for (i = 0; i < g_user_dev_cfg.num_groups; i++) {
idxd->groups[i].idxd = idxd;
idxd->groups[i].id = i;
/* Divide BW tokens evenly */
idxd->groups[i].grpcfg.flags.tokens_allowed =
user_idxd->registers.groupcap.read_bufs / g_user_dev_cfg.num_groups;
}
/*

View File

@ -41,7 +41,6 @@
#define FAKE_REG_SIZE 0x800
#define GRP_CFG_OFFSET 0x400
#define MAX_TOKENS 0x40
#define MAX_ARRAY_SIZE 0x20
SPDK_LOG_REGISTER_COMPONENT(idxd);
@ -172,7 +171,6 @@ test_idxd_group_config(void)
user_idxd.registers.groupcap.num_groups = g_user_dev_cfg.num_groups;
user_idxd.registers.enginecap.num_engines = g_user_dev_cfg.total_engines;
user_idxd.registers.wqcap.num_wqs = g_user_dev_cfg.total_wqs;
user_idxd.registers.groupcap.read_bufs = MAX_TOKENS;
user_idxd.grpcfg_offset = GRP_CFG_OFFSET;
rc = idxd_group_config(idxd);
@ -187,7 +185,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].raw == 0);
/* groups allocated by code under test. */
free(idxd->groups);