nvmf: nvmf_tgt_host_trid stores a pg instead of a core
Change-Id: I53bb89f6999ab9bbc4bd8e960970454d60beebee Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452473 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Seth Howell <seth.howell5141@gmail.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
534240380b
commit
e13da83e4a
@ -62,7 +62,7 @@ struct nvmf_tgt_poll_group {
|
||||
|
||||
struct nvmf_tgt_host_trid {
|
||||
struct spdk_nvme_transport_id host_trid;
|
||||
uint32_t core;
|
||||
struct nvmf_tgt_poll_group *pg;
|
||||
uint32_t ref;
|
||||
TAILQ_ENTRY(nvmf_tgt_host_trid) link;
|
||||
};
|
||||
@ -174,8 +174,7 @@ nvmf_tgt_get_pg(struct spdk_nvmf_qpair *qpair)
|
||||
if (tmp_trid && !strncmp(tmp_trid->host_trid.traddr,
|
||||
trid.traddr, SPDK_NVMF_TRADDR_MAX_LEN + 1)) {
|
||||
tmp_trid->ref++;
|
||||
core = tmp_trid->core;
|
||||
pg = &g_poll_groups[core];
|
||||
pg = tmp_trid->pg;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -188,7 +187,7 @@ nvmf_tgt_get_pg(struct spdk_nvmf_qpair *qpair)
|
||||
}
|
||||
/* Get the next available core for the new host */
|
||||
pg = spdk_nvmf_get_next_pg();
|
||||
new_trid->core = pg->core;
|
||||
new_trid->pg = pg;
|
||||
memcpy(new_trid->host_trid.traddr, trid.traddr,
|
||||
SPDK_NVMF_TRADDR_MAX_LEN + 1);
|
||||
TAILQ_INSERT_TAIL(&g_nvmf_tgt_host_trids, new_trid, link);
|
||||
|
Loading…
Reference in New Issue
Block a user