Lines Matching refs:trap
287 const struct ocelot_vcap_filter *trap) in felix_trap_get_cpu_port() argument
292 if (WARN_ON(!trap->ingress_port_mask)) in felix_trap_get_cpu_port()
295 first_port = __ffs(trap->ingress_port_mask); in felix_trap_get_cpu_port()
311 struct ocelot_vcap_filter *trap; in felix_update_trapping_destinations() local
326 list_for_each_entry(trap, &block_vcap_is2->rules, list) { in felix_update_trapping_destinations()
327 if (!trap->is_trap) in felix_update_trapping_destinations()
337 port_mask = BIT(felix_trap_get_cpu_port(ds, trap)); in felix_update_trapping_destinations()
338 cpu_copy_ena = !!trap->take_ts; in felix_update_trapping_destinations()
348 if (trap->action.mask_mode == mask_mode && in felix_update_trapping_destinations()
349 trap->action.port_mask == port_mask && in felix_update_trapping_destinations()
350 trap->action.cpu_copy_ena == cpu_copy_ena) in felix_update_trapping_destinations()
353 trap->action.mask_mode = mask_mode; in felix_update_trapping_destinations()
354 trap->action.port_mask = port_mask; in felix_update_trapping_destinations()
355 trap->action.cpu_copy_ena = cpu_copy_ena; in felix_update_trapping_destinations()
357 err = ocelot_vcap_filter_replace(ocelot, trap); in felix_update_trapping_destinations()