dev: introduce dev_get_iflink()
The goal of this patch is to prepare the removal of the iflink field. It introduces a new ndo function, which will be implemented by virtual interfaces. There is no functional change into this patch. All readers of iflink field now call dev_get_iflink(). Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
033f46b3c1
commit
a54acb3a6f
@@ -1055,8 +1055,8 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,
|
||||
#ifdef CONFIG_RPS
|
||||
nla_put_u32(skb, IFLA_NUM_RX_QUEUES, dev->num_rx_queues) ||
|
||||
#endif
|
||||
(dev->ifindex != dev->iflink &&
|
||||
nla_put_u32(skb, IFLA_LINK, dev->iflink)) ||
|
||||
(dev->ifindex != dev_get_iflink(dev) &&
|
||||
nla_put_u32(skb, IFLA_LINK, dev_get_iflink(dev))) ||
|
||||
(upper_dev &&
|
||||
nla_put_u32(skb, IFLA_MASTER, upper_dev->ifindex)) ||
|
||||
nla_put_u8(skb, IFLA_CARRIER, netif_carrier_ok(dev)) ||
|
||||
@@ -2863,8 +2863,8 @@ int ndo_dflt_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
|
||||
nla_put_u32(skb, IFLA_MASTER, br_dev->ifindex)) ||
|
||||
(dev->addr_len &&
|
||||
nla_put(skb, IFLA_ADDRESS, dev->addr_len, dev->dev_addr)) ||
|
||||
(dev->ifindex != dev->iflink &&
|
||||
nla_put_u32(skb, IFLA_LINK, dev->iflink)))
|
||||
(dev->ifindex != dev_get_iflink(dev) &&
|
||||
nla_put_u32(skb, IFLA_LINK, dev_get_iflink(dev))))
|
||||
goto nla_put_failure;
|
||||
|
||||
br_afspec = nla_nest_start(skb, IFLA_AF_SPEC);
|
||||
|
||||
Reference in New Issue
Block a user