From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E5DA9A0588; Thu, 16 Apr 2020 17:08:11 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CB12B1D8F7; Thu, 16 Apr 2020 17:08:11 +0200 (CEST) Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by dpdk.org (Postfix) with ESMTP id 5F1341D6FE; Thu, 16 Apr 2020 17:08:10 +0200 (CEST) Received: by mail-pg1-f194.google.com with SMTP id n16so1764062pgb.7; Thu, 16 Apr 2020 08:08:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=sBmA7JnrjVKDrGbtzHE7GDtLH/a80TdFaU5lFXzEo4w=; b=CAJ8+c13UQFLe2+LkLm3BZ/l2pDhz/mS9CSEpfeOJcYXO6pZGSfpyr+6Mj5OoxO9At DdW54O0S3g5tpQhyzHJ1Zhup8avBTbtvadSdRTsJN6z6HJUjBfZkDccIZIQcJ+Y5HftH ONLuiTGdIUeGsOQrqWDKZxwN6JKj84b+S48999TDiU9aOiPQcFU/9NWbHeF3xcVdDvdV XBjP3eBLJSzYAm7yYjmRAVq3wJchcMBbiaWCKHRjzNAqDQhP5QvEZ0++LqwxSMiogP4P Eed63ZFJmKWuCI/pw2Gd/L1ftMdSzCYF94omv3BPUXkIoeI3jy5Yh5goAqKKBGlDZWgi H4dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=sBmA7JnrjVKDrGbtzHE7GDtLH/a80TdFaU5lFXzEo4w=; b=RXiJfy21vr1JHo4EW7Yncbcz1NZ8vMysEClrm5lqrFmSEvrlbRoHHV2Tg/Ye38rveC Bi9ksX9IMEi2oNSxa+u1azkIqGSUO0nurFA57olLZvko/ZC5WbdlZdt7lxj/LR3Lkoi7 nejFMQbcMrovrVO6eUK9w6y2gHx0vOJlAiP87ra0HkD8x6S7XOA2TyJWpG7YfPwGOLPW Jp41A7jq9gt1UmKbIxHynK5spmoWA9qF5uUtV56tXzGkiT8arl3HOmMTMWVEuPP79v38 Bkevg3aKDC3TK/h47ncsEIgzwJoCIRQEbZX8ODwZ+6Oz/XzwzDq37Fz0IG0sSEHAP+NJ QoRg== X-Gm-Message-State: AGi0PuYyPZl3+ZfOKz61TUtYFt+haISakqFdaTNJ0ftgnHmPi7dxmev4 M07mtgr72/HMooZUADw3xzo= X-Google-Smtp-Source: APiQypKtunlDrm0swI1XdWFv2Bo4oeszJp5zJer9IsiL3t207+A2I72Cdwo8ffS4jnsy2gl+Rp3l4A== X-Received: by 2002:a62:ab0b:: with SMTP id p11mr10561648pff.305.1587049689614; Thu, 16 Apr 2020 08:08:09 -0700 (PDT) Received: from local.opencloud.tech.localdomain ([115.171.63.184]) by smtp.gmail.com with ESMTPSA id k189sm15680123pgc.24.2020.04.16.08.08.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Apr 2020 08:08:09 -0700 (PDT) From: xiangxia.m.yue@gmail.com To: suanmingm@mellanox.com, david.marchand@redhat.com Cc: dev@dpdk.org, Tonghao Zhang , stable@dpdk.org Date: Wed, 15 Apr 2020 16:52:29 +0800 Message-Id: <1586940749-35960-1-git-send-email-xiangxia.m.yue@gmail.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] net/mlx5: fix crash when releasing the meter table X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Tonghao Zhang The meters of ports share the same meter table on the port. When releasing meters, don't check value returned using assert. Because other meters may reference to it. Fixes: 46a5e6bc6a85 ("net/mlx5: prepare meter flow tables") Fixes: 708aa5608f98 ("net/mlx5: fix meter suffix table leak") Cc: stable@dpdk.org Signed-off-by: Tonghao Zhang --- drivers/net/mlx5/mlx5_flow_dv.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index ae00ca431eec..2174b9aa37dc 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -8552,11 +8552,9 @@ struct field_modify_info modify_tcp[] = { claim_zero(mlx5_glue->dv_destroy_flow_matcher (mtd->egress.any_matcher)); if (mtd->egress.tbl) - claim_zero(flow_dv_tbl_resource_release(dev, - mtd->egress.tbl)); + flow_dv_tbl_resource_release(dev, mtd->egress.tbl); if (mtd->egress.sfx_tbl) - claim_zero(flow_dv_tbl_resource_release(dev, - mtd->egress.sfx_tbl)); + flow_dv_tbl_resource_release(dev, mtd->egress.sfx_tbl); if (mtd->ingress.color_matcher) claim_zero(mlx5_glue->dv_destroy_flow_matcher (mtd->ingress.color_matcher)); @@ -8564,11 +8562,9 @@ struct field_modify_info modify_tcp[] = { claim_zero(mlx5_glue->dv_destroy_flow_matcher (mtd->ingress.any_matcher)); if (mtd->ingress.tbl) - claim_zero(flow_dv_tbl_resource_release(dev, - mtd->ingress.tbl)); + flow_dv_tbl_resource_release(dev, mtd->ingress.tbl); if (mtd->ingress.sfx_tbl) - claim_zero(flow_dv_tbl_resource_release(dev, - mtd->ingress.sfx_tbl)); + flow_dv_tbl_resource_release(dev, mtd->ingress.sfx_tbl); if (mtd->transfer.color_matcher) claim_zero(mlx5_glue->dv_destroy_flow_matcher (mtd->transfer.color_matcher)); @@ -8576,11 +8572,9 @@ struct field_modify_info modify_tcp[] = { claim_zero(mlx5_glue->dv_destroy_flow_matcher (mtd->transfer.any_matcher)); if (mtd->transfer.tbl) - claim_zero(flow_dv_tbl_resource_release(dev, - mtd->transfer.tbl)); + flow_dv_tbl_resource_release(dev, mtd->transfer.tbl); if (mtd->transfer.sfx_tbl) - claim_zero(flow_dv_tbl_resource_release(dev, - mtd->transfer.sfx_tbl)); + flow_dv_tbl_resource_release(dev, mtd->transfer.sfx_tbl); if (mtd->drop_actn) claim_zero(mlx5_glue->destroy_flow_action(mtd->drop_actn)); rte_free(mtd); -- 1.8.3.1