Lines Matching refs:trap
117 struct devlink_trap trap; member
185 .trap = PRESTERA_TRAP_DRIVER_CONTROL(ARP_BC, NEIGH_DISCOVERY),
189 .trap = PRESTERA_TRAP_DRIVER_CONTROL(IS_IS, LOCAL_DELIVERY),
193 .trap = PRESTERA_TRAP_DRIVER_CONTROL(OSPF, OSPF),
197 .trap = PRESTERA_TRAP_DRIVER_CONTROL(IP_BC_MAC, LOCAL_DELIVERY),
201 .trap = PRESTERA_TRAP_CONTROL(STP, STP, TRAP),
205 .trap = PRESTERA_TRAP_CONTROL(LACP, LACP, TRAP),
209 .trap = PRESTERA_TRAP_CONTROL(LLDP, LLDP, TRAP),
213 .trap = PRESTERA_TRAP_DRIVER_CONTROL(ROUTER_MC, LOCAL_DELIVERY),
217 .trap = PRESTERA_TRAP_DRIVER_CONTROL(VRRP, VRRP),
221 .trap = PRESTERA_TRAP_DRIVER_CONTROL(DHCP, DHCP),
225 .trap = PRESTERA_TRAP_EXCEPTION(MTU_ERROR, L3_EXCEPTIONS),
229 .trap = PRESTERA_TRAP_DRIVER_CONTROL(MAC_TO_ME, LOCAL_DELIVERY),
233 .trap = PRESTERA_TRAP_EXCEPTION(TTL_ERROR, L3_EXCEPTIONS),
237 .trap = PRESTERA_TRAP_DRIVER_EXCEPTION(IPV4_OPTIONS,
242 .trap = PRESTERA_TRAP_DRIVER_CONTROL(IP_DEFAULT_ROUTE,
247 .trap = PRESTERA_TRAP_CONTROL(LOCAL_ROUTE, LOCAL_DELIVERY,
252 .trap = PRESTERA_TRAP_DRIVER_EXCEPTION(IPV4_ICMP_REDIRECT,
257 .trap = PRESTERA_TRAP_CONTROL(ARP_RESPONSE, NEIGH_DISCOVERY,
262 .trap = PRESTERA_TRAP_DRIVER_CONTROL(ACL_CODE_0, ACL_TRAP),
266 .trap = PRESTERA_TRAP_DRIVER_CONTROL(ACL_CODE_1, ACL_TRAP),
270 .trap = PRESTERA_TRAP_DRIVER_CONTROL(ACL_CODE_2, ACL_TRAP),
274 .trap = PRESTERA_TRAP_DRIVER_CONTROL(ACL_CODE_3, ACL_TRAP),
278 .trap = PRESTERA_TRAP_DRIVER_CONTROL(ACL_CODE_4, ACL_TRAP),
282 .trap = PRESTERA_TRAP_DRIVER_CONTROL(ACL_CODE_5, ACL_TRAP),
286 .trap = PRESTERA_TRAP_DRIVER_CONTROL(ACL_CODE_6, ACL_TRAP),
290 .trap = PRESTERA_TRAP_DRIVER_CONTROL(ACL_CODE_7, ACL_TRAP),
294 .trap = PRESTERA_TRAP_DRIVER_CONTROL(BGP, BGP),
298 .trap = PRESTERA_TRAP_DRIVER_CONTROL(SSH, LOCAL_DELIVERY),
302 .trap = PRESTERA_TRAP_DRIVER_CONTROL(TELNET, LOCAL_DELIVERY),
306 .trap = PRESTERA_TRAP_DRIVER_CONTROL(ICMP, LOCAL_DELIVERY),
310 .trap = PRESTERA_TRAP_DRIVER_DROP(RXDMA_DROP, BUFFER_DROPS),
314 .trap = PRESTERA_TRAP_DRIVER_DROP(PORT_NO_VLAN, L2_DROPS),
318 .trap = PRESTERA_TRAP_DRIVER_DROP(LOCAL_PORT, L2_DROPS),
322 .trap = PRESTERA_TRAP_DRIVER_DROP(INVALID_SA, L2_DROPS),
326 .trap = PRESTERA_TRAP_DRIVER_DROP(ILLEGAL_IP_ADDR, L3_DROPS),
330 .trap = PRESTERA_TRAP_DRIVER_DROP(ILLEGAL_IPV4_HDR, L3_DROPS),
334 .trap = PRESTERA_TRAP_DRIVER_DROP(IP_UC_DIP_DA_MISMATCH,
339 .trap = PRESTERA_TRAP_DRIVER_DROP(IP_SIP_IS_ZERO, L3_DROPS),
343 .trap = PRESTERA_TRAP_DRIVER_DROP(MET_RED, BUFFER_DROPS),
349 const struct devlink_trap *trap,
370 const struct devlink_trap *trap, void *trap_ctx);
373 const struct devlink_trap *trap,
475 err = devlink_traps_register(devlink, &prestera_trap->trap, 1, in prestera_devlink_traps_register()
486 devlink_traps_unregister(devlink, &prestera_trap->trap, 1); in prestera_devlink_traps_register()
536 if (prestera_trap_items_arr[i].trap.id == trap_id) in prestera_devlink_trap_item_lookup()
544 const struct devlink_trap *trap, void *trap_ctx) in prestera_trap_init() argument
549 trap_item = prestera_devlink_trap_item_lookup(sw, trap->id); in prestera_trap_init()
554 trap_item->action = trap->init_action; in prestera_trap_init()
560 const struct devlink_trap *trap, in prestera_trap_action_set() argument
569 const struct devlink_trap *trap, in prestera_drop_counter_get() argument
576 container_of(trap, struct prestera_trap, trap); in prestera_drop_counter_get()
586 const struct devlink_trap *trap; in prestera_devlink_traps_unregister() local
590 trap = &prestera_trap_items_arr[i].trap; in prestera_devlink_traps_unregister()
591 devlink_traps_unregister(dl, trap, 1); in prestera_devlink_traps_unregister()