@@ -1,6 +1,6 @@
include ../Config
-RDMA_OBJ = rdma.o utils.o dev.o link.o ipoib.o memory.o
+RDMA_OBJ = rdma.o utils.o dev.o link.o ipoib.o memory.o stats.o protocols.o providers.o monitor.o
TARGETS=rdma
all: $(TARGETS) $(LIBS)
new file mode 100644
@@ -0,0 +1,22 @@
+/*
+ * monitor.c RDMA tool
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ * Authors: Leon Romanovsky <leonro@mellanox.com>
+ */
+
+#include "rdma.h"
+
+int obj_monitor(struct rdma *rd)
+{
+ if (dev_map_init(rd)) {
+ pr_err("There are no RDMA devices\n");
+ return -ENOENT;
+ }
+
+ return 0;
+}
new file mode 100644
@@ -0,0 +1,22 @@
+/*
+ * protocols.c RDMA tool
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ * Authors: Leon Romanovsky <leonro@mellanox.com>
+ */
+
+#include "rdma.h"
+
+int obj_protocols(struct rdma *rd)
+{
+ if (dev_map_init(rd)) {
+ pr_err("There are no RDMA devices\n");
+ return -ENOENT;
+ }
+
+ return 0;
+}
new file mode 100644
@@ -0,0 +1,28 @@
+/*
+ * providers.c RDMA tool
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ * Authors: Leon Romanovsky <leonro@mellanox.com>
+ */
+
+#include "rdma.h"
+
+static void providers_help(char *filename)
+{
+ pr_out("Usage: %s providers show [ DEV ]\n", filename);
+}
+
+int obj_providers(struct rdma *rd)
+{
+ if (dev_map_init(rd)) {
+ pr_err("There are no RDMA devices\n");
+ return -ENOENT;
+ }
+
+ providers_help(rd->filename);
+ return 0;
+}
@@ -17,7 +17,7 @@
static void help(char *name)
{
pr_out("Usage: %s [ OPTIONS ] OBJECT { COMMAND | help }\n"
- "where OBJECT := { dev | link | ipoib | memory }\n"
+ "where OBJECT := { dev | link | ipoib | memory | stats | protocols | providers | monitor }\n"
" OPTIONS := { -V[ersion] }\n", name);
}
@@ -35,6 +35,10 @@ static int rd_cmd(struct rdma *rd)
{ "link", obj_link },
{ "ipoib", obj_ipoib },
{ "memory", obj_memory },
+ { "stats", obj_stats },
+ { "providers", obj_providers },
+ { "protocols", obj_protocols },
+ { "monitor", obj_monitor },
{ "help", obj_help },
{ 0 }
};
@@ -66,6 +66,10 @@ int obj_dev(struct rdma *rd);
int obj_link(struct rdma *rd);
int obj_ipoib(struct rdma *rd);
int obj_memory(struct rdma *rd);
+int obj_protocols(struct rdma *rd);
+int obj_stats(struct rdma *rd);
+int obj_providers(struct rdma *rd);
+int obj_monitor(struct rdma *rd);
/*
* Parser interface
new file mode 100644
@@ -0,0 +1,22 @@
+/*
+ * stats.c RDMA tool
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ * Authors: Leon Romanovsky <leonro@mellanox.com>
+ */
+
+#include "rdma.h"
+
+int obj_stats(struct rdma *rd)
+{
+ if (dev_map_init(rd)) {
+ pr_err("There are no RDMA devices\n");
+ return -ENOENT;
+ }
+
+ return 0;
+}