aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/af_rds.c
diff options
context:
space:
mode:
authorZach Brown <zach.brown@oracle.com>2010-08-03 16:52:47 -0400
committerAndy Grover <andy.grover@oracle.com>2010-09-08 21:16:50 -0400
commit59f740a6aeb2cde2f79fe0df38262d4c1ef35cd8 (patch)
treee05c12cc5c8892bcca3928deb62121b1ee4cedd0 /net/rds/af_rds.c
parent4518071ac1bcb76c64a55a3fddb39fb3d39add41 (diff)
RDS/IB: print string constants in more places
This prints the constant identifier for work completion status and rdma cm event types, like we already do for IB event types. A core string array helper is added that each string type uses. Signed-off-by: Zach Brown <zach.brown@oracle.com>
Diffstat (limited to 'net/rds/af_rds.c')
-rw-r--r--net/rds/af_rds.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/rds/af_rds.c b/net/rds/af_rds.c
index 8e3886d353b5..bb6ad81b671d 100644
--- a/net/rds/af_rds.c
+++ b/net/rds/af_rds.c
@@ -40,6 +40,15 @@
40 40
41#include "rds.h" 41#include "rds.h"
42 42
43char *rds_str_array(char **array, size_t elements, size_t index)
44{
45 if ((index < elements) && array[index])
46 return array[index];
47 else
48 return "unknown";
49}
50EXPORT_SYMBOL(rds_str_array);
51
43/* this is just used for stats gathering :/ */ 52/* this is just used for stats gathering :/ */
44static DEFINE_SPINLOCK(rds_sock_lock); 53static DEFINE_SPINLOCK(rds_sock_lock);
45static unsigned long rds_sock_count; 54static unsigned long rds_sock_count;