Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp387017ybl; Fri, 30 Aug 2019 01:04:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQ6qLmqheJ9TyzCREgvgiVE2FCbiyWkdHnzbVCKlHZDUr+hgmVeNuBcnrLoT995pN1iHqs X-Received: by 2002:a17:902:4b:: with SMTP id 69mr14403458pla.89.1567152248367; Fri, 30 Aug 2019 01:04:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567152248; cv=none; d=google.com; s=arc-20160816; b=LJyx+hf7BYFmlGq2UukDYRy2ndnbJqTPasz2XxyfewnYIdiInq3fw3CNNK4dgNsMDC pQEEjCwPoVtp3IOmqhvGg8B2gZNZA5TYNVNalMqLMsovJWortl3j2RwmmxVWp/pMCGhL c1VofpPrNVOHN8Vng3iXpEDRGSnwjfOEeGeqkgvKBFc20k4sgR66d2WQqvrHxu4qVXX1 CwHbDOPldfKlHCSm6Hg24fnHmbP3Gym6bb07mKmHAnP1X4mShunhBt+SixSfrm+o2Hdp kRpxuxZW62DODoktM4HwnWKM+vvjXnL5zAqS6G/4G/olt+gP/PuM5yEajtflGLUNezat 5L7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xDWFOC5KIqBUnS5KsrM2GDBVfGw82n9BymZaCeLwnrQ=; b=1H/sXJsG03S+5Y7bzx2eNPd/BknUuHivpOMJNkCQXQh7gUbluTjUxn65RS7BiOV7tV E8tKIJgbImoiwte1+WLF8YwD0VL6Q1eLTP6thLaRHcAFtadcbXBXw4IDJE9MHtSKrMwy UeWk9eSU8TXcGGZhjEKSrMkFGFnehvAfxm4uRtVh5Tol8msUdAAxzP5f+0EaOA5zfZ0P FBaQIOYAWZaKikKtW7GFIDEwRQ+m/3G+qoeIifaF4eIgFalJ0OKykGxDp2C82ZShfsNV sYRnpMCzi/DB/F3x3CENRzCNNWYAyEqeDDoLgi0i64gwMJkubAyO9asAvcDJVGv2QU9p YYDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=0tWMSg+Z; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f67si4347965pje.8.2019.08.30.01.03.52; Fri, 30 Aug 2019 01:04:08 -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; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=0tWMSg+Z; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728289AbfH3IBf (ORCPT + 99 others); Fri, 30 Aug 2019 04:01:35 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:55055 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728232AbfH3IBe (ORCPT ); Fri, 30 Aug 2019 04:01:34 -0400 Received: by mail-wm1-f67.google.com with SMTP id k2so4841152wmj.4 for ; Fri, 30 Aug 2019 01:01:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xDWFOC5KIqBUnS5KsrM2GDBVfGw82n9BymZaCeLwnrQ=; b=0tWMSg+ZCEeBjFWM+KTT8++sDU93IOoqfi78OtpLOYzGx5L6DqRT490amuDK/8IY3A pi8I3hmd4hfEXFyWXXc3N4/L0XkzY5gsDvefa73RcNYXcXsMLUTEhEGgy7yLYZjSFMtj lGd1jqIW2tkpwIbJyBN8vScRO/l1x+lAaxXfOFWu7Su19kQYp8N9T41hgufo8Ev5jz3f vlPiW/Xp7sMVtKzdpENlIPKFCL7H5Fu9ISGCBT0OnHOdLDnQiFkAsa1jmW8kKaMtWcDZ IUd6oNl9HT9RVQcrSDvg36v1WBdEcB7YKFXRtdQQl8pjSb2rLPhPBMoAXCSol4wZDm5Z Foig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=xDWFOC5KIqBUnS5KsrM2GDBVfGw82n9BymZaCeLwnrQ=; b=eocChD86w/2j5KNnXtJftGmuRIgbL/aDPEvM6iPdSnx3lfdfwt7PkLERMzfr9LPn59 CAAltaYTDHYRjdlMqPI0UB1ePNQwZ8vJfbmRql5h0CgR9DblL4YdYRAc0V0h8tfnJpGi sJ33zF0kAAZFdsUY7zaejIwxUfwuIXniGElAaSl9Q30+UUFWjVGTnujVbdDHjWWMKAC3 D/KiLOSsYJnMXq+1C+LY9Xrja2ztL8IAFJoddjCsf0h9Ii5QWaC7OL8PGXktxOwSF7d1 YQ9LwoI7X6JtxsAY9oYe7I38PuDiU2AfcXcHVbPpZjzQcFmmNkZ/f5uio1N/JlydRCDX 85LQ== X-Gm-Message-State: APjAAAU9irrLe2YeVSNSjnp6Ipc923sKgaYNiJdTmoVbYaukDb6KUbWY e+WEAbfdqvLUQTy0PvwsRMuvIA== X-Received: by 2002:a1c:ca02:: with SMTP id a2mr1076784wmg.127.1567152092914; Fri, 30 Aug 2019 01:01:32 -0700 (PDT) Received: from localhost (ip-78-45-163-186.net.upcbroadband.cz. [78.45.163.186]) by smtp.gmail.com with ESMTPSA id j20sm9610535wre.65.2019.08.30.01.01.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Aug 2019 01:01:32 -0700 (PDT) Date: Fri, 30 Aug 2019 10:01:31 +0200 From: Jiri Pirko To: David Miller Cc: idosch@idosch.org, andrew@lunn.ch, horatiu.vultur@microchip.com, alexandre.belloni@bootlin.com, UNGLinuxDriver@microchip.com, allan.nielsen@microchip.com, ivecera@redhat.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: <20190830080131.GQ2312@nanopsycho> References: <20190830063624.GN2312@nanopsycho> <20190830.001223.669650763835949848.davem@davemloft.net> <20190830072133.GP2312@nanopsycho> <20190830.003225.292019185488425085.davem@davemloft.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190830.003225.292019185488425085.davem@davemloft.net> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fri, Aug 30, 2019 at 09:32:25AM CEST, davem@davemloft.net wrote: >From: Jiri Pirko >Date: Fri, 30 Aug 2019 09:21:33 +0200 > >> Fri, Aug 30, 2019 at 09:12:23AM CEST, davem@davemloft.net wrote: >>>From: Jiri Pirko >>>Date: Fri, 30 Aug 2019 08:36:24 +0200 >>> >>>> The promiscuity is a way to setup the rx filter. So promics == rx filter >>>> off. For normal nics, where there is no hw fwd datapath, >>>> this coincidentally means all received packets go to cpu. >>> >>>You cannot convince me that the HW datapath isn't a "rx filter" too, sorry. >> >> If you look at it that way, then we have 2: rx_filter and hw_rx_filter. >> The point is, those 2 are not one item, that is the point I'm trying to >> make :/ > >And you can turn both of them off when I ask for promiscuous mode, that's >a detail of the device not a semantic issue. Well, bridge asks for promiscuous mode during enslave -> hw_rx_filter off When you, want to see all traffic in tcpdump -> rx_filter off So basically there are 2 flavours of promiscuous mode we have to somehow distinguish between, so the driver knows what to do. Nothe that the hw_rx_filter off is not something special to bridge. There is a usecase for this when no bridge is there, only TC filters for example.