History

RDMA/core: Introduce RDMA subsystem ibdev_* print functions

Similarly to dev/netdev/etc printk helpers, add standard printk helpers for the RDMA subsystem. Example output: efa 0000:00:06.0 efa_0: Hello World! efa_0: Hello World! (no parent device set) (NULL ib_device): Hello World! (ibdev is NULL)

Gal Pressman committed 7 years ago

Commit 923abb91 parent b9b0f344 files · +138 −0Browse files

Showing the changes to include/linux (1 of 4 files). Show all

Unified · Split

include/linux/dynamic_debug.h+11−0
@@ -71,6 +71,13 @@ void __dynamic_netdev_dbg(struct _ddebug *descriptor, · 70 unmodified lines
7171 const struct net_device *dev,
7272 const char *fmt, ...);
7373
74+struct ib_device;
75+
76+extern __printf(3, 4)
77+void __dynamic_ibdev_dbg(struct _ddebug *descriptor,
78+ const struct ib_device *ibdev,
79+ const char *fmt, ...);
80+
7481 #define DEFINE_DYNAMIC_DEBUG_METADATA(name, fmt) \
7582 static struct _ddebug __aligned(8) \
7683 __attribute__((section("__verbose"))) name = { \
@@ -154,6 +161,10 @@ void __dynamic_netdev_dbg(struct _ddebug *descriptor, · 77 unmodified lines
154161 _dynamic_func_call(fmt, __dynamic_netdev_dbg, \
155162 dev, fmt, ##__VA_ARGS__)
156163
164+#define dynamic_ibdev_dbg(dev, fmt, ...) \
165+ _dynamic_func_call(fmt, __dynamic_ibdev_dbg, \
166+ dev, fmt, ##__VA_ARGS__)
167+
157168 #define dynamic_hex_dump(prefix_str, prefix_type, rowsize, \
158169 groupsize, buf, len, ascii) \
159170 _dynamic_func_call_no_desc(__builtin_constant_p(prefix_str) ? prefix_str : "hexdump", \

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t