Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2314680ybl; Thu, 29 Aug 2019 06:40:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqwV5qdrxCfFhycuDFcNgsqtGlwlFp7pBSmGoI9Zj/L+3aLJpUrqrei19d8V0De8wcFsR7dQ X-Received: by 2002:a17:90a:25ea:: with SMTP id k97mr10013325pje.131.1567086042657; Thu, 29 Aug 2019 06:40:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567086042; cv=none; d=google.com; s=arc-20160816; b=xgvUvQtxChzEscxSwdeDLYEphH4OHi5tUNbJaWOVL+c8kU5HiVw8mUMa+Y+O9AU591 +q5qtlw8jSeArvQFRPOW/J7OXjkHNHsg1DKDGGX2sLwkpSbQ0Z6GSXf3OBQiiklI+SVt mASo6Y/hfpiYrpjDpokX7F4bi11HXDFZqpJ09z9MUmchqR1UIsgYLwpUFO8FF67YDj9P l9Jel/EajQpYoNwqGhAf7W7YXmCZ4jM2yy2myqA110ZaAFI5cx6CL5fDFUDIXlV+0zLt 7it0CZG37HLMKJxtOUVTjxB75gfWvOfvrtND3eQj+szwv22C+CMdGz99kTPSfF5g96ge wy+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=kmXPbjBfS7mlc5JSeneeQF1c6aJhHz33/vPUMQ/Jghw=; b=G2cDW7GnrHuhp63WxZ5/1tdjmoPfJMxKZtsseP9O2qLx8rfH40PduWQ1l6B+dq6L+r CG6abYv/PqCtjNr2+q5fr/kgqMclG0Qi9BDdfra5FfokASNuHddQQwus1XmRyt36NzcL VAQ3NYPBS9FVuX+9kdiBUfgfCm8RugQjSUndSgH1eLYnx6kb4qsaIygvP4ERKH2XIPIa YOsyDObljTfdYLOqWYEWjO+WAa+c0cgJP3Dx1j7T3zNjVMIEGFbY28hOr/wJvw5764O9 Y/dVCfqoCw+dW5jpbeBTLfCjGtLiUoJpuVZPvxHL5O4xHlgXL3fZtyBxOGmUll23ElKe UjCw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y1si1929835plp.204.2019.08.29.06.40.26; Thu, 29 Aug 2019 06:40:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727707AbfH2Njd (ORCPT + 99 others); Thu, 29 Aug 2019 09:39:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53002 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727421AbfH2Njc (ORCPT ); Thu, 29 Aug 2019 09:39:32 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9FC9E8980E7; Thu, 29 Aug 2019 13:39:32 +0000 (UTC) Received: from ceranb (ovpn-204-112.brq.redhat.com [10.40.204.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4F8415C258; Thu, 29 Aug 2019 13:39:30 +0000 (UTC) Date: Thu, 29 Aug 2019 15:39:29 +0200 From: Ivan Vecera To: Andrew Lunn Cc: Horatiu Vultur , Jiri Pirko , alexandre.belloni@bootlin.com, UNGLinuxDriver@microchip.com, davem@davemloft.net, allan.nielsen@microchip.com, f.fainelli@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 1/2] net: core: Notify on changes to dev->promiscuity. Message-ID: <20190829153929.357e7391@ceranb> In-Reply-To: <20190829131543.GB6998@lunn.ch> References: <1567070549-29255-1-git-send-email-horatiu.vultur@microchip.com> <1567070549-29255-2-git-send-email-horatiu.vultur@microchip.com> <20190829095100.GH2312@nanopsycho> <20190829105650.btgvytgja63sx6wx@soft-dev3.microsemi.net> <20190829121811.GI2312@nanopsycho> <20190829124412.nrlpz5tzx3fkdoiw@soft-dev3.microsemi.net> <20190829145518.393fb99d@ceranb> <20190829131543.GB6998@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.67]); Thu, 29 Aug 2019 13:39:32 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 29 Aug 2019 15:15:43 +0200 Andrew Lunn wrote: > The problem with this is, the driver only gets called when promisc > goes from 0 to !0. So, the port is added to the bridge. Promisc goes > 0->1, and the driver gets called. We can evaluate as you said above, > and leave the port filtering frames, not forwarding everything. When > tcpdump is started, the core does promisc 1->2, but does not call into > the driver. Also, currently sending a notification is not > unconditional. Hi Andrew, got it. What about to change the existing notify call so NETDEV_CHANGE notification will be also sent when (old_promiscuity != new_promiscuity)? Ivan