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 5E667A0540 for ; Thu, 7 Jul 2022 09:59:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 340DB427F0; Thu, 7 Jul 2022 09:59:21 +0200 (CEST) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id CD3B340DDE for ; Thu, 7 Jul 2022 09:59:19 +0200 (CEST) Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (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-1.canonical.com (Postfix) with ESMTPS id 9C4353F163 for ; Thu, 7 Jul 2022 07:59:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1657180758; bh=SuByYPuIMT58doHSc18IuAzVvaN4smV7Pd7CoCVOsB0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=k+HsPnVQn2laZXMfsri8OG2G9khtNfNKcZLxpZIl3m6jhBE3ByyZzkXEAxs39El/L eSU5G/jygJimUjG1Q3ZQubWdxNytp3pNdDCwr80/iJ1zABmK//91muSPmcIi3EtsaQ aMmJktiOI6PzD4kpFFwXFTz1E9jlaDB3ULJMX+rOhgcmVqfIQ51TnQS/u6smxW5Daj RfUdKb3n5SJbXTVEhFZKZ3TM7jRv39nd1OumHEngSS28EZwqhgL+wmrTia2dexOjYv YsvE+pk40pX54djicXH9r7m168Lpq4bk7n6sMnZnapHm10jIJki64NisAw0GqpFqYb nQAyMUJKdJk+Q== Received: by mail-ed1-f71.google.com with SMTP id z13-20020a056402274d00b004357fcdd51fso13335205edd.17 for ; Thu, 07 Jul 2022 00:59:18 -0700 (PDT) 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=SuByYPuIMT58doHSc18IuAzVvaN4smV7Pd7CoCVOsB0=; b=y06zMdE8QzmQbuZW8lq/1pWYTCN7e/9HfyA8nqovss5nN96Oan4JaYNUXJlc/skHTG cOPr6jm9fc83cx5jDMpDPSVJiDOqurt7Nm0oCnTHhT5uEu+pmzwEGOLgx54EigOORKdS yK4l2HE77UGjFk95WbFAi+rOjAlK9kIY0X8wfbJV8Kwwi5s0VbzE3qgc0inBxbIMVGep z+Vh464ifft3qfS8ZrFqp+k3PyKn5MGSQi1Vexs0SR8G2MgHCrUpNNrbq/m2Xa+ekKDt /iuc+QMp1bGhkjb5IT/NfZluGUyQlrGX7ObhBhCzAKKbzCI6QmaWGfpRbhkz/jNQu05v 4BFw== X-Gm-Message-State: AJIora+Kxqa2NJbYshJ2udb+qU382yd0FfC6Z0o6sIPRHVyHv6VYwjsa ekI1k5ayBxQ6ZVC9MuU824bLWGYa+YdK9qa+af3q0eMiHZlD6NRpjo9JrvnOD0SKaHVi4Hb5Pkc aqRnFMl/uiNAUnZhnvYVcFLYk X-Received: by 2002:a17:906:7ac2:b0:726:38e0:4e7d with SMTP id k2-20020a1709067ac200b0072638e04e7dmr44817442ejo.236.1657180758271; Thu, 07 Jul 2022 00:59:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sKHkB2IPH+P3qira5/Sx4Q1piFrmpNRCSN/R1bpaIWXV4spz/Q2hsNglK9mGYVj29Lsm/DZQ== X-Received: by 2002:a17:906:7ac2:b0:726:38e0:4e7d with SMTP id k2-20020a1709067ac200b0072638e04e7dmr44817430ejo.236.1657180758068; Thu, 07 Jul 2022 00:59:18 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2a02:6d40:3a4f:7b00:c19b:938e:7c97:afe2]) by smtp.gmail.com with ESMTPSA id p27-20020a1709060ddb00b00722e559ee66sm18232090eji.62.2022.07.07.00.59.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 00:59:17 -0700 (PDT) From: christian.ehrhardt@canonical.com To: Damodharam Ammepalli Cc: Ajit Khaparde , Somnath Kotur , dpdk stable Subject: patch 'net/bnxt: cleanup MTU setting' has been queued to stable release 19.11.13 Date: Thu, 7 Jul 2022 09:55:11 +0200 Message-Id: <20220707075522.194223-76-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220707075522.194223-1-christian.ehrhardt@canonical.com> References: <20220707075522.194223-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.13 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/09/22. 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/ccdd69c5dd08f7a776ee1d3af5b2c685998c00f4 Thanks. Christian Ehrhardt --- >From ccdd69c5dd08f7a776ee1d3af5b2c685998c00f4 Mon Sep 17 00:00:00 2001 From: Damodharam Ammepalli Date: Wed, 15 Jun 2022 20:27:02 +0530 Subject: [PATCH] net/bnxt: cleanup MTU setting [ upstream commit 89670e3b0f852615c29c510d5f6c04d147675c7e ] Minor cleanup in bnxt_mtu_set_op() to move pre-mature setting of jumbo flag post mtu check and remove a redundant mtu set operation from rxq vnic configs. Fixes: daef48efe5e5 ("net/bnxt: support set MTU") Signed-off-by: Damodharam Ammepalli Reviewed-by: Ajit Khaparde Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_ethdev.c | 8 ++++---- drivers/net/bnxt/bnxt_rxq.c | 4 ---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 9c1578e0e9..1f50a449d9 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -2428,6 +2428,10 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu) } #endif + /* Is there a change in mtu setting? */ + if (eth_dev->data->dev_conf.rxmode.max_rx_pkt_len == new_pkt_size) + return rc; + if (new_mtu > RTE_ETHER_MTU) { bp->flags |= BNXT_FLAG_JUMBO; bp->eth_dev->data->dev_conf.rxmode.offloads |= @@ -2438,10 +2442,6 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu) bp->flags &= ~BNXT_FLAG_JUMBO; } - /* Is there a change in mtu setting? */ - if (eth_dev->data->dev_conf.rxmode.max_rx_pkt_len == new_pkt_size) - return rc; - for (i = 0; i < bp->nr_vnics; i++) { struct bnxt_vnic_info *vnic = &bp->vnic_info[i]; uint16_t size = 0; diff --git a/drivers/net/bnxt/bnxt_rxq.c b/drivers/net/bnxt/bnxt_rxq.c index 9d8efe0185..616a0d2360 100644 --- a/drivers/net/bnxt/bnxt_rxq.c +++ b/drivers/net/bnxt/bnxt_rxq.c @@ -348,10 +348,6 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev, } eth_dev->data->rx_queue_state[queue_idx] = queue_state; - /* Configure mtu if it is different from what was configured before */ - if (!queue_idx) - bnxt_mtu_set_op(eth_dev, eth_dev->data->mtu); - return 0; err: bnxt_rx_queue_release_op(rxq); -- 2.37.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-07 09:54:14.292865623 +0200 +++ 0076-net-bnxt-cleanup-MTU-setting.patch 2022-07-07 09:54:11.005824864 +0200 @@ -1 +1 @@ -From 89670e3b0f852615c29c510d5f6c04d147675c7e Mon Sep 17 00:00:00 2001 +From ccdd69c5dd08f7a776ee1d3af5b2c685998c00f4 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 89670e3b0f852615c29c510d5f6c04d147675c7e ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index f040cdcf94..e275d3a53f 100644 +index 9c1578e0e9..1f50a449d9 100644 @@ -25,3 +26,3 @@ -@@ -3037,15 +3037,15 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu) - if (!eth_dev->data->nb_rx_queues) - return -ENOTSUP; +@@ -2428,6 +2428,10 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu) + } + #endif @@ -30,2 +31,2 @@ -+ if (eth_dev->data->mtu == new_mtu) -+ return 0; ++ if (eth_dev->data->dev_conf.rxmode.max_rx_pkt_len == new_pkt_size) ++ return rc; @@ -33 +34 @@ - if (new_mtu > RTE_ETHER_MTU) + if (new_mtu > RTE_ETHER_MTU) { @@ -35 +36,2 @@ - else + bp->eth_dev->data->dev_conf.rxmode.offloads |= +@@ -2438,10 +2442,6 @@ int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu) @@ -36,0 +39 @@ + } @@ -39,2 +42,2 @@ -- if (eth_dev->data->mtu == new_mtu) -- return 0; +- if (eth_dev->data->dev_conf.rxmode.max_rx_pkt_len == new_pkt_size) +- return rc; @@ -46 +49 @@ -index f4b641773d..fabbbd4560 100644 +index 9d8efe0185..616a0d2360 100644 @@ -49,3 +52,3 @@ -@@ -402,10 +402,6 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev, - rxq->rx_started = rxq->rx_deferred_start ? false : true; - rxq->vnic = BNXT_GET_DEFAULT_VNIC(bp); +@@ -348,10 +348,6 @@ int bnxt_rx_queue_setup_op(struct rte_eth_dev *eth_dev, + } + eth_dev->data->rx_queue_state[queue_idx] = queue_state; @@ -59 +62 @@ - bnxt_rx_queue_release_op(eth_dev, queue_idx); + bnxt_rx_queue_release_op(rxq);