Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp891013ybe; Mon, 2 Sep 2019 10:43:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqx5TWYU89+hyO+GSmFufaSt5eZcEy3QV234d1FFhFomycVvC7OkvWDIT2BOBRFVdY/2TkqJ X-Received: by 2002:a63:5d54:: with SMTP id o20mr26504315pgm.413.1567446228881; Mon, 02 Sep 2019 10:43:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567446228; cv=none; d=google.com; s=arc-20160816; b=S05HCCEoqsknDgJvZUV5XHgfOlc+2uo3K49bBQXH7kRrOJgvIPTeP83ZTLrZ6v3GHW sZIGYe9cUrKBho8tm09bwJma9YhvNP7rFfW+bjJ/xAm99QLfHMUmMo4wTVhajU1qY6dc 7ZnIUzhVbt1dc5tH5ddNsl+bEZivlfhOaTfJ8N7jpAiLC/weHeKkGuHw0EE6+oChBr3c ReXnMrKnCJUCB/JUzxnjBI0vruyZBsACQOCJuoIHOdYDMMnIUoviM6W6PFI+q9X0+C81 y960r3RhWI4JglwFiySR3VwcCZECpkBRZzu7gEurjT1UDGRR8xN6eEwml9f3TrKLr/O1 70ng== 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:ironport-sdr; bh=ZMGinoaN7Nuskwyc3SqoJi8CqtF+k46WWfYxPtMqmUA=; b=f4VC5VX2TRUL+8OZjB0i/cNIB054VNcmYQZTllPdvdibbqBm5XdEDZdOkgU/7eP0N4 rigicxEZma7B0UjYjhR29EDYEi8Zcs3vC0N2OxrPzf35jybr77sMOoYZvzd1IeLA9r+C U8reSzluJQVJyNqiK2L8pU7fhFM/yWePWC2Z2FIiCqdZLikvRc8Njev4gyKcLkVqtXT3 0hliuAsTJOtkQ/IL1dXIG9U1EsVbul8L6Lm8AAXZ+Oh0WJcOJQQwQ6HPbqoSGRQb0p/N fKruNM+gg9tSiLn9RIVJgPwgmHI4k0Ti3SAJ7+4zRqK1JqMVHYJ1lmZ3l3CARls1eNwA Wibw== 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=microchip.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1si6284804plq.366.2019.09.02.10.43.33; Mon, 02 Sep 2019 10:43:48 -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=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726773AbfIBRme (ORCPT + 99 others); Mon, 2 Sep 2019 13:42:34 -0400 Received: from esa6.microchip.iphmx.com ([216.71.154.253]:64526 "EHLO esa6.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725988AbfIBRme (ORCPT ); Mon, 2 Sep 2019 13:42:34 -0400 Received-SPF: Pass (esa6.microchip.iphmx.com: domain of Allan.Nielsen@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa6.microchip.iphmx.com; envelope-from="Allan.Nielsen@microchip.com"; x-sender="Allan.Nielsen@microchip.com"; x-conformance=spf_only; x-record-type="v=spf1"; x-record-text="v=spf1 mx a:ushub1.microchip.com a:smtpout.microchip.com a:mx1.microchip.iphmx.com a:mx2.microchip.iphmx.com include:servers.mcsv.net include:mktomail.com include:spf.protection.outlook.com ~all" Received-SPF: None (esa6.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa6.microchip.iphmx.com; envelope-from="Allan.Nielsen@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa6.microchip.iphmx.com; dkim=none (message not signed) header.i=none; spf=Pass smtp.mailfrom=Allan.Nielsen@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: S5lhxx8rJV+pGIrPafvGmFF/lT/gkbBgZ0IMI/ngBHSDJuPd1/0nDNY4kwryGqC8WE8huE8sCU X8GyaBPZV9m/G55tUBxs85N6htn8tsTAXpJRiDQN6o8g03MlHItrA/T0mjOSZ8S41adH0v757p Cd0O5yC2JDI/47w1DyJKORXH4sRQSPPDbPmtL8b0tcnQDLv+OMfmbKnO75YJubYBKzDtU2uCrW OSL7QCj85aNn0UjBmRhnD6W/kJEUJM5A6KBSQLW/mkJIvGFlMLOb88Hor/YaQYBvhTg062o+LL iG0= X-IronPort-AV: E=Sophos;i="5.64,460,1559545200"; d="scan'208";a="44599310" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 02 Sep 2019 10:42:32 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 2 Sep 2019 10:42:32 -0700 Received: from localhost (10.10.85.251) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Mon, 2 Sep 2019 10:42:31 -0700 Date: Mon, 2 Sep 2019 19:42:31 +0200 From: "Allan W. Nielsen" To: Jiri Pirko CC: David Miller , , , , , , , , , Subject: Re: [PATCH v3 1/2] net: core: Notify on changes to dev->promiscuity. Message-ID: <20190902174229.uur7r7duq4dvbnqq@lx-anielsen.microsemi.net> References: <20190829193613.GA23259@splinter> <20190829.151201.940681219080864052.davem@davemloft.net> <20190830053940.GL2312@nanopsycho> <20190829.230233.287975311556641534.davem@davemloft.net> <20190830063624.GN2312@nanopsycho> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <20190830063624.GN2312@nanopsycho> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jiri, Sorry for joining the discussion this late, but I have been without mail access for the last few days. The 08/30/2019 08:36, Jiri Pirko wrote: > Fri, Aug 30, 2019 at 08:02:33AM CEST, davem@davemloft.net wrote: > >From: Jiri Pirko > >Date: Fri, 30 Aug 2019 07:39:40 +0200 > > > >> Because the "promisc mode" would gain another meaning. Now how the > >> driver should guess which meaning the user ment when he setted it? > >> filter or trap? > >> > >> That is very confusing. If the flag is the way to do this, let's > >> introduce another flag, like IFF_TRAPPING indicating that user wants > >> exactly this. > > > >I don't understand how the meaning of promiscuous mode for a > >networking device has suddenly become ambiguous, when did this start > >happening? > > 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. > But if there is hw fwd datapath, rx filter is still off, all rxed packets > are processed. But that does not mean they should be trapped to cpu. > > Simple example: > I need to see slowpath packets, for example arps/stp/bgp/... that > are going to cpu, I do: > tcpdump -i swp1 How is this different from "tcpdump -p -i swp1" > I don't want to get all the traffic running over hw running this cmd. > This is a valid usecase. > > To cope with hw fwd datapath devices, I believe that tcpdump has to have > notion of that. Something like: > > tcpdump -i swp1 --hw-trapping-mode > > The logic can be inverse: > tcpdump -i swp1 > tcpdump -i swp1 --no-hw-trapping-mode > > However, that would provide inconsistent behaviour between existing and > patched tcpdump/kernel. > > All I'm trying to say, there are 2 flags > needed (if we don't use tc trap). I have been reading through this thread several times and I still do not get it. As far as I understand you are arguing that we need 3 modes: - tcpdump -i swp1 - tcpdump -p -i swp1 - tcpdump -i swp1 --hw-trapping-mode Would you mind provide an example of the traffic you want to see in the 3 cases (or the traffic which you do not want to see). /Allan