diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-04 11:47:58 -0700 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-04 11:47:58 -0700 | 
| commit | 6ba74014c1ab0e37af7de6f64b4eccbbae3cb9e7 (patch) | |
| tree | 8f3892fc44f1e403675a6d7e88fda5c70e56ee4c /include/linux/if_macvlan.h | |
| parent | 5abd9ccced7a726c817dd6b5b96bc933859138d1 (diff) | |
| parent | 3ff1c25927e3af61c6bf0e4ed959504058ae4565 (diff) | |
| download | olio-linux-3.10-6ba74014c1ab0e37af7de6f64b4eccbbae3cb9e7.tar.xz olio-linux-3.10-6ba74014c1ab0e37af7de6f64b4eccbbae3cb9e7.zip  | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1443 commits)
  phy/marvell: add 88ec048 support
  igb: Program MDICNFG register prior to PHY init
  e1000e: correct MAC-PHY interconnect register offset for 82579
  hso: Add new product ID
  can: Add driver for esd CAN-USB/2 device
  l2tp: fix export of header file for userspace
  can-raw: Fix skb_orphan_try handling
  Revert "net: remove zap_completion_queue"
  net: cleanup inclusion
  phy/marvell: add 88e1121 interface mode support
  u32: negative offset fix
  net: Fix a typo from "dev" to "ndev"
  igb: Use irq_synchronize per vector when using MSI-X
  ixgbevf: fix null pointer dereference due to filter being set for VLAN 0
  e1000e: Fix irq_synchronize in MSI-X case
  e1000e: register pm_qos request on hardware activation
  ip_fragment: fix subtracting PPPOE_SES_HLEN from mtu twice
  net: Add getsockopt support for TCP thin-streams
  cxgb4: update driver version
  cxgb4: add new PCI IDs
  ...
Manually fix up conflicts in:
 - drivers/net/e1000e/netdev.c: due to pm_qos registration
   infrastructure changes
 - drivers/net/phy/marvell.c: conflict between adding 88ec048 support
   and cleaning up the IDs
 - drivers/net/wireless/ipw2x00/ipw2100.c: trivial ipw2100_pm_qos_req
   conflict (registration change vs marking it static)
Diffstat (limited to 'include/linux/if_macvlan.h')
| -rw-r--r-- | include/linux/if_macvlan.h | 23 | 
1 files changed, 12 insertions, 11 deletions
diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h index 1ffaeffeff7..35280b30229 100644 --- a/include/linux/if_macvlan.h +++ b/include/linux/if_macvlan.h @@ -6,6 +6,7 @@  #include <linux/netdevice.h>  #include <linux/netlink.h>  #include <net/netlink.h> +#include <linux/u64_stats_sync.h>  #if defined(CONFIG_MACVTAP) || defined(CONFIG_MACVTAP_MODULE)  struct socket *macvtap_get_socket(struct file *); @@ -27,14 +28,16 @@ struct macvtap_queue;   *	struct macvlan_rx_stats - MACVLAN percpu rx stats   *	@rx_packets: number of received packets   *	@rx_bytes: number of received bytes - *	@multicast: number of received multicast packets + *	@rx_multicast: number of received multicast packets + *	@syncp: synchronization point for 64bit counters   *	@rx_errors: number of errors   */  struct macvlan_rx_stats { -	unsigned long rx_packets; -	unsigned long rx_bytes; -	unsigned long multicast; -	unsigned long rx_errors; +	u64			rx_packets; +	u64			rx_bytes; +	u64			rx_multicast; +	struct u64_stats_sync	syncp; +	unsigned long		rx_errors;  };  struct macvlan_dev { @@ -56,12 +59,14 @@ static inline void macvlan_count_rx(const struct macvlan_dev *vlan,  {  	struct macvlan_rx_stats *rx_stats; -	rx_stats = per_cpu_ptr(vlan->rx_stats, smp_processor_id()); +	rx_stats = this_cpu_ptr(vlan->rx_stats);  	if (likely(success)) { +		u64_stats_update_begin(&rx_stats->syncp);  		rx_stats->rx_packets++;;  		rx_stats->rx_bytes += len;  		if (multicast) -			rx_stats->multicast++; +			rx_stats->rx_multicast++; +		u64_stats_update_end(&rx_stats->syncp);  	} else {  		rx_stats->rx_errors++;  	} @@ -86,8 +91,4 @@ extern int macvlan_link_register(struct rtnl_link_ops *ops);  extern netdev_tx_t macvlan_start_xmit(struct sk_buff *skb,  				      struct net_device *dev); - -extern struct sk_buff *(*macvlan_handle_frame_hook)(struct macvlan_port *, -						    struct sk_buff *); -  #endif /* _LINUX_IF_MACVLAN_H */  |