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 D884AA04A3 for ; Fri, 5 Jun 2020 20:26:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C43F41D51F; Fri, 5 Jun 2020 20:26:06 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id 529F51D51C for ; Fri, 5 Jun 2020 20:26:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591381564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BbygSXiix1+wiZqsCRVtBz8aAkZIRj6zZENpCNvxB4Y=; b=RX/0EiogTxgADQNHPWJXGLSk9urbaVQWKS1DDPdwiBAAe9a58WHMGPQ+njk8bA7+z1sPGY if4A8QQFRrno+30/H92P/sn8KKt/o/R2ijiBN5e3Rm6pAQ2TQgq6898Mr8GIEuyDFKiFMh gRx1fi7+jPyfPoUTI2DFs4EvLHjrmt0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-197-9NG6k2adMdmPqYNpq-B33A-1; Fri, 05 Jun 2020 14:26:02 -0400 X-MC-Unique: 9NG6k2adMdmPqYNpq-B33A-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 01405107ACCA; Fri, 5 Jun 2020 18:26:01 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1E434619D3; Fri, 5 Jun 2020 18:25:59 +0000 (UTC) From: Kevin Traynor To: Jasvinder Singh Cc: Cristian Dumitrescu , dpdk stable Date: Fri, 5 Jun 2020 19:24:11 +0100 Message-Id: <20200605182525.22483-14-ktraynor@redhat.com> In-Reply-To: <20200605182525.22483-1-ktraynor@redhat.com> References: <20200605182525.22483-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/softnic: fix resource leak for pipeline' has been queued to LTS release 18.11.9 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 LTS release 18.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/10/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. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/cb85463b7e8a0bd120b43cd9f48ff9981b337f5b Thanks. Kevin. --- >From cb85463b7e8a0bd120b43cd9f48ff9981b337f5b 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 e42784e4ca..6a888d20ec 100644 --- a/drivers/net/softnic/rte_eth_softnic_thread.c +++ b/drivers/net/softnic/rte_eth_softnic_thread.c @@ -748,6 +748,4 @@ 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 */ @@ -797,6 +795,4 @@ 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 */ @@ -844,6 +840,4 @@ 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 */ @@ -899,6 +893,4 @@ 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 */ @@ -956,6 +948,4 @@ 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 */ @@ -1236,6 +1226,4 @@ 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 */ @@ -1320,6 +1308,4 @@ 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 */ @@ -1478,6 +1464,4 @@ fail: /* Send request and wait for response */ rsp = pipeline_msg_send_recv(p, req); - if (rsp == NULL) - return -1; /* Read response */ @@ -1543,6 +1527,4 @@ 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 */ @@ -1593,6 +1575,4 @@ 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 */ @@ -1653,6 +1633,4 @@ 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 */ @@ -1734,8 +1712,4 @@ 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 */ @@ -1793,6 +1767,4 @@ 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 */ @@ -1856,6 +1828,4 @@ 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 */ @@ -1921,6 +1891,4 @@ 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 */ @@ -1986,6 +1954,4 @@ 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 */ -- 2.21.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-06-05 19:20:51.705048772 +0100 +++ 0014-net-softnic-fix-resource-leak-for-pipeline.patch 2020-06-05 19:20:50.730042631 +0100 @@ -1 +1 @@ -From c1ea7a5f99ce476631281184b109eb5248ce4a32 Mon Sep 17 00:00:00 2001 +From cb85463b7e8a0bd120b43cd9f48ff9981b337f5b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c1ea7a5f99ce476631281184b109eb5248ce4a32 ] + @@ -20 +21,0 @@ -Cc: stable@dpdk.org @@ -29 +30 @@ -index d61846e030..dcfb5eb82c 100644 +index e42784e4ca..6a888d20ec 100644 @@ -32 +33 @@ -@@ -836,6 +836,4 @@ softnic_pipeline_port_in_stats_read(struct pmd_internals *softnic, +@@ -748,6 +748,4 @@ softnic_pipeline_port_in_stats_read(struct pmd_internals *softnic, @@ -39 +40 @@ -@@ -885,6 +883,4 @@ softnic_pipeline_port_in_enable(struct pmd_internals *softnic, +@@ -797,6 +795,4 @@ softnic_pipeline_port_in_enable(struct pmd_internals *softnic, @@ -46 +47 @@ -@@ -932,6 +928,4 @@ softnic_pipeline_port_in_disable(struct pmd_internals *softnic, +@@ -844,6 +840,4 @@ softnic_pipeline_port_in_disable(struct pmd_internals *softnic, @@ -53 +54 @@ -@@ -987,6 +981,4 @@ softnic_pipeline_port_out_stats_read(struct pmd_internals *softnic, +@@ -899,6 +893,4 @@ softnic_pipeline_port_out_stats_read(struct pmd_internals *softnic, @@ -60 +61 @@ -@@ -1044,6 +1036,4 @@ softnic_pipeline_table_stats_read(struct pmd_internals *softnic, +@@ -956,6 +948,4 @@ softnic_pipeline_table_stats_read(struct pmd_internals *softnic, @@ -67 +68 @@ -@@ -1324,6 +1314,4 @@ softnic_pipeline_table_rule_add(struct pmd_internals *softnic, +@@ -1236,6 +1226,4 @@ softnic_pipeline_table_rule_add(struct pmd_internals *softnic, @@ -74 +75 @@ -@@ -1408,6 +1396,4 @@ softnic_pipeline_table_rule_add_default(struct pmd_internals *softnic, +@@ -1320,6 +1308,4 @@ softnic_pipeline_table_rule_add_default(struct pmd_internals *softnic, @@ -81 +82 @@ -@@ -1566,6 +1552,4 @@ fail: +@@ -1478,6 +1464,4 @@ fail: @@ -88 +89 @@ -@@ -1631,6 +1615,4 @@ softnic_pipeline_table_rule_delete(struct pmd_internals *softnic, +@@ -1543,6 +1527,4 @@ softnic_pipeline_table_rule_delete(struct pmd_internals *softnic, @@ -95 +96 @@ -@@ -1681,6 +1663,4 @@ softnic_pipeline_table_rule_delete_default(struct pmd_internals *softnic, +@@ -1593,6 +1575,4 @@ softnic_pipeline_table_rule_delete_default(struct pmd_internals *softnic, @@ -102 +103 @@ -@@ -1741,6 +1721,4 @@ softnic_pipeline_table_rule_stats_read(struct pmd_internals *softnic, +@@ -1653,6 +1633,4 @@ softnic_pipeline_table_rule_stats_read(struct pmd_internals *softnic, @@ -109 +110 @@ -@@ -1822,8 +1800,4 @@ softnic_pipeline_table_mtr_profile_add(struct pmd_internals *softnic, +@@ -1734,8 +1712,4 @@ softnic_pipeline_table_mtr_profile_add(struct pmd_internals *softnic, @@ -118 +119 @@ -@@ -1881,6 +1855,4 @@ softnic_pipeline_table_mtr_profile_delete(struct pmd_internals *softnic, +@@ -1793,6 +1767,4 @@ softnic_pipeline_table_mtr_profile_delete(struct pmd_internals *softnic, @@ -125 +126 @@ -@@ -1944,6 +1916,4 @@ softnic_pipeline_table_rule_mtr_read(struct pmd_internals *softnic, +@@ -1856,6 +1828,4 @@ softnic_pipeline_table_rule_mtr_read(struct pmd_internals *softnic, @@ -132 +133 @@ -@@ -2009,6 +1979,4 @@ softnic_pipeline_table_dscp_table_update(struct pmd_internals *softnic, +@@ -1921,6 +1891,4 @@ softnic_pipeline_table_dscp_table_update(struct pmd_internals *softnic, @@ -139 +140 @@ -@@ -2074,6 +2042,4 @@ softnic_pipeline_table_rule_ttl_read(struct pmd_internals *softnic, +@@ -1986,6 +1954,4 @@ softnic_pipeline_table_rule_ttl_read(struct pmd_internals *softnic,