Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp877812ybz; Fri, 24 Apr 2020 10:45:23 -0700 (PDT) X-Google-Smtp-Source: APiQypLlbfCb2e8dh5nKp3NeU+AtZ8l555Mg+C31JcVovvwXFiLoB/O9qMnII5KPj0OJAAJx2qfe X-Received: by 2002:a17:906:770b:: with SMTP id q11mr7998548ejm.224.1587750320552; Fri, 24 Apr 2020 10:45:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587750320; cv=none; d=google.com; s=arc-20160816; b=SsSLaOtRRkuXTsnOa66oa6G98QhE/3BlO8aUZw6X26u6dHO0Y9zNnp37Hx09ClXIzC C9cjp8WTUbwrYH9xyJv6xTdH5pvXnXRX8Errp04DLrUoJpv5HWAHtHZGsWnK4O26Q1li C+RYQmePG7CaHqbAYc03EZllfnTy1Xw+iq/D+X4Xx61vWr+zimzuzPNk0QUVGQ3HAs7A SKKKMC5h7HwOL/GBZl3Waus87/dlgS/wU/YhJyTLxuLKP8sHiGZAiRShmZq7m7WIPUjp Mnf7xOQEwqU/kQJWd2E8PC+607hQ+xKuvVTST/iIcqoSgRjRWP2K+/3JcqB0p27s5qpN lkeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=6ynuYCNSzGoFhD9DY3E9J6uJIJUVQ066XlOxHm1u/9Y=; b=HmyJIV63Q9HBzPlG3CcJpmUtwf2WqDHZ8SaQi9mVc7+lclrRagKWEAmfJDIB4Mz5vp 3WmYNI61Dfwc34wZjzeXjtYY1tqzrz9ZDZaKuFsi+zGrZDxa9LtVoXYLlgwbyEzelM2L s0nwxkvKIYyzH4nFmqOi5BUWK4NDZYqZ8giY5dMV7kohQg1M3gQoHXbx2xrnwiOjMMJ4 4AxKGtN+gLeJKDTA1d9RUrKjb6xLy32/eZJHuvdUvn4xmA6zLgP5a4fAQwMYIzvBLbj0 W2BNUK+qbgLrcoGfurFsLCGWN9qYau0l9UinS0S3sLQ9NQmtWdspJ7IZ0csqYPG1yp6A q+QA== ARC-Authentication-Results: i=1; mx.google.com; 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b21si3599760edj.146.2020.04.24.10.44.56; Fri, 24 Apr 2020 10:45:20 -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; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729010AbgDXRlb (ORCPT + 99 others); Fri, 24 Apr 2020 13:41:31 -0400 Received: from mga06.intel.com ([134.134.136.31]:34773 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727022AbgDXRla (ORCPT ); Fri, 24 Apr 2020 13:41:30 -0400 IronPort-SDR: rzc0LJ4Sq9pbdVUkLzZolbVl0GQ/g+d7MuPuA23Tly9+xnxkJaIPWA4aSOBCFYvulF5PBqMYom dM7xy9lc2nCQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2020 10:41:29 -0700 IronPort-SDR: f4RRp7WWJttbUvgxw/9UbApYxaL50ZANvd/0c2wTkhy44+grzEtlQjgdh6D3EnkBa2JITfHCMy lZukeMoNSHNg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,311,1583222400"; d="scan'208";a="457998026" Received: from unknown (HELO ellie) ([10.212.255.230]) by fmsmga006.fm.intel.com with ESMTP; 24 Apr 2020 10:41:28 -0700 From: Vinicius Costa Gomes To: Po Liu , "davem\@davemloft.net" , "linux-kernel\@vger.kernel.org" , "netdev\@vger.kernel.org" Cc: Claudiu Manoil , Vladimir Oltean , Alexandru Marginean , "michael.chan\@broadcom.com" , "vishal\@chelsio.com" , "saeedm\@mellanox.com" , "leon\@kernel.org" , "jiri\@mellanox.com" , "idosch\@mellanox.com" , "alexandre.belloni\@bootlin.com" , "UNGLinuxDriver\@microchip.com" , "kuba\@kernel.org" , "jhs\@mojatatu.com" , "xiyou.wangcong\@gmail.com" , "simon.horman\@netronome.com" , "pablo\@netfilter.org" , "moshe\@mellanox.com" , "m-karicheri2\@ti.com" , "andre.guedes\@linux.intel.com" , "stephen\@networkplumber.org" Subject: RE: [EXT] Re: [v3,net-next 1/4] net: qos: introduce a gate control flow action In-Reply-To: References: <20200418011211.31725-5-Po.Liu@nxp.com> <20200422024852.23224-1-Po.Liu@nxp.com> <20200422024852.23224-2-Po.Liu@nxp.com> <878sim2jcs.fsf@intel.com> Date: Fri, 24 Apr 2020 10:41:28 -0700 Message-ID: <874kt83ho7.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Po Liu writes: >> >> One idea that just happened, if you find a way to enable RX timestamping >> and can rely that all packets have a timestamp, the code can simplified a >> lot. You wouldn't need any hrtimers, and deciding to drop or not a packet >> becomes a couple of mathematical operations. Seems worth a thought. > > Thanks for the different ideas. The basic problem is we need to know > now is a close time or open time in action. But I still don't know a > better way than hrtimer to set the flag. That's the point, if you have the timestamp of when the packet arrived, you can calculate if the gate is open and closed at that point. You don't need to know "now", you work only in terms of "skb->tstamp" (supposing that's where the timestamp is stored). In other words, it doesn't matter when the packet arrives at the qdisc action, but when it arrived at the controller, and the actions should be taken based on that time. > >> >> The real question is: if requiring for the driver to support at least software >> RX timestamping is excessive (doesn't seem so to me). > > I understand. > >> >> >> Cheers, >> -- >> Vinicius > > Thanks a lot! > > Br, > Po Liu -- Vinicius