aboutsummaryrefslogtreecommitdiffstats
path: root/net/ethtool/netlink.h
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2020-10-05 15:07:36 -0700
committerDavid S. Miller <davem@davemloft.net>2020-10-06 06:25:55 -0700
commit329d9c333ee4a904341d555b72cd6218f4104d53 (patch)
tree21ad16925587cc34e707ba4f7585919f193f8ba9 /net/ethtool/netlink.h
parentethtool: trim policy tables (diff)
downloadlinux-dev-329d9c333ee4a904341d555b72cd6218f4104d53.tar.xz
linux-dev-329d9c333ee4a904341d555b72cd6218f4104d53.zip
ethtool: link up ethnl_header_policy as a nested policy
To get the most out of parsing by the core, and to allow dumping full policies we need to specify which policy applies to nested attrs. For headers it's ethnl_header_policy. $ sed -i 's@\(ETHTOOL_A_.*HEADER\].*=\) { .type = NLA_NESTED },@\1\n\t\tNLA_POLICY_NESTED(ethnl_header_policy),@' net/ethtool/* Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ethtool/netlink.h')
-rw-r--r--net/ethtool/netlink.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ethtool/netlink.h b/net/ethtool/netlink.h
index 2cfbc016393c..281d793d4557 100644
--- a/net/ethtool/netlink.h
+++ b/net/ethtool/netlink.h
@@ -345,6 +345,7 @@ extern const struct ethnl_request_ops ethnl_pause_request_ops;
extern const struct ethnl_request_ops ethnl_eee_request_ops;
extern const struct ethnl_request_ops ethnl_tsinfo_request_ops;
+extern const struct nla_policy ethnl_header_policy[ETHTOOL_A_HEADER_FLAGS + 1];
extern const struct nla_policy ethnl_strset_get_policy[ETHTOOL_A_STRSET_STRINGSETS + 1];
extern const struct nla_policy ethnl_linkinfo_get_policy[ETHTOOL_A_LINKINFO_HEADER + 1];
extern const struct nla_policy ethnl_linkinfo_set_policy[ETHTOOL_A_LINKINFO_TP_MDIX_CTRL + 1];