Skip to contentSkip to conversation

switch trtype and adrfam print

PATCH New Ming Lin 1 participant 1 message Jun 7, 2016 NVMe

lore
Share & tools
lore

Ming Lin

author
#0 lore raw

PATCH 1/1 switch trtype and adrfam print

From: Ming Lin <[email protected]>

Signed-off-by Ming Lin <ming.l at samsung.com>

---

Dave,

Could you help to take a look?
Just to make sure I don't make stupid mistake again.

 fabrics.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)
fabrics.c +15 -15
index d30bef2..0071147 100644
@@ -274,18 +274,15 @@ static void print_discovery_log(struct nvmf_disc_rsp_page_hdr *log, int numrec)
 
 		printf("trtype:  ");
 		switch(e->trtype) {
-		case NVMF_ADDR_FAMILY_IP4:
-			printf("ipv4\n");
-			break;
-		case NVMF_ADDR_FAMILY_IP6:
-			printf("ipv6\n");
-			break;
-		case NVMF_ADDR_FAMILY_IB:
-			printf("ib\n");
+		case NVMF_TRTYPE_RDMA:
+			printf("rdma\n");
 			break;
-		case NVMF_ADDR_FAMILY_FC:
+		case NVMF_TRTYPE_FC:
 			printf("fc\n");
 			break;
+		case NVMF_TRTYPE_LOOP:
+			printf("loop\n");
+			break;
 		default:
 			printf("unknown\n");
 			break;
@@ -293,14 +290,17 @@ static void print_discovery_log(struct nvmf_disc_rsp_page_hdr *log, int numrec)
 
 		printf("adrfam:  ");
 		switch(e->adrfam) {
-		case NVMF_TRTYPE_RDMA:
-			printf("rdma\n");
+		case NVMF_ADDR_FAMILY_IP4:
+			printf("ipv4\n");
 			break;
-		case NVMF_TRTYPE_FC:
-			printf("fc\n");
+		case NVMF_ADDR_FAMILY_IP6:
+			printf("ipv6\n");
 			break;
-		case NVMF_TRTYPE_LOOP:
-			printf("loop\n");
+		case NVMF_ADDR_FAMILY_IB:
+			printf("ib\n");
+			break;
+		case NVMF_ADDR_FAMILY_FC:
+			printf("fc\n");
 			break;
 		default:
 			printf("unknown\n");
Signature · 1 line
1.9.1