1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/infiniband/hw/cxgb4
Michal Kubecek ae0be8de9a netlink: make nla_nest_start() add NLA_F_NESTED flag
Even if the NLA_F_NESTED flag was introduced more than 11 years ago, most
netlink based interfaces (including recently added ones) are still not
setting it in kernel generated messages. Without the flag, message parsers
not aware of attribute semantics (e.g. wireshark dissector or libmnl's
mnl_nlmsg_fprintf()) cannot recognize nested attributes and won't display
the structure of their contents.

Unfortunately we cannot just add the flag everywhere as there may be
userspace applications which check nlattr::nla_type directly rather than
through a helper masking out the flags. Therefore the patch renames
nla_nest_start() to nla_nest_start_noflag() and introduces nla_nest_start()
as a wrapper adding NLA_F_NESTED. The calls which add NLA_F_NESTED manually
are rewritten to use nla_nest_start().

Except for changes in include/net/netlink.h, the patch was generated using
this semantic patch:

@@ expression E1, E2; @@
-nla_nest_start(E1, E2)
+nla_nest_start_noflag(E1, E2)

@@ expression E1, E2; @@
-nla_nest_start_noflag(E1, E2 | NLA_F_NESTED)
+nla_nest_start(E1, E2)

Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-27 17:03:44 -04:00
..
cm.c iw_cxgb4: Make function read_tcb() static 2019-02-19 20:52:19 -07:00
cq.c iw_cxgb4: Use proper enumerated type in c4iw_bar2_addrs 2018-09-25 14:37:17 -06:00
device.c 5.1 Merge Window Pull Request 2019-03-09 15:53:03 -08:00
ev.c rdma/cxgb4: Add support for 64Byte cqes 2018-07-13 11:52:55 -06:00
id_table.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
iw_cxgb4.h RDMA/cxgb4: Remove kref accounting for sync operation 2019-02-15 21:39:15 -07:00
Kconfig iw_cxgb4: add INFINIBAND_ADDR_TRANS dependency 2018-06-04 09:35:24 -06:00
Makefile infiniband: prefix header search paths with $(srctree)/ 2019-01-25 15:28:50 -07:00
mem.c cxgb4: kfree mhp after the debug print 2019-03-04 16:41:30 -04:00
provider.c RDMA: Handle ucontext allocations by IB/core 2019-02-22 14:11:37 -07:00
qp.c RDMA/cxgb4: Remove kref accounting for sync operation 2019-02-15 21:39:15 -07:00
resource.c rdma/cxgb4: Add support for kernel mode SRQ's 2018-07-25 21:08:04 -06:00
restrack.c netlink: make nla_nest_start() add NLA_F_NESTED flag 2019-04-27 17:03:44 -04:00
t4.h iw_cxgb4: complete the cached SRQ buffers 2019-02-08 17:02:05 -07:00
t4fw_ri_api.h iw_cxgb4: Support FW write completion WR 2018-08-02 20:16:02 -06:00