diff options
author | Veaceslav Falico | 2013-09-25 09:20:23 +0200 |
---|---|---|
committer | David S. Miller | 2013-09-26 22:02:06 +0200 |
commit | b6ccba4c681fdaf0070e580bf951badf7edc860b (patch) | |
tree | 69182002ffd5eba43619b6f7a1b8fe1273f59296 /net/core | |
parent | bonding: convert bond_has_slaves() to use the neighbour list (diff) | |
download | kernel-qcow2-linux-b6ccba4c681fdaf0070e580bf951badf7edc860b.tar.gz kernel-qcow2-linux-b6ccba4c681fdaf0070e580bf951badf7edc860b.tar.xz kernel-qcow2-linux-b6ccba4c681fdaf0070e580bf951badf7edc860b.zip |
net: add a possibility to get private from netdev_adjacent->list
It will be useful to get first/last element.
CC: "David S. Miller" <davem@davemloft.net>
CC: Eric Dumazet <edumazet@google.com>
CC: Jiri Pirko <jiri@resnulli.us>
CC: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 0aa844aae40b..acc11810805f 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4466,6 +4466,16 @@ struct net_device *netdev_master_upper_dev_get(struct net_device *dev) } EXPORT_SYMBOL(netdev_master_upper_dev_get); +void *netdev_adjacent_get_private(struct list_head *adj_list) +{ + struct netdev_adjacent *adj; + + adj = list_entry(adj_list, struct netdev_adjacent, list); + + return adj->private; +} +EXPORT_SYMBOL(netdev_adjacent_get_private); + /** * netdev_all_upper_get_next_dev_rcu - Get the next dev from upper list * @dev: device |