This patch introduces netdev_walk_all_upper_dev_rcu,
netdev_walk_all_lower_dev and netdev_walk_all_lower_dev_rcu. These
functions recursively walk the adj_list of devices to determine all upper
and lower devices.
The functions take a callback function that is invoked for each device
in the list. I
On 10/17/16 6:21 AM, Stephen Hemminger wrote:
>
> No if/else needed. No cast of void * ptr need. Use const if possible?
>
so much of the stack does not use const and trying to add it for this API does
not work -- the upper or lower device is passed to the callbacks and those
callbacks invoke o
From: Stephen Hemminger
Date: Mon, 17 Oct 2016 05:21:21 -0700
> You should write this more succinctly as:
>
> static bool __netdev_has_upper_dev(struct net_device *upper_dev, void *data)
> {
> struct net_device *dev = data;
>
> return upper_dev == dev;
> }
>
> bool netdev_has_upper
On Fri, 14 Oct 2016 18:28:42 -0700
David Ahern wrote:
>
> /**
> + * netdev_has_upper_dev_all - Check if device is linked to an upper device
> + * @dev: device
> + * @upper_dev: upper device to check
> + *
> + * Find out if a device is linked to specified upper device and return true
> + * in c
This patch introduces netdev_walk_all_upper_dev_rcu,
netdev_walk_all_lower_dev and netdev_walk_all_lower_dev_rcu. These
functions recursively walk the adj_list of devices to determine all upper
and lower devices.
The functions take a callback function that is invoked for each device
in the list. I
Wed, Oct 12, 2016 at 10:51:50PM CEST, d...@cumulusnetworks.com wrote:
>This patch introduces netdev_walk_all_upper_dev_rcu,
>netdev_walk_all_lower_dev and netdev_walk_all_lower_dev_rcu. These
>functions recursively walk the adj_list of devices to determine all upper
>and lower devices.
>
>The funct
This patch introduces netdev_walk_all_upper_dev_rcu,
netdev_walk_all_lower_dev and netdev_walk_all_lower_dev_rcu. These
functions recursively walk the adj_list of devices to determine all upper
and lower devices.
The functions take a callback function that is invoked for each device
in the list. I