lkml.org 
[lkml]   [2020]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[iproute2-next] action police: make 'mtu' could be set independently in police action
Date
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
\
 
 \ /
  Last update: 2020-06-28 03:45    [W:0.089 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site