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_HELO_NONE,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 9D8F1C04AAC for ; Mon, 20 May 2019 18:36:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7BFEE214DA for ; Mon, 20 May 2019 18:36:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726065AbfETSgn (ORCPT ); Mon, 20 May 2019 14:36:43 -0400 Received: from dispatch1-us1.ppe-hosted.com ([148.163.129.52]:40892 "EHLO dispatch1-us1.ppe-hosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725909AbfETSgn (ORCPT ); Mon, 20 May 2019 14:36:43 -0400 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-us2.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id DFAFFA40092; Mon, 20 May 2019 18:36:40 +0000 (UTC) Received: from [10.17.20.203] (10.17.20.203) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 20 May 2019 11:36:36 -0700 Subject: Re: [RFC PATCH v2 net-next 0/3] flow_offload: Re-add per-action statistics To: Jamal Hadi Salim , Jiri Pirko , "Pablo Neira Ayuso" , David Miller CC: netdev , Cong Wang , Andy Gospodarek , Jakub Kicinski , Michael Chan , Vishal Kulkarni References: <9b137a90-9bfb-9232-b01b-6b6c10286741@solarflare.com> <3db2e5bf-4142-de4b-7085-f86a592e2e09@mojatatu.com> <17cf3488-6f17-cb59-42a3-6b73f7a0091e@solarflare.com> From: Edward Cree Message-ID: Date: Mon, 20 May 2019 19:36:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Language: en-GB X-Originating-IP: [10.17.20.203] X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24624.005 X-TM-AS-Result: No-10.552800-4.000000-10 X-TMASE-MatchedRID: 8+bhjh9TQnHmLzc6AOD8DfHkpkyUphL9F9s8UTYYetUZSz1vvG+0mpnB iGeCTSiBlKHr8Cov1n3jzHPSq+SlEv/E8pKAu+Qt/I86v5Fe2NzpVMb1xnESMmmycYYiBYyZMrJ 18VCI8ftvO0CgsOaW7b0RJbiXHWT1R/LrKX7ntfCVOwZbcOalSyAeV4oFCpbhIyM6bqaAlyuplt /ndMV7yesnjDCnbp2KZKk8ASWMqqQoqtz9efX8KeUEC57Foxt0CBjso/O/Vch9eguxhXL5MnV9g u9iocCNaMT0cRrDveNycKtPkXGgBwiXIt8WXwJnIwk7p1qp3JaH0N4NyO41W9up0fEawV9pHjKd T/yfRehFleQSA5qYTF+24nCsUSFNjaPj0W1qn0TKayT/BQTiGhvtSXvbrEoCOr8+JhSbeeL/xez ZWxtCU1grGYhLG8BJQJzZB+h1gaE= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--10.552800-4.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24624.005 X-MDID: 1558377402-0B9DEPfUCSIA Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 20/05/2019 17:29, Jamal Hadi Salim wrote: > Maybe dump after each step and it will be easier to see what is > happening. > >> I don't *think* my changes can have caused this, but I'll try a test on a >>   vanilla kernel just to make sure the same thing happens there. > > Possible an offload bug that was already in existence. I've now reproduced on vanilla net-next (63863ee8e2f6); the breakage occurs  when I run `tc -s actions get action drop index 104`, even _without_ having  previously deleted a rule. And in a correction to my last email, it turns out this *does* reproduce  without offloading (I evidently didn't hit the right sequence to tickle  the bug before). # tc -stats filter show dev $vfrep parent ffff: filter protocol ip pref 49151 flower chain 0 filter protocol ip pref 49151 flower chain 0 handle 0x1   eth_type ipv4   skip_sw   in_hw in_hw_count 1         action order 1: vlan  push id 100 protocol 802.1Q priority 0 pipe          index 3 ref 1 bind 1 installed 7 sec used 7 sec         Action statistics:         Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)         backlog 0b 0p requeues 0         action order 2: mirred (Egress Mirror to device $pf) pipe         index 102 ref 1 bind 1 installed 7 sec used 3 sec         Action statistics:         Sent 306 bytes 3 pkt (dropped 0, overlimits 0 requeues 0)         Sent software 0 bytes 0 pkt         Sent hardware 306 bytes 3 pkt         backlog 0b 0p requeues 0         action order 3: vlan  pop pipe          index 4 ref 1 bind 1 installed 7 sec used 7 sec         Action statistics:         Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)         backlog 0b 0p requeues 0         action order 4: gact action drop          random type none pass val 0          index 104 ref 3 bind 2 installed 13 sec used 3 sec         Action statistics:         Sent 306 bytes 3 pkt (dropped 3, overlimits 0 requeues 0)         Sent software 0 bytes 0 pkt         Sent hardware 306 bytes 3 pkt         backlog 0b 0p requeues 0 filter protocol arp pref 49152 flower chain 0 filter protocol arp pref 49152 flower chain 0 handle 0x1   eth_type arp   skip_sw   in_hw in_hw_count 1         action order 1: vlan  push id 100 protocol 802.1Q priority 0 pipe          index 1 ref 1 bind 1 installed 7 sec used 7 sec         Action statistics:         Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)         backlog 0b 0p requeues 0         action order 2: mirred (Egress Mirror to device $pf) pipe         index 101 ref 1 bind 1 installed 7 sec used 5 sec         Action statistics:         Sent 64 bytes 1 pkt (dropped 0, overlimits 0 requeues 0)         Sent software 0 bytes 0 pkt         Sent hardware 64 bytes 1 pkt         backlog 0b 0p requeues 0         action order 3: vlan  pop pipe          index 2 ref 1 bind 1 installed 7 sec used 7 sec         Action statistics:         Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)         backlog 0b 0p requeues 0         action order 4: gact action drop          random type none pass val 0          index 104 ref 3 bind 2 installed 13 sec used 3 sec         Action statistics:         Sent 370 bytes 4 pkt (dropped 4, overlimits 0 requeues 0)         Sent software 0 bytes 0 pkt         Sent hardware 370 bytes 4 pkt         backlog 0b 0p requeues 0 # tc -s actions get action drop index 104 total acts 0         action order 1: gact action drop          random type none pass val 0          index 104 ref 3 bind 2 installed 27 sec used 17 sec         Action statistics:         Sent 370 bytes 4 pkt (dropped 4, overlimits 0 requeues 0)         Sent software 0 bytes 0 pkt         Sent hardware 370 bytes 4 pkt         backlog 0b 0p requeues 0 # tc -stats filter show dev $vfrep parent ffff: filter protocol ip pref 49151 flower chain 0 filter protocol ip pref 49151 flower chain 0 handle 0x1   eth_type ipv4   skip_sw   in_hw in_hw_count 1         action order 1: vlan  push id 100 protocol 802.1Q priority 0 pipe          index 3 ref 1 bind 1 installed 26 sec used 26 sec         Action statistics:         Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)         backlog 0b 0p requeues 0         action order 2: mirred (Egress Mirror to device $pf) pipe         index 102 ref 1 bind 1 installed 26 sec used 22 sec         Action statistics:         Sent 306 bytes 3 pkt (dropped 0, overlimits 0 requeues 0)         Sent software 0 bytes 0 pkt         Sent hardware 306 bytes 3 pkt         backlog 0b 0p requeues 0         action order 3: vlan  pop pipe          index 4 ref 1 bind 1 installed 26 sec used 26 sec         Action statistics:         Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)         backlog 0b 0p requeues 0 filter protocol arp pref 49152 flower chain 0 filter protocol arp pref 49152 flower chain 0 handle 0x1   eth_type arp   skip_sw   in_hw in_hw_count 1         action order 1: vlan  push id 100 protocol 802.1Q priority 0 pipe          index 1 ref 1 bind 1 installed 27 sec used 27 sec         Action statistics:         Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)         backlog 0b 0p requeues 0         action order 2: mirred (Egress Mirror to device $pf) pipe         index 101 ref 1 bind 1 installed 27 sec used 17 sec         Action statistics:         Sent 256 bytes 4 pkt (dropped 0, overlimits 0 requeues 0)         Sent software 0 bytes 0 pkt         Sent hardware 256 bytes 4 pkt         backlog 0b 0p requeues 0         action order 3: vlan  pop pipe          index 2 ref 1 bind 1 installed 27 sec used 27 sec         Action statistics:         Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)         backlog 0b 0p requeues 0 #