Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp592467ybl; Fri, 23 Aug 2019 05:38:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqxTNT5U55YHHBB6ccqfwJ8Ytb6DpbGuG9xioBGWyl2Oq8vfRex42lYhzPWnYuO7H7aWOPzo X-Received: by 2002:a17:902:9041:: with SMTP id w1mr4673739plz.132.1566563930087; Fri, 23 Aug 2019 05:38:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566563930; cv=none; d=google.com; s=arc-20160816; b=XGCCM+E2QRnfRf8n2pWTSbNQQEsbBKnB22uj+ePo8jEDH7miCkYB2ra6JBlG5PsWTp 8NwF+h6f2ir2mMCXtdGbU87Br0kL/yUjdQGMgmrnntFvbhuFO/tEmGnvnt8QIhckndwh mScPlRq9+C6YQXFEuHa1E1qIpljc/tRyvEPD85pP8Qn4CiPiPU/Xts18BMPGpLbdY++2 tUKTKXjICG6VQX0rFOC3TaVIbNzwEQTfgyoW1js5jFkZsRW7L65K7XUir2omaodAPSSC PosozBJAK7+o8cyAMERwTidpEHJjukAVhoMyVEOYwM0lsAP2rYntdaIQSOYKzcgunjo+ FUUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:ironport-sdr; bh=advAoxHIE5G/Y5vlJDwgp6hw8YoNdaOnL3XhNXebpzk=; b=vtRhSrnRcT9rvjyxsIQKnCl+XvHbMt5oWiBw/TNL6ABuoXjHJ4If3RqqhoOENPGhT0 3JGe6NkNCuVSSvaABADTwbcw+AX/6toFfwJQMWf1xC3aVq/opO26YmfUzgJF0JAMBK6c +/O/7dStkFZsu9YkqFQviKnshBbt5qtNOP7UD6Hn80EBs9o1b64n17FntdlIPIwbHiUj tiZFE0UnRXEroDPWUrryZZxSThg+uv2i3iuMnElmwye5uJyVA58X/KEa/hqvPPMPxfpP 2TEkMdYYkACUtV6WbmL/utpVUl3xiB8UEFUcf4BCRjehA50a4X6miYClozlISuE+AXgr IkBw== 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 r17si1910846pgg.155.2019.08.23.05.38.30; Fri, 23 Aug 2019 05:38:50 -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 S2391429AbfHVTIJ (ORCPT + 99 others); Thu, 22 Aug 2019 15:08:09 -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 S2391161AbfHVTIH (ORCPT ); Thu, 22 Aug 2019 15:08:07 -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: qjqszRIDhs91jWQcz26gwPHhelCeg6vBPO2heAE5sEh2vTHDqw/ERCG7qanM02Obuljp1cTvGM l+91D/dU2ltTW7nnK4ZOZW+NserXlC3fzulVKXbtt7avaozDpjUtwUyhDQnXWGt265lTdlnPLe y/Kk/3gbH3gXAjNhCUbgQcsTMEY+8lgj96C3F324JnuAHG2MZpc+XjlWxj+REp3Ks+gvvM0I/C dWJg0PMgtbFYLCmWNl8aLe73Qsc0wUrCVMsoVyvsgbiZmmgvlsAZfdlQfBDH9Qrypzb76KC/ew y+M= X-IronPort-AV: E=Sophos;i="5.64,417,1559545200"; d="scan'208";a="46283513" 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:06 -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:05 -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:08:02 -0700 From: Horatiu Vultur To: , , , , , , , , CC: Horatiu Vultur Subject: [PATCH 2/3] net: mscc: Use NETIF_F_HW_BRIDGE Date: Thu, 22 Aug 2019 21:07:29 +0200 Message-ID: <1566500850-6247-3-git-send-email-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1566500850-6247-1-git-send-email-horatiu.vultur@microchip.com> References: <1566500850-6247-1-git-send-email-horatiu.vultur@microchip.com> 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 Enable HW_BRIDGE feature for ocelot. In this way the HW will do all the switching of the frames so it is not needed for the ports to be in promisc mode. Signed-off-by: Horatiu Vultur --- drivers/net/ethernet/mscc/ocelot.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mscc/ocelot.c b/drivers/net/ethernet/mscc/ocelot.c index 4d1bce4..c9cf2bee 100644 --- a/drivers/net/ethernet/mscc/ocelot.c +++ b/drivers/net/ethernet/mscc/ocelot.c @@ -2017,8 +2017,10 @@ int ocelot_probe_port(struct ocelot *ocelot, u8 port, dev->ethtool_ops = &ocelot_ethtool_ops; dev->hw_features |= NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_RXFCS | - NETIF_F_HW_TC; - dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_HW_TC; + NETIF_F_HW_TC | NETIF_F_HW_BRIDGE; + dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER | NETIF_F_HW_TC | + NETIF_F_HW_BRIDGE; + dev->priv_flags |= IFF_UNICAST_FLT; memcpy(dev->dev_addr, ocelot->base_mac, ETH_ALEN); dev->dev_addr[ETH_ALEN - 1] += port; -- 2.7.4