Searched refs:pcpu_stats (Results 1 - 14 of 14) sorted by relevance

/linux-4.4.14/include/linux/
H A Dif_macvlan.h44 struct vlan_pcpu_stats __percpu *pcpu_stats; member in struct:macvlan_dev
71 struct vlan_pcpu_stats *pcpu_stats; macvlan_count_rx() local
73 pcpu_stats = this_cpu_ptr(vlan->pcpu_stats); macvlan_count_rx()
74 u64_stats_update_begin(&pcpu_stats->syncp); macvlan_count_rx()
75 pcpu_stats->rx_packets++; macvlan_count_rx()
76 pcpu_stats->rx_bytes += len; macvlan_count_rx()
78 pcpu_stats->rx_multicast++; macvlan_count_rx()
79 u64_stats_update_end(&pcpu_stats->syncp); macvlan_count_rx()
81 this_cpu_inc(vlan->pcpu_stats->rx_errors); macvlan_count_rx()
H A Dif_team.h177 struct team_pcpu_stats __percpu *pcpu_stats; member in struct:team
H A Dnetdevice.h2074 typeof(type) __percpu *pcpu_stats = alloc_percpu_gfp(type, gfp);\
2075 if (pcpu_stats) { \
2079 stat = per_cpu_ptr(pcpu_stats, __cpu); \
2083 pcpu_stats; \
/linux-4.4.14/drivers/net/team/
H A Dteam_mode_loadbalance.c63 struct lb_pcpu_stats __percpu *pcpu_stats; member in struct:lb_priv
73 struct lb_stats __percpu *pcpu_stats; member in struct:lb_port_priv
193 struct lb_pcpu_stats *pcpu_stats; lb_update_tx_stats() local
197 pcpu_stats = this_cpu_ptr(lb_priv->pcpu_stats); lb_update_tx_stats()
198 port_stats = this_cpu_ptr(lb_port_priv->pcpu_stats); lb_update_tx_stats()
199 hash_stats = &pcpu_stats->hash_stats[hash]; lb_update_tx_stats()
200 u64_stats_update_begin(&pcpu_stats->syncp); lb_update_tx_stats()
203 u64_stats_update_end(&pcpu_stats->syncp); lb_update_tx_stats()
450 struct lb_pcpu_stats *pcpu_stats; lb_stats_refresh() local
473 pcpu_stats = per_cpu_ptr(lb_priv->pcpu_stats, i); for_each_possible_cpu()
474 stats = &pcpu_stats->hash_stats[j]; for_each_possible_cpu()
476 &pcpu_stats->syncp); for_each_possible_cpu()
487 pcpu_stats = per_cpu_ptr(lb_priv->pcpu_stats, i); for_each_possible_cpu()
488 stats = per_cpu_ptr(lb_port_priv->pcpu_stats, i); for_each_possible_cpu()
490 &pcpu_stats->syncp); for_each_possible_cpu()
589 lb_priv->pcpu_stats = alloc_percpu(struct lb_pcpu_stats); lb_init()
590 if (!lb_priv->pcpu_stats) { lb_init()
597 team_lb_stats = per_cpu_ptr(lb_priv->pcpu_stats, i); for_each_possible_cpu()
610 free_percpu(lb_priv->pcpu_stats);
623 free_percpu(lb_priv->pcpu_stats); lb_exit()
631 lb_port_priv->pcpu_stats = alloc_percpu(struct lb_stats); lb_port_enter()
632 if (!lb_port_priv->pcpu_stats) lb_port_enter()
641 free_percpu(lb_port_priv->pcpu_stats); lb_port_leave()
H A Dteam.c736 struct team_pcpu_stats *pcpu_stats; team_handle_frame() local
738 pcpu_stats = this_cpu_ptr(team->pcpu_stats); team_handle_frame()
739 u64_stats_update_begin(&pcpu_stats->syncp); team_handle_frame()
740 pcpu_stats->rx_packets++; team_handle_frame()
741 pcpu_stats->rx_bytes += skb->len; team_handle_frame()
743 pcpu_stats->rx_multicast++; team_handle_frame()
744 u64_stats_update_end(&pcpu_stats->syncp); team_handle_frame()
748 this_cpu_inc(team->pcpu_stats->rx_dropped); team_handle_frame()
1571 team->pcpu_stats = netdev_alloc_pcpu_stats(struct team_pcpu_stats); team_init()
1572 if (!team->pcpu_stats) team_init()
1604 free_percpu(team->pcpu_stats); team_init()
1631 free_percpu(team->pcpu_stats); team_destructor()
1658 struct team_pcpu_stats *pcpu_stats; team_xmit() local
1660 pcpu_stats = this_cpu_ptr(team->pcpu_stats); team_xmit()
1661 u64_stats_update_begin(&pcpu_stats->syncp); team_xmit()
1662 pcpu_stats->tx_packets++; team_xmit()
1663 pcpu_stats->tx_bytes += len; team_xmit()
1664 u64_stats_update_end(&pcpu_stats->syncp); team_xmit()
1666 this_cpu_inc(team->pcpu_stats->tx_dropped); team_xmit()
1793 p = per_cpu_ptr(team->pcpu_stats, i); for_each_possible_cpu()
/linux-4.4.14/drivers/net/ethernet/mellanox/mlxsw/
H A Dcore.c102 struct mlxsw_core_pcpu_stats __percpu *pcpu_stats; member in struct:mlxsw_core
612 p = per_cpu_ptr(mlxsw_core->pcpu_stats, j); for_each_possible_cpu()
628 p = per_cpu_ptr(mlxsw_core->pcpu_stats, j); for_each_possible_cpu()
639 p = per_cpu_ptr(mlxsw_core->pcpu_stats, j); for_each_possible_cpu()
655 p = per_cpu_ptr(mlxsw_core->pcpu_stats, j); for_each_possible_cpu()
810 mlxsw_core->pcpu_stats = mlxsw_core_bus_device_register()
812 if (!mlxsw_core->pcpu_stats) { mlxsw_core_bus_device_register()
843 free_percpu(mlxsw_core->pcpu_stats); mlxsw_core_bus_device_register()
860 free_percpu(mlxsw_core->pcpu_stats); mlxsw_core_bus_device_unregister()
1190 struct mlxsw_core_pcpu_stats *pcpu_stats; mlxsw_core_skb_receive() local
1215 pcpu_stats = this_cpu_ptr(mlxsw_core->pcpu_stats); mlxsw_core_skb_receive()
1216 u64_stats_update_begin(&pcpu_stats->syncp); mlxsw_core_skb_receive()
1217 pcpu_stats->port_rx_packets[local_port]++; mlxsw_core_skb_receive()
1218 pcpu_stats->port_rx_bytes[local_port] += skb->len; mlxsw_core_skb_receive()
1219 pcpu_stats->trap_rx_packets[rx_info->trap_id]++; mlxsw_core_skb_receive()
1220 pcpu_stats->trap_rx_bytes[rx_info->trap_id] += skb->len; mlxsw_core_skb_receive()
1221 u64_stats_update_end(&pcpu_stats->syncp); mlxsw_core_skb_receive()
1228 this_cpu_inc(mlxsw_core->pcpu_stats->trap_rx_invalid); mlxsw_core_skb_receive()
1230 this_cpu_inc(mlxsw_core->pcpu_stats->trap_rx_dropped[rx_info->trap_id]); mlxsw_core_skb_receive()
1232 this_cpu_inc(mlxsw_core->pcpu_stats->port_rx_invalid); mlxsw_core_skb_receive()
1234 this_cpu_inc(mlxsw_core->pcpu_stats->port_rx_dropped[local_port]); mlxsw_core_skb_receive()
H A Dswitchx2.c78 struct mlxsw_sx_port_pcpu_stats __percpu *pcpu_stats; member in struct:mlxsw_sx_port
296 struct mlxsw_sx_port_pcpu_stats *pcpu_stats; mlxsw_sx_port_xmit() local
312 this_cpu_inc(mlxsw_sx_port->pcpu_stats->tx_dropped); mlxsw_sx_port_xmit()
325 pcpu_stats = this_cpu_ptr(mlxsw_sx_port->pcpu_stats); mlxsw_sx_port_xmit()
326 u64_stats_update_begin(&pcpu_stats->syncp); mlxsw_sx_port_xmit()
327 pcpu_stats->tx_packets++; mlxsw_sx_port_xmit()
328 pcpu_stats->tx_bytes += len; mlxsw_sx_port_xmit()
329 u64_stats_update_end(&pcpu_stats->syncp); mlxsw_sx_port_xmit()
331 this_cpu_inc(mlxsw_sx_port->pcpu_stats->tx_dropped); mlxsw_sx_port_xmit()
361 p = per_cpu_ptr(mlxsw_sx_port->pcpu_stats, i); for_each_possible_cpu()
969 mlxsw_sx_port->pcpu_stats = mlxsw_sx_port_create()
971 if (!mlxsw_sx_port->pcpu_stats) { mlxsw_sx_port_create()
1081 free_percpu(mlxsw_sx_port->pcpu_stats); mlxsw_sx_port_create()
1095 free_percpu(mlxsw_sx_port->pcpu_stats); mlxsw_sx_port_remove()
1210 struct mlxsw_sx_port_pcpu_stats *pcpu_stats; mlxsw_sx_rx_listener_func() local
1220 pcpu_stats = this_cpu_ptr(mlxsw_sx_port->pcpu_stats); mlxsw_sx_rx_listener_func()
1221 u64_stats_update_begin(&pcpu_stats->syncp); mlxsw_sx_rx_listener_func()
1222 pcpu_stats->rx_packets++; mlxsw_sx_rx_listener_func()
1223 pcpu_stats->rx_bytes += skb->len; mlxsw_sx_rx_listener_func()
1224 u64_stats_update_end(&pcpu_stats->syncp); mlxsw_sx_rx_listener_func()
H A Dspectrum.c373 struct mlxsw_sp_port_pcpu_stats *pcpu_stats; mlxsw_sp_port_xmit() local
389 this_cpu_inc(mlxsw_sp_port->pcpu_stats->tx_dropped); mlxsw_sp_port_xmit()
396 this_cpu_inc(mlxsw_sp_port->pcpu_stats->tx_dropped); mlxsw_sp_port_xmit()
408 pcpu_stats = this_cpu_ptr(mlxsw_sp_port->pcpu_stats); mlxsw_sp_port_xmit()
409 u64_stats_update_begin(&pcpu_stats->syncp); mlxsw_sp_port_xmit()
410 pcpu_stats->tx_packets++; mlxsw_sp_port_xmit()
411 pcpu_stats->tx_bytes += len; mlxsw_sp_port_xmit()
412 u64_stats_update_end(&pcpu_stats->syncp); mlxsw_sp_port_xmit()
414 this_cpu_inc(mlxsw_sp_port->pcpu_stats->tx_dropped); mlxsw_sp_port_xmit()
460 p = per_cpu_ptr(mlxsw_sp_port->pcpu_stats, i); for_each_possible_cpu()
1233 mlxsw_sp_port->pcpu_stats = mlxsw_sp_port_create()
1235 if (!mlxsw_sp_port->pcpu_stats) { mlxsw_sp_port_create()
1331 free_percpu(mlxsw_sp_port->pcpu_stats); mlxsw_sp_port_create()
1354 free_percpu(mlxsw_sp_port->pcpu_stats); mlxsw_sp_port_remove()
1469 struct mlxsw_sp_port_pcpu_stats *pcpu_stats; mlxsw_sp_rx_listener_func() local
1479 pcpu_stats = this_cpu_ptr(mlxsw_sp_port->pcpu_stats); mlxsw_sp_rx_listener_func()
1480 u64_stats_update_begin(&pcpu_stats->syncp); mlxsw_sp_rx_listener_func()
1481 pcpu_stats->rx_packets++; mlxsw_sp_rx_listener_func()
1482 pcpu_stats->rx_bytes += skb->len; mlxsw_sp_rx_listener_func()
1483 u64_stats_update_end(&pcpu_stats->syncp); mlxsw_sp_rx_listener_func()
H A Dspectrum.h85 struct mlxsw_sp_port_pcpu_stats __percpu *pcpu_stats; member in struct:mlxsw_sp_port
/linux-4.4.14/drivers/net/
H A Dmacvlan.c529 struct vlan_pcpu_stats *pcpu_stats; macvlan_start_xmit() local
531 pcpu_stats = this_cpu_ptr(vlan->pcpu_stats); macvlan_start_xmit()
532 u64_stats_update_begin(&pcpu_stats->syncp); macvlan_start_xmit()
533 pcpu_stats->tx_packets++; macvlan_start_xmit()
534 pcpu_stats->tx_bytes += len; macvlan_start_xmit()
535 u64_stats_update_end(&pcpu_stats->syncp); macvlan_start_xmit()
537 this_cpu_inc(vlan->pcpu_stats->tx_dropped); macvlan_start_xmit()
810 vlan->pcpu_stats = netdev_alloc_pcpu_stats(struct vlan_pcpu_stats); macvlan_init()
811 if (!vlan->pcpu_stats) macvlan_init()
822 free_percpu(vlan->pcpu_stats); macvlan_uninit()
835 if (vlan->pcpu_stats) { macvlan_dev_get_stats64()
843 p = per_cpu_ptr(vlan->pcpu_stats, i); for_each_possible_cpu()
H A Dmacvtap.c842 this_cpu_inc(vlan->pcpu_stats->tx_dropped); macvtap_get_user()
/linux-4.4.14/drivers/net/ipvlan/
H A Dipvlan_main.c126 ipvlan->pcpu_stats = alloc_percpu(struct ipvl_pcpu_stats); ipvlan_init()
127 if (!ipvlan->pcpu_stats) ipvlan_init()
138 free_percpu(ipvlan->pcpu_stats); ipvlan_uninit()
190 pcptr = this_cpu_ptr(ipvlan->pcpu_stats); ipvlan_start_xmit()
197 this_cpu_inc(ipvlan->pcpu_stats->tx_drps); ipvlan_start_xmit()
251 if (ipvlan->pcpu_stats) { ipvlan_get_stats64()
259 pcptr = per_cpu_ptr(ipvlan->pcpu_stats, idx); for_each_possible_cpu()
H A Dipvlan.h70 struct ipvl_pcpu_stats __percpu *pcpu_stats; member in struct:ipvl_dev
H A Dipvlan_core.c28 pcptr = this_cpu_ptr(ipvlan->pcpu_stats); ipvlan_count_rx()
36 this_cpu_inc(ipvlan->pcpu_stats->rx_errs); ipvlan_count_rx()

Completed in 422 milliseconds