Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp901349pxb; Tue, 9 Feb 2021 16:05:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJyW4lN6UQGEhHWeoNVMdvASutBpNWpzX8FRVnXBiJ27aLCk/KJhnfmr9JndBteRN9Ik4O+9 X-Received: by 2002:a50:aade:: with SMTP id r30mr655906edc.15.1612915555121; Tue, 09 Feb 2021 16:05:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612915555; cv=none; d=google.com; s=arc-20160816; b=ut1Pq92fwRi2/ogZxTgcctlQJTITxVVwcjWfULdVv+oVWZCLQf3MPYQswTtVh87Kqn SQCxarM3MkHAWaH0h77NUGaTu9BHn8mNGulv+rQ+0RCFiJKSBfjcy88+u6yzWmuVCt01 nDvYR5Jtj99Si+7k1GBdDI0zxwBjaqgyJBZGzh5SsLXGUYRqHSwkOhgdnSFt8VAmL+mz knwKPP0ELtu4V/2hH+SNMTMuP+SiC0gMF5bmhaukvLZUVKoL72gcHJLVhuU4DMHy4OCg Ja+8BvfBtccplMWqEcYd4RnhQB+yxbtO4KKBSkmMt17tLQZ17XBLwS+QcOe6gpp57HY6 3Daw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:dkim-signature; bh=23mfXqWorLz7NzaI9S0H3NyQXRURfi744OajafzrNKI=; b=VLs7soJNe/VUexLzGZkuZ9mfiTIfnIB1Y6zCs/IYtkxiOI6c8Wv6L1k1Q1ePz8dlHK Gh7CUMKMywuVYcMR429B9u6Ps8jc8yAKdFMDerxdefXUd5lTHRrirWZfACCSznQZzsOb dT+kKEcm6tiKBYNGEjNfAlxHFQcwkLKxy/5PDiNza24Xkp+aqLcL2TWx8rwdd/Ut46HX mZg/RkIJbp6jeLv1PogZkH6k9ap7sfAF1JinAoFC9aUoVorqLL2d3fDQtgcpKTPIcIoS aIkLpR7ihapflYbatCFDYUdx9kXmdRAvhT5p68xZzNhCgHG+IiwfUEqcrYrNNuPsjBpT +bPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=UCTir8je; 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=QUARANTINE sp=QUARANTINE 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 a24si228407edm.608.2021.02.09.16.05.31; Tue, 09 Feb 2021 16:05:55 -0800 (PST) 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=UCTir8je; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234681AbhBJABy (ORCPT + 99 others); Tue, 9 Feb 2021 19:01:54 -0500 Received: from esa.microchip.iphmx.com ([68.232.153.233]:54902 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233719AbhBIUfh (ORCPT ); Tue, 9 Feb 2021 15:35:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1612902936; x=1644438936; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EHLVPvUVJez21AH8PebxAXBSYM5AvLzTmtWmafYTWPs=; b=UCTir8jeHWWyumutCnlkXE1qxTYqOB7zWLvg5nhBDUIZEV+B0OwtgDDG EQzk2Xqupy7E/qa7/ZzVe1FU7wxn/xjiqlEOCkErCA3GZt8obxZyZRNyD Ct7bBW40XwmFpRqpGWocl5h4PkFo1Zmjni5r0Q1oK5oRJPKoA2GcDKdBz xYQLdxLrGDKPCfmbbjowMGT1FyFnJ3rX1GxANKmnujQsPka54O0Jw5aMd sNgbp/Wox8Zfcr0ld3rvzSH6Kgj9dQTZDxiMygOjZQUl06SvaUfQbDC0f Ww+AAL6G46FVkgcfSfvvVUf1Xn6pM6iBwfxAp3+115iY2zpRak4q9jac8 A==; IronPort-SDR: Oju202nIkkMU8pXEVI3BqXqb0RWdKUozUz5kt4tNCAFAd0J2XSBaRxcWdKWH6AIB6QwXo7p9nv IJ2b8Be5yRgZ1p+wxko5mTvhyuQ77QULLOgBSBS68lvPt0/A8/hjG0n0h2O/sRRGfgmb3Zf6oU r/VaFOWSeknhPem7dgzrcZnFNmE1llE6xEu+IVmhmFF/Zo2Nwj5jU37uuCuzJJYYh/elcGLQek JpqCTXTRK1/s4ywwO74fK8t7RGCOq5dV6TCnW04ZpJckOEG7fpbyc9NT6NAv5KvcuZs+Xw7Sk4 G+Y= X-IronPort-AV: E=Sophos;i="5.81,166,1610434800"; d="scan'208";a="114457590" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 09 Feb 2021 13:24:22 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Tue, 9 Feb 2021 13:24:22 -0700 Received: from soft-dev3.localdomain (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Tue, 9 Feb 2021 13:24:19 -0700 From: Horatiu Vultur To: , , , , , , , , , , , , , , CC: Horatiu Vultur Subject: [PATCH net-next v3 2/5] bridge: mrp: Add 'enum br_mrp_hw_support' Date: Tue, 9 Feb 2021 21:21:09 +0100 Message-ID: <20210209202112.2545325-3-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210209202112.2545325-1-horatiu.vultur@microchip.com> References: <20210209202112.2545325-1-horatiu.vultur@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add the enum br_mrp_hw_support that is used by the br_mrp_switchdev functions to allow the SW to detect the cases where HW can't implement the functionality or when SW is used as a backup. Signed-off-by: Horatiu Vultur --- net/bridge/br_private_mrp.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/net/bridge/br_private_mrp.h b/net/bridge/br_private_mrp.h index 32a48e5418da..a94017f86cda 100644 --- a/net/bridge/br_private_mrp.h +++ b/net/bridge/br_private_mrp.h @@ -46,6 +46,20 @@ struct br_mrp { struct rcu_head rcu; }; +/* This type is returned by br_mrp_switchdev functions that allow to have a SW + * backup in case the HW can't implement completely the protocol. + * BR_MRP_NONE - means the HW can't run at all the protocol, so the SW stops + * configuring the node anymore. + * BR_MRP_SW - the HW can help the SW to run the protocol, by redirecting MRP + * frames to CPU. + * BR_MRP_HW - the HW can implement completely the protocol. + */ +enum br_mrp_hw_support { + BR_MRP_NONE, + BR_MRP_SW, + BR_MRP_HW, +}; + /* br_mrp.c */ int br_mrp_add(struct net_bridge *br, struct br_mrp_instance *instance); int br_mrp_del(struct net_bridge *br, struct br_mrp_instance *instance); -- 2.27.0