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 1C06EA0545; Thu, 23 Jun 2022 04:27:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 17FB942824; Thu, 23 Jun 2022 04:27:06 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2107.outbound.protection.outlook.com [40.107.94.107]) by mails.dpdk.org (Postfix) with ESMTP id 93A044069C for ; Thu, 23 Jun 2022 04:27:00 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dHrX+2JV1ciXq13XsWwXEJqzveNdW5G5OSG+B5kfqO8KlBcfscDpjPF/JsE93NyqL1fEc6lHowfgRDemweN1NpTX/5/QMCtE2xVcvEnn4qMVEsAkXXJFR8dtyZNrAjExTy3MJLh9vrCXkBjvUx7YVB2iYbOyW4bP+wrz7OvhULVHZ5FiZqjHquVYvkET6twvZ0u4iDvhAwKTKYNhVV9NGHx4Z+IEZyr8QA7Fu2vvS/b3aJAg1Lzuo2C5SyCWCYpeD3EeYVXAEVfv7/A67/HXkPTo/c8Nt6hhfHZWi4cn9YlOyw0/xtwsDJnYExZzZg64PBG6c6+p5fJ4s8plo1SFUA== 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=lunMfxd+SXFstKpVpG/MG5UK3s2BSPPs53tqidbF2+k=; b=gr2+6zFmNt9cAJjxWxH616XZQra31iurkb1eGVce14SVW33CK3QvdAwQXN6renuQV+zAMG/rGopSh7IAWXkwnyDe8VjtgWb4pkWXCxsMxHoW6nlZwiQAd3hVITmEb/UZ+dY7YQRrvHezTE2BjGON5UZ24pas7L0mk7heDBsfme46fxCtsEpnrcn7K8Mbwcroe5S71obAEp+14kXXs9N37NQXefkX/VgwJAvBSl/WjfNLtngRMog5vwCJ1oHJYcIFtx0cfP1+Z7PGzYEPNUFsnBcHfdWid5mJWxVtI/3Xcm2qoGO7rzGPXmMcVev9sb6GS6/L2Who4U7T5JlV7HP91g== 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=lunMfxd+SXFstKpVpG/MG5UK3s2BSPPs53tqidbF2+k=; b=IkTl6RqC2HmuZdOk8J5FQ9AiOK8vI9aueIbaiRzidpUZA53VRzoXUBZmTB04xPGX90IEWs0WgdORIimpKog3qHlUXP31b11nlxcX1YFpYGHn9rM9YhdmQN34/I/WlNur5k1oSmvB9IQ9Xdgec7qClK2yMG3oYbs8rzwf7Ujo3ew= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from DM6PR13MB3004.namprd13.prod.outlook.com (2603:10b6:5:191::21) by MN2PR13MB3535.namprd13.prod.outlook.com (2603:10b6:208:169::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15; Thu, 23 Jun 2022 02:26:59 +0000 Received: from DM6PR13MB3004.namprd13.prod.outlook.com ([fe80::ac31:a36a:cc15:cd35]) by DM6PR13MB3004.namprd13.prod.outlook.com ([fe80::ac31:a36a:cc15:cd35%7]) with mapi id 15.20.5373.015; Thu, 23 Jun 2022 02:26:59 +0000 From: Jin Liu To: dev@dpdk.org Cc: niklas.soderlund@corigine.com, Jin Liu , Yinjun Zhang , Chaoyong He Subject: [PATCH v4 03/13] net/nfp: remove pessimistic limit Date: Thu, 23 Jun 2022 04:26:05 +0200 Message-Id: <20220623022615.3628093-4-jin.liu@corigine.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220623022615.3628093-1-jin.liu@corigine.com> References: <20220617093444.2004000-1-jin.liu@corigine.com> <20220623022615.3628093-1-jin.liu@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P265CA0222.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:33a::10) To DM6PR13MB3004.namprd13.prod.outlook.com (2603:10b6:5:191::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 28b00879-d0ae-4cc6-c9b6-08da54bfd952 X-MS-TrafficTypeDiagnostic: MN2PR13MB3535:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NoYVlPUL+1TR8dxh5vUhwhFTK7EJSI0JUpvPZVXKBrjJrN+UoPlBO4Jn+A/NT8KFXwBvIF+x2vvGmyMo6+ez3Uk59wt56yxl21hCmj9wVwYaPEyv0kiQrGTsWPNJfSh2Bf1h+FTbP/h28Jra9DvZEMX/TPdQxtBuO+qUT+BYSwTZh1NqDhiPbq1P1CRN8cvetjwMKzW1aDSnWaW8kJoskXyv7rew8aB5IFJoRzXUsfZmaxxVPuZVlJZoxMbVynJT9YAlirTaDTPpvmxaIAEKN4zj6+/zyHftkJI6I3SsXF5HVvKCqKFLHwKZLryUXHp/ZLKZUCIOoZVidXROyL3atZCWF9ENXeFeAxa7P+lhwk7iv7QMbueQre5dzzuoWS1+GVxthi9Ld9R7IYf4azhOqCJxXMmdtIYLeKNEG3NzpyEFnDBUVmTYpjFfDYJm7lZ+2xxB8gv9pzYeWyglDNI96p+fw07tNsZP1az3vPh4pAI5TUXkx2zstzZ+57EEufk/UJhQCxBtpn5czk51XDCYjU5G3BGOrr59CvAH4k8riO7R9zmxycsJw9pSSZPrw+HGb6jXyzrdDWH0P15KsmGJN6JFvUKass3bkx/yrAfqwRwkAe0h/WsZRxEtKuIHgWu8ryb0vbnMYRdfEYb4CLYaWI5+b4bOsIBg8HXQiMKmOk+M08e3EhkbQiadnt+5F/hwGPdnzocxnsDbAhHJ8MmK14G0bjzogmcih3G32DWrJks90hNA0getcGpp//Pr+08FBVZo/l5P42Vga+8T6CW0c07eSqmt4Z3lSwN74hgou0i/VR4bDUkQmQbxR+DuI9Ic X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR13MB3004.namprd13.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(376002)(366004)(346002)(136003)(396003)(39830400003)(6666004)(107886003)(1076003)(38100700002)(38350700002)(6486002)(36756003)(66574015)(8936002)(54906003)(2616005)(6916009)(5660300002)(316002)(66556008)(52116002)(6506007)(186003)(66946007)(8676002)(4326008)(66476007)(41300700001)(86362001)(6512007)(26005)(83380400001)(478600001)(2906002)(44832011); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SHNHY2NTZE1QWTVicGxZMGxmbEE0MDA0K3VjY1MxaG1JdVhpbW56bjB3VGI0?= =?utf-8?B?QkVlRFJrYVQrd1oycVlJdFRvUGQxQ2lwS2Y4YitwaGsrajdaaXRmcGkxOCtk?= =?utf-8?B?NEF3ZTMrZU5wSEtReVR3QTNhWU1KUE1VSm9BQzIrR1VDRnJmditobDhiUTl5?= =?utf-8?B?WlRKMjFTMm1sZjBqTHJoWERhWVFwMzRQS2Y0RUtQUEEzVk9Pai96SlV3WXdM?= =?utf-8?B?WWxtVzNLdEY2UjFhZ2EwcjZ3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utf-8?B?dUtjcHN1QWsxNWR4dlh5Szdia3kvU0R5LzFhS3NyNHJiQ0ZzU2ZnajZMcFUw?= =?utf-8?Q?hMtp0LpKsIrg2U17Hw1yRQH5b?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 28b00879-d0ae-4cc6-c9b6-08da54bfd952 X-MS-Exchange-CrossTenant-AuthSource: DM6PR13MB3004.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jun 2022 02:26:59.0414 (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: qXP+KycmRgJubKHA3D0j54TIgzAuzOtzECnhLm2cKoUAkZAyZ3Yza0jg7Qyx7dqlF625wBHBD2wssKXepxGVNg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR13MB3535 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 Multiple writes cause intermediate pointer values that do not end on complete TX descriptors. The QCP peripheral on the NFP provides a number of access modes. In some access modes, the maximum amount to add must be restricted to a 6bit value. The particular access mode used by _nfp_qcp_ptr_add() has no such restrictions, so the "NFP_QCP_MAX_ADD" test is unnecessary. Note that trying to add more that the configured ring size in a single add will cause a QCP overflow, caught and handled by the QCP peripheral. Signed-off-by: Jin Liu Signed-off-by: Yinjun Zhang Signed-off-by: Chaoyong He Signed-off-by: Niklas Söderlund --- drivers/net/nfp/nfp_common.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/net/nfp/nfp_common.h b/drivers/net/nfp/nfp_common.h index 8db5ec23f8..49d6bb6ad5 100644 --- a/drivers/net/nfp/nfp_common.h +++ b/drivers/net/nfp/nfp_common.h @@ -44,9 +44,6 @@ struct nfp_net_adapter; /* The offset of the queue controller queues in the PCIe Target */ #define NFP_PCIE_QUEUE(_q) (0x80000 + (NFP_QCP_QUEUE_ADDR_SZ * ((_q) & 0xff))) -/* Maximum value which can be added to a queue with one transaction */ -#define NFP_QCP_MAX_ADD 0x7f - /* Interrupt definitions */ #define NFP_NET_IRQ_LSC_IDX 0 @@ -307,8 +304,6 @@ nn_cfg_writeq(struct nfp_net_hw *hw, int off, uint64_t val) * @q: Base address for queue structure * @ptr: Add to the Read or Write pointer * @val: Value to add to the queue pointer - * - * If @val is greater than @NFP_QCP_MAX_ADD multiple writes are performed. */ static inline void nfp_qcp_ptr_add(uint8_t *q, enum nfp_qcp_ptr ptr, uint32_t val) @@ -320,12 +315,7 @@ nfp_qcp_ptr_add(uint8_t *q, enum nfp_qcp_ptr ptr, uint32_t val) else off = NFP_QCP_QUEUE_ADD_WPTR; - while (val > NFP_QCP_MAX_ADD) { - nn_writel(rte_cpu_to_le_32(NFP_QCP_MAX_ADD), q + off); - val -= NFP_QCP_MAX_ADD; -} - -nn_writel(rte_cpu_to_le_32(val), q + off); + nn_writel(rte_cpu_to_le_32(val), q + off); } /* -- 2.27.0