idxd: update structures based on latest public DSA spec
Compliant with both current and next gen DSA. Note: some fields in gencap were mapped incorrectly previously, but this did not impact the SPDK driver because the only times those values (max_xfer_shift and max_batch_shift) were used were in asserts. Signed-off-by: paul luse <paul.e.luse@intel.com> Change-Id: I9648184670f661166136e7898d0d8c7e07d8c746 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10966 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
30ea7ecc6f
commit
026f003154
@ -316,17 +316,16 @@ union idxd_gencap_register {
|
||||
uint64_t overlap_copy: 1;
|
||||
uint64_t cache_control_mem: 1;
|
||||
uint64_t cache_control_cache: 1;
|
||||
uint64_t command_cap: 1;
|
||||
uint64_t rsvd: 3;
|
||||
uint64_t int_handle_req: 1;
|
||||
uint64_t dest_readback: 1;
|
||||
uint64_t drain_readback: 1;
|
||||
uint64_t rsvd2: 6;
|
||||
uint64_t max_xfer_shift: 5;
|
||||
uint64_t max_batch_shift: 4;
|
||||
uint64_t max_ims_mult: 6;
|
||||
uint64_t config_en: 1;
|
||||
uint64_t max_descs_per_engine: 8;
|
||||
uint64_t rsvd3: 24;
|
||||
uint64_t config_support: 1;
|
||||
uint64_t rsvd3: 32;
|
||||
} __attribute__((packed));
|
||||
uint64_t raw;
|
||||
};
|
||||
@ -340,11 +339,11 @@ union idxd_wqcap_register {
|
||||
uint64_t rsvd: 20;
|
||||
uint64_t shared_mode: 1;
|
||||
uint64_t dedicated_mode: 1;
|
||||
uint64_t rsvd2: 1;
|
||||
uint64_t ats_support: 1;
|
||||
uint64_t priority: 1;
|
||||
uint64_t occupancy: 1;
|
||||
uint64_t occupancy_int: 1;
|
||||
uint64_t rsvd3: 10;
|
||||
uint64_t rsvd1: 10;
|
||||
} __attribute__((packed));
|
||||
uint64_t raw;
|
||||
};
|
||||
@ -353,9 +352,9 @@ SPDK_STATIC_ASSERT(sizeof(union idxd_wqcap_register) == 8, "size mismatch");
|
||||
union idxd_groupcap_register {
|
||||
struct {
|
||||
uint64_t num_groups: 8;
|
||||
uint64_t total_tokens: 8;
|
||||
uint64_t token_en: 1;
|
||||
uint64_t token_limit: 1;
|
||||
uint64_t read_bufs: 8;
|
||||
uint64_t read_bufs_ctrl: 1;
|
||||
uint64_t read_bus_limit: 1;
|
||||
uint64_t rsvd: 46;
|
||||
} __attribute__((packed));
|
||||
uint64_t raw;
|
||||
|
@ -229,7 +229,7 @@ idxd_group_config(struct spdk_idxd_device *idxd)
|
||||
|
||||
/* Divide BW tokens evenly */
|
||||
idxd->groups[i].grpcfg.flags.tokens_allowed =
|
||||
user_idxd->registers.groupcap.total_tokens / g_user_dev_cfg.num_groups;
|
||||
user_idxd->registers.groupcap.read_bufs / g_user_dev_cfg.num_groups;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -172,7 +172,7 @@ 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.total_tokens = MAX_TOKENS;
|
||||
user_idxd.registers.groupcap.read_bufs = MAX_TOKENS;
|
||||
user_idxd.grpcfg_offset = GRP_CFG_OFFSET;
|
||||
|
||||
rc = idxd_group_config(idxd);
|
||||
|
Loading…
Reference in New Issue
Block a user