X-Received: by 2002:a17:90a:2848:b0:1bc:2e67:7a2 with SMTP id p8-20020a17090a284800b001bc2e6707a2mr11933360pjf.188.1645665678569; Wed, 23 Feb 2022 17:21:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645665678; cv=none; d=google.com; s=arc-20160816; b=GWJMeT6q4im5AOeRlGw5CeAdDixrEHA9cusCzrTNhONBdk1nmNGwczO6iFLjIvPRet AASeEShKANlJIrP74q1oKkBrPliQS6bjT6PIZyTq4CwUtVLpZMhMB+lJmAxUnwPXyT4m GMn0t1Ev6ho0MnCo0BhpAHv6O6cOzraApmyCdsRDv+iY0KXoNrN6ZgNMQkbMFXYitEWA p7krQX5WF2OVQAD03H6gADUvrJXGwGeJ07omAWEaZXR4O0d1lHadGA0OqRNDb2OkOG/g SdNZ/0ISe2XgOamXG41vnK6RgqnFuXDmnP/tfwXYJuC8fXzJ4Fk3owzLluJbgoITkaTh wAnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:organization :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EwW1ad9aaDxzLEmHNXCm17nZVCt4Pcys+G0syr6CYU4=; b=ZacOq8pxCw0aaF7igs+i9T+2gR0vX0ceLf3IUneGHvq099qU3A8JFySgPqaD5msgri 75jhLXnvChrCfD6kTrBLmv89FmchQfQVbtuMRUUzjv7twJMM8eLmMQdJhcOZYEteMcVx C7zw4YRpuOoJcqCCuVbgH1UGb4q+PaQJBg1Rni6wlrFAeFzUJP6Uf733AkVLbtkZgejj 8w7frUM8ffKB381jWlNgZyI1VZoPehkzPZzHaG+B4Kj9yf7frHb7TXbxUk2cDImGWnkK vi88ANmh5lHumcubXqKBz0nEoJFHE40q11wY6kHq6fm8merfwBGhDDS4mXs/8yqYFvT3 KBcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jUiiuGYA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d14si1067441pfl.285.2022.02.23.17.21.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 17:21:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jUiiuGYA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9491F19E723; Wed, 23 Feb 2022 17:05:27 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239559AbiBWKR4 (ORCPT + 99 others); Wed, 23 Feb 2022 05:17:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239554AbiBWKRx (ORCPT ); Wed, 23 Feb 2022 05:17:53 -0500 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D88458B6E3; Wed, 23 Feb 2022 02:17:25 -0800 (PST) Received: by mail-lf1-x12d.google.com with SMTP id e5so30109331lfr.9; Wed, 23 Feb 2022 02:17:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:organization:content-transfer-encoding; bh=EwW1ad9aaDxzLEmHNXCm17nZVCt4Pcys+G0syr6CYU4=; b=jUiiuGYArmzRZQS3Y4XwRUrxAylVnKXbhlDvgmK5j4rEj3BPOn/kbijHKxC8iG/uV6 vr5lYaimp0a2+TRviGmqzurM7LFfRTv0s6htX0kNJzNbcP2n7jA9BOyzBDy7pBEAliqR YNu706cfj6V6i0xsR+hL+nhuV0Kf6O22r20lDjppmVdu1L5xvdHBbzx1yiMXgl3wmFNm ioK23b38vbXcCkLWcwfcsvJGO9//yjEkw5au5fzgMtlt8/YjmDtXytC5e9aFamneDLxA OPN8bF+rtabSGIUHYzS/AqYauq8UnNhL+nN0T6v84vFjhm6OivSPMKoOBlnFUF0360jv hrKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:organization:content-transfer-encoding; bh=EwW1ad9aaDxzLEmHNXCm17nZVCt4Pcys+G0syr6CYU4=; b=440ir/quFYZyt15wfbIlXFwlQkQ9NIsCImhTTG5edpYfa+l4jR4Dk0UQjOqn6Z/z4w PDnwSyeEyMsJoTkIa/bXxh1Adpv2bu+PtdoQq9PfzjO1CbK+T7/Hs7FIPB90JhDHK7S7 pOcO223kHvF8xAk6z05AhoV4GqxE27f6t++xV2O65UiX4+Vj/dxCPtfxqnOcH9NJ1nw2 G04kyXb6v1gWVHOGVa917K5WZ7lnk0tSR2chbOgJ0KH9XNZXq1+ce6hEOaiz773F+Hlf NWiEHIEdXNoNXz03EAieQ3PTxs+wfb3wbTqtzCJyqBIMVUGY09Ub1pxCxPpjMOOcu49v ir6A== X-Gm-Message-State: AOAM532K15C02cabat/R3w+aB3r0QRMmaF0gHa8wClGQqoF1F9niY4G+ HoC/1YQevs2fmsTzhEuuxbc= X-Received: by 2002:a05:6512:1281:b0:439:f0fd:c96c with SMTP id u1-20020a056512128100b00439f0fdc96cmr19857951lfs.102.1645611444290; Wed, 23 Feb 2022 02:17:24 -0800 (PST) Received: from wse-c0127.beijerelectronics.com ([208.127.141.29]) by smtp.gmail.com with ESMTPSA id d5sm1613102lfs.307.2022.02.23.02.17.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 02:17:23 -0800 (PST) From: Hans Schultz X-Google-Original-From: Hans Schultz To: davem@davemloft.net, kuba@kernel.org Cc: netdev@vger.kernel.org, Hans Schultz , Nikolay Aleksandrov , Ido Schimmel , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , Roopa Prabhu , Shuah Khan , Stephen Suryaputra , David Ahern , Petr Machata , Amit Cohen , Po-Hsu Lin , Baowen Zheng , linux-kernel@vger.kernel.org, bridge@lists.linux-foundation.org, linux-kselftest@vger.kernel.org Subject: [PATCH net-next v5 2/5] net: bridge: Add support for offloading of locked port flag Date: Wed, 23 Feb 2022 11:16:47 +0100 Message-Id: <20220223101650.1212814-3-schultz.hans+netdev@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220223101650.1212814-1-schultz.hans+netdev@gmail.com> References: <20220223101650.1212814-1-schultz.hans+netdev@gmail.com> MIME-Version: 1.0 Organization: Westermo Network Technologies AB Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Various switchcores support setting ports in locked mode, so that clients behind locked ports cannot send traffic through the port unless a fdb entry is added with the clients MAC address. Signed-off-by: Hans Schultz Acked-by: Nikolay Aleksandrov Reviewed-by: Ido Schimmel --- net/bridge/br_switchdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bridge/br_switchdev.c b/net/bridge/br_switchdev.c index f8fbaaa7c501..bf549fc22556 100644 --- a/net/bridge/br_switchdev.c +++ b/net/bridge/br_switchdev.c @@ -72,7 +72,7 @@ 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_PORT_LOCKED) int br_switchdev_set_port_flag(struct net_bridge_port *p, unsigned long flags, -- 2.30.2