[[RFC] iproute2-next] rdma: Add the prefix for driver attributes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We need to increase the prefix named drv_ to
distinguish whether the attribute is from
IB/core or the driver attribute.

Signed-off-by: Lijun Ou <oulijun@xxxxxxxxxx>
---
 rdma/utils.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/rdma/utils.c b/rdma/utils.c
index 069d44f..8890981 100644
--- a/rdma/utils.c
+++ b/rdma/utils.c
@@ -720,7 +720,7 @@ static int print_driver_string(struct rd *rd, const char *key_str,
 		jsonw_string_field(rd->jw, key_str, val_str);
 		return 0;
 	} else {
-		return pr_out("%s %s ", key_str, val_str);
+		return pr_out("drv_%s %s ", key_str, val_str);
 	}
 }
 
@@ -733,9 +733,9 @@ static int print_driver_s32(struct rd *rd, const char *key_str, int32_t val,
 	}
 	switch (print_type) {
 	case RDMA_NLDEV_PRINT_TYPE_UNSPEC:
-		return pr_out("%s %d ", key_str, val);
+		return pr_out("drv_%s %d ", key_str, val);
 	case RDMA_NLDEV_PRINT_TYPE_HEX:
-		return pr_out("%s 0x%x ", key_str, val);
+		return pr_out("drv_%s 0x%x ", key_str, val);
 	default:
 		return -EINVAL;
 	}
@@ -750,9 +750,9 @@ static int print_driver_u32(struct rd *rd, const char *key_str, uint32_t val,
 	}
 	switch (print_type) {
 	case RDMA_NLDEV_PRINT_TYPE_UNSPEC:
-		return pr_out("%s %u ", key_str, val);
+		return pr_out("drv_%s %u ", key_str, val);
 	case RDMA_NLDEV_PRINT_TYPE_HEX:
-		return pr_out("%s 0x%x ", key_str, val);
+		return pr_out("drv_%s 0x%x ", key_str, val);
 	default:
 		return -EINVAL;
 	}
@@ -767,9 +767,9 @@ static int print_driver_s64(struct rd *rd, const char *key_str, int64_t val,
 	}
 	switch (print_type) {
 	case RDMA_NLDEV_PRINT_TYPE_UNSPEC:
-		return pr_out("%s %" PRId64 " ", key_str, val);
+		return pr_out("drv_%s %" PRId64 " ", key_str, val);
 	case RDMA_NLDEV_PRINT_TYPE_HEX:
-		return pr_out("%s 0x%" PRIx64 " ", key_str, val);
+		return pr_out("drv_%s 0x%" PRIx64 " ", key_str, val);
 	default:
 		return -EINVAL;
 	}
@@ -784,9 +784,9 @@ static int print_driver_u64(struct rd *rd, const char *key_str, uint64_t val,
 	}
 	switch (print_type) {
 	case RDMA_NLDEV_PRINT_TYPE_UNSPEC:
-		return pr_out("%s %" PRIu64 " ", key_str, val);
+		return pr_out("drv_%s %" PRIu64 " ", key_str, val);
 	case RDMA_NLDEV_PRINT_TYPE_HEX:
-		return pr_out("%s 0x%" PRIx64 " ", key_str, val);
+		return pr_out("drv_%s 0x%" PRIx64 " ", key_str, val);
 	default:
 		return -EINVAL;
 	}
-- 
1.9.1




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux