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 8EFAFA0547; Thu, 16 Jun 2022 04:41:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DCC9542BCB; Thu, 16 Jun 2022 04:41:03 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2125.outbound.protection.outlook.com [40.107.94.125]) by mails.dpdk.org (Postfix) with ESMTP id 733F442BCC for ; Thu, 16 Jun 2022 04:41:02 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lIBm3VRfr/eHjIpKhJXuV7brQtx9mYFWuhybdtKNxaYwr0z8+nZ2ewayyLbg3PhaCKE+ipTgq8fR3cR/SqrxqAzBSSLSEGrtgEDgPHMHc4jg7ih8VMRb0/vimeOgo+0t3krzoY0lSY+/lK+CQee3aIBRYuWOSwlMVjerZfFFj6QOyJUiClMumGEyCZ0Z6Hg1KManMvXVZQu7SnOZ1aq/35m5mpnx0KvVLdZifYgQe9ZUUoAXBlqGr+dRlPPn3iAphm1XjsXETgtJuD9mzm8HdZzUrxuzxptUPCgqkcmGK1HhInTqYWBJX3XULHuoblZQQPo2f57jTPRO8So38xwpHQ== 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=N3+AsvM6gDThUEoURXNVQKJabY0KMuGg8Sz5+g5kNtceL7BDv8p8VKxN3ZrueagkIeJzelbwwFLKQiz71NRYp8PQaFL5K7Wsnz+nDoutMtiTd/83JEUoePZjxSnaITWjA3+c8jfKeRLPSwXUsBbSxnoqEIs82F6vSpTn0aDnPhsCFfRf0sqoDo+iqy4uMD75qnsKbgNlh41Fq+4YpxvfmFy6GpM6UZtzCN5XLkGSFwF7EHhchGxg3ifZwEYMOnaoMTOcR4KBEVtZmB9/97r3XxPX+JEFrd5bju9jymJcnSrSBz49P1AFrh/u170MxhPCGzvNOShJttW4i7hVm9dGjA== 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=T9UriX1mF0nkPb6PulNrr14zZRLBYLrzBmTdPIJEtLF8YmXrLdEIu6dzO4AchuDj2+6lcxQd8eQVOP0JtDyy5ddhNoNBOm4L0SUETn/NpbxL+eMmOja84J6tDxW8n+OR6qSBTYGg8OLVIyIJLMtAUqx0yOFgGa20H7thtntwNGY= 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 DM6PR13MB2345.namprd13.prod.outlook.com (2603:10b6:5:be::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.9; Thu, 16 Jun 2022 02:41:01 +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.5353.011; Thu, 16 Jun 2022 02:41:01 +0000 From: Jin Liu To: dev@dpdk.org Cc: niklas.soderlund@corigine.com, Jin Liu , Yinjun Zhang , Chaoyong He Subject: [PATCH v2 05/15] net/nfp: remove pessimistic limit Date: Thu, 16 Jun 2022 04:39:29 +0200 Message-Id: <20220616023939.1798769-6-jin.liu@corigine.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220616023939.1798769-1-jin.liu@corigine.com> References: <20220602015304.710197-1-jin.liu@corigine.com> <20220616023939.1798769-1-jin.liu@corigine.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P123CA0087.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:190::20) 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: e5d0553c-8aa6-4843-4e11-08da4f41a66e X-MS-TrafficTypeDiagnostic: DM6PR13MB2345: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: 8PjBDjXceeLcBLpBg0UtRxjgYBNhzfClqUEfIs4TV+R/lnOtPfOZcXhUekAyhQc4V+TlDfh9180HCudreSfTmY8DGkzE18AgAoQLG8W0olqF9h8X53qd3Qc+iV7isFYmsor2a2ErhQGItT2iVmo7KZ2HYgRTCe2UhY7hEBg/axk4Z2/03in61G6mxr/yq0ybIYilCslRg4fJHzTQSC1BzNUC7qWDustoYw+JFh19WYrA0ho8MHegKjVFIu4uc6lt/q3gNT99mh0lClrLj9jlfQpAwK6+UH2nZb2T3zvmHPPyY5SNPnnOnL1noZEIOCNO0XsjnHFUxSIdesYdCfP/jmjs/gL54jsRLZkOWM7/7q9fnNTNeJk1aJNrA3nkB04yygreu+HeZJeNdFBrEuQK2aCYtEJvam8A5wAuSyDG23SGEtzeJOszTHL2xxbriHsxOaOZaTM1Z2B0oZS2oVNCOdcPZj8sfHuicu7QUZQx4JNVwTustsJDyBvPr+TWcVNzvidGS3bdYPXez9HJGZhMQbyzPNNjo0o7vViewCu0TcWR15uFS3fMa7MXx9CpxaDWe7LJzFgYX3zNHUvMNsBAFA2XWKZ9NtMWWVti3is95na2an20JyhQ8Xmf/3ZDqUweXRIAPoUXps+uFSgtBnR7M6pk1NnqrQOQUcyTFx3UQ9pKnwT5eH5gjY21sE7cX5VpxAsSFYk+2SFjSMtaftLiZA== 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)(396003)(366004)(39830400003)(136003)(6506007)(6666004)(26005)(316002)(66574015)(186003)(107886003)(6486002)(508600001)(41300700001)(2616005)(83380400001)(1076003)(36756003)(54906003)(6916009)(66556008)(8676002)(2906002)(4326008)(44832011)(38350700002)(6512007)(52116002)(5660300002)(66476007)(66946007)(86362001)(8936002)(38100700002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SzIxQlpLY0ZON3NOSG54K2M3cTk3UmJYMmwrWjE5alR5M0Y3KzZaL1lyZFJZ?= =?utf-8?B?MllkZnlWaVlPSHR2RG9QRnNsYjNsa01acmhYNDhDdFd3cElPcGZxRXBEV1R2?= =?utf-8?B?d1M2d3EyNnJtQmx5eEdHUjNzSlJ2TWpSd2k1b0pvbGU1TFdnVFN4MVZZSFA4?= =?utf-8?B?TVJYNDlnV2wxLzdwMVlPcmdhbjhTMSttdm04c2ZVUFlLY2FYSnkyZTNjeGFr?= =?utf-8?B?NUpHRElVdGRBSjFYL1Z3cXY5OHQxbS9NQTFVYmFYTHdPeC9NNnppZjFVN0FS?= =?utf-8?B?eTlUS0RCM1JhOTNEQlJtaTFMV3JzVzk1WDVpbDROaUcwa1E4a1pVdkJZdUJC?= =?utf-8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xZlJ0MnVFVityN3o1VkpOeVA0?= =?utf-8?B?Nk56OHR4M0g0TDcyNGNmaHhidGEyR0ZScVppVXpMVFRaVmNQM0pMTHUyajRH?= =?utf-8?B?K2xIdGtZSnJNeWpuaDZ6WmZQUzhOY2tqejJBMTYzVVNhQW43SDNQVnZmc2dK?= =?utf-8?B?L1I0S1E0NFArSXI4dHJWR2JYTE4xYlRrRDZQbC9RYW5ib0hTRDI2UT09?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: e5d0553c-8aa6-4843-4e11-08da4f41a66e X-MS-Exchange-CrossTenant-AuthSource: DM6PR13MB3004.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2022 02:41:01.2874 (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: at89bkWDJbqm+iKRMEmrVnLxcqkLvBtMTvyVYDWlOrz6xOoe9qPGCmygRnLJscNuuaPa/8jcxzWDVpZVPB9D+g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR13MB2345 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