Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1874996pxb; Sat, 23 Jan 2021 08:25:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJxEfF3bUS7RYOVcejWH2Pp69r7Jc0l5UxvzfCY81aDzDp4qj+FG+INR76poNU+2N+Wx2cOJ X-Received: by 2002:a17:906:6846:: with SMTP id a6mr1632337ejs.470.1611419112361; Sat, 23 Jan 2021 08:25:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611419112; cv=none; d=google.com; s=arc-20160816; b=nabzHmujasUSGqXnSZfLYndSQ2DomJ0BAsG1W+WrineJSY464DMh6+ao3ujXkik5c0 /vQnm8VNGAgdw/Oj1vNLxnZvGH9ZjAISlRmhaGWkdWkFm0fyCoasQmsFfjkF+/BFzIzR 7vcAW6ntI7fAZs71GMRLBonyGHYQjFuMQcWmYcV7txgSCCGD+uktXQnHYVV9x6A79EiM K0XgvgByst2BvrsLAJdRdTjXaIGTv+Syy8/5wz808zgyb9CusCAY3SbdYYqDUpJCmCD4 cDFNVGALKF7Rimny3hgHOb7VDAm+Kj5Kz4Xwm7cagJw3RzbKHdIG9GmSzZBjK1kny+k4 Oz4A== 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=Ct7njBuTCT5doeZZ9JS9DPuwBOsjrEnutMxYW/ZqLgw=; b=Op7D4ZFZbk9MqbQyoVr1HdfTei9nO4lpEMSRTKQ0wyRHkZ6JNEhM2LYvTlty1u/YEa kbZ161vVBiuxnDcP3EdUjn45iLRq6oyuEsW7sBgvvBWkxv+zwDcrA9X6QEw7wVT2c/t4 Kcui+6Lhn2TzU1kJ7bnUfXc2bPqUa4aNiz6dSwMZ3jUsgx5QzrAGVllVjgG/IM6sNJ0g Ot56qosAhYPPlf03G99CSeBpePmJL4cVQJZj8bfZQQapr550xZki0Ozphr/vgDeLPUWs l7CrQ9xURhb5s78r0YO7lPM1Y5qcxvC47K+X8/fq4Zas3DM/kjvdSyttFGFFzm9u2Nlf 0FiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=YzrxfEU6; 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 bd27si4852292edb.16.2021.01.23.08.24.49; Sat, 23 Jan 2021 08:25:12 -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=YzrxfEU6; 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 S1726229AbhAWQWK (ORCPT + 99 others); Sat, 23 Jan 2021 11:22:10 -0500 Received: from esa.microchip.iphmx.com ([68.232.154.123]:16215 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726173AbhAWQVc (ORCPT ); Sat, 23 Jan 2021 11:21:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1611418891; x=1642954891; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=x1dQhUol+8VUXh7OWgoJGUChQ9yRIXGyOFo+E8lOWP0=; b=YzrxfEU65cCaBhozQul9J3RmFEPbYyY4Ui4ELjfUb06irRepTSGs5p9s 3/wqZS9pZuukEpdxsIvKMEdVhL85YRPkSK1ObpuQv0FcdRjX5zyjb/+fe vzQEph9aIlKKOJYQQHKCSvxElq+i0Jkp5t8YluLE8bZI5gkANqECA/hy9 VABS/aCrDT+xPOd0Q8Cho1+23mzN+5XiBtJrthTdcYIs4tJZoLxjmDVyj Y/WaZ16pCEtXNccLLcLiIuSVoIES2yfQnmJTALIUzOMdBk/xZlpqdFI+3 BGyL7dq+wv/fFoh+rkyoe1w2zOBUCDnRkUFpkaNA+ZKBlBkaFK9KCBCJ/ w==; IronPort-SDR: 17Ql66CSHJhtCeqvHZkPXt/HGhDRp6yHMB7D2a8DlI4UXkQ9qPoaEUp/h3uehpztihvpkh5mxb m1XRTAKv0M4UX60edrRJwmCBr2r8dxbHbh/VQ0QWkYX+C1znSBFe0KXVm6/pzYf/YvUOF1bKXe 2a4yy6HYsYwxDopqLVd6hECzeXA4f3EApcNT2BZEvH5quempu9vDW+zrYdN7MmTqHGBC++RL9H RS5euOrgNUxJatNIkoEpI3P4cSWjbAHyx4Lnw6TGm9Ssh/O24t46YCJuWu6SNu0NSzS8zKydpM ReA= X-IronPort-AV: E=Sophos;i="5.79,369,1602572400"; d="scan'208";a="103959007" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 23 Jan 2021 09:19:54 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) 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; Sat, 23 Jan 2021 09:19:54 -0700 Received: from soft-dev3.localdomain (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Sat, 23 Jan 2021 09:19:51 -0700 From: Horatiu Vultur To: , , , , , , , , , , CC: Horatiu Vultur Subject: [PATCH net-next 2/4] bridge: mrp: Add 'enum br_mrp_hw_support' Date: Sat, 23 Jan 2021 17:18:10 +0100 Message-ID: <20210123161812.1043345-3-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210123161812.1043345-1-horatiu.vultur@microchip.com> References: <20210123161812.1043345-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 better the cases where the HW can't implement this or when the 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 1883118aae55..31e666ae6955 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