Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp282644ybl; Fri, 23 Aug 2019 00:26:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqypSMX4ovxND8WeYLMzDFEI7rgTfBGFIRvbUnJNRZKQVmq+ctc77N2ijChu1kbijPBu+ArH X-Received: by 2002:a05:6a00:46:: with SMTP id i6mr3664683pfk.196.1566545176483; Fri, 23 Aug 2019 00:26:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566545176; cv=none; d=google.com; s=arc-20160816; b=UOxveCyfKE6ZAGIk+FfShEVYWDkVmlcGGlhA8CgAynL7T5aqny4mRepiT+gC8Rig3f pskgQRknJH8WzUhpd81U+rZQPZaD7pFq57XCHQXzwoVdQKCthC4K38pexaaVAnbEV6bE uGklmbzmRd1n6ZKWel+5TGWCpVgslyPdqDdmeiJLroGQ/kVSII1yUK0ZstiMsggE6YYs bz32JRW4Wsag8nX0X3fbkeanRQJRfJ1DNPzD/LYyNqfxnxY09wLyREar7x7N3dHIjrUF e1844PAhrWMzPdbRr9fZS4ZoM+iCkCYskJ8D6VvkFD2VZ3kdGL7k2jwapyowA/LdenjE mgfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:ironport-sdr; bh=5qNINRpaLYbmORN9RAdkySM6FMNK6QOzN+U+meLcrcw=; b=cPn8ZhIQk1BKU8fw5xNiSgYEY3DpHhzlfkUzphWTM107JvTQsSN8VmWY4jUR/sE3Ei H+RfcGmqF0QicjB5bXH9RROge/v69Sm8cejoYY1XavPtVOGCijrHr3z7VU+8Iv84i2CG vZ84MWDFvaRoy2xA5BWKruwMW6Yjme3j4jjFLKLGK0Um0/DwU8HHJkniCAivKgMmYPSH f5kzbR7zH7xfsW6fV+TeAiX3Xfc0TajxuzYF1U+7bal7jXGPLh9LcYa2wCZNK+c8t6AP tf88HFM8l0rB86kAt7FI/Bs8Vb9u0N4j3kvHA6di+Scx9VKBCysFqMB+8rZhbFuLoA/i 6Pag== 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 4si1701799plh.254.2019.08.23.00.26.01; Fri, 23 Aug 2019 00:26:16 -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 S1732540AbfHVTIE (ORCPT + 99 others); Thu, 22 Aug 2019 15:08:04 -0400 Received: from esa3.microchip.iphmx.com ([68.232.153.233]:24585 "EHLO esa3.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731946AbfHVTID (ORCPT ); Thu, 22 Aug 2019 15:08:03 -0400 Received-SPF: Pass (esa3.microchip.iphmx.com: domain of Horatiu.Vultur@microchip.com designates 198.175.253.82 as permitted sender) identity=mailfrom; client-ip=198.175.253.82; receiver=esa3.microchip.iphmx.com; envelope-from="Horatiu.Vultur@microchip.com"; x-sender="Horatiu.Vultur@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 (esa3.microchip.iphmx.com: no sender authenticity information available from domain of postmaster@email.microchip.com) identity=helo; client-ip=198.175.253.82; receiver=esa3.microchip.iphmx.com; envelope-from="Horatiu.Vultur@microchip.com"; x-sender="postmaster@email.microchip.com"; x-conformance=spf_only Authentication-Results: esa3.microchip.iphmx.com; dkim=none (message not signed) header.i=none; spf=Pass smtp.mailfrom=Horatiu.Vultur@microchip.com; spf=None smtp.helo=postmaster@email.microchip.com; dmarc=pass (p=none dis=none) d=microchip.com IronPort-SDR: 3j/s0R80uTH2/iiwh3/Aq50sL9TGuK21EoqkCrGTKS/2wpZS/H/2ik5hBFQkEdNc+EtUWKH71i NWoJQBpa8udfutd8IWtcJOand3f4nWYNMHaptQ9u32IPCEk8qpBO6GNPDdotaKTJ3+hySTT0I/ Vwhv3U4ao/mslKdtB3id8jFSudKHBHlF/pqphCSoo0YTq2a60mB9C7Ota15PbxwMD86Z2t45Qv vt9G/FvKYm3hLpTAn7Be9fXqrq9MRNYm4thJFepCCsOUSacCuwmzfw1r8GB2Os1zXdL8wly1iE P6w= X-IronPort-AV: E=Sophos;i="5.64,417,1559545200"; d="scan'208";a="46283497" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 22 Aug 2019 12:08:02 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 22 Aug 2019 12:08:00 -0700 Received: from soft-dev3.microsemi.net (10.10.85.251) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Thu, 22 Aug 2019 12:07:58 -0700 From: Horatiu Vultur To: , , , , , , , , CC: Horatiu Vultur Subject: [PATCH 0/3] Add NETIF_F_HW_BRIDGE feature Date: Thu, 22 Aug 2019 21:07:27 +0200 Message-ID: <1566500850-6247-1-git-send-email-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Horatiu Vultur (3): net: Add HW_BRIDGE offload feature net: mscc: Use NETIF_F_HW_BRIDGE net: mscc: Implement promisc mode. drivers/net/ethernet/mscc/ocelot.c | 26 ++++++++++++++++++++++++-- include/linux/netdev_features.h | 3 +++ net/bridge/br_if.c | 29 ++++++++++++++++++++++++++++- net/core/ethtool.c | 1 + 4 files changed, 56 insertions(+), 3 deletions(-) -- 2.7.4