Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2144205iof; Tue, 7 Jun 2022 21:13:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylUdMBiqBI2vGZdfcHqKegNdquqSdGwhn9Xu8RwsRCsFtU4YyOhdK5QXx90JGOcPhS68Cv X-Received: by 2002:aa7:88d2:0:b0:50a:cf7d:6ff1 with SMTP id k18-20020aa788d2000000b0050acf7d6ff1mr33172519pff.67.1654661608748; Tue, 07 Jun 2022 21:13:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654661608; cv=none; d=google.com; s=arc-20160816; b=GC8Lc4vF0IzXIqCRtmOW7OK0Ofjal7zu1cwIf5j52bG90R4QFHddOOqUJokAbq9Wk9 KitpuGnQvjeXdCGpwx7nmyDSimfnHpgQ+7EMLLq53Tz2uXQm2+3eZptHx7MTj9SJFPZa iLMgR1PhMhSMsBKwyj0Hfjz1tXv4U1AvVkT8M9PH+eWYZZK5QO0yjYes227plA/B3MIP YaRsfxQJhCPgjFA0k8Re/rcvKqdQOLUTOKUZSvU5Xcdk38bvtBSxLAcoTnWOg+vVD3Pj TJswdHs6V/FiLlOOtRlT6BMrJjMdmG9s53+RXXDqGQkgE7tjKqTDJ6yl13kaYF0F2zV9 Nn3A== 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=Hw4+SmOhG3sKVcmdByv2EZRUguIWTGVyT8RTilCri0o=; b=n0Tfaa0EzKKKLtZtqSJKx7h+9rl14l8UM3rGpLxyTzV8BiVB4yGn0hbPoQXjQFpdIL 5ax+rufjCabUQcLDC6JumVSsBFxX7bW8SRa+wn7zDPcNeUB7Uf0gFp2FdvHb+TPZ+EBI xrAEaSSyWDEfnbUiF+maN11ngGCvYTPq9WBfjkOpCthhLKz0mwSTZGpoVsAK/GqO0sjC D+oPbMhm+PnlgTczOAFeqOV4jAjsdWJ/LKyZjpgoDYUgwNCpeIY+5kpBhw42RNH+3vju bOKuDVa1mczdLX//hUEYKbfZzLVB+LBB4ezmcB4QKZyG1LbMQZqIPNix43wxx5lXQUHq fXfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=o+Wxb30U; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h1-20020a636c01000000b003fd97d4ed97si12881614pgc.21.2022.06.07.21.13.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:13:28 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=o+Wxb30U; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B66D041F6E8; Tue, 7 Jun 2022 20:52:54 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377540AbiFGUdo (ORCPT + 99 others); Tue, 7 Jun 2022 16:33:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357465AbiFGTmB (ORCPT ); Tue, 7 Jun 2022 15:42:01 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5145915A742; Tue, 7 Jun 2022 11:15:12 -0700 (PDT) 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 2ED6CB82368; Tue, 7 Jun 2022 18:15:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96083C385A2; Tue, 7 Jun 2022 18:15:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654625709; bh=6Hz5HqIYdJLRIZwRktEAYB4iRCBgmhBAZDeEbAndy0g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o+Wxb30UdF8Aqdim/kivVOabdNIA+Yoj3W4khvmHEAL+gPC/ZALbqPqEj9GMH3OD6 0OGtbWudQiGzNSzPUL4Y5PizqdQTHmt2/60oKhNsSfELuffS0WHoVvz7HjSsD/icVT rdrXBi0UYJQOrpm4YWH57YQO1vCDFxCSL3PM8jM0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maksym Yaremchuk , Petr Machata , Ido Schimmel , "David S. Miller" , Sasha Levin Subject: [PATCH 5.17 114/772] mlxsw: Treat LLDP packets as control Date: Tue, 7 Jun 2022 18:55:06 +0200 Message-Id: <20220607164952.408419962@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164948.980838585@linuxfoundation.org> References: <20220607164948.980838585@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 From: Petr Machata [ Upstream commit 0106668cd2f91bf913fb78972840dedfba80a3c3 ] When trapping packets for on-CPU processing, Spectrum machines differentiate between control and non-control traps. Traffic trapped through non-control traps is treated as data and kept in shared buffer in pools 0-4. Traffic trapped through control traps is kept in the dedicated control buffer 9. The advantage of marking traps as control is that pressure in the data plane does not prevent the control traffic to be processed. When the LLDP trap was introduced, it was marked as a control trap. But then in commit aed4b5721143 ("mlxsw: spectrum: PTP: Hook into packet receive path"), PTP traps were introduced. Because Ethernet-encapsulated PTP packets look to the Spectrum-1 ASIC as LLDP traffic and are trapped under the LLDP trap, this trap was reconfigured as non-control, in sync with the PTP traps. There is however no requirement that PTP traffic be handled as data. Besides, the usual encapsulation for PTP traffic is UDP, not bare Ethernet, and that is in deployments that even need PTP, which is far less common than LLDP. This is reflected by the default policer, which was not bumped up to the 19Kpps / 24Kpps that is the expected load of a PTP-enabled Spectrum-1 switch. Marking of LLDP trap as non-control was therefore probably misguided. In this patch, change it back to control. Reported-by: Maksym Yaremchuk Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c index 47b061b99160..ed4d0d3448f3 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_trap.c @@ -864,7 +864,7 @@ static const struct mlxsw_sp_trap_item mlxsw_sp_trap_items_arr[] = { .trap = MLXSW_SP_TRAP_CONTROL(LLDP, LLDP, TRAP), .listeners_arr = { MLXSW_RXL(mlxsw_sp_rx_ptp_listener, LLDP, TRAP_TO_CPU, - false, SP_LLDP, DISCARD), + true, SP_LLDP, DISCARD), }, }, { -- 2.35.1