Lines Matching refs:hw_data

304 net_dm_hw_reset_per_cpu_data(struct per_cpu_dm_data *hw_data)  in net_dm_hw_reset_per_cpu_data()  argument
316 mod_timer(&hw_data->send_timer, jiffies + HZ / 10); in net_dm_hw_reset_per_cpu_data()
319 raw_spin_lock_irqsave(&hw_data->lock, flags); in net_dm_hw_reset_per_cpu_data()
320 swap(hw_data->hw_entries, hw_entries); in net_dm_hw_reset_per_cpu_data()
321 raw_spin_unlock_irqrestore(&hw_data->lock, flags); in net_dm_hw_reset_per_cpu_data()
412 struct per_cpu_dm_data *hw_data; in net_dm_hw_summary_work() local
416 hw_data = container_of(work, struct per_cpu_dm_data, dm_alert_work); in net_dm_hw_summary_work()
418 hw_entries = net_dm_hw_reset_per_cpu_data(hw_data); in net_dm_hw_summary_work()
445 struct per_cpu_dm_data *hw_data; in net_dm_hw_trap_summary_probe() local
452 hw_data = this_cpu_ptr(&dm_hw_cpu_data); in net_dm_hw_trap_summary_probe()
453 raw_spin_lock_irqsave(&hw_data->lock, flags); in net_dm_hw_trap_summary_probe()
454 hw_entries = hw_data->hw_entries; in net_dm_hw_trap_summary_probe()
476 if (!timer_pending(&hw_data->send_timer)) { in net_dm_hw_trap_summary_probe()
477 hw_data->send_timer.expires = jiffies + dm_delay * HZ; in net_dm_hw_trap_summary_probe()
478 add_timer(&hw_data->send_timer); in net_dm_hw_trap_summary_probe()
482 raw_spin_unlock_irqrestore(&hw_data->lock, flags); in net_dm_hw_trap_summary_probe()
946 struct per_cpu_dm_data *hw_data; in net_dm_hw_packet_work() local
951 hw_data = container_of(work, struct per_cpu_dm_data, dm_alert_work); in net_dm_hw_packet_work()
955 spin_lock_irqsave(&hw_data->drop_queue.lock, flags); in net_dm_hw_packet_work()
956 skb_queue_splice_tail_init(&hw_data->drop_queue, &list); in net_dm_hw_packet_work()
957 spin_unlock_irqrestore(&hw_data->drop_queue.lock, flags); in net_dm_hw_packet_work()
970 struct per_cpu_dm_data *hw_data; in net_dm_hw_trap_packet_probe() local
991 hw_data = this_cpu_ptr(&dm_hw_cpu_data); in net_dm_hw_trap_packet_probe()
993 spin_lock_irqsave(&hw_data->drop_queue.lock, flags); in net_dm_hw_trap_packet_probe()
994 if (skb_queue_len(&hw_data->drop_queue) < net_dm_queue_len) in net_dm_hw_trap_packet_probe()
995 __skb_queue_tail(&hw_data->drop_queue, nskb); in net_dm_hw_trap_packet_probe()
998 spin_unlock_irqrestore(&hw_data->drop_queue.lock, flags); in net_dm_hw_trap_packet_probe()
1000 schedule_work(&hw_data->dm_alert_work); in net_dm_hw_trap_packet_probe()
1005 spin_unlock_irqrestore(&hw_data->drop_queue.lock, flags); in net_dm_hw_trap_packet_probe()
1006 u64_stats_update_begin(&hw_data->stats.syncp); in net_dm_hw_trap_packet_probe()
1007 u64_stats_inc(&hw_data->stats.dropped); in net_dm_hw_trap_packet_probe()
1008 u64_stats_update_end(&hw_data->stats.syncp); in net_dm_hw_trap_packet_probe()
1067 struct per_cpu_dm_data *hw_data = &per_cpu(dm_hw_cpu_data, cpu); in net_dm_hw_monitor_start() local
1070 INIT_WORK(&hw_data->dm_alert_work, ops->hw_work_item_func); in net_dm_hw_monitor_start()
1071 timer_setup(&hw_data->send_timer, sched_send_work, 0); in net_dm_hw_monitor_start()
1072 hw_entries = net_dm_hw_reset_per_cpu_data(hw_data); in net_dm_hw_monitor_start()
1088 struct per_cpu_dm_data *hw_data = &per_cpu(dm_hw_cpu_data, cpu); in net_dm_hw_monitor_start() local
1091 del_timer_sync(&hw_data->send_timer); in net_dm_hw_monitor_start()
1092 cancel_work_sync(&hw_data->dm_alert_work); in net_dm_hw_monitor_start()
1093 while ((skb = __skb_dequeue(&hw_data->drop_queue))) { in net_dm_hw_monitor_start()
1122 struct per_cpu_dm_data *hw_data = &per_cpu(dm_hw_cpu_data, cpu); in net_dm_hw_monitor_stop() local
1125 del_timer_sync(&hw_data->send_timer); in net_dm_hw_monitor_stop()
1126 cancel_work_sync(&hw_data->dm_alert_work); in net_dm_hw_monitor_stop()
1127 while ((skb = __skb_dequeue(&hw_data->drop_queue))) { in net_dm_hw_monitor_stop()
1491 struct per_cpu_dm_data *hw_data = &per_cpu(dm_hw_cpu_data, cpu); in net_dm_hw_stats_read() local
1492 struct net_dm_stats *cpu_stats = &hw_data->stats; in net_dm_hw_stats_read()
1711 struct per_cpu_dm_data *hw_data; in net_dm_hw_cpu_data_init() local
1713 hw_data = &per_cpu(dm_hw_cpu_data, cpu); in net_dm_hw_cpu_data_init()
1714 __net_dm_cpu_data_init(hw_data); in net_dm_hw_cpu_data_init()
1719 struct per_cpu_dm_data *hw_data; in net_dm_hw_cpu_data_fini() local
1721 hw_data = &per_cpu(dm_hw_cpu_data, cpu); in net_dm_hw_cpu_data_fini()
1722 kfree(hw_data->hw_entries); in net_dm_hw_cpu_data_fini()
1723 __net_dm_cpu_data_fini(hw_data); in net_dm_hw_cpu_data_fini()