]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - net/ethtool/tsinfo.c
ethtool: trim policy tables
authorJakub Kicinski <kuba@kernel.org>
Mon, 5 Oct 2020 22:07:35 +0000 (15:07 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Oct 2020 13:25:55 +0000 (06:25 -0700)
commitff419afa43109e05d42d75629f21d9fd87f635ea
treeaea540f88230add4ac90d08ca3d336a2a9a9deea
parent5028588b62cbda74744f4f28b35f618e5b1078ef
ethtool: trim policy tables

Since ethtool uses strict attribute validation there's no need
to initialize all attributes in policy tables. 0 is NLA_UNSPEC
which is going to be rejected. Remove the NLA_REJECTs.

Similarly attributes above maxattrs are rejected, so there's
no need to always size the policy tables to ETHTOOL_A_..._MAX.

v2: - new patch

Suggested-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
19 files changed:
net/ethtool/bitset.c
net/ethtool/cabletest.c
net/ethtool/channels.c
net/ethtool/coalesce.c
net/ethtool/debug.c
net/ethtool/eee.c
net/ethtool/features.c
net/ethtool/linkinfo.c
net/ethtool/linkmodes.c
net/ethtool/linkstate.c
net/ethtool/netlink.c
net/ethtool/netlink.h
net/ethtool/pause.c
net/ethtool/privflags.c
net/ethtool/rings.c
net/ethtool/strset.c
net/ethtool/tsinfo.c
net/ethtool/tunnels.c
net/ethtool/wol.c