All of lore.kernel.org
 help / color / mirror / Atom feed
* [iproute2-next] action police: make 'mtu' could be set independently in police action
@ 2020-06-28  1:46 Po Liu
  2020-06-28 20:16 ` Stephen Hemminger
  2020-06-29  2:04 ` [v2,iproute2-next 1/2] action police: change the print message quotes style Po Liu
  0 siblings, 2 replies; 7+ messages in thread
From: Po Liu @ 2020-06-28  1:46 UTC (permalink / raw)
  To: dsahern, linux-kernel, netdev
  Cc: stephen, davem, jhs, vlad, po.liu, claudiu.manoil,
	vladimir.oltean, alexandru.marginean

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>
---
 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 a5bc20c0..89497f67 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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-07-05 15:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-28  1:46 [iproute2-next] action police: make 'mtu' could be set independently in police action Po Liu
2020-06-28 20:16 ` Stephen Hemminger
2020-06-29  2:04 ` [v2,iproute2-next 1/2] action police: change the print message quotes style Po Liu
2020-06-29  2:04   ` [v2,iproute2-next 2/2] action police: make 'mtu' could be set independently in police action Po Liu
2020-06-29  6:54     ` [v2,net-next] net:qos: police action offloading parameter 'burst' change to the original value Po Liu
2020-06-30  0:33       ` David Miller
2020-07-05 15:35   ` [v2,iproute2-next 1/2] action police: change the print message quotes style David Ahern

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.