Lines Matching refs:nsim_trap_data
652 struct nsim_trap_data { struct
789 struct nsim_trap_data *nsim_trap_data; in nsim_dev_trap_report() local
792 nsim_trap_data = nsim_dev->trap_data; in nsim_dev_trap_report()
794 spin_lock(&nsim_trap_data->trap_lock); in nsim_dev_trap_report()
804 nsim_trap_item = &nsim_trap_data->trap_items_arr[i]; in nsim_dev_trap_report()
826 spin_unlock(&nsim_trap_data->trap_lock); in nsim_dev_trap_report()
833 struct nsim_trap_data *nsim_trap_data; in nsim_dev_trap_report_work() local
837 nsim_trap_data = container_of(work, struct nsim_trap_data, in nsim_dev_trap_report_work()
839 nsim_dev = nsim_trap_data->nsim_dev; in nsim_dev_trap_report_work()
865 struct nsim_trap_data *nsim_trap_data; in nsim_dev_traps_init() local
868 nsim_trap_data = kzalloc(sizeof(*nsim_trap_data), GFP_KERNEL); in nsim_dev_traps_init()
869 if (!nsim_trap_data) in nsim_dev_traps_init()
872 nsim_trap_data->trap_items_arr = kcalloc(ARRAY_SIZE(nsim_traps_arr), in nsim_dev_traps_init()
875 if (!nsim_trap_data->trap_items_arr) { in nsim_dev_traps_init()
880 nsim_trap_data->trap_policers_cnt_arr = kcalloc(policers_count, in nsim_dev_traps_init()
883 if (!nsim_trap_data->trap_policers_cnt_arr) { in nsim_dev_traps_init()
892 spin_lock_init(&nsim_trap_data->trap_lock); in nsim_dev_traps_init()
893 nsim_trap_data->nsim_dev = nsim_dev; in nsim_dev_traps_init()
894 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()
1054 struct nsim_trap_data *nsim_trap_data = nsim_dev->trap_data; in nsim_dev_trap_item_lookup() local
1059 return &nsim_trap_data->trap_items_arr[i]; in nsim_dev_trap_item_lookup()