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=-4.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 C0B62C4360F for ; Thu, 4 Apr 2019 12:02:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8FFE320882 for ; Thu, 4 Apr 2019 12:02:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cumulusnetworks.com header.i=@cumulusnetworks.com header.b="Pabjgr/O" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729748AbfDDMCZ (ORCPT ); Thu, 4 Apr 2019 08:02:25 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:38703 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729544AbfDDMCX (ORCPT ); Thu, 4 Apr 2019 08:02:23 -0400 Received: by mail-wr1-f65.google.com with SMTP id k11so3468785wro.5 for ; Thu, 04 Apr 2019 05:02:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cumulusnetworks.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=AiZGBHJWUU+y3IzVaHX84qjtArvYOyCoke2uD9GNBy0=; b=Pabjgr/OrPcrfT6fDi1H3CK06QgwCYauBrgoDMuoITyfWOgFMdtjHaPWCNwIO9Kix0 0/52xiS3vrIeME98HPGDBhKmVQmExeifuxeKteSLg2Vfn4rJ/jz7XafIeGXrdlkgdyAy RIOe58LbKSnX318mu5N2vVc3oLhjQtahKRcPI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=AiZGBHJWUU+y3IzVaHX84qjtArvYOyCoke2uD9GNBy0=; b=daBFsmMMR3CMp2B04OlC2/3vhpAONbOSCa99Vc9WBVW75xuT1USX0i0upaeOnnF3XF HWUgVrvjNLNCeqrOs3r30NWR1O5PBICcsCr4eix50qjEMOMrx92ddGguGouEsKQxLcqE cuJDh13AJdrmPQPjOIwVh5rqAnnjCZcusRyBF06CuepzeaGdauuGqQlg8ByDqLN9UqS6 YlBkymHFZCbabHvMlb2kakoM2u9hLnnzv/Vli8WzyZo4fmliHLf2FzdhgnLJ3pQ75ZfZ Vbds8//QRQ6b1LPqfxUyuOoS8Dca7K3KHlvWAJZ2ZNSM39Eu0hJYdymOlYLkZHF8WHWl PBQw== X-Gm-Message-State: APjAAAVx/UbbKc6MtFZiuyME99hYgaFhxmka0jMwh5KwFreUEy1/FLpu IZGIx/1cRKlABVAZDbGkw9ceaA== X-Google-Smtp-Source: APXvYqwzy00fKPLp90NDwaA20e758T5Pp/T1EZWFZBzf26OTd6zv+hNoB96jLZgX0ZmmGZbGwoHR/Q== X-Received: by 2002:a5d:60cf:: with SMTP id x15mr3833926wrt.96.1554379341739; Thu, 04 Apr 2019 05:02:21 -0700 (PDT) Received: from [192.168.51.243] ([93.152.141.58]) by smtp.gmail.com with ESMTPSA id w18sm28523393wru.24.2019.04.04.05.02.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Apr 2019 05:02:21 -0700 (PDT) Subject: Re: [PATCH net-next] net: bridge: update multicast stats from maybe_deliver() To: Pablo Neira Ayuso , netdev@vger.kernel.org Cc: davem@davemloft.net, roopa@cumulusnetworks.com, bridge@lists.linux-foundation.org, nbd@nbd.name References: <20190404115638.28592-1-pablo@netfilter.org> From: Nikolay Aleksandrov Message-ID: <952568d9-771f-982c-9a75-5dfc01a461fb@cumulusnetworks.com> Date: Thu, 4 Apr 2019 15:02:19 +0300 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: <20190404115638.28592-1-pablo@netfilter.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 04/04/2019 14:56, Pablo Neira Ayuso wrote: > Simplify this code by updating bridge multicast stats from > maybe_deliver(). > > Note that commit 6db6f0eae605 ("bridge: multicast to unicast"), in case > the port flag BR_MULTICAST_TO_UNICAST is set, never updates the previous > port pointer, therefore it is always going to be different from the > existing port in this deduplicated list iteration. > > Signed-off-by: Pablo Neira Ayuso > --- > net/bridge/br_forward.c | 15 ++++----------- > 1 file changed, 4 insertions(+), 11 deletions(-) > This was intentional, the reason I didn't add that call to maybe_deliver() is to avoid these checks for the standard unicast fast-path. We need to avoid touching the mcast cache lines (and checks) when using unicast.