Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3084170rwb; Mon, 15 Aug 2022 17:44:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR5OIyPqk838UEf5e8+OJHoE337U3FNLsv7g7vwi4Ahbhkjaq4YMuMpKAx5ejEBLSDvK4kk9 X-Received: by 2002:a17:903:32c8:b0:172:5962:74fd with SMTP id i8-20020a17090332c800b00172596274fdmr14237468plr.84.1660610667214; Mon, 15 Aug 2022 17:44:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660610667; cv=none; d=google.com; s=arc-20160816; b=epUq4pvfzOGnoMxbKrjsSgaZCiIuEVW2tEyrYVyHfW/ge8ed0pVLvgwdNisJ0Uzr1W ndgC7qdmVTn1Wi017q9TmREnhY72WMKB7Yz4N3UVJQf4q93+wKdChEC62kmgZIOu8zLI Yjo72BZUQExoYBmnR7BO2PULjStX/5eWUaze5sFI9Ukmiu5in8J5FDoXbwcwBQPIidEK sT3ZDYyZ0P9D/RtaIVC4Zz+BnAIRhhB2Omd0OHKXHZM0u83uOX4M4BJMLA1DoxhQgWXv YYDTULVJGib/B3ym2jiejrIhCHQ+7PplVD+SN62NqyA2AOJj/697LBMYuPceuXCD01oP 2wNQ== 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=e595YpqrWdF62LFDaZ5q3MawsZAqeexbsgNDjdGwce8=; b=CGgaGFbLLEyNjhUeDuaPnQbQdQ/V2/xNbr7HpdIAH4d7EZGrWJCEvlZ1lYKAuIY3pr P8WqWPOZvC86k08+lDypunhS8c2ugw21eLsFWnDzl9Xzx3uK54+tQ3SO7vGncen9srgj XEap2WzqKPK7hz79ePxInMDniLF0NSiajz4YMEw0eiiNIGjFoWOoyjb6I1zxSQ4VYV2D LVJdNJspuxiCZIKOvFHw9+KS+qxGA/QcMH8Eli4GXU/Apq+3HZV9M9/0pNeDOMB9uf74 e13Yr1iQWiZSPwkuM5NLwmtuGFK9SpV3OG8IKsIT0hQN1IGE0S7IHaTBz4CnJLV3h4e6 TEJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FEhfs3td; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h19-20020a056a00219300b00525b292ccf0si12923437pfi.124.2022.08.15.17.44.16; Mon, 15 Aug 2022 17:44:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FEhfs3td; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1350881AbiHPAIT (ORCPT + 99 others); Mon, 15 Aug 2022 20:08:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351272AbiHPAAV (ORCPT ); Mon, 15 Aug 2022 20:00:21 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 358E515DFB6; Mon, 15 Aug 2022 13:21:20 -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 DCE58B80EB1; Mon, 15 Aug 2022 20:21:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40FFBC433C1; Mon, 15 Aug 2022 20:21:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660594877; bh=w9DKv41Q3nZHDkkXaYYUdVGq5szEXNwsqk7DaJ1L83s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FEhfs3tdz6wdMh5x4qYYzG0U9zGpOr1jDbotdAhIw7rJfYPUbdOScGGP/Iws/+iVL dlUuzuyuMUsu6MZl70/eA+DFMj/rGdNaOnDc1C4zns4fItBkuz4k1uqCVXnO9t0Ig2 v4c72GwKeYtfh8rJ6yTS+mINCBi6ekQscTzAx+k0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yevgeny Kliteynik , Muhammad Sammar , Alex Vesker , Saeed Mahameed , Sasha Levin Subject: [PATCH 5.19 0554/1157] net/mlx5: DR, Fix SMFS steering info dump format Date: Mon, 15 Aug 2022 19:58:30 +0200 Message-Id: <20220815180501.790573837@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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: Yevgeny Kliteynik [ Upstream commit 62d2664351ef37da34f6f3a3fd8ab34257d6fe30 ] Fix several issues in SMFS steering info dump: - Fix outdated macro value for matcher mask in the SMFS debug dump format. The existing value denotes the old format of the matcher mask, as it was used during the early stages of development, and it results in wrong parsing by the steering dump parser - wrong fields are shown in the parsed output. - Add the missing destination table to the dumped action. The missing dest table handle breaks the ability to associate between the "go to table" action and the actual table in the steering info. Fixes: 9222f0b27da2 ("net/mlx5: DR, Add support for dumping steering info") Signed-off-by: Yevgeny Kliteynik Signed-off-by: Muhammad Sammar Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- .../ethernet/mellanox/mlx5/core/steering/dr_dbg.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_dbg.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_dbg.c index d5998ef59be4..7adcf0eec13b 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_dbg.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_dbg.c @@ -21,10 +21,11 @@ enum dr_dump_rec_type { DR_DUMP_REC_TYPE_TABLE_TX = 3102, DR_DUMP_REC_TYPE_MATCHER = 3200, - DR_DUMP_REC_TYPE_MATCHER_MASK = 3201, + DR_DUMP_REC_TYPE_MATCHER_MASK_DEPRECATED = 3201, DR_DUMP_REC_TYPE_MATCHER_RX = 3202, DR_DUMP_REC_TYPE_MATCHER_TX = 3203, DR_DUMP_REC_TYPE_MATCHER_BUILDER = 3204, + DR_DUMP_REC_TYPE_MATCHER_MASK = 3205, DR_DUMP_REC_TYPE_RULE = 3300, DR_DUMP_REC_TYPE_RULE_RX_ENTRY_V0 = 3301, @@ -114,13 +115,15 @@ dr_dump_rule_action_mem(struct seq_file *file, const u64 rule_id, break; case DR_ACTION_TYP_FT: if (action->dest_tbl->is_fw_tbl) - seq_printf(file, "%d,0x%llx,0x%llx,0x%x\n", + seq_printf(file, "%d,0x%llx,0x%llx,0x%x,0x%x\n", DR_DUMP_REC_TYPE_ACTION_FT, action_id, - rule_id, action->dest_tbl->fw_tbl.id); + rule_id, action->dest_tbl->fw_tbl.id, + -1); else - seq_printf(file, "%d,0x%llx,0x%llx,0x%x\n", + seq_printf(file, "%d,0x%llx,0x%llx,0x%x,0x%llx\n", DR_DUMP_REC_TYPE_ACTION_FT, action_id, - rule_id, action->dest_tbl->tbl->table_id); + rule_id, action->dest_tbl->tbl->table_id, + DR_DBG_PTR_TO_ID(action->dest_tbl->tbl)); break; case DR_ACTION_TYP_CTR: -- 2.35.1