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 E735EA034F for ; Wed, 10 Nov 2021 07:39:18 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD80940142; Wed, 10 Nov 2021 07:39:18 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2065.outbound.protection.outlook.com [40.107.94.65]) by mails.dpdk.org (Postfix) with ESMTP id 771334014D for ; Wed, 10 Nov 2021 07:39:17 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZX/jfc2EvxYFIGF+HD0CWdgWjN8nW+A4N06HYtGSUwr4uUrNTPjGDD7lzOmnk9xB9DgJmDXwaHSt9AeDLLyNOzm5vHWbo/a4cfnQHJgQkrJb0BZ/hadcbETAPFvbvGsmQ7hdGZjLz8JlLqFTQxQTPnOryuRlcyYnqEj8+L39A+DNgSt9RbeuScROfANOHn06tewDivdT0bRbXk97b1hrNcyZKH4q7j2MB73eVTd1xPhE0hqwTLu1I5xY5FOdUZQY1jTTYIoYIoIZ7V4PFQ0G0Dp09K1elp7mhCcqCQTe1uOjtSacdaXDpjlBDYRlftxCCGZQWjVAmYbnL1CfvwhN6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yx+5uEutrImAkm4iVVlR0P/xgtj1zVxX/jzSdvS8tZY=; b=Usv6+ZueFYQk9vtHU7D/ld4NXIEu/IU3t2OTlnar2gYGicAPZvEh6fu9raZE1Ru5+d+AJAl7JeLE9unZoar6ifNvCRvkJJujBcrYYuOrF8pMpu4FCXivD18GRwqEfZk77B1xIi7LG9ybVV0gx8jOFSezvCBw4mKR1woZomTu3B77MojYhh2OrNhCBuHWnw4R91SGFWVgzx9ZVDowDZ9GZjvYlUSKo7p1Rn0rfHUS2ISGenFxc6mUuOKGLKcgkJssV6MFC7Z7li81+lkzAzLxi9mDVw2zh4cjKcbZr/Vxpumx4XczSPCB2f8H6raCTaL9TktiHFKPsqUve7VNG4CzIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yx+5uEutrImAkm4iVVlR0P/xgtj1zVxX/jzSdvS8tZY=; b=XVG26FCZ9pRxvrQ0bxOkfXEbQ2VJsmD/fpahGbzO+nv9xR/TwOqZETTVag4ZIcRySHZRfC3uBeod3qdJPOFl19a21Wl//irYvBDCQp5tKRwTFEzNDT0MzQaNVcW75wUwqXZ5TYT5No2GUOV/81l9aUW+oa6a0xUp2vzQWPTQ0nAFNAVfPOPBf7/ZBzdTuqajMaSaL7QqSouwmL0NMa71L2296IedYD39Za3aQRjA80f5k3I3uw00Z2BT/T8VgDTNMhDCZFb5GmOezwW4EyJni9iogUCA+TRJIFAeSJDDkjuH5K6sz0wulfwIJLRWBckocBIu40pQb6OtxNJKQZh8Iw== Received: from DM6PR13CA0036.namprd13.prod.outlook.com (2603:10b6:5:bc::49) by CH2PR12MB3941.namprd12.prod.outlook.com (2603:10b6:610:28::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10; Wed, 10 Nov 2021 06:39:15 +0000 Received: from DM6NAM11FT068.eop-nam11.prod.protection.outlook.com (2603:10b6:5:bc:cafe::bc) by DM6PR13CA0036.outlook.office365.com (2603:10b6:5:bc::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.8 via Frontend Transport; Wed, 10 Nov 2021 06:39:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT068.mail.protection.outlook.com (10.13.173.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4690.15 via Frontend Transport; Wed, 10 Nov 2021 06:39:14 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:39:10 +0000 From: Xueming Li To: Qiming Chen CC: Luca Boccassi , Qi Zhang , dpdk stable Date: Wed, 10 Nov 2021 14:29:07 +0800 Message-ID: <20211110063216.2744012-64-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a1f6fc4e-21ad-4f69-5e9b-08d9a414d01e X-MS-TrafficTypeDiagnostic: CH2PR12MB3941: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: s2N+MC7pU7eqjB+yDpx3po80gGXKEsWs0J+Bpkv+1uhoqQRtlQ+y2aV2ghEq8akxxWvGr77BPccjLBG8AVO8HIrGDrWlxwcT/3nleHjqOPAI9Alxp8S6ucmH7OQa1EdfZBGzYxH/aQ32hDNakevALr0b0V0lAFRMi7PQspp+vZrULh4zEmXftImjSr2gxFvFP7rSNy9wvER1PEr2pKvco7MbNUJADQFt6IK13gAJkmkwSELOdRIs8+vBc1cVk3moALNCu0bQeNKY4uncLVKf7sMRLAsKQRBsPSnjaB6ihCe/gwyFb+wqBPUIc59+0cuXCtqrCa9xYyv499AdJhOL7+sGST0qtubKgldGDLiwE2ItnKtOrapeleLGtD2DDWdNTGTBTFG/BWAdziKGjfPRByWk1+aFMfzKxlLQ3eyd8mVMqiWL3VUwXtQCAOwC3rr+W9kLdcrQtiAtQUcnMHln/W7ARvPWXU0dp/5gPVLF0r0Ec8WEy1fbtQVJi4HdyG96PYgWjndQM+y1Xc/qeXmgzQuY66QhjeUXQthh4heYXQmLVLlrDJ4qcz//DjJfEIXK1mThPEQAfg2F67fURR1DauRmpqA1V7+HQlzb6FwnH+sPAnzeRWJNZk8h+TnTZKkGusXY6Jl5Q141kUxvfXvNH8zaT1hl1TXbHBCh4/Dhrqo5584do8iZipnL/h2UEhm/lKt3Kerj7FQ84LBJAZJOESJ2tTCIp0gnItFnL73ZGZ1tbadZcGO2aRaIT28YqkkjCUENbhaSWQR5rGGEVJNKkuRLzZG6kjduTYYcohqYRvlfw9Qyp9LEC01/1zS+mrJPz7zY8+0S8tjummyqy1EaOQ== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(46966006)(36840700001)(2906002)(47076005)(26005)(53546011)(426003)(7636003)(5660300002)(336012)(6666004)(16526019)(186003)(36906005)(36756003)(4326008)(82310400003)(36860700001)(2616005)(6916009)(70586007)(54906003)(70206006)(55016002)(86362001)(356005)(1076003)(508600001)(7696005)(6286002)(83380400001)(4001150100001)(8676002)(966005)(316002)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:39:14.6548 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a1f6fc4e-21ad-4f69-5e9b-08d9a414d01e X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT068.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB3941 Subject: [dpdk-stable] patch 'net/iavf: fix Rx queue buffer size alignment' has been queued to stable release 20.11.4 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/12/21. 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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/88719f1273a4bc3aada347a97dc87e8e1637f6ee Thanks. Xueming Li --- >From 88719f1273a4bc3aada347a97dc87e8e1637f6ee 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 Cc: Xueming Li [ 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 248e3df03b..b0e86f022b 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -560,7 +560,7 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, rxq->vsi = vsi; 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.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:04.896631253 +0800 +++ 0063-net-iavf-fix-Rx-queue-buffer-size-alignment.patch 2021-11-10 14:17:01.824079806 +0800 @@ -1 +1 @@ -From c9c45beb1b97eed3fbf05095e376823fc58c9aa7 Mon Sep 17 00:00:00 2001 +From 88719f1273a4bc3aada347a97dc87e8e1637f6ee Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit c9c45beb1b97eed3fbf05095e376823fc58c9aa7 ] @@ -16 +18,0 @@ -Cc: stable@dpdk.org @@ -25 +27 @@ -index 7240e70f9e..6de8ad3fe3 100644 +index 248e3df03b..b0e86f022b 100644 @@ -28,2 +30,2 @@ -@@ -619,7 +619,7 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, - rxq->crc_len = 0; +@@ -560,7 +560,7 @@ iavf_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx, + rxq->vsi = vsi;