action police: make 'mtu' could be set independently in police action

Current police action must set 'rate' and 'burst'. 'mtu' parameter
set the max frame size and could be set alone without 'rate' and 'burst'
in some situation. Offloading to hardware for example, 'mtu' could limit
the flow max frame size.

Signed-off-by: Po Liu <po.liu@nxp.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
This commit is contained in:
Po Liu 2020-06-29 10:04:20 +08:00 committed by David Ahern
parent 3c5570706b
commit bc4d9f982f
1 changed files with 2 additions and 2 deletions

View File

@ -161,8 +161,8 @@ action_ctrl_ok:
return -1;
/* Must at least do late binding, use TB or ewma policing */
if (!rate64 && !avrate && !p.index) {
fprintf(stderr, "'rate' or 'avrate' MUST be specified.\n");
if (!rate64 && !avrate && !p.index && !mtu) {
fprintf(stderr, "'rate' or 'avrate' or 'mtu' MUST be specified.\n");
return -1;
}