Home
last modified time | relevance | path

Searched refs:policer (Results 1 – 21 of 21) sorted by relevance

/linux-6.6.21/tools/testing/selftests/drivers/net/mlxsw/
Ddevlink_trap_policer.sh144 devlink trap policer set $DEVLINK_DEV policer 1 rate 0 &> /dev/null
146 devlink trap policer set $DEVLINK_DEV policer 1 \
150 devlink trap policer set $DEVLINK_DEV policer 1 rate 1
152 devlink trap policer set $DEVLINK_DEV policer 1 rate 2000000000
162 devlink trap policer set $DEVLINK_DEV policer 1 burst 0 &> /dev/null
164 devlink trap policer set $DEVLINK_DEV policer 1 burst 17 &> /dev/null
166 devlink trap policer set $DEVLINK_DEV policer 1 burst 8 &> /dev/null
168 devlink trap policer set $DEVLINK_DEV policer 1 \
172 devlink trap policer set $DEVLINK_DEV policer 1 burst 16
174 devlink trap policer set $DEVLINK_DEV policer 1 burst $((2**24))
[all …]
/linux-6.6.21/tools/testing/selftests/drivers/net/netdevsim/
Ddevlink_trap.sh298 devlink trap policer set $DEVLINK_DEV policer 1337 &> /dev/null
300 devlink trap policer show $DEVLINK_DEV policer 1337 &> /dev/null
303 devlink trap policer set $DEVLINK_DEV policer 1 rate 2000 burst 16
312 devlink trap policer set $DEVLINK_DEV policer 1 rate 0 &> /dev/null
314 devlink trap policer set $DEVLINK_DEV policer 1 rate 9000 &> /dev/null
316 devlink trap policer set $DEVLINK_DEV policer 1 burst 2 &> /dev/null
318 devlink trap policer set $DEVLINK_DEV policer 1 rate 65537 &> /dev/null
321 devlink trap policer set $DEVLINK_DEV policer 1 rate 3000 &> /dev/null
339 devlink -s trap policer show $DEVLINK_DEV policer 1 &> /dev/null
342 devlink -s trap policer show $DEVLINK_DEV policer 1 &> /dev/null
[all …]
/linux-6.6.21/drivers/net/ethernet/mellanox/mlxsw/
Dspectrum_policer.c33 struct mlxsw_sp_policer *policer);
37 const struct mlxsw_sp_policer *policer);
117 struct mlxsw_sp_policer *policer) in mlxsw_sp_policer_single_rate_index_alloc() argument
122 id = idr_alloc(&family->policer_idr, policer, family->start_index, in mlxsw_sp_policer_single_rate_index_alloc()
130 policer->index = id; in mlxsw_sp_policer_single_rate_index_alloc()
139 struct mlxsw_sp_policer *policer; in mlxsw_sp_policer_single_rate_index_free() local
144 policer = idr_remove(&family->policer_idr, policer_index); in mlxsw_sp_policer_single_rate_index_free()
147 WARN_ON(!policer); in mlxsw_sp_policer_single_rate_index_free()
149 return policer; in mlxsw_sp_policer_single_rate_index_free()
154 const struct mlxsw_sp_policer *policer) in mlxsw_sp_policer_single_rate_init() argument
[all …]
Dspectrum_trap.c16 struct devlink_trap_policer policer; member
454 .policer = MLXSW_SP_TRAP_POLICER(1, 10 * 1024, 4096),
457 .policer = MLXSW_SP_TRAP_POLICER(2, 128, 128),
460 .policer = MLXSW_SP_TRAP_POLICER(3, 128, 128),
463 .policer = MLXSW_SP_TRAP_POLICER(4, 128, 128),
466 .policer = MLXSW_SP_TRAP_POLICER(5, 16 * 1024, 8192),
469 .policer = MLXSW_SP_TRAP_POLICER(6, 128, 128),
472 .policer = MLXSW_SP_TRAP_POLICER(7, 1024, 512),
475 .policer = MLXSW_SP_TRAP_POLICER(8, 20 * 1024, 8192),
478 .policer = MLXSW_SP_TRAP_POLICER(9, 128, 128),
[all …]
Dcore_acl_flex_actions.c873 struct mlxsw_afa_policer *policer; in mlxsw_afa_policer_create() local
876 policer = kzalloc(sizeof(*policer), GFP_KERNEL); in mlxsw_afa_policer_create()
877 if (!policer) in mlxsw_afa_policer_create()
881 burst, &policer->policer_index, in mlxsw_afa_policer_create()
886 refcount_set(&policer->ref_count, 1); in mlxsw_afa_policer_create()
887 policer->fa_index = fa_index; in mlxsw_afa_policer_create()
889 err = rhashtable_insert_fast(&mlxsw_afa->policer_ht, &policer->ht_node, in mlxsw_afa_policer_create()
894 list_add_tail(&policer->list, &mlxsw_afa->policer_list); in mlxsw_afa_policer_create()
896 return policer; in mlxsw_afa_policer_create()
900 policer->policer_index); in mlxsw_afa_policer_create()
[all …]
Dcore.h404 const struct devlink_trap_policer *policer,
407 const struct devlink_trap_policer *policer);
409 const struct devlink_trap_policer *policer);
411 const struct devlink_trap_policer *policer,
415 const struct devlink_trap_policer *policer,
Dspectrum.h1421 const struct devlink_trap_policer *policer,
1425 const struct devlink_trap_policer *policer);
1427 const struct devlink_trap_policer *policer);
1430 const struct devlink_trap_policer *policer,
1434 const struct devlink_trap_policer *policer,
Dcore.c1657 const struct devlink_trap_policer *policer, in mlxsw_devlink_trap_group_set() argument
1665 return mlxsw_driver->trap_group_set(mlxsw_core, group, policer, extack); in mlxsw_devlink_trap_group_set()
1670 const struct devlink_trap_policer *policer) in mlxsw_devlink_trap_policer_init() argument
1677 return mlxsw_driver->trap_policer_init(mlxsw_core, policer); in mlxsw_devlink_trap_policer_init()
1682 const struct devlink_trap_policer *policer) in mlxsw_devlink_trap_policer_fini() argument
1689 mlxsw_driver->trap_policer_fini(mlxsw_core, policer); in mlxsw_devlink_trap_policer_fini()
1694 const struct devlink_trap_policer *policer, in mlxsw_devlink_trap_policer_set() argument
1703 return mlxsw_driver->trap_policer_set(mlxsw_core, policer, rate, burst, in mlxsw_devlink_trap_policer_set()
1709 const struct devlink_trap_policer *policer, in mlxsw_devlink_trap_policer_counter_get() argument
1717 return mlxsw_driver->trap_policer_counter_get(mlxsw_core, policer, in mlxsw_devlink_trap_policer_counter_get()
/linux-6.6.21/net/devlink/
Dtrap.c28 const struct devlink_trap_policer *policer; member
78 if (policer_item->policer->id == id) in devlink_trap_policer_item_lookup()
500 group_item->policer_item->policer->id)) in devlink_nl_trap_group_fill()
658 const struct devlink_trap_policer *policer; in devlink_trap_group_set() local
675 policer = policer_item ? policer_item->policer : NULL; in devlink_trap_group_set()
677 err = devlink->ops->trap_group_set(devlink, group_item->group, policer, in devlink_trap_group_set()
737 const struct devlink_trap_policer *policer) in devlink_trap_policer_stats_put() argument
746 err = devlink->ops->trap_policer_counter_get(devlink, policer, &drops); in devlink_trap_policer_stats_put()
784 policer_item->policer->id)) in devlink_nl_trap_policer_fill()
796 policer_item->policer); in devlink_nl_trap_policer_fill()
[all …]
/linux-6.6.21/tools/testing/selftests/net/forwarding/
Ddevlink_lib.sh536 devlink -j -p trap policer show | jq '.[]["'$DEVLINK_DEV'"] | length'
543 devlink -j -p trap policer show $DEVLINK_DEV policer $policer_id \
551 devlink -j -p trap policer show $DEVLINK_DEV policer $policer_id \
559 devlink -j -p -s trap policer show $DEVLINK_DEV policer $policer_id \
/linux-6.6.21/Documentation/netlink/specs/
Ddevlink.yaml134 name: trap-policer-id
577 name: trap-policer-get
578 doc: Get trap policer instances.
588 attributes: &trap-policer-id-attrs
591 - trap-policer-id
592 reply: &trap-policer-get-reply
594 attributes: *trap-policer-id-attrs
598 reply: *trap-policer-get-reply
/linux-6.6.21/drivers/net/ethernet/marvell/octeontx2/nic/
Dcn10k.h37 u16 policer, bool map);
Dcn10k.c302 u16 policer, bool map) in cn10k_map_unmap_rq_policer() argument
317 aq->rq.band_prof_id = policer; in cn10k_map_unmap_rq_policer()
/linux-6.6.21/include/net/
Ddevlink.h1382 const struct devlink_trap_policer *policer,
1411 const struct devlink_trap_policer *policer);
1419 const struct devlink_trap_policer *policer);
1424 const struct devlink_trap_policer *policer,
1434 const struct devlink_trap_policer *policer,
Ddsa.h227 struct dsa_mall_policer_tc_entry policer; member
1097 struct dsa_mall_policer_tc_entry *policer);
/linux-6.6.21/Documentation/networking/devlink/
Dprestera.rst141 …- Drops non-conforming packets (dropped by Ingress policer, metering drop), e.g. packet rate excee…
Ddevlink-trap.rst574 the CPU usage, a packet trap policer with a low rate can be bound to the
629 to retrieve the number of packets that were dropped by the policer because its
/linux-6.6.21/drivers/net/netdevsim/
Ddev.c1099 const struct devlink_trap_policer *policer, in nsim_dev_devlink_trap_group_set() argument
1112 const struct devlink_trap_policer *policer, in nsim_dev_devlink_trap_policer_set() argument
1128 const struct devlink_trap_policer *policer, in nsim_dev_devlink_trap_policer_counter_get() argument
1137 cnt = &nsim_dev->trap_data->trap_policers_cnt_arr[policer->id - 1]; in nsim_dev_devlink_trap_policer_counter_get()
/linux-6.6.21/net/dsa/
Dslave.c1440 struct dsa_mall_policer_tc_entry *policer; in dsa_slave_add_cls_matchall_police() local
1478 policer = &mall_tc_entry->policer; in dsa_slave_add_cls_matchall_police()
1479 policer->rate_bytes_per_sec = act->police.rate_bytes_ps; in dsa_slave_add_cls_matchall_police()
1480 policer->burst = act->police.burst; in dsa_slave_add_cls_matchall_police()
1482 err = ds->ops->port_policer_add(ds, dp->index, policer); in dsa_slave_add_cls_matchall_police()
/linux-6.6.21/drivers/net/dsa/ocelot/
Dfelix.c1838 struct dsa_mall_policer_tc_entry *policer) in felix_port_policer_add() argument
1842 .rate = div_u64(policer->rate_bytes_per_sec, 1000) * 8, in felix_port_policer_add()
1843 .burst = policer->burst, in felix_port_policer_add()
/linux-6.6.21/drivers/net/dsa/sja1105/
Dsja1105_main.c2913 struct dsa_mall_policer_tc_entry *policer) in sja1105_port_policer_add() argument
2924 policing[port].rate = div_u64(512 * policer->rate_bytes_per_sec, in sja1105_port_policer_add()
2926 policing[port].smax = policer->burst; in sja1105_port_policer_add()