Lines Matching refs:nsim_trap_data
649 struct nsim_trap_data { struct
786 struct nsim_trap_data *nsim_trap_data; in nsim_dev_trap_report() local
789 nsim_trap_data = nsim_dev->trap_data; in nsim_dev_trap_report()
791 spin_lock(&nsim_trap_data->trap_lock); in nsim_dev_trap_report()
801 nsim_trap_item = &nsim_trap_data->trap_items_arr[i]; in nsim_dev_trap_report()
823 spin_unlock(&nsim_trap_data->trap_lock); in nsim_dev_trap_report()
830 struct nsim_trap_data *nsim_trap_data; in nsim_dev_trap_report_work() local
834 nsim_trap_data = container_of(work, struct nsim_trap_data, in nsim_dev_trap_report_work()
836 nsim_dev = nsim_trap_data->nsim_dev; in nsim_dev_trap_report_work()
864 struct nsim_trap_data *nsim_trap_data; in nsim_dev_traps_init() local
867 nsim_trap_data = kzalloc(sizeof(*nsim_trap_data), GFP_KERNEL); in nsim_dev_traps_init()
868 if (!nsim_trap_data) in nsim_dev_traps_init()
871 nsim_trap_data->trap_items_arr = kcalloc(ARRAY_SIZE(nsim_traps_arr), in nsim_dev_traps_init()
874 if (!nsim_trap_data->trap_items_arr) { in nsim_dev_traps_init()
879 nsim_trap_data->trap_policers_cnt_arr = kcalloc(policers_count, in nsim_dev_traps_init()
882 if (!nsim_trap_data->trap_policers_cnt_arr) { in nsim_dev_traps_init()
891 spin_lock_init(&nsim_trap_data->trap_lock); in nsim_dev_traps_init()
892 nsim_trap_data->nsim_dev = nsim_dev; in nsim_dev_traps_init()
893 nsim_dev->trap_data = nsim_trap_data; in nsim_dev_traps_init()
925 kfree(nsim_trap_data->trap_policers_cnt_arr); in nsim_dev_traps_init()
927 kfree(nsim_trap_data->trap_items_arr); in nsim_dev_traps_init()
929 kfree(nsim_trap_data); in nsim_dev_traps_init()
1051 struct nsim_trap_data *nsim_trap_data = nsim_dev->trap_data; in nsim_dev_trap_item_lookup() local
1056 return &nsim_trap_data->trap_items_arr[i]; in nsim_dev_trap_item_lookup()