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 707A9A0C41 for ; Tue, 30 Nov 2021 17:38:07 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6A4C7410F7; Tue, 30 Nov 2021 17:38:07 +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 92823410F7 for ; Tue, 30 Nov 2021 17:38:05 +0100 (CET) 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-0.canonical.com (Postfix) with ESMTPS id 6CB373F1B1 for ; Tue, 30 Nov 2021 16:38:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1638290285; bh=lGt7Tj58blv+7J+i+HAukKscYP6mghPwscDdfIKMukU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DiV8cUArRShRaws3T4XPZfB5XWEoIxtcnpvXj+v8pugIlg+KiFsg3BLZEbyOse6Tc dQ454ubr/SsxNTMa3Ey+nGNyY9DHC3w3bYq74J9Yww7dy+uZGkop91/J9RT8hn4Hbt oXneKXKx1jJsRBnmQNRe5/jQZerrXyZ7sCJ69Ir2iTFOm7ddLr3Z/B9xYFipjZySco A1Vbe81AOGeJw94lWeTDo0G/4cDv3t2LnQXtrXgZOQ6g1IyQlAm2KKUXDbKCFfiXCE WyNI9YTfz7DwhSHw5dX8FQn3zMeeGOi6k/o8iSrcBndT2VJtMwuvssIG7g7vxsHz0m vmzN+usPT+aWA== Received: by mail-ed1-f71.google.com with SMTP id w18-20020a056402071200b003e61cbafdb4so17480233edx.4 for ; Tue, 30 Nov 2021 08:38:05 -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=lGt7Tj58blv+7J+i+HAukKscYP6mghPwscDdfIKMukU=; b=B7fqg+0f9LwtCOHxkcXKBQ4tu7CXJCit0bTEOiJIo+LjvsEkD4yEHv6R4peqMb2335 NWdpryuLt6dH3/jPgGLXdc+yYjNHGdPZRCpnuW5kka0eVwY2UfFJdGkFQZ44QbeUcWyZ nSMYX2DO0j9I3eteBs2FgIqJLZbuFDi0LxH2wW7evSbRxyQULvBOGhLPUoYEiQW0FIV6 r6tlF5OdYQabiO2dcGK8amrms7kY3kSuekC8VpHE3MxZYPmO1N40Ae9zZ2IeLytaYCO9 B4eBjTt4Stfgzo4axOrfUQRCF3pQDb2+AwWKEmJpwreX4MdpOtuTvDc72hVj8w94AEhG ZZmw== X-Gm-Message-State: AOAM531V86nyrBSEdxA7YxDZRnbp8vZfY/Ha6SeX6HhMHOm5KB9DRo4x Rv7h8JvfUqI4ZjmTOCLfsTY3Xf9e+mpwclcHp/5mpf1K3P1zoQqV77Fh0157+1eqR4GQckrhCzX 6sCe2Px/icvgpLuT5pIeik1gU X-Received: by 2002:a17:906:f74a:: with SMTP id jp10mr214883ejb.358.1638290285148; Tue, 30 Nov 2021 08:38:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJyyRl4vs/tnk+G6kI8pmdRkScY5ZhMaBOUjOVbeLflV8+iSA8BJmJyapYFSefaoksfjy/ILXA== X-Received: by 2002:a17:906:f74a:: with SMTP id jp10mr214866ejb.358.1638290285004; Tue, 30 Nov 2021 08:38:05 -0800 (PST) Received: from localhost.localdomain ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id gt18sm9745641ejc.46.2021.11.30.08.38.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Nov 2021 08:38:04 -0800 (PST) From: christian.ehrhardt@canonical.com To: Qiming Chen Cc: Qi Zhang , dpdk stable Subject: patch 'net/iavf: fix Rx queue buffer size alignment' has been queued to stable release 19.11.11 Date: Tue, 30 Nov 2021 17:34:00 +0100 Message-Id: <20211130163605.2460997-36-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/a7be123dcb3561887183b099630beb5c2f63d04f Thanks. Christian Ehrhardt --- >From a7be123dcb3561887183b099630beb5c2f63d04f Mon Sep 17 00:00:00 2001 From: Qiming Chen Date: Sat, 11 Sep 2021 10:07:56 +0800 Subject: [PATCH] net/iavf: fix Rx queue buffer size alignment [ upstream commit c9c45beb1b97eed3fbf05095e376823fc58c9aa7 ] The RTE_ALIGN macro is aligned upwards. If the buf_size variable is not aligned with 1 << I40E_RXQ_CTX_DBUFF_SHIFT, the rx_buf_len is larger than the actual mbuf memory after the operation. When receiving the packet, if the packet is larger than the configured buf_size, it will cause a memory stepping event. The patch uses the RTE_ALIGN_FLOOR down alignment macro to correct the problem. Fixes: 69dd4c3d0898 ("net/avf: enable queue and device") Signed-off-by: Qiming Chen Acked-by: Qi Zhang --- drivers/net/iavf/iavf_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 167f7e53b4..bc67712d9c 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -362,7 +362,7 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, rxq->rx_hdr_len = 0; len = rte_pktmbuf_data_room_size(rxq->mp) - RTE_PKTMBUF_HEADROOM; - rxq->rx_buf_len = RTE_ALIGN(len, (1 << IAVF_RXQ_CTX_DBUFF_SHIFT)); + rxq->rx_buf_len = RTE_ALIGN_FLOOR(len, (1 << IAVF_RXQ_CTX_DBUFF_SHIFT)); /* Allocate the software ring. */ len = nb_desc + IAVF_RX_MAX_BURST; -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-30 16:50:08.178572470 +0100 +++ 0036-net-iavf-fix-Rx-queue-buffer-size-alignment.patch 2021-11-30 16:50:05.646872473 +0100 @@ -1 +1 @@ -From c9c45beb1b97eed3fbf05095e376823fc58c9aa7 Mon Sep 17 00:00:00 2001 +From a7be123dcb3561887183b099630beb5c2f63d04f Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit c9c45beb1b97eed3fbf05095e376823fc58c9aa7 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index 7240e70f9e..6de8ad3fe3 100644 +index 167f7e53b4..bc67712d9c 100644 @@ -28,2 +29,2 @@ -@@ -619,7 +619,7 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, - rxq->crc_len = 0; +@@ -362,7 +362,7 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, + rxq->rx_hdr_len = 0;