Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2395127ybl; Thu, 29 Aug 2019 07:38:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwinLApRECTvBu1WznXDhjVKjZntpKci4GuW5F4Src+P5cuRqIvZ6fR4iPUihqCqgp0wkxg X-Received: by 2002:a63:2685:: with SMTP id m127mr8611907pgm.6.1567089538699; Thu, 29 Aug 2019 07:38:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567089538; cv=none; d=google.com; s=arc-20160816; b=rCIwdeoBn7gbEsxjz38sBhKYI24RRywz6MkJrXd3AU2FYDdzgrZx2Fwp9Su/1IH3u8 3ED+VKr5T4VT4Al/RrhDex5ZH51a8TdJ21zGiLHbNVtyEDhhX6Bxf79a2rJCIN9dyH9j CnViw6O06qMd+7YmGtlc9+jT0vuGels4dUM9HYW8oHABzfNDWFeQQI9L6I6TFCli5lOS g3BXSZM/EJN/1gO0F+TQkca7Ib67nGm1MCgeFkuyEyAqxoBWTcryiDeA/P6CDwDry8l9 lKfPRvXJ9E1Npdsm2QvdAUvUovgT76K22bz6FZWPHDy84alGVXODgjJ0h3G89NtIh1U0 eU6g== 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=gCK1HkDqdyDaXZixXGrAX2dLIZ8vXSbAgDoN62z26bA=; b=q9xzN0ZRQWlkmeuxwvYLAwxhMEkCJM9nMZAaUWpKJvT+4exY+kojjX9txvl9qg8JjG 1Rhgd94WfPHPk3IMoJI0z5eTJgC2p4XI9nvlxWnzQuQ5sKZaUlsgXTqYWmenNtakLEpJ RE4MHZdKT6rkVvhlut6AudAT9BBpbYgo6Co5zZGc3DnjvXNs7o7H3c3wgvcbivzvwOWE RCpwFKtXdv/6aptdZHXFfhkyyPnILD5QndTwnGddT2xQfBNOhWJDdPPfOv3PPRfb8kFM nX2emLqQB2MQdO5Yzvh5ZsAkIk7/YJC/9MbVLQxB+3Yc4+27JnV8qfExkLTmnMS107hp go3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=Br2XVbDp; 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 g5si2354989pjp.10.2019.08.29.07.38.42; Thu, 29 Aug 2019 07:38:58 -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=fail header.i=@lunn.ch header.s=20171124 header.b=Br2XVbDp; 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 S1727417AbfH2Ohp (ORCPT + 99 others); Thu, 29 Aug 2019 10:37:45 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:40880 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726739AbfH2Ohp (ORCPT ); Thu, 29 Aug 2019 10:37:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=gCK1HkDqdyDaXZixXGrAX2dLIZ8vXSbAgDoN62z26bA=; b=Br2XVbDpw6aEsSRl4bc/3081w6 wIPQVvk/pBq26Uvea11W62nFlT6Viszpg+Joh8hoRRFUhk0+RSzg2w7noy72xtHf6Vmd2cphZvzG7 /miripZdS0WbMqpg8y3PQrxYmj1OpXur/acxT28n4vhp5nwuyxVfqTmiMdmi7uFJ6ygc=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1i3LYK-0002lb-AU; Thu, 29 Aug 2019 16:37:32 +0200 Date: Thu, 29 Aug 2019 16:37:32 +0200 From: Andrew Lunn To: Jiri Pirko Cc: Horatiu Vultur , alexandre.belloni@bootlin.com, UNGLinuxDriver@microchip.com, davem@davemloft.net, 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: <20190829143732.GB17864@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> <20190829132611.GC6998@lunn.ch> <20190829134901.GJ2312@nanopsycho> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190829134901.GJ2312@nanopsycho> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Wait, I believe there has been some misundestanding. Promisc mode is NOT > about getting packets to the cpu. It's about setting hw filters in a way > that no rx packet is dropped. > > If you want to get packets from the hw forwarding dataplane to cpu, you > should not use promisc mode for that. That would be incorrect. Hi Jiri I'm not sure a wireshark/tcpdump/pcap user would agree with you. They want to see packets on an interface, so they use these tools. The fact that the interface is a switch interface should not matter. The switchdev model is that we try to hide away the interface happens to be on a switch, you can just use it as normal. So why should promisc mode not work as normal? > If you want to get packets from the hw forwarding dataplane to cpu, you > should use tc trap action. It is there exactly for this purpose. Do you really think a wireshark/tcpdump/pcap user should need to use tc trap for the special case the interface is a switch port? Doesn't that break the switchdev model? tc trap is more about fine grained selection of packets. Also, it seems like trapped packets are not forwarded, which is not what you would expect from wireshark/tcpdump/pcap. Andrew