Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3701056pxb; Mon, 24 Jan 2022 15:46:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJzY73L0ZLIVQ8fxTNwqDci7a+u/n8ZMIl47LNFNEVY5pOQVviGBthqhTmFezcxK0G3xgvuv X-Received: by 2002:aa7:988b:0:b0:4c8:b982:d4fa with SMTP id r11-20020aa7988b000000b004c8b982d4famr8536577pfl.14.1643067965439; Mon, 24 Jan 2022 15:46:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643067965; cv=none; d=google.com; s=arc-20160816; b=drGYrn5CbVgDPgP1OzTSpWtYpjT4dOB3vBabaTmn+IkpJ+hRfP8KYM6zuAMPHLascW l1vxXY0lm84uh+VNyiVZPyZYvcoQQre9UFyZUd7WzPnEU4tGJYcfA1Vlsyps/ArK4kOL iqTgVtc0J3c+dlfPn4jrpZLu2Yx4QihRf9K19IqB0m2P9ExvadQ7mWKfrw1S7HGpBRNw r5yOHouf3D2HPQQ++7htmSgPeKfkEvHVWRDZVYeE4VZFFgN8oDpEGCNCPkZoo745Ydpt nud0JY/tIvDHGKkhe0b1kIN07VaiIfOyIS+WkhkD03F844GLVw2dtt2QuaYAKDV4FLYO MH6Q== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Z6kgR94bQ8mOFaBtDPCk7p56BXrTAR7A4CcZ+0DnNO8=; b=jtVysU4/l3nt+ZMAa6awOoQGyEuQM0pBJC6nCkj47deKxdgxmMiZ4ilCZT7Fmd+k8G uU95ekgHVkMlcs98j7rOqHCgswvm86rU/AGczV/nnUE3do3o0/u3038A9lbqg8VD/+9V ftOEs/S3hOaJXAiOLbJ/Sszkt/Fr8/rdgGjsyMWcLn2COohu+ydLEYp53wpUJMlRQ9tq TyhJtciu8EkNNQXGLjHqgCjEytxKjJ1T5Lrr9UBLOe1XhtsV4920fi3WLEz5Htii46XK q1dKlid9NETmUDGZJelUFIIuHX3X3Jt6OshcK65zQtXUCqWa+rvnJCprxTMHgp8YeZMu +uJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bDuvcUxn; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i5si9309413pla.326.2022.01.24.15.45.52; Mon, 24 Jan 2022 15:46:05 -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=pass header.i=@linuxfoundation.org header.s=korg header.b=bDuvcUxn; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2360145AbiAXXgJ (ORCPT + 99 others); Mon, 24 Jan 2022 18:36:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1838742AbiAXWsA (ORCPT ); Mon, 24 Jan 2022 17:48:00 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D136AC068097; Mon, 24 Jan 2022 13:07:22 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 625FB60E8D; Mon, 24 Jan 2022 21:07:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3B827C340E5; Mon, 24 Jan 2022 21:07:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643058441; bh=8e00U0sygiDjy9t1dLdGDBMdtS4FVv8xGfSfW3y8oLQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bDuvcUxnPJZygDdKezPWYDV3ArJen/JVrnIuhmEW/YV30t2phHKBd7gOuZYLkQTvO E/ic5ymnrotZqjvgadaYE7MK6W8L6InHQaZUrrCCmIn8ubA02YdhItQvQAWJzdpa2i wBYPUukIVSTxm8W4l/iJauatxM2KfJpmZWRVpYMk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kurt Kanzenbach , Vladimir Oltean , Richard Cochran , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.16 0290/1039] net: dsa: hellcreek: Add STP forwarding rule Date: Mon, 24 Jan 2022 19:34:39 +0100 Message-Id: <20220124184135.028681639@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kurt Kanzenbach [ Upstream commit b7ade35eb53a2455f737a623c24e4b24455b2271 ] Treat STP as management traffic. STP traffic is designated for the CPU port only. In addition, STP traffic has to pass blocked ports. Fixes: e4b27ebc780f ("net: dsa: Add DSA driver for Hirschmann Hellcreek switches") Signed-off-by: Kurt Kanzenbach Reviewed-by: Vladimir Oltean Acked-by: Richard Cochran Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/dsa/hirschmann/hellcreek.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/dsa/hirschmann/hellcreek.c b/drivers/net/dsa/hirschmann/hellcreek.c index bb1a24c8078be..b488990b5b06e 100644 --- a/drivers/net/dsa/hirschmann/hellcreek.c +++ b/drivers/net/dsa/hirschmann/hellcreek.c @@ -1074,6 +1074,17 @@ static int hellcreek_setup_fdb(struct hellcreek *hellcreek) .reprio_tc = 6, /* TC: 6 as per IEEE 802.1AS */ .reprio_en = 1, }; + static struct hellcreek_fdb_entry stp = { + /* MAC: 01-80-C2-00-00-00 */ + .mac = { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x00 }, + .portmask = 0x03, /* Management ports */ + .age = 0, + .is_obt = 0, + .pass_blocked = 1, + .is_static = 1, + .reprio_tc = 6, + .reprio_en = 1, + }; int ret; mutex_lock(&hellcreek->reg_lock); @@ -1081,6 +1092,9 @@ static int hellcreek_setup_fdb(struct hellcreek *hellcreek) if (ret) goto out; ret = __hellcreek_fdb_add(hellcreek, &p2p); + if (ret) + goto out; + ret = __hellcreek_fdb_add(hellcreek, &stp); out: mutex_unlock(&hellcreek->reg_lock); -- 2.34.1