From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9479BA0C41 for ; Tue, 30 Nov 2021 17:38:54 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B80F410F7; Tue, 30 Nov 2021 17:38:54 +0100 (CET) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id EAEAA41186 for ; Tue, 30 Nov 2021 17:38:53 +0100 (CET) Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id B5C223F1B2 for ; Tue, 30 Nov 2021 16:38:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290333; bh=oBGI0JcuJvpKz7IwvBlyEYHJGePrKtHMTz1y9nM97dI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ES7qW0XP7ac/kyRB6z1v3FqykX+LXkErrcTcC9WBR72PVL6WzwnCQw/KWqLHu73rk S5xoVSW3pMLzxCNQeFADkUt/cnKv7lhVR1xwqw4MSCS3cszICHUPAENFw/bw9uawTy hpNl57I3DGaMvNu3PNZ5kRadjg07m1jN6RsZRb1j+VU7LiujYhLJT9biQbpEtXaM7y ortGXuxZAvj/TxQ4faN5xtO2nf9gDBknc1QCRmElH0c3Lxny+AGOea7YB8w/czh/cj clr6m414tMyA0C49lgMu/dQG9D+n6lrARoaaHJPGlWRRdWk/1s7qi+OuOuBzL7NvSD EbcjSZiyBwZvQ== Received: by mail-ed1-f72.google.com with SMTP id l15-20020a056402124f00b003e57269ab87so17426493edw.6 for ; Tue, 30 Nov 2021 08:38:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oBGI0JcuJvpKz7IwvBlyEYHJGePrKtHMTz1y9nM97dI=; b=rBysheFmo5Tk+/V2/mBAYcvgXdv90Z4HamPZaXRRN1qRt082jg+f92ekV19wTlYk2s kPzsg3iwvrNGYQmsZ5Ot3BFgARfr7nm5p5xFNEdFDNlbMyLwsdYCUfWzn67UXazPr00P Fe7JsLeXkk2BZJehn+EcqbVF4z16Dr5+Mhnq8uhz34XsyphU43TIoJZfxja+caJKt9fc Elhn0TFaGn90OqVvAQ6Iho/H1uFxiQr7Dar0EsSl5j0btuD2C59+dHFClTGco4MOYIHF vqysLsewqId5ST2YAvvplzXl2whMmREUerKkvFSkNoVRgEDhAhdf3xMnHA2gKQOaGoU8 oiBQ== X-Gm-Message-State: AOAM531hEDHrHYaYZN3kCff2PmoI5LqOA2RUJpXJa4mmx/FfWzcG7t/b Ci0sBZE6gDQ/1f9x7yq67D+EtlV6OWsX8M3Y3LNY98LExN0O6tmMqA7EtfkFlneCOUQtOFbXgwM 13Ea2FPW/Eb4zUiMweLxdpNps X-Received: by 2002:a17:907:216e:: with SMTP id rl14mr219965ejb.368.1638290332138; Tue, 30 Nov 2021 08:38:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/i0XgtvW1BoEaNZTX3puOj/TsAlIAkI2EcEuHk7LHsjSxy9TE91yGzEIkFx9MnT6r2j7SuA== X-Received: by 2002:a17:907:216e:: with SMTP id rl14mr219940ejb.368.1638290331902; Tue, 30 Nov 2021 08:38:51 -0800 (PST) Received: from localhost.localdomain ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id he17sm9307168ejc.110.2021.11.30.08.38.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:38:51 -0800 (PST) From: christian.ehrhardt@canonical.com To: Ajit Khaparde Cc: Lance Richardson , dpdk stable Subject: patch 'net/bnxt: fix tunnel port accounting' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:34:16 +0100 Message-Id: <20211130163605.2460997-52-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> References: <20211130163605.2460997-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 19.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before December 10th 2021. 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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/c3dd66c29ab5a907c9bfcc2877f14879a1373423 Thanks. Christian Ehrhardt --- >From c3dd66c29ab5a907c9bfcc2877f14879a1373423 Mon Sep 17 00:00:00 2001 From: Ajit Khaparde Date: Fri, 24 Sep 2021 12:52:47 -0700 Subject: [PATCH] net/bnxt: fix tunnel port accounting [ upstream commit 3cb6659137feb7f3ce411c3e9b4cedf30ebdebe3 ] Fix the tunnel port counting logic. Currently we are incrementing the port count without checking the if bnxt_hwrm_tunnel_dst_port_alloc would return success or failure. Modify the logic to increment it only if the firmware returns success. Fixes: 10d074b2022d ("net/bnxt: support tunneling") Signed-off-by: Ajit Khaparde Reviewed-by: Lance Richardson --- drivers/net/bnxt/bnxt_ethdev.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 69ecc6d21a..81f9886ff5 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -1786,7 +1786,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, } tunnel_type = HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN; - bp->vxlan_port_cnt++; break; case RTE_TUNNEL_TYPE_GENEVE: if (bp->geneve_port_cnt) { @@ -1801,7 +1800,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, } tunnel_type = HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_GENEVE; - bp->geneve_port_cnt++; break; default: PMD_DRV_LOG(ERR, "Tunnel type is not supported\n"); @@ -1809,6 +1807,18 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, } rc = bnxt_hwrm_tunnel_dst_port_alloc(bp, udp_tunnel->udp_port, tunnel_type); + + if (rc != 0) + return rc; + + if (tunnel_type == + HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_VXLAN) + bp->vxlan_port_cnt++; + + if (tunnel_type == + HWRM_TUNNEL_DST_PORT_ALLOC_INPUT_TUNNEL_TYPE_GENEVE) + bp->geneve_port_cnt++; + return rc; } -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:09.089535163 +0100 +++ 0052-net-bnxt-fix-tunnel-port-accounting.patch 2021-11-30 16:50:05.702872884 +0100 @@ -1 +1 @@ -From 3cb6659137feb7f3ce411c3e9b4cedf30ebdebe3 Mon Sep 17 00:00:00 2001 +From c3dd66c29ab5a907c9bfcc2877f14879a1373423 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 3cb6659137feb7f3ce411c3e9b4cedf30ebdebe3 ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index 857da91c9d..aa7e7fdc85 100644 +index 69ecc6d21a..81f9886ff5 100644 @@ -24 +25 @@ -@@ -2369,7 +2369,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, +@@ -1786,7 +1786,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, @@ -32 +33 @@ -@@ -2384,7 +2383,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, +@@ -1801,7 +1800,6 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, @@ -40 +41 @@ -@@ -2392,6 +2390,18 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev, +@@ -1809,6 +1807,18 @@ bnxt_udp_tunnel_port_add_op(struct rte_eth_dev *eth_dev,