From d0183e308e79863f4582f6026e72f6d46ef4f1a0 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Tue, 28 Mar 2023 12:28:21 +0200 Subject: [PATCH] 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 --- src/nvme/fabrics.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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) -- 2.50.1