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 5D144A0C56; Mon, 23 Aug 2021 09:59:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E31E540687; Mon, 23 Aug 2021 09:59:41 +0200 (CEST) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam07on2103.outbound.protection.outlook.com [40.107.95.103]) by mails.dpdk.org (Postfix) with ESMTP id 1EC5D40143; Mon, 23 Aug 2021 09:59:41 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fjz3PaUwEzTnB/WHF7wNK61FKs1WdpnAATh/S2NgL2KmxVs4/82K7AOpVymCPnK2tz4o9c56WijDkRL2L8PAWHq7UGV3mm1stTAiPFNpeyJZtVYjvx3HnV4hNrxJTfMfQw07twrv12dOpm7kOgP7oFMoIUOQjZT7tcbwPJ7V3RkAsxJdTeNgfkPdQaba2HW5NKh60fxTKMyKvnskFj/ageqeWSlrVlZLlExki5AGvG3xhORh4H1uDlU8zF6huxUOV9a3G3A7zednndeyTS1tZEx6sfRWRJNbedvDPv+l99DYurTZ9MRUGi6IxumaMUDvGV8nFyY+PA8TDrIorHg+lQ== 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-SenderADCheck; bh=cOldPK5b/LHPT7D8RgV9uFrCb09CyV+QVulOrMOavUU=; b=kdkoR3svpv1FzK2vpOoanWXjwMYMNfQMfeBfdhD41kKiiVusqX7I32qril9DxNUeZUkaOs8m3jVxDt+YpaBmgybJWNZ3Xmr2hVOUXzvUCyP/wql///NsTusdJEg2HCgaYTB1IyNVGfC+6MkUUpi2ZeYNpAINrPrpwQnBbbqc8febaCbPQXOlgqGmW/FPmuC7lF7Wgd/I7gzCMe1EYVA4yUuErjMwFqLxDFUVFFiW1fmM4lp2qP88gfMLlEu6GhQS3cMBMDtltns0JMh9Ia3iI/KOfDiB+nO5DnTlZNiq+AVKs1a1CPp0Y+4DTfGW0Efno5IrkluA7imSHGLu1seleA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=cOldPK5b/LHPT7D8RgV9uFrCb09CyV+QVulOrMOavUU=; b=UiCd4AMH3IuiQf3OuOuwyjHpAKgYDvRUwvkHH0kYbs87werqXWUuc0zVhOplX/Q+Tuz4ExtYFfH2E184hPP2qNrYOHQYU5T2UoO5j9xl6uC9QCBSLwUQG6ppXhsvkMkfMBgaDOMwBoyfz5Wo+y3RFkPdGZUU1PTM0qCf5fHhcPY= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=corigine.com; Received: from DM6PR13MB4268.namprd13.prod.outlook.com (2603:10b6:5:33::26) by DM6PR13MB2425.namprd13.prod.outlook.com (2603:10b6:5:c9::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4457.12; Mon, 23 Aug 2021 07:59:40 +0000 Received: from DM6PR13MB4268.namprd13.prod.outlook.com ([fe80::d426:151:2698:e5d4]) by DM6PR13MB4268.namprd13.prod.outlook.com ([fe80::d426:151:2698:e5d4%7]) with mapi id 15.20.4436.017; Mon, 23 Aug 2021 07:59:40 +0000 From: heinrich.kuhn@corigine.com To: dev@dpdk.org Cc: Heinrich Kuhn , stable@dpdk.org, Simon Horman Date: Mon, 23 Aug 2021 09:59:21 +0200 Message-Id: <20210823075921.97168-1-heinrich.kuhn@corigine.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: JNXP275CA0040.ZAFP275.PROD.OUTLOOK.COM (2603:1086:0:18::28) To DM6PR13MB4268.namprd13.prod.outlook.com (2603:10b6:5:33::26) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (102.132.233.103) by JNXP275CA0040.ZAFP275.PROD.OUTLOOK.COM (2603:1086:0:18::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.19 via Frontend Transport; Mon, 23 Aug 2021 07:59:38 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e7512ad0-44c6-4c0b-8018-08d9660bf582 X-MS-TrafficTypeDiagnostic: DM6PR13MB2425: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: a9beU/K/OyrejUUfH268ABNeW20np3lZXaRIMG0pmXcg3roiXK+LNTgkPgzKkX29uQw/fvR22d+9g3WwUrkRH4eXJMLKCRltyEVkACixSKQDTytV8t75y5sijUIL5e7qKm3RRmJWz796vBxl6m3UdkhDOtQ2iQBA8tOI6Hmti/tckzj+iJMVZ38Ip2LfQyAr0yMvdDAoT/8/hjVnXn4EM7uH9RJs+vhQZMh6mNwQ0Sr2bCuBn14VYfOGqwSHwZxkeQ09C6/Rq+sfLD6xFXV7ADYyszXgNcVttb/ezKTtsYJtO3BHgZTM7xzMmutE1jM+jlJQyQXbQS881C3wYtCbDZ1UAKxBQvo7IYbTcjZWrvQk5fTFYy6oEzAT87VCgusbkXz0hMCLJyTpWhnUS+3eStACxBw2nCyToz4qzCpy4Dm1wF5mcrCurPGaVNciBIhn1dE3WSTauNGn/qN6bi3chqaeNl/T3gnPCnJ7Srqq0LPAqzUjpsjXJCxQn6krQLHQdkiEx53lJ2xSmAd5uIUQ7JbZGGflkfZQBsc6mkIa+I56SF4akgZ/PtOMt4vLWmdarAH+B6aUJ9BvRROX+mbZG3x3JYnNMCPqAOqRrWglHaOO/UlIAWVYvoxukusjibiXG1qJmnLW4a96n+JDJC04NdxdC2VkUS9P+cvFDQdyxVjB7VJ8qTK5MM5Jo3arkVM4YWqoZqG2CCKetAx5yUmsPQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR13MB4268.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(346002)(396003)(136003)(376002)(366004)(39830400003)(8936002)(6916009)(4326008)(5660300002)(316002)(8676002)(6666004)(66946007)(6486002)(52116002)(186003)(6506007)(26005)(86362001)(450100002)(83380400001)(107886003)(54906003)(9686003)(6512007)(2906002)(66476007)(38100700002)(38350700002)(36756003)(956004)(2616005)(508600001)(66556008)(1076003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?266memLup2IbwEusoHf0J4Rqdj6Mhk2S9IqXhB+UhVr6WHNdBCyVutxvsBTQ?= =?us-ascii?Q?bDH4SbpI/uDaGtnEguCvOTCvwLukMn5c5BFnGBsmx7vNI2l+5Unr3PyJScpG?= =?us-ascii?Q?gtxj29eB/k4byloVadt/5BkBLHHAYKD+GtPsjWkd7QetwXeLp2sNHgBznMPh?= =?us-ascii?Q?QLToyZ9h1EFkaD5vmAE9+6XNSqnR4LwynFEw84bHisv/mwuo/Bb4WV/uHd0K?= =?us-ascii?Q?xee7zcLiWzC78B/+sgbv5bNOglERl9gZLGKG/EVjKTvwMJb8m1dNhgBEN9Yx?= =?us-ascii?Q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DPWMgD90ugSZsfAk1K?= =?us-ascii?Q?wSCeTW8rIf/xuz5J2sRnKn9iwQLC9xQHn/r5EZATO8RPMQxrpIUVKxIjClwy?= =?us-ascii?Q?PdFu7fHEmaldCcr9QO8YxItinwt4w3WlRP4lrDz5WsymQF/berwUVu+8S4PZ?= =?us-ascii?Q?gJZtVt/C+7kwR/48aWGxvbXb?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: e7512ad0-44c6-4c0b-8018-08d9660bf582 X-MS-Exchange-CrossTenant-AuthSource: DM6PR13MB4268.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2021 07:59:39.9999 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DRhSQeZsO99swefVxumkSYmUAxzMw18SrSfmtylbMA2y4fY1I/cmRJI7Z8j7XIwpl1/BstKRMxOZnPBE865NDejyi44O0uKL+CYPZN3Mtg8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR13MB2425 Subject: [dpdk-dev] [PATCH] net/nfp: fix minimum descriptor sizes X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Heinrich Kuhn The NFP4000/6000 supports a minimum of 256 Tx/Rx descriptors and not 64. Before this patch when a DPDK application configured < 256 Tx descriptors the hardware read/write pointers would be unmasked and not wrapped at the expected size of the ring. The PMD logic to determine the amount of free space in the Tx ring is incompatible with the unmasked hwqueue pointers and this will result in the PMD not updating the read pointer at all.The knock-on effect is that under high load the PMD will potentially re-use a Tx descriptor before the hw has had a chance to process that particular descriptor. This issue can manifest as a DMA error when the hardware tries to perform a DMA with info from a partially populated descriptor. Fixes: defb9a5dd156 ("nfp: introduce driver initialization") Cc: stable@dpdk.org Signed-off-by: Heinrich Kuhn Signed-off-by: Simon Horman --- drivers/net/nfp/nfp_rxtx.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/nfp/nfp_rxtx.h b/drivers/net/nfp/nfp_rxtx.h index d2d0f3f175..b0a8bf81b0 100644 --- a/drivers/net/nfp/nfp_rxtx.h +++ b/drivers/net/nfp/nfp_rxtx.h @@ -30,10 +30,10 @@ * DPDK uses uint16_t variables for these values */ #define NFP_NET_MAX_TX_DESC (32 * 1024) -#define NFP_NET_MIN_TX_DESC 64 +#define NFP_NET_MIN_TX_DESC 256 #define NFP_NET_MAX_RX_DESC (32 * 1024) -#define NFP_NET_MIN_RX_DESC 64 +#define NFP_NET_MIN_RX_DESC 256 /* Descriptor alignment */ #define NFP_ALIGN_RING_DESC 128 -- 2.30.1 (Apple Git-130)