Commit e1a9774c authored by Jacek Kalwas's avatar Jacek Kalwas Committed by Tomasz Zawadzki
Browse files

nvmf: clear-out qpair during poll group add



There are operations on nvmf which depends on proper values of qpair
attributes which can be intepreted as internal state.
e.g.
nvmf_ctrlr_process_fabrics_cmd execution relies on qpair->ctrlr
spdk_nvmf_qpair_disconnect relies on qpair->disconnect_started

As poll group add is like a registration of qpair into nvmf lets try
to initialize it to a defined and expected state.

Signed-off-by: default avatarJacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I10494e7f70ff58ec5460cab1de8a52fd21cc4a48
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4479


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent ffbddd4f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -843,6 +843,8 @@ spdk_nvmf_poll_group_add(struct spdk_nvmf_poll_group *group,

	TAILQ_INIT(&qpair->outstanding);
	qpair->group = group;
	qpair->ctrlr = NULL;
	qpair->disconnect_started = false;

	TAILQ_FOREACH(tgroup, &group->tgroups, link) {
		if (tgroup->transport == qpair->transport) {