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 C55B4A0093 for ; Tue, 19 May 2020 15:13:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BB57B1D702; Tue, 19 May 2020 15:13:42 +0200 (CEST) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id ADC571D8F2 for ; Tue, 19 May 2020 15:13:40 +0200 (CEST) Received: by mail-wr1-f68.google.com with SMTP id l17so15872722wrr.4 for ; Tue, 19 May 2020 06:13:40 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=fTfoTJrpB49Dgkt+Z7MCVdXpNRn2c949ljcyQrDv6rA=; b=DyY0wIsdrgsjyPDB2F0AvZeJa6jAKfdnyU+7DJjE0T/c4yFi5B7JKeXAx+3ydDEurQ Rv0n/tdz0Xv6Y1ty1jT8SNJCob6D56IbJgEZUrpAR+tl7GSflSmgupPUiiQ/uRVjfgKS GN0Rop2fxKfd+6TRwrgag3E0vFq8F2/99h9Uxse/bkKWis2mxekyZOJ6jnmBNrkMg5KJ 8H536VEjHlwlripTUjqm67krb5nsSv5gTDippAk6HpxLezgjSWPcbu+yxH4CK30NQZ2t YMLeK8mmFavWjnM0msJcla5eRsIO0rHNNz4gx6s6I2XtOnA8gOCbAl4YulEZUibK71kt UFlw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=fTfoTJrpB49Dgkt+Z7MCVdXpNRn2c949ljcyQrDv6rA=; b=W/6j/T0mwj5uj1eXF7qmJYhdUBuD+VbUChLN3QNpuFhUpilhSdEWtoJHojV8u6BlQm tHxcjenXlNjSU4YB2fcf7vO0QM2w7D/3A+3hoMVhQf6KTFhy2dV2ZxThDck9jma0yOEy 0gMEPpORCsrak1lkjrD2DzXjyH0hmRX/WSL+69WPGvmw+AoaWAdgoh7ULxBCODhHQFtX t2PZVflKBMNOx7J3OBxSRBcxguwMLQR9WWEMvdYy+qblDnXzw6B6nfXIU6bcHFn0xBVd 0uEPWJ6+MV2aqtVKdt/JNG6irH3R5Q3Ut+BnSjTLOpaO4q0YBmM+6a4p9xETBuRkDwLe aheQ== X-Gm-Message-State: AOAM530xyeHP8AwOXyW9BGVtEkk5ftb7W/Cs0CUXYlM12qs/fxu4nPJy MP7suCV9G0NfVL1HVWTGLp/rMsAxAiBHKPXe X-Google-Smtp-Source: ABdhPJz2KxJU7Ji7tebr2LnjiJ/2AgRtsgV4M10YzVq8l8icxDWaVR4SCROCbGttb1SmhxhwEicXig== X-Received: by 2002:adf:9286:: with SMTP id 6mr27264608wrn.179.1589894020450; Tue, 19 May 2020 06:13:40 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id w82sm3835850wmg.28.2020.05.19.06.13.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 06:13:39 -0700 (PDT) From: luca.boccassi@gmail.com To: Jasvinder Singh Cc: Cristian Dumitrescu , dpdk stable Date: Tue, 19 May 2020 14:04:44 +0100 Message-Id: <20200519130549.112823-149-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200519130549.112823-1-luca.boccassi@gmail.com> References: <20200519125804.104349-1-luca.boccassi@gmail.com> <20200519130549.112823-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/softnic: fix resource leak for pipeline' has been queued to stable release 19.11.3 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.3 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/21/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From 66861316719b43f18dedb0b750f6fd2e85a208da Mon Sep 17 00:00:00 2001 From: Jasvinder Singh Date: Mon, 27 Apr 2020 18:15:51 +0100 Subject: [PATCH] net/softnic: fix resource leak for pipeline [ upstream commit c1ea7a5f99ce476631281184b109eb5248ce4a32 ] For sending request messages to data plane threads, the caller invokes pipeline_msg_send_recv() function which never returns null response. Thus, removed redundant check on the returned response. Coverity issue: 357676, 357680, 357681, 357682, 357690, 357693, 357711 Coverity issue: 357722, 357725, 357734, 357739, 357743, 357747, 357762 Coverity issue: 357766, 357787 Fixes: 6d4d05402501 ("net/softnic: add command to read stats") Fixes: 202905f3ee4d ("net/softnic: add command to create objects") Fixes: ee19326a4b1e ("net/softnic: add command for pipeline table entries") Fixes: 9bc0ce0ad17c ("net/softnic: add command for meter action") Fixes: 2505030a8383 ("net/softnic: add command for TTL action") Signed-off-by: Jasvinder Singh Acked-by: Cristian Dumitrescu --- drivers/net/softnic/rte_eth_softnic_thread.c | 34 -------------------- 1 file changed, 34 deletions(-) diff --git a/drivers/net/softnic/rte_eth_softnic_thread.c b/drivers/net/softnic/rte_eth_softnic_thread.c index d61846e030..dcfb5eb82c 100644 --- a/drivers/net/softnic/rte_eth_softnic_thread.c +++ b/drivers/net/softnic/rte_eth_softnic_thread.c @@ -835,8 +835,6 @@ softnic_pipeline_port_in_stats_read(struct pmd_internals *softnic, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -884,8 +882,6 @@ softnic_pipeline_port_in_enable(struct pmd_internals *softnic, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -931,8 +927,6 @@ softnic_pipeline_port_in_disable(struct pmd_internals *softnic, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -986,8 +980,6 @@ softnic_pipeline_port_out_stats_read(struct pmd_internals *softnic, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -1043,8 +1035,6 @@ softnic_pipeline_table_stats_read(struct pmd_internals *softnic, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -1323,8 +1313,6 @@ softnic_pipeline_table_rule_add(struct pmd_internals *softnic, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -1407,8 +1395,6 @@ softnic_pipeline_table_rule_add_default(struct pmd_internals *softnic, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -1565,8 +1551,6 @@ fail: /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -1630,8 +1614,6 @@ softnic_pipeline_table_rule_delete(struct pmd_internals *softnic, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -1680,8 +1662,6 @@ softnic_pipeline_table_rule_delete_default(struct pmd_internals *softnic, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -1740,8 +1720,6 @@ softnic_pipeline_table_rule_stats_read(struct pmd_internals *softnic, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -1821,10 +1799,6 @@ softnic_pipeline_table_mtr_profile_add(struct pmd_internals *softnic, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) { - free(mp); - return -1; - } /* Read response */ status = rsp->status; @@ -1880,8 +1854,6 @@ softnic_pipeline_table_mtr_profile_delete(struct pmd_internals *softnic, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -1943,8 +1915,6 @@ softnic_pipeline_table_rule_mtr_read(struct pmd_internals *softnic, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -2008,8 +1978,6 @@ softnic_pipeline_table_dscp_table_update(struct pmd_internals *softnic, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; @@ -2073,8 +2041,6 @@ softnic_pipeline_table_rule_ttl_read(struct pmd_internals *softnic, /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ status = rsp->status; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-05-19 14:04:50.522131161 +0100 +++ 0149-net-softnic-fix-resource-leak-for-pipeline.patch 2020-05-19 14:04:44.476653085 +0100 @@ -1,8 +1,10 @@ -From c1ea7a5f99ce476631281184b109eb5248ce4a32 Mon Sep 17 00:00:00 2001 +From 66861316719b43f18dedb0b750f6fd2e85a208da Mon Sep 17 00:00:00 2001 From: Jasvinder Singh Date: Mon, 27 Apr 2020 18:15:51 +0100 Subject: [PATCH] net/softnic: fix resource leak for pipeline +[ upstream commit c1ea7a5f99ce476631281184b109eb5248ce4a32 ] + For sending request messages to data plane threads, the caller invokes pipeline_msg_send_recv() function which never returns null response. Thus, removed redundant check on @@ -17,7 +19,6 @@ Fixes: ee19326a4b1e ("net/softnic: add command for pipeline table entries") Fixes: 9bc0ce0ad17c ("net/softnic: add command for meter action") Fixes: 2505030a8383 ("net/softnic: add command for TTL action") -Cc: stable@dpdk.org Signed-off-by: Jasvinder Singh Acked-by: Cristian Dumitrescu