Commit aabf23d1 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'ethtool-netlink-interface-preliminary-part'



Michal Kubecek says:

====================
ethtool netlink interface, preliminary part

As Jakub Kicinski suggested in ethtool netlink v7 discussion, this
submission consists only of preliminary patches which raised no objections;
first four patches already have Acked-by or Reviewed-by.

- patch 1 exposes permanent hardware address (as shown by "ethtool -P")
  via rtnetlink
- patch 2 is renames existing netlink helper to a better name
- patch 3 and 4 reorganize existing ethtool code (no functional change)
- patch 5 makes the table of link mode names available as an ethtool string
  set (will be needed for the netlink interface)

Once we get these out of the way, v8 of the first part of the ethtool
netlink interface will follow.

Changes from v2 to v3: fix SPDX licence identifiers (patch 3 and 5).

Changes from v1 to v2: restore build time check that all link modes have
assigned a name (patch 5).
====================

Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 545a6822 428c122f
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1735,7 +1735,7 @@ static inline void nla_nest_cancel(struct sk_buff *skb, struct nlattr *start)
}

/**
 * nla_validate_nested - Validate a stream of nested attributes
 * __nla_validate_nested - Validate a stream of nested attributes
 * @start: container attribute
 * @maxtype: maximum attribute type to be expected
 * @policy: validation policy
@@ -1758,7 +1758,7 @@ static inline int __nla_validate_nested(const struct nlattr *start, int maxtype,
}

static inline int
nl80211_validate_nested(const struct nlattr *start, int maxtype,
nla_validate_nested(const struct nlattr *start, int maxtype,
		    const struct nla_policy *policy,
		    struct netlink_ext_ack *extack)
{
+2 −0
Original line number Diff line number Diff line
@@ -593,6 +593,7 @@ struct ethtool_pauseparam {
 * @ETH_SS_RSS_HASH_FUNCS: RSS hush function names
 * @ETH_SS_PHY_STATS: Statistic names, for use with %ETHTOOL_GPHYSTATS
 * @ETH_SS_PHY_TUNABLES: PHY tunable names
 * @ETH_SS_LINK_MODES: link mode names
 */
enum ethtool_stringset {
	ETH_SS_TEST		= 0,
@@ -604,6 +605,7 @@ enum ethtool_stringset {
	ETH_SS_TUNABLES,
	ETH_SS_PHY_STATS,
	ETH_SS_PHY_TUNABLES,
	ETH_SS_LINK_MODES,
};

/**
+1 −0
Original line number Diff line number Diff line
@@ -169,6 +169,7 @@ enum {
	IFLA_MAX_MTU,
	IFLA_PROP_LIST,
	IFLA_ALT_IFNAME, /* Alternative ifname */
	IFLA_PERM_ADDRESS,
	__IFLA_MAX
};

+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ obj-$(CONFIG_NET) += $(tmp-y)

# LLC has to be linked before the files in net/802/
obj-$(CONFIG_LLC)		+= llc/
obj-$(CONFIG_NET)		+= ethernet/ 802/ sched/ netlink/ bpf/
obj-$(CONFIG_NET)		+= ethernet/ 802/ sched/ netlink/ bpf/ ethtool/
obj-$(CONFIG_NETFILTER)		+= netfilter/
obj-$(CONFIG_INET)		+= ipv4/
obj-$(CONFIG_TLS)		+= tls/
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ obj-y := sock.o request_sock.o skbuff.o datagram.o stream.o scm.o \

obj-$(CONFIG_SYSCTL) += sysctl_net_core.o

obj-y		     += dev.o ethtool.o dev_addr_lists.o dst.o netevent.o \
obj-y		     += dev.o dev_addr_lists.o dst.o netevent.o \
			neighbour.o rtnetlink.o utils.o link_watch.o filter.o \
			sock_diag.o dev_ioctl.o tso.o sock_reuseport.o \
			fib_notifier.o xdp.o flow_offload.o
Loading