Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp4472319pxt; Wed, 11 Aug 2021 06:55:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYmWqNErnYs8xpVga/XbFYdPFzhB9NW+v2ZJr9m1W1sYJLWvns8c4N3dU47l1W6kgn3c9l X-Received: by 2002:a05:6402:524b:: with SMTP id t11mr11747017edd.330.1628690112680; Wed, 11 Aug 2021 06:55:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628690112; cv=none; d=google.com; s=arc-20160816; b=T3oZq9LuFVrn8mbxWqQlRhMzuL4xQF4OrWu8SA7g+JFq/6iRSOhc/95+NcZaF8sIy0 U4A45BVZe4LretDLzc3vFgIu8C7WyDrrJmXh/FA1utkOVWlVsvxEVHqWcMBssmGTkbAT JbQhHAG43GrwrawHbhzlI+wVdUd2Gek7dLq/qWZW35dWunZ5ySH0wazXbMrb60nweJ0E /CmReqKjuwfOS+kxcJD4yMcBIGXiEemtBUhLbZipvgybPH8NJp+h0x1NYz03ONSLdtgY Ks9sN61U7Wf/+d2zGmvWTATg8B6X2lBRKPagxJun5JiK95dn5kTjkA6SvIZYDVSEz6gr zH+g== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=McZHw6sQ4TwpaGC2g78JrbLUmpP0WSdIbTjyHIQHZDg=; b=zvDUuc0izQhRqKZS5WDjH5PQlojPRbeXav+14kRY9xXWb1lueuE5sxDgPycMYmC32j xEuIBCTmEORgHQAVPjPu2nB3tH293+y8qeFLuGXiKbPR0nfT9EAdpgLs1tsoyFyF789H n/wbeKlnIfw97aWisPPI4Eg+8ZeejV8WJ0i44jK573M+U9pDX8R6OCkH0Ran8tGQf3n1 mIt0ymOcdzMsKr+G2HA9x1IeTPc8NoFw9f7Zsouo4U9OqBxMTeCw1oZgVX/Jw7izCHga TmWYOmihjqZj4qLMrH8wDBvDagWFb6Nm+a7c+UM03q05VxXc3/t2KSPvcVEvWxXBZ+Rb 27XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IX2JCs+z; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h17si24289868edb.607.2021.08.11.06.54.48; Wed, 11 Aug 2021 06:55:12 -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=pass header.i=@gmail.com header.s=20161025 header.b=IX2JCs+z; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231714AbhHKNxl (ORCPT + 99 others); Wed, 11 Aug 2021 09:53:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231176AbhHKNxl (ORCPT ); Wed, 11 Aug 2021 09:53:41 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F827C061765; Wed, 11 Aug 2021 06:53:17 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id g12-20020a17090a7d0cb0290178f80de3d8so4881525pjl.2; Wed, 11 Aug 2021 06:53:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=McZHw6sQ4TwpaGC2g78JrbLUmpP0WSdIbTjyHIQHZDg=; b=IX2JCs+zddAvzfStvaEUhhbbYHBSt9n8HTPWZ3/t5mQ1TU3rlXnmZzyeO6NqlMVniN IlsOhAoy5rjlKPxKf1nDNMSRzYcCkuQXGZTaPjS9X5Df3HKv6AOb/Dq9kkRV3YhHBAYS Txyz8cSrY0O8FSCRMbuPV3ONHUxjWZ+MI4St8yeA8CTSDSp6AQMrrTzfAsv6k/lxX5sS fmR1h6LqYPgX5fuQkMpUhjvAn4EohaQqLlQD9CQpjAocSj2pjYcmzP6UOEEo+7sku4P/ osqfp7ya4/LoEf85EZaokcXQe97Pt/WHoh49edxjQXSJgHHsPHB02IUz8atH/NyRNWjc 7OwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=McZHw6sQ4TwpaGC2g78JrbLUmpP0WSdIbTjyHIQHZDg=; b=F651fGZ2RFLB9Ga1vNtAdnaivTjN8LI8xwhUZTOu0IiQpTNIsvW3xHlQ22aN9cGBRn yJmIhdPEZGe+G6op0UiFuHGUXSvVwVtZ0pOXStF12kinbVS2JS9D1CLhltzxql+XNKKP eEXzXO4m2cZLFRoKkiEfpvOVAlBL624IPYQAi+yiqTP8WKargix0oofqnVrAx94/opCZ mCIMS+z/IazG1CcluVKTJ6b4pmNx6iQpr3tamK7QCTwYy1y8fN0tKXJ/Rgt73gFucvm9 7sF5iExCT1cH+V0mzIFqIRDJN75/LKjwoqv+yjKrnfF8mSYjOJmAw7zkgtLuVsTURQzb DGNQ== X-Gm-Message-State: AOAM5320A4OHX3l5SX8Czd2hKMe8GKAdkiSezacaSaA70GgohonviuG8 Mew3GCvWhflLjw1QvNCmn7E= X-Received: by 2002:a17:90a:dac4:: with SMTP id g4mr36766901pjx.233.1628689997001; Wed, 11 Aug 2021 06:53:17 -0700 (PDT) Received: from haswell-ubuntu20.lan ([138.197.212.246]) by smtp.gmail.com with ESMTPSA id c136sm27603597pfc.53.2021.08.11.06.53.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Aug 2021 06:53:16 -0700 (PDT) From: DENG Qingfang To: Roopa Prabhu , Nikolay Aleksandrov , "David S. Miller" , Jakub Kicinski , bridge@lists.linux-foundation.org (moderated list:ETHERNET BRIDGE), netdev@vger.kernel.org (open list:ETHERNET BRIDGE), linux-kernel@vger.kernel.org (open list) Cc: Florian Fainelli , Vladimir Oltean Subject: [PATCH net-next] net: bridge: switchdev: allow port isolation to be offloaded Date: Wed, 11 Aug 2021 21:52:46 +0800 Message-Id: <20210811135247.1703496-1-dqfext@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add BR_ISOLATED flag to BR_PORT_FLAGS_HW_OFFLOAD, to allow switchdev drivers to offload port isolation. Suggested-by: Vladimir Oltean Signed-off-by: DENG Qingfang --- net/bridge/br_switchdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/bridge/br_switchdev.c b/net/bridge/br_switchdev.c index 6bf518d78f02..898257153883 100644 --- a/net/bridge/br_switchdev.c +++ b/net/bridge/br_switchdev.c @@ -71,7 +71,8 @@ bool nbp_switchdev_allowed_egress(const struct net_bridge_port *p, /* Flags that can be offloaded to hardware */ #define BR_PORT_FLAGS_HW_OFFLOAD (BR_LEARNING | BR_FLOOD | \ - BR_MCAST_FLOOD | BR_BCAST_FLOOD) + BR_MCAST_FLOOD | BR_BCAST_FLOOD | \ + BR_ISOLATED) int br_switchdev_set_port_flag(struct net_bridge_port *p, unsigned long flags, -- 2.25.1