[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200629020420.30412-2-po.liu@nxp.com>
Date: Mon, 29 Jun 2020 10:04:20 +0800
From: Po Liu <po.liu@....com>
To: dsahern@...il.com, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org
Cc: stephen@...workplumber.org, davem@...emloft.net, jhs@...atatu.com,
vlad@...lov.dev, po.liu@....com, claudiu.manoil@....com,
vladimir.oltean@....com, alexandru.marginean@....com
Subject: [v2,iproute2-next 2/2] 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@....com>
---
v1->v2 changes:
- fix the print message style and add space acked by Stephen Hemminger <stephen@...workplumber.org>
tc/m_police.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tc/m_police.c b/tc/m_police.c
index 7eb47f8e..83b25db4 100644
--- a/tc/m_police.c
+++ b/tc/m_police.c
@@ -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;
}
--
2.17.1
Powered by blists - more mailing lists