From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A667C169C4 for ; Fri, 8 Feb 2019 10:27:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 77DFB206A3 for ; Fri, 8 Feb 2019 10:27:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727638AbfBHK1A (ORCPT ); Fri, 8 Feb 2019 05:27:00 -0500 Received: from dispatch1-us1.ppe-hosted.com ([67.231.154.164]:57110 "EHLO dispatch1-us1.ppe-hosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726022AbfBHK07 (ORCPT ); Fri, 8 Feb 2019 05:26:59 -0500 X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 679CE400066; Fri, 8 Feb 2019 10:26:57 +0000 (UTC) Received: from ec-desktop.uk.solarflarecom.com (10.17.20.45) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Fri, 8 Feb 2019 02:26:54 -0800 Subject: Re: TC stats / hw offload question To: Jamal Hadi Salim , netdev CC: Jiri Pirko , Cong Wang References: <26f0cfc9-3bef-8579-72cc-aa6c5ccecd43@solarflare.com> <4cb765dd-453f-3139-bce6-6e0b31167aec@mojatatu.com> From: Edward Cree Message-ID: <70d77198-42fd-838a-d352-2647e7cad4d6@solarflare.com> Date: Fri, 8 Feb 2019 10:26:52 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <4cb765dd-453f-3139-bce6-6e0b31167aec@mojatatu.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Language: en-GB X-Originating-IP: [10.17.20.45] X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24416.005 X-TM-AS-Result: No-9.513200-4.000000-10 X-TMASE-MatchedRID: wQVy7q402w0OwH4pD14DsPHkpkyUphL9h+w9Wz/xXDowyfWtyopBqKtE NdaUxA53y/67GbH/VXgSbknCyruEXaNkxxcwzhmbk3rl+MaNgxB+tO36GYDlspUyTIJurbdhHAC UcDvcWyA5FCSrwjQQYB18zX8n5tRBv1l2Uvx6idoLbigRnpKlKTpcQTtiHDgWxi9rNq/RMCIWjt J5gOKV3bhIuPyEXCcVHOrPmtN7oxpnmvT30bj85g== X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--9.513200-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24416.005 X-MDID: 1549621618-RcZf26HgZ65a Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 06/02/19 02:20, Jamal Hadi Salim wrote: > The classifiers dont mod the packets. The actions do. And they > maintain stats on the size on "entry" i.e pre-edit. Thank you for clearing that up. > Each action keeps its own counters. If you did something like: > > tc match using flower blah \ > action vlan push tag ... \ > action redirect to egress of eth0 > > And you submited a packet of size x bytes, > then the "match" would record x bytes. Sorry, where would it record that?  I can't find any stats counters on  the "match" either in the software path or the offload API. > the "vlan action" would record x bytes. > the "redirect" would record size x+vlaninfo bytes > the egress of eth0 would  recorr x+vlaninfo bytes Am I right in thinking that offloaded counters don't do that?  As far  as I can tell, the drivers with flower offload all use  tcf_exts_stats_update() which takes a single 'bytes' count and adds  it to all the actions.  (Presumably this is pre-edit length.) -Ed