Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp353964ybl; Fri, 23 Aug 2019 01:45:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqxCN/GkwT1Gjd01pQ8CujXYopeRKzobTwetTf6IU7jeDuvtDPvEQISVdUT/Csz4dALom5iY X-Received: by 2002:a17:90a:734a:: with SMTP id j10mr4012842pjs.63.1566549936468; Fri, 23 Aug 2019 01:45:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566549936; cv=none; d=google.com; s=arc-20160816; b=m0Poj4EQ7PMkXY+o0tO9myClwu7rBnFlg7zI8udfj2KZAveA6aVhFv16m8gqLvJXN9 pGinuUynV6MaK3423MEDG+t19KJmKFUwbqxXv27FvtoI94st8XGp2NuQof+//TgZpzvn k7v4NZBhCB0CE8BwWPN0D33gskhQBIxZ6FNHAqz/+5vzt4RPe29JdJgxHi4BpjLnTyvZ ZPYki68H25RNbWfpqdWchtEXUVNyFCy6S9FVClbJGw090t+W1F6xiViaRLLIj2/EGTao /7gMynDFIanJH6Jfe5yhtwtydTOHAlimRXUld+Sb0pNjmtrMH4yuUBrrScDXPlEwOcZA MKsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=IWAFZRS0SidPKFKpSWEk91SMvUUq8YUZizUooyJ8JAE=; b=B08Pw2xJxHmuMO2nv+Uy77xHM+u2GdqQu9IsKNrQzL8UMSCcP2EzuuUN45c3OEwIzS I6G4Th2TVdr42krSAKZA9YWtUWe5zSABEqCwP8BdNjevoOF4Aov78jAyagRYWlCZifmE Xo7HmONHnPY0xBVRpQMbWFW3tuWpXlnA2m7rfVrW3lmOAnawnMXXYGk+Vr66H/yg/R5t R6xe3aQyqJvpU4fdfY7EVO321A41LniKTvxKmSQyxKN2HtjwNECGrKlskWSjnuEUqG7J jgr5XoXFIXh+ADRMgHsQ6GOmsHXo8gd4nw2/ZQS2OXOMsJXCqnWCu91BNNQNFL+yLdfR AqdQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a15si1387294pgk.523.2019.08.23.01.45.20; Fri, 23 Aug 2019 01:45:36 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389135AbfHVWcL (ORCPT + 99 others); Thu, 22 Aug 2019 18:32:11 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:49766 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731886AbfHVWcL (ORCPT ); Thu, 22 Aug 2019 18:32:11 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::d71]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 87E9A15393F5C; Thu, 22 Aug 2019 15:32:10 -0700 (PDT) Date: Thu, 22 Aug 2019 15:32:09 -0700 (PDT) Message-Id: <20190822.153209.365750764799027706.davem@davemloft.net> To: horatiu.vultur@microchip.com Cc: roopa@cumulusnetworks.com, nikolay@cumulusnetworks.com, UNGLinuxDriver@microchip.com, alexandre.belloni@bootlin.com, allan.nielsen@microchip.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bridge@lists.linux-foundation.org Subject: Re: [PATCH 0/3] Add NETIF_F_HW_BRIDGE feature From: David Miller In-Reply-To: <1566500850-6247-1-git-send-email-horatiu.vultur@microchip.com> References: <1566500850-6247-1-git-send-email-horatiu.vultur@microchip.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 22 Aug 2019 15:32:10 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Horatiu Vultur Date: Thu, 22 Aug 2019 21:07:27 +0200 > Current implementation of the SW bridge is setting the interfaces in > promisc mode when they are added to bridge if learning of the frames is > enabled. > In case of Ocelot which has HW capabilities to switch frames, it is not > needed to set the ports in promisc mode because the HW already capable of > doing that. Therefore add NETIF_F_HW_BRIDGE feature to indicate that the > HW has bridge capabilities. Therefore the SW bridge doesn't need to set > the ports in promisc mode to do the switching. > This optimization takes places only if all the interfaces that are part > of the bridge have this flag and have the same network driver. > > If the bridge interfaces is added in promisc mode then also the ports part > of the bridge are set in promisc mode. This doesn't look right at all. The Linux bridge provides a software bridge. By default, all hardware must provide a hardware implementation of that software bridge behavior. Anything that deviates from that behavior has to be explicitly asked for by the user by explicit config commands.