Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp399186pxu; Sun, 22 Nov 2020 12:17:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/YSbccX+lBZ6PJh2c2c2yBOV9bpWSUSTWpDq8ZLqIXpuGJYh+Hrb5zneAl3hzW4l5ygNY X-Received: by 2002:a17:906:b53:: with SMTP id v19mr9365887ejg.250.1606076222422; Sun, 22 Nov 2020 12:17:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606076222; cv=none; d=google.com; s=arc-20160816; b=BbQxP6ISC51y9E0XMXi7Q2VVrUXP1yqRUpm77WfVhY9a0LQEFne2JWve6Gjf0EwSIs ixQlVMWojsT6rYRy1qpGWKat3X2GicT/jBApfmOl+cNMMYi5OiAdGLLYW9BFyVrmqEPh eIO95BiAsoQI2sZ7mMDcXVBF9lquBO3K2oEhJVnaJscT86iL0PowSX3dadagfWj+zTi6 OfBzzX3ScOwPH5T1R7CTYhIRGRC3WfLTpfkfaKTkgO61GxYdnYm7vTIzT0vECZmCaiXo pzWgNtoul8VqIgn9OxsOKCTpvPvttAlaGAfSS6nVTgFVvIByfQhNR9aJmgde7njsGrCo /GWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=kzjobJGZIi1/EDo5fFb5LRCOapGSCVE9dT++G6rLSmA=; b=BGKdepq4f4MS5A7LRIoQOH1TF9duhVxK94GH4Ll7wEK1rs1MlFlVTEOOsu+IpXifl0 0ZaUfguS7FzQe+s11X0BvqlO0uYXsLrrEaDXuLdpSac/BqKSz7QeJfm/v40Yo7y/VlBO 6f8nQ0urSKQ4liq6Fc3zd3irsreQRGHo8Qrek86dxXgJmmXHuIjW1A2uLoVSio/F8eAf MrO53fvGL8sMoBuhWgVT31OqJL2H8DsjrfOCfaS3pbgdNyt/9XuqiRgZY9eWnES3HtRC OY6cNspFsYol7sS/PUvnkphE93SSvFgge7X4JtvaUeJ0sWv4hb1AUrvObFQgktDtNpMY eJ8Q== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y3si5202240edq.324.2020.11.22.12.16.39; Sun, 22 Nov 2020 12:17:02 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727620AbgKVUPL (ORCPT + 99 others); Sun, 22 Nov 2020 15:15:11 -0500 Received: from correo.us.es ([193.147.175.20]:37380 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727366AbgKVUPL (ORCPT ); Sun, 22 Nov 2020 15:15:11 -0500 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id A5095DA720 for ; Sun, 22 Nov 2020 21:15:08 +0100 (CET) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 91FEDDA704 for ; Sun, 22 Nov 2020 21:15:08 +0100 (CET) Received: by antivirus1-rhel7.int (Postfix, from userid 99) id 875B5DA73F; Sun, 22 Nov 2020 21:15:08 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on antivirus1-rhel7.int X-Spam-Level: X-Spam-Status: No, score=-108.2 required=7.5 tests=ALL_TRUSTED,BAYES_50, SMTPAUTH_US2,URIBL_BLOCKED,USER_IN_WELCOMELIST,USER_IN_WHITELIST autolearn=disabled version=3.4.1 Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id 5154FDA73D; Sun, 22 Nov 2020 21:15:06 +0100 (CET) Received: from 192.168.1.97 (192.168.1.97) by antivirus1-rhel7.int (F-Secure/fsigk_smtp/550/antivirus1-rhel7.int); Sun, 22 Nov 2020 21:15:06 +0100 (CET) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/antivirus1-rhel7.int) Received: from us.es (unknown [90.77.255.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: 1984lsi) by entrada.int (Postfix) with ESMTPSA id 2FD6B41FF201; Sun, 22 Nov 2020 21:15:06 +0100 (CET) Date: Sun, 22 Nov 2020 21:15:05 +0100 X-SMTPAUTHUS: auth mail.us.es From: Pablo Neira Ayuso To: Alexander Lobakin Cc: netfilter-devel@vger.kernel.org, davem@davemloft.net, netdev@vger.kernel.org, kuba@kernel.org, fw@strlen.de, razor@blackwall.org, jeremy@azazel.net, tobias@waldekranz.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next,v5 0/9] netfilter: flowtable bridge and vlan enhancements Message-ID: <20201122201505.GA31257@salvia> References: <20201122102605.2342-1-alobakin@pm.me> <20201122145108.2640-1-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20201122145108.2640-1-alobakin@pm.me> User-Agent: Mutt/1.10.1 (2018-07-13) X-Virus-Scanned: ClamAV using ClamSMTP Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 22, 2020 at 02:51:18PM +0000, Alexander Lobakin wrote: > From: Pablo Neira Ayuso > Date: Sun, 22 Nov 2020 12:42:19 +0100 > > > On Sun, Nov 22, 2020 at 10:26:16AM +0000, Alexander Lobakin wrote: > >> From: Pablo Neira Ayuso > >> Date: Fri, 20 Nov 2020 13:49:12 +0100 > > [...] > >>> Something like this: > >>> > >>> fast path > >>> .------------------------. > >>> / \ > >>> | IP forwarding | > >>> | / \ . > >>> | br0 eth0 > >>> . / \ > >>> -- veth1 veth2 > >>> . > >>> . > >>> . > >>> eth0 > >>> ab:cd:ef:ab:cd:ef > >>> VM > >> > >> I'm concerned about bypassing vlan and bridge's .ndo_start_xmit() in > >> case of this shortcut. We'll have incomplete netdevice Tx stats for > >> these two, as it gets updated inside this callbacks. > > > > TX device stats are being updated accordingly. > > > > # ip netns exec nsr1 ip -s link > > 1: lo: mtu 65536 qdisc noop state DOWN mode DEFAULT group default qlen 1000 > > link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 > > RX: bytes packets errors dropped overrun mcast > > 0 0 0 0 0 0 > > TX: bytes packets errors dropped carrier collsns > > 0 0 0 0 0 0 > > 2: veth0@if2: mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000 > > link/ether 82:0d:f3:b5:59:5d brd ff:ff:ff:ff:ff:ff link-netns ns1 > > RX: bytes packets errors dropped overrun mcast > > 213290848248 4869765 0 0 0 0 > > TX: bytes packets errors dropped carrier collsns > > 315346667 4777953 0 0 0 0 > > 3: veth1@if2: mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000 > > link/ether 4a:81:2d:9a:02:88 brd ff:ff:ff:ff:ff:ff link-netns ns2 > > RX: bytes packets errors dropped overrun mcast > > 315337919 4777833 0 0 0 0 > > TX: bytes packets errors dropped carrier collsns > > 213290844826 4869708 0 0 0 0 > > 4: br0: mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000 > > link/ether 82:0d:f3:b5:59:5d brd ff:ff:ff:ff:ff:ff > > RX: bytes packets errors dropped overrun mcast > > 4101 73 0 0 0 0 > > TX: bytes packets errors dropped carrier collsns > > 5256 74 0 0 0 0 > > Aren't these counters very low for br0, despite that br0 is an > intermediate point of traffic flow? Most packets follow the flowtable fast path, which is bypassing the br0 device. Bumping br0 stats would be misleading, it would make the user think that the packets follow the classic bridge layer path, while they do not. The flowtable have counters itself to allow the user to collect stats regarding the packets that follow the fastpath.