On Wed, May 12, 2010 at 02:44:53PM -0700, Stephen Hemminger wrote:
Fair point!
OK.
The reason for br_port() is to allow ->br_port to be a void*. If we
eliminate br_port(), then it is necessary to make the definition of the
struct net_bridge_port available everywhere that ->br_port is given to
rcu_dereference(). The reason for this is that Arnd's sparse-based RCU
checking code uses __rcu to tag the data pointed to by an RCU-protected
pointer. This in turn means that rcu_dereference() and friends must
now have access to the pointed-to type, as is done in patch 6 in this
series.
One way to make struct net_bridge_port available is to put:
#include "../../net/bridge/br_private.h"
in include/linux/netdevice.h.
However, when I try this, I get lots of build errors, which was what led
us to the path of making ->br_port be a void*, thus requiring the br_port()
helper function in cases where the caller needs the underlying type.
What should we be doing instead?
Thanx, Paul
--