1# SPDX-License-Identifier: GPL-2.0
2source ../tc_flower_scale.sh
3
4tc_flower_get_target()
5{
6	local should_fail=$1; shift
7
8	# 6144 (6x1024) is the theoretical maximum.
9	# One bank of 512 rules is taken by the 18-byte MC router rule.
10	# One rule is the ACL catch-all.
11	# 6144 - 512 - 1 = 5631
12	local target=5631
13
14	if ((! should_fail)); then
15		echo $target
16	else
17		echo $((target + 1))
18	fi
19}
20