Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2161748ybz; Thu, 23 Apr 2020 12:42:30 -0700 (PDT) X-Google-Smtp-Source: APiQypImolk8qu8ZJnqLNeE+KTv1Dw4Jk/b+DTTx5C0njF7tlkqo8sfvPHYaq10AT53oLEPTrnt6 X-Received: by 2002:a17:906:bcec:: with SMTP id op12mr4110156ejb.245.1587670950388; Thu, 23 Apr 2020 12:42:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587670950; cv=none; d=google.com; s=arc-20160816; b=Wvf8jvBUsF8tWUz8hv5HgloIHOJ6MDQ52nmCcEcjAcoK2y4u5GOiFir5gXTUp4lm08 rT9xSrKsskYFVC6e0PV0BXh0PI29B4TkmwEcXdsrGG054Lk8o2Bj/11bcZR3r/SYC+Op O1DZonPRNHaH+P7MuyZLya7zmxR3UuGpP2sFwU5OsAhw6C8/Ia+UvRFzJA+3NN+lA/+t uk6umNQab2y/zh445V4lRiOHlHFSfW2IQJfYp2QRF7ZDaaeGmwF2c4fPKaaEAUib1iT8 k8w0nyKbuQO4YskfzmATD0hcR+kazJ8wsPQAePiaylGIOsqOjYv1ONpGx8wodwAcUQg0 u7WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:dkim-signature; bh=nHlWX/aecXJ2YNlN1aAxvmkSCMZ7pAGN7wLq/UKak3Y=; b=bO/D0Xhddp07yPpT0ru3anIVeCapJfLG6VoIOl9BcjJN/EybgTcbJTNfgT287+qnf9 j1LeVZ1CbL7cz8e17XIOS4xDUGdhgxvYGBlMfGe/ZUU/+FOyhJkxAX4Tcgh5vMvYJk0j 9u4e/hQhvwFBxNG0NdnuFUjwMODe+vm0chUSGrXjO1LccB5F5ILcxsZJcj5ibirKZuZ0 ywRqRVax+Xf0+7H0IzDhDArSo5NtizKiSe1/+o/ytJWDIDr8S1EcjLvJlr6Fyla4eSqQ cXLjh8fYZeTEc7CR+9v8OeMsFzulyukCXNv55VM1kPVsoAc1R6OWvtLlJRPu55KyDcKP AuUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=VmiJV0EN; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=microchip.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oj19si1720011ejb.22.2020.04.23.12.42.06; Thu, 23 Apr 2020 12:42:30 -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=fail header.i=@microchip.com header.s=mchp header.b=VmiJV0EN; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728099AbgDWTLf (ORCPT + 99 others); Thu, 23 Apr 2020 15:11:35 -0400 Received: from esa5.microchip.iphmx.com ([216.71.150.166]:37045 "EHLO esa5.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726296AbgDWTLe (ORCPT ); Thu, 23 Apr 2020 15:11:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1587669094; x=1619205094; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=+cVjfYAvD3unz6/hlGHc2ikrQ4gswyF1rlxFN2YivHk=; b=VmiJV0ENqhfTJ/daRhsW+T80el7COvVR7Uhp2LtMcEJZpSYMT5IXqtHz DUEYWJFcOcYBf41dIjeSpyv4F3fjVefWNjiwLcTKYPYUKhMRExIRdeXyP Bbjh5/gLCVmQjS9KafatDH8qywv+4C6rEmheECLPk6DFPNIKvCsRa+7Yp wCDB9cvEBG3QhBBMQ1QFgBwwqOSOBEbAFPJrxAIS99gAZhJVgeDifGGCt EMxvb+x+ZWYAM3Cbsy2CIi09scX1n2K1mLIpZJh7cG7puKf43twCDH1SN ZbaUX6BON4M2mM/zJXCO3DlGKeaQ8WQM3zlBRwAk+zTFVg1g6daqYQeFA A==; IronPort-SDR: iHfHgFDexiVhSHmxfaViEIXRiY8e+MXC3cnM/YGOy+vDxVWcImOZAZIYrQttPmt3uHYNLLJcFL jxAuIt1KC+YK+zpfveo0gNWmghvYTxZMV6LcyNQzQdPyZixq8/MGJko/t4piTy6d4dGxiCHq0o iFy0lrW3pOzrn8XaCxR645jX3RMfvpQrWtAXQXv1wRsq3Y2zWUaZpxzrVxAcCQkwshYUqbcm8C KS9GmqBZZXfTxttS/z0nW+ZG6Cb0Z/a5oeOb4VBGvUwJM5P7ExJ1Bs1Hu9Zb7UNr3zoWv9pikX Nag= X-IronPort-AV: E=Sophos;i="5.73,307,1583218800"; d="scan'208";a="73628295" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 23 Apr 2020 12:11:33 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 23 Apr 2020 12:11:34 -0700 Received: from localhost (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Thu, 23 Apr 2020 12:11:33 -0700 Date: Thu, 23 Apr 2020 21:11:31 +0200 From: "Allan W. Nielsen" To: Vladimir Oltean CC: Po Liu , "David S. Miller" , lkml , netdev , "Vinicius Costa Gomes" , Claudiu Manoil , Vladimir Oltean , Alexandru Marginean , , , , , Jiri Pirko , Ido Schimmel , Alexandre Belloni , Microchip Linux Driver Support , Jakub Kicinski , Jamal Hadi Salim , Cong Wang , , , , Murali Karicheri , Andre Guedes , "Stephen Hemminger" Subject: Re: [v3,net-next 1/4] net: qos: introduce a gate control flow action Message-ID: <20200423191131.c257srsnicyrhol6@ws.localdomain> References: <20200418011211.31725-5-Po.Liu@nxp.com> <20200422024852.23224-1-Po.Liu@nxp.com> <20200422024852.23224-2-Po.Liu@nxp.com> <20200422191910.gacjlviegrjriwcx@ws.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22.04.2020 22:28, Vladimir Oltean wrote: >> >> tc qdisc add dev eth0 ingress >> > >> >> tc filter add dev eth0 parent ffff: protocol ip \ >> > flower src_ip 192.168.0.20 \ >> > action gate index 2 clockid CLOCK_TAI \ >> > sched-entry open 200000000 -1 8000000 \ >> > sched-entry close 100000000 -1 -1 >> >> First of all, it is a long time since I read the 802.1Qci and when I did >> it, it was a draft. So please let me know if I'm completly off here. >> >> I know you are focusing on the gate control in this patch serie, but I >> assume that you later will want to do the policing and flow-meter as >> well. And it could make sense to consider how all of this work >> toghether. >> >> A common use-case for the policing is to have multiple rules pointing at >> the same policing instance. Maybe you want the sum of the traffic on 2 >> ports to be limited to 100mbit. If you specify such action on the >> individual rule (like done with the gate), then you can not have two >> rules pointing at the same policer instance. >> >> Long storry short, have you considered if it would be better to do >> something like: >> >> tc filter add dev eth0 parent ffff: protocol ip \ >> flower src_ip 192.168.0.20 \ >> action psfp-id 42 >> >> And then have some other function to configure the properties of psfp-id >> 42? >> >> >> /Allan >> > >It is very good that you brought it up though, since in my opinion too >it is a rather important aspect, and it seems that the fact this >feature is already designed-in was a bit too subtle. > >"psfp-id" is actually his "index" argument. Ahh.. Thanks for clarifying, I missed this point completly.