Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2260683ybt; Sun, 28 Jun 2020 13:19:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJvbPNlAKWe2+abJoxwQi6YtKo1MATcYMScc7GejnIj23aAJcxMjaWtosLMZCFm5h0nSlq X-Received: by 2002:a05:6402:363:: with SMTP id s3mr3248969edw.238.1593375541760; Sun, 28 Jun 2020 13:19:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593375541; cv=none; d=google.com; s=arc-20160816; b=t/VYCJeiLr5o3ysNPLeqyS0IBY2VF55gfPP6/SeoFnVXe00xfqfghpP6j7NNz0Mao2 26fuuIp+CBljjKuBUBwdXwhLNRdi8LTh3YJHqt7Vb1c2VhzLMfLBzBsBIXQzF3DcCyIO WRE/2f6gLPyy7whVn1Z7kd7n6DIHpICOWXKcEkfuVYAHjyi9rfWOoaTV5dDMX/5zxQ0R ruYYjyCpnTjg9fjs5HC7js5fP+2giDzQX4bnwe3WVYWdvfaAX6jLx3VlD9YrUiRxwbB1 g8Hvqd0yFIejwXjKnY/tJWq0uHo9exCVIi6mXvscKGDgGB5MmAdt3WsJ4z7Tz2ltZ+Hz gi1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=+7G1cJiL1IaJ+/+KocmI0bkRGjYWF6YUbbOVAYsF63s=; b=HKMildk/8AXg41hng5L+KmyAx3vLdevqhGhZ0JmXnYYk7mHzyI5NsM2RrGFl2QYDCj rDYNp77xWi3AdNtMSf1izkRWkb64YBKlXDtdoglaAjDr5uF9QHrjcTIqlS6FG8MBV3Kc vfTu3k1LUPAtIijatiwkH1L5xKRg4YxlgN+Su7AmOfBseqfUZ8wH/q8t9Jr9SM/NGZV1 vWBuhJlQSuvYPNSGmvb18Y6ANNaEzso3SrRrHNDsfqJIX3R2hMM2i6KsFPSMUkqda3Aq izUFWJSU4foSJYFu8qMr2geHNsPplA3Bm0Xh0/NfsVy3V5vyq6rBYb6NvXTjQwt/ig+0 2WFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=p8g0DnAn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k13si3399183ejb.579.2020.06.28.13.18.27; Sun, 28 Jun 2020 13:19:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@networkplumber-org.20150623.gappssmtp.com header.s=20150623 header.b=p8g0DnAn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726738AbgF1UQU (ORCPT + 99 others); Sun, 28 Jun 2020 16:16:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726695AbgF1UQU (ORCPT ); Sun, 28 Jun 2020 16:16:20 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C2CBC03E979 for ; Sun, 28 Jun 2020 13:16:20 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id q17so6981441pfu.8 for ; Sun, 28 Jun 2020 13:16:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+7G1cJiL1IaJ+/+KocmI0bkRGjYWF6YUbbOVAYsF63s=; b=p8g0DnAnbblnRq6Uq4Hsbr0IiZTuN2Rp65mtL+hgMHWaxsoGSb00VsNX5CczW4oA1F IsV2y/l6REPdK8oUxv1WWuYhu3ihH5vrZ9kN88u5IWlDNNgn2VyUqPjho7sL5pgEFOYo Q7SzlRUysBH3GI6t/EH6Weo1053EgNGy83WuIypjNG8BONmsspnozk3rwODuFRw6u5zE b7/1lwJNdS2ScMuyr8eE4mF7PRkuk1cG2h6h0MBjIxZHNIwPrO1voUM8f98ktxkGh1/s OUdZvXsZYGKRCh+Q4fdLI7rJuBwe/ahroTZr8vPFsPCojtkxJZuXJqhtXj4abU8/9ARt OPDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+7G1cJiL1IaJ+/+KocmI0bkRGjYWF6YUbbOVAYsF63s=; b=rE2gh/JsDA2QXZohLpdwQLlUOV5SRa0/RH1hVjqcH808XU0Uwfbs5HN2zqk36rSuwf e9RIfwzRbnExWw0IvCzsdyfeGmKbAR+KRkO1M4BVekOyg2tXrutWBRxbWSlcHta+gthy Pa8UZQqleyh4joEYQypQqMm/IReIMkKnTFU0BPzyUE3ZpGQ3MFDR1qpHWCn1GcqBxK0a cTQ8jixGfGLdpIWiBMP1XSP1Nk2odXjK8YwigNFWXnmvHzUPG0praZaH7Xr/VBZ0CQ3n iJLCUbIuYEpAC/0EdlfvHwSS1bo/u80dfGoJPbJ2FO7QtRvp1eJAcrAdM2Sap8vsOWl6 DOiQ== X-Gm-Message-State: AOAM530ohV36v2YbMyf1JrD/FJKJTpdkHQRRLe52zx+fi7p/oyOKHQq4 TOirFyqDxoLZzROBXISXY+crUw== X-Received: by 2002:a63:d317:: with SMTP id b23mr7563957pgg.132.1593375379539; Sun, 28 Jun 2020 13:16:19 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id s9sm27793405pgo.22.2020.06.28.13.16.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jun 2020 13:16:19 -0700 (PDT) Date: Sun, 28 Jun 2020 13:16:11 -0700 From: Stephen Hemminger To: Po Liu Cc: dsahern@gmail.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, davem@davemloft.net, jhs@mojatatu.com, vlad@buslov.dev, claudiu.manoil@nxp.com, vladimir.oltean@nxp.com, alexandru.marginean@nxp.com Subject: Re: [iproute2-next] action police: make 'mtu' could be set independently in police action Message-ID: <20200628131611.48a07e81@hermes.lan> In-Reply-To: <20200628014602.13002-1-po.liu@nxp.com> References: <20200628014602.13002-1-po.liu@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 28 Jun 2020 09:46:02 +0800 Po Liu wrote: > 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 > --- > 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"); Missing blank. Your message will come out as: "rate" or "avrate" or "mtu"MUST be specified. The quotes aren't adding to the readability, why not just remove them instead.