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 42B15A051C for ; Tue, 11 Feb 2020 12:34:55 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3A70B1BF83; Tue, 11 Feb 2020 12:34:55 +0100 (CET) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by dpdk.org (Postfix) with ESMTP id 8A12D1BF83 for ; Tue, 11 Feb 2020 12:34:54 +0100 (CET) Received: by mail-wm1-f65.google.com with SMTP id s10so3065767wmh.3 for ; Tue, 11 Feb 2020 03:34:54 -0800 (PST) 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=ir4hrmzboZU6F6/wj8VKhVeA78TnGuN86xK1qBnrMUc=; b=ApUdaTAFx+NgsdpgxaKzIwUBdn6bh0kmjMgJ9vavh+5wMW+2j5GcoZbpPXr1nqKGXq ctpqy+IMsS80VP+9+rV/y0zMFHNqIUPjbMX+ZEXmBCwdxFExcVXABOMSh2UGce1k4YhD VJYTEF6Qo4uDDf0YGzZvG6LTT6O2sFyzIC9WsMR/AfduuKkqC7Kn5p0KMGMNO9KvN1J8 ZdHUkUJyBGFORKi6G6vkGl7N6njElLfeo0q1lnOQyHBXwh+1I/F6twg5AXipVaQ3yaJr d62xATIIRNod0XGqj1tmmv+Egyzr56eYm2x+wk3qYmnIjx+8Kfso1ZpBgIbP+pFvVsuK yMNg== 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=ir4hrmzboZU6F6/wj8VKhVeA78TnGuN86xK1qBnrMUc=; b=JORIndau2UI7POzqJQqjcQ0OLSTpzUCW2BLUdEcA3vhtAYpn+gXMYmjkfK5tESi8te 6nbPGr4YLHxk3FYOiQtmAziwbzqzQaKSjNGoHl2TbnghUEUeT8wLc9EF19KbvMDrqIGn uR+MZnpNbbgugtwfFCT+vI+ndBZJXMG38TB/SNgi/rCPVvwVI+ePbT419l23LaLs4Em1 wtyU8k8SFAUT24jr+oA7fkvL0XYvg46W3kTPInMjz+rqBJNANmqpiDPBmBA5VymbM6sr F0pUusapNmmsYoQoBx70B0amXxYQLrOYtIg58j+OLb9FJsyBzNdhqbQtgA1yLV+y/eAM assA== X-Gm-Message-State: APjAAAWHPh7uf60q40cSIAGH7OInzK4N7zwwjizAndXmchNjeZ0PrkcY hRVHkBlUe1nDHkBb7y7IwrM= X-Google-Smtp-Source: APXvYqxMvj96QFma3R5GZpHX64t4w0pJQxk2AwitWl6XYBDVYbNxFhS4lWVlMviwOLS6Wn37ZpQo9w== X-Received: by 2002:a7b:cd14:: with SMTP id f20mr5108234wmj.43.1581420894253; Tue, 11 Feb 2020 03:34:54 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id a13sm5017359wrp.93.2020.02.11.03.34.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:34:53 -0800 (PST) From: luca.boccassi@gmail.com To: Kalesh AP Cc: Ajit Khaparde , dpdk stable Date: Tue, 11 Feb 2020 11:21:16 +0000 Message-Id: <20200211112216.3929-130-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/bnxt: fix flow creation' has been queued to stable release 19.11.1 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.1 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/13/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 7303a6f5ab19523204d055ae34ce32c623189401 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 c694367300..c11c0c969d 100644 --- a/drivers/net/bnxt/bnxt_flow.c +++ b/drivers/net/bnxt/bnxt_flow.c @@ -1673,7 +1673,9 @@ bnxt_flow_create(struct rte_eth_dev *dev, filter = bnxt_get_unused_filter(bp); if (filter == NULL) { - PMD_DRV_LOG(ERR, "Not enough resources for a new flow.\n"); + rte_flow_error_set(error, ENOSPC, + RTE_FLOW_ERROR_TYPE_HANDLE, NULL, + "Not enough resources for a new flow"); goto free_flow; } -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:43.227512249 +0000 +++ 0130-net-bnxt-fix-flow-creation.patch 2020-02-11 11:17:38.624005536 +0000 @@ -1,8 +1,10 @@ -From 9356d01d5fca23ce0f6617b1aab5e74da862808b Mon Sep 17 00:00:00 2001 +From 7303a6f5ab19523204d055ae34ce32c623189401 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(). @@ -14,7 +16,6 @@ when flow create fails due to not enough filter resources. Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow") -Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde @@ -23,10 +24,10 @@ 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c -index cde1fa41c4..5564c53637 100644 +index c694367300..c11c0c969d 100644 --- a/drivers/net/bnxt/bnxt_flow.c +++ b/drivers/net/bnxt/bnxt_flow.c -@@ -1702,7 +1702,9 @@ bnxt_flow_create(struct rte_eth_dev *dev, +@@ -1673,7 +1673,9 @@ bnxt_flow_create(struct rte_eth_dev *dev, filter = bnxt_get_unused_filter(bp); if (filter == NULL) {