diff options
Diffstat (limited to 'net/mpls/internal.h')
| -rw-r--r-- | net/mpls/internal.h | 15 | 
1 files changed, 7 insertions, 8 deletions
| diff --git a/net/mpls/internal.h b/net/mpls/internal.h index 838cdfc10e47..b9f492ddf93b 100644 --- a/net/mpls/internal.h +++ b/net/mpls/internal.h @@ -87,7 +87,7 @@ enum mpls_payload_type {  };  struct mpls_nh { /* next hop label forwarding entry */ -	struct net_device __rcu *nh_dev; +	struct net_device	*nh_dev;  	/* nh_flags is accessed under RCU in the packet path; it is  	 * modified handling netdev events with rtnl lock held @@ -158,17 +158,16 @@ struct mpls_route { /* next hop label forwarding entry */  };  #define for_nexthops(rt) {						\ -	int nhsel; struct mpls_nh *nh;  u8 *__nh;			\ -	for (nhsel = 0, nh = (rt)->rt_nh, __nh = (u8 *)((rt)->rt_nh);	\ +	int nhsel; const struct mpls_nh *nh;				\ +	for (nhsel = 0, nh = (rt)->rt_nh;				\  	     nhsel < (rt)->rt_nhn;					\ -	     __nh += rt->rt_nh_size, nh = (struct mpls_nh *)__nh, nhsel++) +	     nh = (void *)nh + (rt)->rt_nh_size, nhsel++)  #define change_nexthops(rt) {						\ -	int nhsel; struct mpls_nh *nh; u8 *__nh;			\ -	for (nhsel = 0, nh = (struct mpls_nh *)((rt)->rt_nh),		\ -			__nh = (u8 *)((rt)->rt_nh);			\ +	int nhsel; struct mpls_nh *nh;					\ +	for (nhsel = 0, nh = (rt)->rt_nh;				\  	     nhsel < (rt)->rt_nhn;					\ -	     __nh += rt->rt_nh_size, nh = (struct mpls_nh *)__nh, nhsel++) +	     nh = (void *)nh + (rt)->rt_nh_size, nhsel++)  #define endfor_nexthops(rt) } |