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 94F2BA0093; Fri, 17 Jun 2022 11:35:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1801742802; Fri, 17 Jun 2022 11:35:23 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2103.outbound.protection.outlook.com [40.107.94.103]) by mails.dpdk.org (Postfix) with ESMTP id EE6E242820 for ; Fri, 17 Jun 2022 11:35:16 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gN+zrF6/voptbTEeQ69I3QVGb2z76Y0gg18ydgYiQ8vBDJDhxPlbYmx1g5FdcREhLbkOJnh5Rua1LcDup9SBrsuD34pZPPwBo6uCQqCSV9PArQQm6N4o7x2E1VxcPVvr5P6Rk45uCxJLn7ycK/kxkjYHVtxKwYyPWcflJWQ8Bw64TMMvFrnPmEdZyTUmcpALrNATXrAnM4QokJE/sFeBcjnt5dYgGTJTDOOFa+Mxp0TjLQrRwbdWadd/Yc+qFGbQbpRcfvkvJ3tOJBzJQs5aAW2f3698dsLVDAJoOaEdIdH6szayr5cFCGulWoKuJ2jf2skvO0oDa0pK4ClR678ruw== 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=oWEo/NjyHJfZC75rSdxxICc91mSwUGHboDcwIYGoZVwZSTIxrgxkp4Cv6mhgoOPmX2mMNNVEPazpthOdVkMx0enhZBp6n9DrDC+nbEwMYLygcNCe8iTqNMi+dPH0sEiKI3obV9DXNJbQA1jB7QrCSWabqcQR3T4Ob0/5FRU4jy3hgsjGtGG1a5HVldgDn/Fa1c+0NBgo1UuTzCfkmkggxI+sV1hvdrXN8kkhBCRVLlQnivpYb/kjH6Wogjs6+o63AIiQU63GTiy0s1P446wG1LSdIVytsFnMKjnhIddSH/4DaLU7CoiIL0oVZFjX19uWCwPLX/hVb6cOHHnkAtX3FQ== 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=FZe3aWBuKq9Fhm0eX/1n+xelLF9Z7GyHYRuYESpC0X5wVxoVPXB5HSwrJTcHEkWuhEOTNrigAb/ScZUjgBlUFkEKLMS9AHf38HMFgfJSKc10KYyDi8PdL+Cj9VktLyYSZOjnyc+/9V1tYW9+3aq1yh90T1rtfms2mN7NwjCnqME= 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 CO3PR13MB5671.namprd13.prod.outlook.com (2603:10b6:303:17a::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.9; Fri, 17 Jun 2022 09:35:15 +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.009; Fri, 17 Jun 2022 09:35:15 +0000 From: Jin Liu To: dev@dpdk.org Cc: niklas.soderlund@corigine.com, Jin Liu , Yinjun Zhang , Chaoyong He Subject: [PATCH v3 03/13] net/nfp: remove pessimistic limit Date: Fri, 17 Jun 2022 11:34:34 +0200 Message-Id: <20220617093444.2004000-4-jin.liu@corigine.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220617093444.2004000-1-jin.liu@corigine.com> References: <20220616023939.1798769-1-jin.liu@corigine.com> <20220617093444.2004000-1-jin.liu@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0192.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a4::17) 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: 968c275a-62ce-4b3d-b232-08da5044af32 X-MS-TrafficTypeDiagnostic: CO3PR13MB5671: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: G5OgW/1ceBk56lKcALiPbr/vWV8ZCFYR1BQAxDNFlxNB6ShIC65I5AW4vInZ/B9aV8UZdjNyuGcUfCeh+6xwEpmfD1NQuqP9un8j3cvQzCoMQMUJWKKF0Lu3tUVK0o9vC5XZRnu+1SH12o94iKi7f3HvUBp5UNBR0Q9vaYmkDOUT6nPzWkrcLmJNi97nKLCIvXdRQM3fEs9AGiFokpJ7g3iLbFnQDyai0EcUX6YumcSjPrD+ejfjeB+oODSiftAGnxJ4jF7GmdHf1J3e1TlybOwe5cBtYgDhg2CzLLWMN5Q8CaqkRiVtgzk9TEwob5twpxH3u4quX+CAhn05IUhrqaymza0bPIpA/za9hkADYtuefvOtAU0Fv8iVG61a5Gfq8oyAADDRcpc0+swFuBkO5DsELCV9DxEYOTg5dbdp56aplS9h45GyIWpkp5ODFsIVDjRhh9Sc0umcEw6cq6lGAO7qRy1yWNDf6R81EpMRLy0QaUaqlvTR+Idsi98TOj8RtO2SB+URoz/R4D8/NqYkdEUphmEMww2aRGQiF3Hf9sr80nLrQDKEb+LWsjRYpMgOtkj2l4LxlIaJWyn1oGizsqQBjVIKXUvW1QZ8WhLuBgzjwtG0EU7BSendCzPPHWpzfSWUZd/x3n0WhcySuqdvuLKDTu6fn1L1aS0W0g5G/LgJmFmrfsdYntw2QT0mW//MW8g4UVROrKJ+EKgzfnlQR8m+ipR4ayYegfwVB0GZcS6h/jiuFk8QlTAgMlBoZaHo 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)(346002)(136003)(366004)(396003)(39840400004)(66476007)(66556008)(26005)(8676002)(66574015)(6666004)(107886003)(66946007)(6506007)(6916009)(44832011)(2906002)(316002)(4326008)(38350700002)(186003)(508600001)(54906003)(5660300002)(6486002)(6512007)(1076003)(8936002)(2616005)(36756003)(52116002)(83380400001)(86362001)(38100700002)(41300700001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YnllUkRTUUNXdWNlbmZhM285R0tuVU1Valg1RXdoWnNlczhMMXR1Y2hiU04z?= =?utf-8?B?QVYrMkRkTnBPS3Z6b2ZMYUh3cCsxcCsrbHJMZnJSRisvSTFzYndTYjh1cVcy?= =?utf-8?B?RGJHQy96V2ZiUTZ6SXVyeVMwaHBoNUJPZ0ZhbEV1YmtCeStSUTlmZ0Z4R3dp?= =?utf-8?B?V1Z4Y2czYzFSRTNWenpOajNpYmdzbFE3NzJOZVFvOERBSGwwVEg0QTdlK2hC?= =?utf-8?B?RWJnS3VOV0ZRYytMa3BiS1FrcnlhdzB4T1FJVHpXVUZaSisxUXBjYlMxT3BY?= =?utf-8?B?aWxPaXN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WdzYnRySGxNcE5telBD?= =?utf-8?B?dXpKYUUzelV5emNueXdJUVZuTExlRGFCM2pWMDJJbFJGbUpHWTRuT1FQbGJX?= =?utf-8?B?eFN4SXl4UmFtWW1EcXNqdTdmR3VCTHAzLzROWm8xcjNRUU40RjdNdzIxa1ZN?= =?utf-8?B?NTNGMXVPQTNPK1dzNmFUUXlyS1UyRmM3RC9xU3BBc00zVkdvRmhYVjJ5NGlr?= =?utf-8?B?bjdVUVNkcVc0emtZMlBOcksxclZuZUljZTNVMnJ0bnNZZlRscHpvQT09?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 968c275a-62ce-4b3d-b232-08da5044af32 X-MS-Exchange-CrossTenant-AuthSource: DM6PR13MB3004.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2022 09:35:15.6648 (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: igA+VDq3Yjsa58iKEtAWBj8UgZlcdjSckxVQH8lCpiD6vk+GVUSJ7oVzMqIHFuLBABlM7q8jTeyeK6HSBui3Dw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO3PR13MB5671 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