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 15EF0A051C for ; Tue, 11 Feb 2020 12:41:07 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0E00E1BFF5; Tue, 11 Feb 2020 12:41:07 +0100 (CET) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by dpdk.org (Postfix) with ESMTP id BF8871BFF5 for ; Tue, 11 Feb 2020 12:41:06 +0100 (CET) Received: by mail-wr1-f46.google.com with SMTP id g3so10864143wrs.12 for ; Tue, 11 Feb 2020 03:41:06 -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=/Q1pBZ14frnDEsC+6qjj1n7fpa4mVloxISpjpavm+Bg=; b=N8RoVAfpF9hm7pBkvhddITwCHCmjZOTEURZw7KL9uCcohG721O2QwcLH3QR0CbE+tX 5WfucHWjUgaGMHC6hq5b+OTc34U4fkfAQ4MnI4k6ZpvudX1KznsY2v18ixKC0U96/J9b A0PIqTKboU4cD/qDxVMc2A8DWj0JSoEAdAgVmAGiX/fah+1sTHX0Q/dNidq4+qpog/Q0 YIFuOe1ZetrXkEDEA9R98QaqTLTOBsuRqHEhQ9c5jl+2O0n63GIkSNhuUmvcIvhDOAAE 6Nn9jUJz/oD9Fu7/w6CaHIbhMmXT70TWTiON64+Ez5pUTSHwW6S7zlaHpciB7JiCV7kX Nc/Q== 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=/Q1pBZ14frnDEsC+6qjj1n7fpa4mVloxISpjpavm+Bg=; b=hTpqCv3Ref5EkUGXO2OxJk6Z95WgeEybX0mZFYrduAtnxMRfWJp1vgYaNrvthKCye5 OAjUyOLMnUOFY4jbXrj73FC0LtQv5XQzRNy44dcYQYlr0j0JGUbsd+O1ZTvSyl8yIxnu R7XAf3Ef29df3qFl3Ggc4rEJiPO+Cgw+DRjxRIev8MkV9eCinCSPQm/KzXgtJlOKpN3U WKClpyL4itrmiYivFvVrwtWd49CCXHkFs/TJ+jZh/LkhYZXXXNJt6Y7rN3DHDLIlFIUV t/aLfJ2NY8gwZaqAByjjONlQ9+tGEA0MOqG9DSp+QTxk+rcfIAPY5+CGPQWIXdB0+X0J uRCw== X-Gm-Message-State: APjAAAXlJZAP1uMB6PAZGhcGkU1mwCs+wUMH4wPlMd8uJyeekBJiFXgl vaR9geSRluLnI6ep8t5yu3RhubEvmkM= X-Google-Smtp-Source: APXvYqy73bN9rJZruStLAqMiDv1n7qeuXcgAeDZR+S7U/3piQj8AFSDpZ3MOQhW3Y+Cbvu3FLMseeg== X-Received: by 2002:a5d:4f89:: with SMTP id d9mr8086071wru.391.1581421266279; Tue, 11 Feb 2020 03:41:06 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id h18sm5083190wrv.78.2020.02.11.03.41.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:41:05 -0800 (PST) From: luca.boccassi@gmail.com To: Somnath Kotur Cc: Kalesh AP , Ajit Khaparde , dpdk stable Date: Tue, 11 Feb 2020 11:21:46 +0000 Message-Id: <20200211112216.3929-160-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 bumping of L2 filter reference count' 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 c07f50f9824531ddc8912a43cdd286d31bb3e084 Mon Sep 17 00:00:00 2001 From: Somnath Kotur Date: Tue, 28 Jan 2020 12:59:16 +0530 Subject: [PATCH] net/bnxt: fix bumping of L2 filter reference count [ upstream commit 9073198e42d23d00d807798e02227f7bc50a0046 ] Now that the L2 filter reference count is bumped up in all cases including bnxt_alloc_filter() which is issued in init, just move this ref count bump inside the routine issuing the HWRM cmd so that it is bumped up only if the cmd is successful. Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow") Reviewed-by: Kalesh AP Signed-off-by: Somnath Kotur Signed-off-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_filter.c | 3 +-- drivers/net/bnxt/bnxt_flow.c | 1 - drivers/net/bnxt/bnxt_hwrm.c | 2 ++ 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c index 2f890779d2..622a9bb417 100644 --- a/drivers/net/bnxt/bnxt_filter.c +++ b/drivers/net/bnxt/bnxt_filter.c @@ -39,8 +39,7 @@ struct bnxt_filter_info *bnxt_alloc_filter(struct bnxt *bp) HWRM_CFA_L2_FILTER_ALLOC_INPUT_ENABLES_L2_ADDR_MASK; memcpy(filter->l2_addr, bp->mac_addr, RTE_ETHER_ADDR_LEN); memset(filter->l2_addr_mask, 0xff, RTE_ETHER_ADDR_LEN); - /* bump up the reference count of filter */ - filter->l2_ref_cnt++; + return filter; } diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c index c11c0c969d..60c390448a 100644 --- a/drivers/net/bnxt/bnxt_flow.c +++ b/drivers/net/bnxt/bnxt_flow.c @@ -867,7 +867,6 @@ bnxt_create_l2_filter(struct bnxt *bp, struct bnxt_filter_info *nf, bnxt_free_filter(bp, filter1); return NULL; } - filter1->l2_ref_cnt++; return filter1; } diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 2becf0fbe6..6309a61c06 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -487,6 +487,8 @@ int bnxt_hwrm_set_l2_filter(struct bnxt *bp, filter->fw_l2_filter_id = rte_le_to_cpu_64(resp->l2_filter_id); HWRM_UNLOCK(); + filter->l2_ref_cnt++; + return rc; } -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:44.186682980 +0000 +++ 0160-net-bnxt-fix-bumping-of-L2-filter-reference-count.patch 2020-02-11 11:17:38.764008153 +0000 @@ -1,15 +1,16 @@ -From 9073198e42d23d00d807798e02227f7bc50a0046 Mon Sep 17 00:00:00 2001 +From c07f50f9824531ddc8912a43cdd286d31bb3e084 Mon Sep 17 00:00:00 2001 From: Somnath Kotur Date: Tue, 28 Jan 2020 12:59:16 +0530 Subject: [PATCH] net/bnxt: fix bumping of L2 filter reference count +[ upstream commit 9073198e42d23d00d807798e02227f7bc50a0046 ] + Now that the L2 filter reference count is bumped up in all cases including bnxt_alloc_filter() which is issued in init, just move this ref count bump inside the routine issuing the HWRM cmd so that it is bumped up only if the cmd is successful. Fixes: 5c1171c97216 ("net/bnxt: refactor filter/flow") -Cc: stable@dpdk.org Reviewed-by: Kalesh AP Signed-off-by: Somnath Kotur @@ -21,7 +22,7 @@ 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/bnxt/bnxt_filter.c b/drivers/net/bnxt/bnxt_filter.c -index e2184334f7..a1463a0e2f 100644 +index 2f890779d2..622a9bb417 100644 --- a/drivers/net/bnxt/bnxt_filter.c +++ b/drivers/net/bnxt/bnxt_filter.c @@ -39,8 +39,7 @@ struct bnxt_filter_info *bnxt_alloc_filter(struct bnxt *bp) @@ -35,7 +36,7 @@ } diff --git a/drivers/net/bnxt/bnxt_flow.c b/drivers/net/bnxt/bnxt_flow.c -index 5564c53637..4b3b597956 100644 +index c11c0c969d..60c390448a 100644 --- a/drivers/net/bnxt/bnxt_flow.c +++ b/drivers/net/bnxt/bnxt_flow.c @@ -867,7 +867,6 @@ bnxt_create_l2_filter(struct bnxt *bp, struct bnxt_filter_info *nf, @@ -47,11 +48,11 @@ } diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c -index 3b013396ba..460cc48942 100644 +index 2becf0fbe6..6309a61c06 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c -@@ -488,6 +488,8 @@ int bnxt_hwrm_set_l2_filter(struct bnxt *bp, - filter->flow_id = rte_le_to_cpu_32(resp->flow_id); +@@ -487,6 +487,8 @@ int bnxt_hwrm_set_l2_filter(struct bnxt *bp, + filter->fw_l2_filter_id = rte_le_to_cpu_64(resp->l2_filter_id); HWRM_UNLOCK(); + filter->l2_ref_cnt++;