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 58520C6FD18 for ; Thu, 20 Apr 2023 01:10:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230297AbjDTBKc (ORCPT ); Wed, 19 Apr 2023 21:10:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232343AbjDTBK3 (ORCPT ); Wed, 19 Apr 2023 21:10:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13906A1 for ; Wed, 19 Apr 2023 18:10:25 -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 A40AC64433 for ; Thu, 20 Apr 2023 01:10:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94CF9C433EF; Thu, 20 Apr 2023 01:10:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681953024; bh=o5IAyXnbDrtMk5vhAYVDPVz5ufRdjLAQ0NhfaGoiJ4E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r9GeUNuENSkgneOs1uEyJIeVIkjFXQHPNQZRE43HiLtZ8eMB6/ssxww6z96zCcPWZ ClrXQHWKj17pcPY7vuaUWf5QLPeg2FrICfLaxIuj97Xs2zpOk/V9CE7cuAStKLvbxd klSDa6KlQyxfnmexcvQgbbUE4l04zfARpj3oldIw2YwE2+T3H2dxYhmalMdRamDXYt eDgYzyoty2c37DjgT19EqMcBsydMaoUQjxM+Y2TXSJbg4H5EJQ3R0r7HL+cuFIc5kR XCBjWPx/BXXDMmwkTYeXTxmZ+HMLjp2UJn+EKqQCpnRQrkkkqxLdNrYGvZQDw1waNA 7SoULzdg7Ka7g== 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 04/10] net/mlx5: E-switch, Don't destroy indirect table in split rule Date: Wed, 19 Apr 2023 18:09:53 -0700 Message-Id: <20230420010959.276760-5-saeed@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230420010959.276760-1-saeed@kernel.org> References: <20230420010959.276760-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