From: Hannes Reinecke Date: Tue, 28 Mar 2023 10:28:21 +0000 (+0200) Subject: Print out correct TREQ strings for discovery X-Git-Tag: v1.4~6 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d0183e308e79863f4582f6026e72f6d46ef4f1a0;p=users%2Fsagi%2Flibnvme.git Print out correct TREQ strings for discovery The TREQ field in the discover log page is actually a bit field, so we need to update the string mapping to print out all possible combinations correctly. Signed-off-by: Hannes Reinecke --- diff --git a/src/nvme/fabrics.c b/src/nvme/fabrics.c index 6dab5466..c12dbf6a 100644 --- a/src/nvme/fabrics.c +++ b/src/nvme/fabrics.c @@ -110,8 +110,15 @@ static const char * const treqs[] = { [NVMF_TREQ_NOT_SPECIFIED] = "not specified", [NVMF_TREQ_REQUIRED] = "required", [NVMF_TREQ_NOT_REQUIRED] = "not required", - [NVMF_TREQ_DISABLE_SQFLOW] = "not specified, " - "sq flow control disable supported", + [NVMF_TREQ_NOT_SPECIFIED | + NVMF_TREQ_DISABLE_SQFLOW] = "not specified, " + "sq flow control disable supported", + [NVMF_TREQ_REQUIRED | + NVMF_TREQ_DISABLE_SQFLOW] = "required, " + "sq flow control disable supported", + [NVMF_TREQ_NOT_REQUIRED | + NVMF_TREQ_DISABLE_SQFLOW] = "not required, " + "sq flow control disable supported", }; const char *nvmf_treq_str(__u8 treq)