Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2326110ybl; Thu, 29 Aug 2019 06:50:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwV47WrAWUXyt+aztWlgVJXJlmDoJW0tSmZHcLnYkpPfeHVeme3zLcwduYjr++q+0NIxomA X-Received: by 2002:a17:90a:3266:: with SMTP id k93mr10118785pjb.46.1567086614613; Thu, 29 Aug 2019 06:50:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567086614; cv=none; d=google.com; s=arc-20160816; b=kAVaBUXq/1/xvZcs6IoJ5pVk22r0r7G9xjjbDBkLI1pMLTu7gpr1nEFgS4Juxq/weL av2dGwTPA4tLsL3HeoAfPY8EaUGKKjrj4A7hCa2qX3RR4mKAw2cVjnZrdEcc1oBF4oSn Ysih4pzZDxjUgUBT/qiK4x31MxhP25/s1Z1UFIMpJ9U1Lfe9axCBrrLLuU6Og0QFd625 m0IgzgqHBifCI6UrThWgC15dmBxhwrPsi/lPgDLubAHaSD6YWhv7Qzf4lsNv+B2Ha6v3 apueZa3QeZS4yoXTdw/UvBGWLUe/T3vONuM2v+JFfPIyPt27fUVZ6JJftwzkCUdfF7A9 aH2Q== 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=HsA5AiZYcLjGaOwF7llG2D8YWXDZ7fAurDyqgUx22cQ=; b=U065CDIRrmvd5RIiaPN5HOwDfZl+LySPugAEICNjmyhqQxIk8BbRzZb+VvbdILsqQP ZugbG8+3QC82hJGC0DKyPNtPF9YC83/I26S/95TB8X4YOynJ+rauLwKSJT5JEHRgfTKa mD7JXSNWlWXDyqYC5MffP5GbLNORpAG9hR3OruCQettWQCms/ZjQkMttu/NvlKnue2c4 8OgGhvV2PRwP17x9i7zkggxsVSOq8j2k9tM8JqHKP6ktAAwFs2xltyjsxf59Qb+UU4Ts AlivEBqRkO4+o5mrIeeJTT8Bf+x1ojvJOKSAH2u8t+wfbY21yuoJI9TuCW/jbK3WT0Qg dR0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@resnulli-us.20150623.gappssmtp.com header.s=20150623 header.b=Smiubh10; 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 q32si2250699pjc.2.2019.08.29.06.49.57; Thu, 29 Aug 2019 06:50:14 -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=Smiubh10; 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 S1727415AbfH2NtE (ORCPT + 99 others); Thu, 29 Aug 2019 09:49:04 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:51675 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727360AbfH2NtE (ORCPT ); Thu, 29 Aug 2019 09:49:04 -0400 Received: by mail-wm1-f66.google.com with SMTP id k1so3805747wmi.1 for ; Thu, 29 Aug 2019 06:49:02 -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=HsA5AiZYcLjGaOwF7llG2D8YWXDZ7fAurDyqgUx22cQ=; b=Smiubh10AZvy1V5/a3s9ngk74AY/Gn/dplsTUfPlBGrWfI2iXfguDSeowO4ocsHvk1 Iz+4/Mi4Xw3NAVZOltljgx6/2szcMQU35rLITwq+mgDElGosjMdWZyCDI4EgM6ccSCNl h5fVC2owNRY4l4bPEpamPDVdadJ0VgkVCIsbTlRhX4xdpmw0YobpQiZDPL0YmieOrN1D Oi1pyQLxw/E4EBp6rwFro1h8IKA/hEemLSIV0p/mxQALFuCVJ/cu48RD/p9zHZvsCwcp +sPWyM/cK29se/O5RDe3bbIfVoawGXs+KdKYbiSL4EO6b3DcjLCilTYi8sS1NLLBkHk4 zVgQ== 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=HsA5AiZYcLjGaOwF7llG2D8YWXDZ7fAurDyqgUx22cQ=; b=odXKiCF7LkVDwQYL2OXSNgA7IQ9QrSqT70Dqqu6f10rYKaiCyJcpu2vbpc691FUV0g k+VD3I+7FzU/MvE5S2h8POrH0r8vOoxA6m+vrbWYITyrkPraVwFv5tToVU7xI3RnCe80 oQV8Vz4P8dX/9RNamvBZH2IdmdHDprI7mrUbAMUijkEMnEpBga3a6bpNEGipZv9nwyoz Uoywn/mgwU4PfgBHosPocwhV7bIPbx3Ilk1rJHXb+zijn2qmiLRZs0BzISii/fN40jNn 4lR/FvKiJj62QcXeE34qE068ovXdyEAloZky/U9mJOh16LL/1XCHHW/ksHMVE/VEhcsU wJ4w== X-Gm-Message-State: APjAAAVPUFSyZdd8tKVTwVyeGETviGKsDZ5KxbipfabxS7iASVJz6/8h roqnZKufbsy41S4tQaa9MMtnRQ== X-Received: by 2002:a1c:f604:: with SMTP id w4mr11797299wmc.169.1567086541944; Thu, 29 Aug 2019 06:49:01 -0700 (PDT) Received: from localhost (ip-78-45-163-186.net.upcbroadband.cz. [78.45.163.186]) by smtp.gmail.com with ESMTPSA id x10sm3671157wrn.39.2019.08.29.06.49.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2019 06:49:01 -0700 (PDT) Date: Thu, 29 Aug 2019 15:49:01 +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: <20190829134901.GJ2312@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190829132611.GC6998@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 03:26:11PM CEST, andrew@lunn.ch wrote: >> NACK >> >> This is invalid usecase for switchdev infra. Switchdev is there for >> bridge offload purposes only. > >Hi Jiri > >I would argue this is for bridge offload. In another email, you say >promisc is promisc. Does that mean the Mellonox hardware forwards >every frame ingressing a port to the CPU by default as soon as it is >enslaved to a bridge and promisc mode turned on? Or course not. At the >moment, every switchdev driver wrongly implement promisc mode. > >This patchset is about correctly implementing promisc mode, so that >applications can use it as expected. And that means configuring the >hardware bridge to also forward a copy of frames to the CPU. 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. For normal nics it means that all packets get to the cpu, but that is just because it is the only direction they can make. 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. 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. Promisc is for setting rx filters. > >I see trap as a different use case. tcpdump/pcap is not going to use >traps. > > Andrew