netlink: add macro for checking dump ctx size
authorJakub Kicinski <kuba@kernel.org>
Thu, 5 Jan 2023 04:05:21 +0000 (20:05 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 6 Jan 2023 06:13:39 +0000 (22:13 -0800)
commit2c7bc10d0f7b0f66d9042ed88bb3ecd588352a00
tree19b1b26c184a35febcfbdbbd1b1a6c44e62abd82
parent623cd13b165486afaa2df706d49209392f3764ca
netlink: add macro for checking dump ctx size

We encourage casting struct netlink_callback::ctx to a local
struct (in a comment above the field). Provide a convenience
macro for checking if the local struct fits into the ctx.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/netlink.h
net/netfilter/nf_conntrack_netlink.c