From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3768EC77B76 for ; Fri, 21 Apr 2023 01:51:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231983AbjDUBv0 (ORCPT ); Thu, 20 Apr 2023 21:51:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233343AbjDUBvX (ORCPT ); Thu, 20 Apr 2023 21:51:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E18A15B98 for ; Thu, 20 Apr 2023 18:51:22 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 7D20464B8B for ; Fri, 21 Apr 2023 01:51:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C249C433D2; Fri, 21 Apr 2023 01:51:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682041881; bh=o5IAyXnbDrtMk5vhAYVDPVz5ufRdjLAQ0NhfaGoiJ4E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sb7elptjm60EVztdEgws6MulvdnSQbKZs3wxJtN3YkLQrhaQeXKjrP+MJMDAk8LoQ 9EzcKIsYhIS/uY7SSQNghxHG+7+yYTAQ2ZNhvw/5pak58WkyNTim/ZwHTOUtKrYwfo Di+nzSCFwcOW/KsrKBMzsY9PMScywWYq5rpGcOqvZNPWaj6GVNN7yCThZq+O7RFNHp kauABYYWGVoG17GWZpW2ND3xuyXn69cpdps9hs7M1szPbJqTBKy3kYcRm680Emwbcf MrbewkwhUy5XcxpGTjtITnzCxK/zrIdx3lEQ4je1VSgZzNao+7hAicXg1NPCq8qugY XkV2Sg1QQCrfg== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet Cc: Saeed Mahameed , netdev@vger.kernel.org, Tariq Toukan , Chris Mi , Roi Dayan , Maor Dickman Subject: [net V2 04/10] net/mlx5: E-switch, Don't destroy indirect table in split rule Date: Thu, 20 Apr 2023 18:50:51 -0700 Message-Id: <20230421015057.355468-5-saeed@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230421015057.355468-1-saeed@kernel.org> References: <20230421015057.355468-1-saeed@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Chris Mi Source port rewrite (forward to ovs internal port or statck device) isn't supported in the rule of split action. So there is no indirect table in split rule. The cited commit destroyes indirect table in split rule. The indirect table for other rules will be destroyed wrongly. It will cause traffic loss. Fix it by removing the destroy function in split rule. And also remove the destroy function in error flow. Fixes: 10742efc20a4 ("net/mlx5e: VF tunnel TX traffic offloading") Signed-off-by: Chris Mi Reviewed-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c index 706746cd10af..c99d208722f5 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c @@ -760,7 +760,6 @@ mlx5_eswitch_add_fwd_rule(struct mlx5_eswitch *esw, kfree(dest); return rule; err_chain_src_rewrite: - esw_put_dest_tables_loop(esw, attr, 0, i); mlx5_esw_vporttbl_put(esw, &fwd_attr); err_get_fwd: mlx5_chains_put_table(chains, attr->chain, attr->prio, 0); @@ -803,7 +802,6 @@ __mlx5_eswitch_del_rule(struct mlx5_eswitch *esw, if (fwd_rule) { mlx5_esw_vporttbl_put(esw, &fwd_attr); mlx5_chains_put_table(chains, attr->chain, attr->prio, 0); - esw_put_dest_tables_loop(esw, attr, 0, esw_attr->split_count); } else { if (split) mlx5_esw_vporttbl_put(esw, &fwd_attr); -- 2.39.2