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 ABB54A054C for ; Fri, 14 Feb 2020 18:04:50 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A2F71137D; Fri, 14 Feb 2020 18:04:50 +0100 (CET) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 3A44CF72 for ; Fri, 14 Feb 2020 18:04:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1581699888; 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=GhisoLv/72/wwfagslKY0t2SXDuKh3y2P8Y1mdymtPs=; b=b1nmU+4L5hN5nV++wUdy4AfPXk9n1O24VwbyqUFY40ODsoZug7ZYgRX3+ENO4f9gSyWs54 o3PP4LtNkm8XmoQgZr3wrZ5xvsOay61UuDT4ntO7OelU9zOGJS3byTph1n966JtLgcvopM sw489iie1oJF70qU3a5gurEEiwJ6E7s= 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-1-qCzwwNKKMOmrCswfh-7qIg-1; Fri, 14 Feb 2020 12:04:46 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D0DC618C35AD; Fri, 14 Feb 2020 17:04:44 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 23BF184BCD; Fri, 14 Feb 2020 17:04:42 +0000 (UTC) From: Kevin Traynor To: Kalesh AP Cc: Ajit Khaparde , dpdk stable Date: Fri, 14 Feb 2020 17:03:09 +0000 Message-Id: <20200214170337.25093-15-ktraynor@redhat.com> In-Reply-To: <20200214170337.25093-1-ktraynor@redhat.com> References: <20200214170337.25093-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: qCzwwNKKMOmrCswfh-7qIg-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: [dpdk-stable] patch 'net/bnxt: fix flow creation' has been queued to LTS release 18.11.7 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.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/20/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 rebasi= ng (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/fbff17b62cad6eade5= 1dcc7168141c73fda8fd77 Thanks. Kevin. --- >From fbff17b62cad6eade51dcc7168141c73fda8fd77 Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Thu, 16 Jan 2020 18:34:46 +0530 Subject: [PATCH] net/bnxt: fix flow creation [ upstream commit 9356d01d5fca23ce0f6617b1aab5e74da862808b ] If flow create fails due to not enough filter resources, driver does not populate the rte_flow_error using rte_flow_error_set(). Since "rte_errno" could have garbage value and is not reliable, it could cause a segfault in the stack in port_flow_complain(). Fix it to set rte_flow_error using rte_flow_error_set() when flow create fails due to not enough filter resources. Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow") Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_flow.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c index aca5f38892..df962d9b77 100644 --- a/drivers/net/bnxt/bnxt_flow.c +++ b/drivers/net/bnxt/bnxt_flow.c @@ -1027,5 +1027,7 @@ bnxt_flow_create(struct rte_eth_dev *dev, =09filter =3D bnxt_get_unused_filter(bp); =09if (filter =3D=3D NULL) { -=09=09PMD_DRV_LOG(ERR, "Not enough resources for a new flow.\n"); +=09=09rte_flow_error_set(error, ENOSPC, +=09=09=09=09 RTE_FLOW_ERROR_TYPE_HANDLE, NULL, +=09=09=09=09 "Not enough resources for a new flow"); =09=09goto free_flow; =09} --=20 2.21.1 --- Diff of the applied patch vs upstream commit (please double-check if non-= empty: --- --- -=092020-02-14 17:02:37.876483547 +0000 +++ 0015-net-bnxt-fix-flow-creation.patch=092020-02-14 17:02:36.944408084 += 0000 @@ -1 +1 @@ -From 9356d01d5fca23ce0f6617b1aab5e74da862808b Mon Sep 17 00:00:00 2001 +From fbff17b62cad6eade51dcc7168141c73fda8fd77 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 9356d01d5fca23ce0f6617b1aab5e74da862808b ] + @@ -17 +18,0 @@ -Cc: stable@dpdk.org @@ -26 +27 @@ -index cde1fa41c4..5564c53637 100644 +index aca5f38892..df962d9b77 100644 @@ -29 +30 @@ -@@ -1703,5 +1703,7 @@ bnxt_flow_create(struct rte_eth_dev *dev, +@@ -1027,5 +1027,7 @@ bnxt_flow_create(struct rte_eth_dev *dev,