+37
−15
Loading
The qpair state is set in multiple code paths. Having nvme_tcp_qpair_set_recv_state as a macro makes it possible to see the caller. Moreover, added the state to ERRLOG. Intentionally skipped DEBUGLOG as it is covered by the nvme_tcp_qpair_set_recv_state now. Unit test was adjusted to suppress compilation warning nvme_tcp.c:39:76: warning: the address of ‘tqpair’ will always evaluate as ‘true’ [-Waddress] 39 | #define NVME_TQPAIR_ERRLOG(tqpair, format, ...) NVME_QPAIR_ERRLOG((tqpair) ? &(tqpair)->qpair : NULL, "[%s] " format, (tqpair) ? nvme_tcp_qpair_state_string((tqpair)->state) : "", ##__VA_ARGS__) Change-Id: I5bc9a152d57aac2f63defa2004c22240c956a051 Signed-off-by:Jacek Kalwas <jacek.kalwas@nutanix.com> Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/26601 Community-CI: Mellanox Build Bot Reviewed-by:
Tomasz Zawadzki <tomasz@tzawadzki.com> Tested-by:
SPDK Automated Test System <spdkbot@gmail.com> Reviewed-by:
Jim Harris <jim.harris@nvidia.com>