repo.or.cz
/
linux
/
fpc-iii.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
WIP FPC-III support
[linux/fpc-iii.git]
/
tools
/
testing
/
selftests
/
drivers
/
net
/
mlxsw
/
spectrum
/
tc_police_scale.sh
blob
e79ac0dad1f4be9da867abcd5d4fab125b1ba7b7
1
# SPDX-License-Identifier: GPL-2.0
2
source
..
/
tc_police_scale.sh
3
4
tc_police_get_target
()
5
{
6
local
should_fail
=
$1
;
shift
7
local
target
8
9
target
=
$
(
devlink_resource_size_get global_policers single_rate_policers
)
10
11
if
((!
should_fail
));
then
12
echo
$target
13
else
14
echo
$
((
target
+
1
))
15
fi
16
}