Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3727865ybz; Mon, 20 Apr 2020 08:22:24 -0700 (PDT) X-Google-Smtp-Source: APiQypLbvLHFE3T9C1zdI0uoMzDFS7QvqE/mR4ysYSct8kEEQsVHr3RkUTDQN4Ln2eWALA2zl1S0 X-Received: by 2002:a17:907:41b6:: with SMTP id na6mr16192314ejb.119.1587396143869; Mon, 20 Apr 2020 08:22:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587396143; cv=none; d=google.com; s=arc-20160816; b=OlYISFkdbYX+q8NVhGvoTZGUwmFhS48uARCxGE8obGwiggfT368OVUeMYbRMo2aKWn MP2LJKnh9m+yk5qbpZXhT7lgEy+UfNg0V0+V6F5yQYZ9uxKzYOplc8E+41TqIpu8iY5+ HZeeiJkfylATdiYXTq+tW0sxep9qPQy81vYK0isZW/+FRCgUVDTaTkH4tcgw1Q2c9HTZ KOixkaDM86i1APzyvGFYD5cZazhGC1M3dFt8E2PCEGT00vZKVoB5rvJRptj9mlc0yQ9j +8yattsJW4+pudZP8KAaw5m1dxuCod6XP4Kge2hmIPtrT6KgrNGQzixkqyXAULfsWwka M/2A== 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:dkim-signature; bh=z/d35JC3qx5S7YOhDklhDSB4CzSs+REdFzSA1NWPro8=; b=RGbYX6YXdlgxcdc1UbQ5GEDdEFzXbrbP0MN1dSZGcq2usjoADAm3KpE9giZ5x6pUSb l9A/u0JjQ7r+znTR589H4PnWhsz1KiZn+E0ivaztT0ZhhP0sAqhU8wdH7bRdx+xJrWRU /ub0VcXWaONn2uOr1bdW63KGXDJm9mwQkfYEI70705TUw413mJepKUUWGpJrcGWul+zK DoAsBLgWTemR2B8Xk6Z/lz7sttomMFzAVypoO3eYHUHOCi79foOA0iEWjNW5fNRO6p+H ju/s6bmx9tXcqtMZft9LiLLHFiEOKHtOYTgcZaCj8TFvaZ0wggRs9C1c5tnNAr8Dyj8F HPUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=1ZJBsVrm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id q1si714865edj.64.2020.04.20.08.21.59; Mon, 20 Apr 2020 08:22:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=1ZJBsVrm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1730201AbgDTPMI (ORCPT + 99 others); Mon, 20 Apr 2020 11:12:08 -0400 Received: from esa3.microchip.iphmx.com ([68.232.153.233]:3824 "EHLO esa3.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730166AbgDTPMA (ORCPT ); Mon, 20 Apr 2020 11:12:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1587395520; x=1618931520; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=f83042ZIqutNYkKufvnkcdocBQbp4ZWpcUIFE5BjUho=; b=1ZJBsVrm6RoOpk+4ZWR7UmjlbDRHLQjucjN8kbN0f8a15AruEizRUYsl SLuB2NpMYkc3wEJPOJvakV7na9+xipJnnvRC7JG6g2FGoDLvkCRaNjU13 cKjT5YLp6oeujAyn2uQr/NLp9wpIe/XlqoshMh2L+9nPwN+lO/GiraLDB rmXKSmoc+CHfx/tvcqa0Kel2wpcHI11/FVPj1YYJQWdPcrt2GsqpGBP8V +S3OiEXW7foZLCWMgAkmEsB41x9Sarhe3IHzt6797OQ+2S3GN2df0WpsO Lr46ORexsfLxvOsD5Suifwi/6zRFDR1WJoJQuPGfKlPPzvP9PhhlMq1KB w==; IronPort-SDR: QKhBxYRncQotaAJiTaV9P4lO93wKL2eAzJ93otF1Ug9g2ZDSXbcS1McJsZLoxtuAmSHBzK+THr 5XOzkwzhvi2/61t01bmr8GJ1+O1R2D2EFpJ1z2TJJwtC7htFmgOTkM0I4zByrFj+THILEmcvgb PQPI8DZ2Qua8/j709SHQ6a0xQI6yGnU5CF6Io7IEewIvo7091r1JgDZOzQHpFxO4d5hMCKO5gh HlTvAgE5a/oCLpSn2wmwphyspG0u16P7FRnj7eoXcjs3fWvnxk3nxBsRS8cxZ3ZFMUT+DHgh5r BUM= X-IronPort-AV: E=Sophos;i="5.72,406,1580799600"; d="scan'208";a="73911570" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 20 Apr 2020 08:11:59 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 20 Apr 2020 08:12:05 -0700 Received: from soft-dev3.microsemi.net (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.1713.5 via Frontend Transport; Mon, 20 Apr 2020 08:11:28 -0700 From: Horatiu Vultur To: , , , , , , , , , , , CC: Horatiu Vultur Subject: [PATCH net-next 06/13] bridge: mrp: Extend bridge interface Date: Mon, 20 Apr 2020 17:09:40 +0200 Message-ID: <20200420150947.30974-7-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200420150947.30974-1-horatiu.vultur@microchip.com> References: <20200420150947.30974-1-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 To integrate MRP into the bridge, first the bridge needs to be aware of ports that are part of an MRP ring and which rings are on the bridge. Therefore extend bridge interface with the following: - add new flag(BR_MPP_AWARE) to the net bridge ports, this bit will be set when the port is added to an MRP instance. In this way it knows if the frame was received on MRP ring port - add a list of MRP instances Signed-off-by: Horatiu Vultur --- include/linux/if_bridge.h | 1 + net/bridge/br_private.h | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h index 9e57c4411734..10baa9efdae8 100644 --- a/include/linux/if_bridge.h +++ b/include/linux/if_bridge.h @@ -47,6 +47,7 @@ struct br_ip_list { #define BR_BCAST_FLOOD BIT(14) #define BR_NEIGH_SUPPRESS BIT(15) #define BR_ISOLATED BIT(16) +#define BR_MRP_AWARE BIT(17) #define BR_DEFAULT_AGEING_TIME (300 * HZ) diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 735ec6ff86cc..b3c176a0a136 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h @@ -432,6 +432,10 @@ struct net_bridge { int offload_fwd_mark; #endif struct hlist_head fdb_list; + +#if IS_ENABLED(CONFIG_BRIDGE_MRP) + struct list_head __rcu mrp_list; +#endif }; struct br_input_skb_cb { -- 2.17.1