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 4332D41D4F for ; Thu, 23 Feb 2023 10:39:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3F55843186; Thu, 23 Feb 2023 10:39:51 +0100 (CET) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mails.dpdk.org (Postfix) with ESMTP id 7B450427E9 for ; Thu, 23 Feb 2023 10:39:49 +0100 (CET) Received: by mail-wr1-f48.google.com with SMTP id v3so10063501wrp.2 for ; Thu, 23 Feb 2023 01:39:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QegCHdImiYQyLLj1bO8giX8UwKFr6MAu4AoDjOvl8BI=; b=Q72LRYVrhwe0KHvbYih+69rG74WIb/NKD5FeaiVunqQuX5DO13E0JSW5EkqVSX5c8h XkE3lKbWz/I9WVUv+a9RbzaIJgM3R6EISiRH2DkLlq1WgeVFHoAZ+LtRY2LlXEaaV4Ug Em8S2+EUVVkuu0k6BJRCGRR0A698xH6fYuGMhL89dOmoBl3MvGncfiWtacrZ0TImc2C4 Oagbt4V2znEScQ2+6UaXO0y3lRifq5R7635TuuAdD8chN3NmQ71b92durm/ZwtfLUZsM WKCudG8j8DNl3iWiVAqJjbZemAfPBsAAHcMbgv+IWhqhHmcFBr5qZQZUFIeIUTHqySng Gdgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QegCHdImiYQyLLj1bO8giX8UwKFr6MAu4AoDjOvl8BI=; b=0uljzfl18ScQAox7P80J0m53KAfo36/4UZ0Ewt94DBL9yfW3LOqpc7to34NevhnsQ8 ngwedqQ1M7ZI9KDeImiBf94g0XCKYdgrGOUu57oCSncy0/q3niredbAXohdBjaN+DuqK D+DnGt0XlfxFkvywtsQPgakjuvZ/CtLYgYaZLUzI3KjA5hXTzpvgIlqETwDHPGvacRnf +GdpaDkHTmY3cEGe9H2KUNanoB0YDDZfXic2EPBji4eWgPupVvOAgZWP64ckvfMlTWzK xzhfFrnj2KmmcQMN8N20dcPtKI6/lzmr/y3qVyym+jRvbbEl8M5MRfHIIzpGlMp9Kugx 39NQ== X-Gm-Message-State: AO0yUKX2Ba7UPFytW0ultz68Gh9e9l/XtrvzOi63OE6xIRDJzWvjSKLg pGlq4x3QTnqwlKYUKp+WsSU= X-Google-Smtp-Source: AK7set8dhRUKY8OweO2KSPoUYwsjqxc1HUwMwmCkBOmRnIp2LyTbMHRyTMZusjwM3Rsq8ZBZdeLi8Q== X-Received: by 2002:a5d:49d0:0:b0:2c6:e744:cf71 with SMTP id t16-20020a5d49d0000000b002c6e744cf71mr10101004wrs.52.1677145189095; Thu, 23 Feb 2023 01:39:49 -0800 (PST) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id i16-20020adfefd0000000b002c552c6c8c2sm7390606wrp.87.2023.02.23.01.39.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 01:39:48 -0800 (PST) From: luca.boccassi@gmail.com To: Jiawen Wu Cc: dpdk stable Subject: patch 'net/txgbe: fix Rx buffer size in config register' has been queued to stable release 20.11.8 Date: Thu, 23 Feb 2023 09:36:54 +0000 Message-Id: <20230223093715.3926893-50-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230223093715.3926893-1-luca.boccassi@gmail.com> References: <20230223093715.3926893-1-luca.boccassi@gmail.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 20.11.8 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/25/23. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/54b97b047879c9483c80ead08d0eaba0aece58ef Thanks. Luca Boccassi --- >From 54b97b047879c9483c80ead08d0eaba0aece58ef Mon Sep 17 00:00:00 2001 From: Jiawen Wu Date: Wed, 15 Feb 2023 10:00:56 +0800 Subject: [PATCH] net/txgbe: fix Rx buffer size in config register [ upstream commit 8a3ef4b89e6dd0247355fdf3a77ff7ec1db28d8d ] When round up buffer size to 1K, to configure the register, hardware will receive packets exceeding the buffer size in LRO mode. It will cause a segment fault in the receive function. Fixes: be797cbf4582 ("net/txgbe: add Rx and Tx init") Signed-off-by: Jiawen Wu --- drivers/net/txgbe/txgbe_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/txgbe/txgbe_rxtx.c b/drivers/net/txgbe/txgbe_rxtx.c index 1196b95367..ae6aa07a01 100644 --- a/drivers/net/txgbe/txgbe_rxtx.c +++ b/drivers/net/txgbe/txgbe_rxtx.c @@ -4243,7 +4243,7 @@ txgbe_dev_rx_init(struct rte_eth_dev *dev) */ buf_size = (uint16_t)(rte_pktmbuf_data_room_size(rxq->mb_pool) - RTE_PKTMBUF_HEADROOM); - buf_size = ROUND_UP(buf_size, 0x1 << 10); + buf_size = ROUND_DOWN(buf_size, 0x1 << 10); srrctl |= TXGBE_RXCFG_PKTLEN(buf_size); wr32(hw, TXGBE_RXCFG(rxq->reg_idx), srrctl); -- 2.39.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-23 09:36:30.227470610 +0000 +++ 0050-net-txgbe-fix-Rx-buffer-size-in-config-register.patch 2023-02-23 09:36:28.298171266 +0000 @@ -1 +1 @@ -From 8a3ef4b89e6dd0247355fdf3a77ff7ec1db28d8d Mon Sep 17 00:00:00 2001 +From 54b97b047879c9483c80ead08d0eaba0aece58ef Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8a3ef4b89e6dd0247355fdf3a77ff7ec1db28d8d ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 021f281fbb..427f8b82ac 100644 +index 1196b95367..ae6aa07a01 100644 @@ -22 +23 @@ -@@ -4392,7 +4392,7 @@ txgbe_dev_rx_init(struct rte_eth_dev *dev) +@@ -4243,7 +4243,7 @@ txgbe_dev_rx_init(struct rte_eth_dev *dev)