Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3970912pxb; Tue, 25 Jan 2022 00:17:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJyPYVUvf3WyvIjgS7qqe2dosukjESfVNK9ByMyU5jO0pHv6suWbSelkj5/xAyX4cCj+Jx81 X-Received: by 2002:a17:90a:f413:: with SMTP id ch19mr2285437pjb.19.1643098677457; Tue, 25 Jan 2022 00:17:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643098677; cv=none; d=google.com; s=arc-20160816; b=xgv5I6jOfIOzoeWRWRYcYdkiU6bsqXRSf+xEVmKtEGXTOkuImMidiHzEjLJGfH/mwt FKGyiQ5efIVkYftaM/cX+5dssTRS6bxs0CV6H6ElyOD2Xhj7I9aPHwmzjq4weBXXGSXf 6ZFWNSqaM43J3J2X5/HhL6yfY7izHDnj4yPRqgDW7N8q1deYYeHmfHQ/zrf8DBowTLSr zHG/wx4GWvcKnzdeNrUOGfHMJD4RaX5K2m18TV9Z1scnX1/mpxU4wKPy3oGMh2N2VssT 1DbhoxqZbbspB+ZEaxbDJivDu3sXeNi5yonyJK+AXCww+US089FsLqXNHiCSJsefDh/u Be0A== 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=m9yPcOmw7/Ivb05W8EskB5qZzCyec2vyG1CTwm9bAD8=; b=j3kyXnBsbb0zZtHw3awzIgNDM189HoL0n8VS3I8gMQryPfMtU8UeCqWq5FlIcv07lw LmlcLpHdFMRROpNlEhzR8tDQEsjoXkh4E4HWBlbNKk7fvx5jRM4SQYfp5L6aZS2NxVM+ UrtblYaRpySn6ukY72zZ9J3jkj3ZRtdZN7pvPKm5hxTLfcpnTA348FFmvQEXq7tPO58g qIjWKBWcO8c7fijEPPJCHK5EQGvD3O9svenOJcSJmFI5QNo/caLE5Ld3hQYpNsTqScqi Sw1fjbcCkVqMYR1PeS2fOL4xL6eKWczQWcLQJbA3N/MZyJKtsQ7BYJCDNLxKUYlKU1Eb z6bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tffNzc9B; 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 d2si14656863plr.271.2022.01.25.00.17.21; Tue, 25 Jan 2022 00:17:57 -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=tffNzc9B; 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 S1359155AbiAYAdE (ORCPT + 99 others); Mon, 24 Jan 2022 19:33:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1455411AbiAXVfX (ORCPT ); Mon, 24 Jan 2022 16:35:23 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B05BC0BD105; Mon, 24 Jan 2022 12:22: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 ams.source.kernel.org (Postfix) with ESMTPS id 17EEBB8122D; Mon, 24 Jan 2022 20:22:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31565C340E5; Mon, 24 Jan 2022 20:22:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643055736; bh=fbwYxUYlvTYPzaUQAL027dB4qyx/sJYlFcXuAvJKKXQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tffNzc9B7EEdiXo9kqoSLr2Fs0DAxNmFjPoED9YjQsh+kZqt3kDFZmlYxaWacOCa4 i4zCiRgifH8m1Te9CnAvz1vgeaDB8JrWkvao0vcsv7R+bf901d1nTGREze4vQ+vHKL FqyroEImBdLxfz6CXjxAtsLDpPbzcqaxF3vI5CCk= 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.15 248/846] net: dsa: hellcreek: Add STP forwarding rule Date: Mon, 24 Jan 2022 19:36:05 +0100 Message-Id: <20220124184109.501854158@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@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 2afd6a4f02b88..1469e41f2045a 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