Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp291704ybl; Thu, 29 Aug 2019 23:14:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqxG84swRe2Jen0E60FNx3TMyvCr0jJDZKSlwuyYvnaPjXSCQl8zd9feXkl9FwyR1RKWkUTQ X-Received: by 2002:a62:2d3:: with SMTP id 202mr2387933pfc.141.1567145680186; Thu, 29 Aug 2019 23:14:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567145680; cv=none; d=google.com; s=arc-20160816; b=G9ThYgOBuhssMGA6tPqF4P3cQNRHmqtsWmuwjQ0zYpcAYgDCxhTYuTkAbb8AlZKziQ N4Jx149vpLRN7dgutNhF2i5BCte6kPl5Tjen/GbBIFRstHjQpz1DxwV8NdVfPZfZ8+wQ ZtT9ECO7A096aBvF1Ms/yPtZB7F3sLRQGC+tQTVovt9s75Pnh4PoHQEvF87tnhDP3ZwE Bh+qDxOtdv2VTm1TmH26yiYqCd6lXfABkTE33iOSG9u/AFHZfBY9Z6+9/oQobJEbtIdr UC8p++DQMi9e0EzLs5GmSldrfs/FFSFg8vF5Dlc5aJIzctSxe7TCRiGWVyuax01OUdK3 gJSg== 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=mIaRAmZlXfrUjHkJ2pUtw5Qyx4E/Zd4jn5MOod/LYBs=; b=CnL4uYFOBNhbsPR+BXJ+d42PZpgoZm841jlbppbHmsvaPundPhGvORh3g1hpoR4V7w 8EEeMPcFoihsIm5Y//40Es40bSoBQgxRK5DhofWPKTyzTb6JZII5axLPOd1qquSzFbut tD6zzaaXlgL+T8PCUWTigx9JWx1+9GEbqtE7kOQtw3sm07ji1192B2GjyDO6E7n7PL67 go1cViUHvPQrXxk3k0MrVR3PqdFzg0TEaISsRtXTuZ+ev4hj79TUYyZ6LQ2PvpMQzbvx Kjd4PTJz7Yl0YHiHT7zgCBMHkOqDNESZiTZNJuyG7oJ03BkrVgW7RL9gDj03+JYGKRx2 //1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=n7fov0x4; 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 k43si4126566pje.59.2019.08.29.23.14.24; Thu, 29 Aug 2019 23:14:40 -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=n7fov0x4; 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 S1727788AbfH3GNb (ORCPT + 99 others); Fri, 30 Aug 2019 02:13:31 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:55495 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726236AbfH3GNa (ORCPT ); Fri, 30 Aug 2019 02:13:30 -0400 Received: by mail-wm1-f66.google.com with SMTP id g207so2018662wmg.5 for ; Thu, 29 Aug 2019 23:13:29 -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=mIaRAmZlXfrUjHkJ2pUtw5Qyx4E/Zd4jn5MOod/LYBs=; b=n7fov0x47sWP5sCMWoI5rq1YKFAt3fENNVa7hKIxjXLPyJnd8Ua2g7xj1VBit6kbd3 0nqV2Wpe1JHoFm34DmXbVlz4YQnhNYhDVgcVou1/k5gnQVK8cEx2Fx4/jBSkORs+2TDh OeoAMJ2WlkuQxBBMXzmwFi4/GC9V5Mcqk9thteQP9ci50ZH8BnW4UMEWftep4dQ1uXbd JOUKUJq6uFY0O/97wiGWSrmElPY9Rg+FwGDE+TQmEk1HBIUKKCYgqhWvZqncBtegy3z1 CgPE78jUNUJ8/K+E+LKDCvr52JKo+Fp2Pj9ZdvinnLBxzNvPZWj6udtxls+BcGqURCET VAOA== 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=mIaRAmZlXfrUjHkJ2pUtw5Qyx4E/Zd4jn5MOod/LYBs=; b=h/ZZLT78/RQPXtChVHuNpfa+4y8cUTeXDTgmYDjR3W9CCahoKLO6kTY8pXATumv0VI bF+mrUWOA70prdFXMd/4toDrSnowbiPx7XGZNp5W5+JIzSrK8Olpn6JWl+QSDjijHqzk Zz8evP/RyEYpQoKrgNndy/SsZRRRnbSpGipLCzYI7NUXXayMaILDI93oTauUc9rS8mhA ajzpXixZNKXsL4um3ZUj3JOuRePZrWegiCqWF0ZyAvtp+1cNMmebTRXx8stfrVDpZLZm CDmpbCfk23v/wS6zPmVwz9U0f2CVtYChJC9tfvHs7uQ3NZZMjY++a47N9Pf3jsLaDggn pgOA== X-Gm-Message-State: APjAAAUVIdGqLLGShQ6LjYeSLeYZvAqnYgnmBrU7fyBPDCpMj1yOpGIt DaPDhe7kPISl//GrN/mC09M6lg== X-Received: by 2002:a05:600c:2245:: with SMTP id a5mr8590411wmm.53.1567145608620; Thu, 29 Aug 2019 23:13:28 -0700 (PDT) Received: from localhost (ip-78-45-163-186.net.upcbroadband.cz. [78.45.163.186]) by smtp.gmail.com with ESMTPSA id j9sm3826665wrx.66.2019.08.29.23.13.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2019 23:13:28 -0700 (PDT) Date: Fri, 30 Aug 2019 08:13:27 +0200 From: Jiri Pirko To: Andrew Lunn 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: <20190830061327.GM2312@nanopsycho> 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> <20190829143732.GB17864@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190829143732.GB17864@lunn.ch> 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 Thu, Aug 29, 2019 at 04:37:32PM CEST, andrew@lunn.ch wrote: >> 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? It does, disables the rx filter. Why do you think it means the same thing as "trap all to cpu"? Hw datapath was never considered by wireshark. In fact, I have usecase where I need to see only slow-path traffic by wireshark, not all packets going through hw. So apparently, there is a need of another wireshark option and perhaps another flag IFF_HW_TRAPPING?. tcpdump -i eth0 tcpdump -i eth0 --no-promiscuous-mode tcpdump -i eth0 --hw-trapping-mode > >> 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