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 8699AA00C5; Mon, 14 Feb 2022 15:00:11 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1855440DDA; Mon, 14 Feb 2022 15:00:11 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 3F9694067E for ; Mon, 14 Feb 2022 15:00:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644847209; x=1676383209; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=uOhlaTe4YPpbRttNG+B69M7UOBPv2L/zmao8cqUsOHo=; b=d2dSJQtLQOBOZpUd3d0GfFNk1wwu4PrY0YrwrkGjqMQZZBXHf5PnRJoF zdOHYs8JOOwqmI8/vKK7g4mEiMkkZ0SRoLldeJajLKDLDIOMjhgX7RLs7 CjBAzdX4QTM6YnwO0/7rC8DZ3KEv3hc/hJEl3XeO02nsjwgiAsi4mZJpl W4tXgMzHPeJWPjS72M4nr+vDXE6K4w2rZoSANENSv1vSToWD/olz6MTxb FQiluaI6AQvB4Xh1K/kz0vlUBaZCg4hjFJdlmGYq7AEIqc09mx7XnPeIw +qeZMjOrBOtBAY6Yz1LmscjENzdPUIfh2fUPvZezZ01M23xA3/fJK/lLD A==; X-IronPort-AV: E=McAfee;i="6200,9189,10257"; a="250297195" X-IronPort-AV: E=Sophos;i="5.88,368,1635231600"; d="scan'208";a="250297195" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2022 06:00:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,368,1635231600"; d="scan'208";a="501825918" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga002.jf.intel.com with ESMTP; 14 Feb 2022 05:59:59 -0800 Received: from fmsmsx605.amr.corp.intel.com (10.18.126.85) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Mon, 14 Feb 2022 05:59:59 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Mon, 14 Feb 2022 05:59:59 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.47) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Mon, 14 Feb 2022 05:59:59 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KdcjzW9h71K4TxLDTRIUqWXua1AQm+XG8ALRj4rf7XGfo4rV8YbvAGWs4gwsmiwZCLSswuVQwrMQz7zfvM3I5zI8SIzqTytTRH7DxEebShnS3VkccAHT5iVCYRDEyV1omV8PtEk+hT94GKwEVetwJFNnuKuBVyNdmGyKiRUiymA9stl4DTKfpbvYhr7psZkt/uH+lAf8/CI4tQq8UI7JJ3c6X1+RYJBgF2HFFj8ybne6NEs7mUJu9zKmZeVUJD8RSC6hydTHc0942OmRJu8heyfshRZtrGKx70JQ0K9qyiXm6wJGaZP7S/rcCJPd87mN0Uk29AkiMKZzQMEoRTWs8w== 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=XGNxfg/+62LizmLTc4o0JPJM2KmJpylaWK78vmyWUCk=; b=LJwayU+/FMXJXsnU6JQJwmUPMh0fvFciYQoqc3aiJFGbBSCec3uVq+GouFAsZf7DLIbp9qxP5Sh9i42zyIcbyHiQEOLOZSI4Ld0iHeptAW543Xys3YMXr7ZBYtuxbh24orQ/4N7ewvIuwrRXVZtJc4JVbI82CnPP9r64Gyg+m1tabH9sTjq9sLdsuK6ztQSnoCSQeRoEw6Nm29/3xzHeBbjhgDaF6nE/S1Z0HN9BZdOopG8Hdf94l7tE6KtGpyC0uN40/MTxR13FVQQEJe6ucfBuENociP9uXJuUjQxD+PLoGgoOhzaaCtNFuOhpm7QHxzKJrF1/gSTbnCrOVH1w6Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by MN2PR11MB4335.namprd11.prod.outlook.com (2603:10b6:208:18d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.18; Mon, 14 Feb 2022 13:59:57 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::98be:5506:5020:28a2]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::98be:5506:5020:28a2%4]) with mapi id 15.20.4975.019; Mon, 14 Feb 2022 13:59:57 +0000 Message-ID: <697a7d68-bb01-80e0-ae2d-f5d2b5d2e63e@intel.com> Date: Mon, 14 Feb 2022 13:59:51 +0000 Content-Language: en-US To: John Miller , CC: References: <20220119191255.273988-ed.czeck@atomicrules.com> <20220211113935.303366-1-john.miller@atomicrules.com> <20220211113935.303366-3-john.miller@atomicrules.com> From: Ferruh Yigit Subject: Re: [PATCH v2 3/3] net/ark: support chunk DMA transfers X-User: ferruhy In-Reply-To: <20220211113935.303366-3-john.miller@atomicrules.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0251.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a7::22) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4bb354f4-1181-4768-ab9e-08d9efc24874 X-MS-TrafficTypeDiagnostic: MN2PR11MB4335:EE_ X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:473; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +LdNrRAJdkTdOLHUDxZsvAtsEWscT2nD+6pnRNMF5xLRxF2Bw32jvU5EHEHzWu1V2sQVORwy6dXO0C8+y9CgL6IFV8vf2eyX447YHkXxgnBDV1uqo7VrYiqGCoxSvQAbDqUVdWaPodzf32v7HDKvm9ZYPp2P8Qyj4WKRlsbkmnGSoyPpMqOINmT2QuRTBfaXcvODOnY4C1CZUy0Ftz/OcRsZqePup4dGlLkc5zXG9EJMQ/3AfByyBGwgIr1/Z4hlx+V/z2/5bEEXP/BBhX/T2TTTI1vVY3hrW4b3IRsyLM92mIiis1CKWzg0VClv2D0UtCM8PDPqsty3qO3EzdrTGzfI/lUlAYaUNYdvRsOILRtMW8wXhglcU/1GgIkr12Y4dts0k1/2wcOeoJHxvlu7nIgZB2CEhsXn0EerEy/0FVZ2VQ9e7XCamVSlqNuieO1doCutfWiFDGTkFWlIxcuPwd7MsDIJSzjyPYc29dae+jQwX9Xs2oS33J4u6IjZqD51aayM7eMisG8NZluM/GMazhtpUnCZDI8oO/b7wxvPZ4V5LJSiFGwiPPZ1olhLYOZvxQxHT+vsHuQbNKDvexfUfYmbubmvDSKjSFnYauQTJEcAdzFYtO/qknWaEkdBA1MTSp2oPhSWwiTLcBW1FP4eBofNYBaxfqy9Z9lEbf4idgpfxNsMNaHT/HHgU0x1ywq3U9QSw3PmmqzV5/y35JjnLg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(66946007)(86362001)(66556008)(66476007)(8676002)(2906002)(8936002)(38100700002)(4326008)(44832011)(5660300002)(31696002)(82960400001)(186003)(26005)(2616005)(6666004)(316002)(53546011)(6506007)(6512007)(508600001)(6486002)(36756003)(83380400001)(31686004)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RWY0OHlhNk1La1hhZlU5N2g3SVVCMXhSNFRkVjFxdTY3b0VQN2ozN1JCNWRW?= =?utf-8?B?cUNzd1VlSUc5NkFRVitZeUNhdHJpSEVXbEpiRFYvREhUN1IrYnRRTE5aSXNE?= =?utf-8?B?QTNwT05PTllEVEtsWmVrQTEwQVFqZEI5N2V3SUx5Yyt2aVN1bStsQ211d1FI?= =?utf-8?B?MTVxbUVQcFBYekxSbjB0cmhHM0h3TXV5N3FTcG9rL2t5R1dRcXkvRThFREly?= =?utf-8?B?dkp6d0ZMc1M0S1lhb3FWaXdjUVhGTmJaMEp6RURrTmNldlg4bUhQVDFLKzRI?= =?utf-8?B?eFRMaGl0cFZYejU3UllHZFVaVUpEYlFVVkl5elBRRCsvbVMyT3UvSE91dEk5?= =?utf-8?B?WkxVa3ZkMkZaaFI1Q1ViaTdoWTI5bEI1ZGNwaHpxWmM1clJkaXhqNFArVXBx?= =?utf-8?B?eGRUencwNkZGcTJRUGRDajF0bmVzajVJSGhmQTJmNVc4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768-ab9e-08d9efc24874 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Feb 2022 13:59:57.0434 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SABVCIZzbN/ZdQezmfV/cFSBSrAynfMzIM25QXOe1MEo6XTxbR/9FEAEExpTp1bPVGrZcJ6qvFt+DUSH2iCC5w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4335 X-OriginatorOrg: intel.com 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 On 2/11/2022 11:39 AM, John Miller wrote: > Add support for chunk DMA transfers. > Various performance optimizations and behavior fixes. > Chunk mpu transfer use 64 objects (512 byte) to maintain memory > read alignment. > Align mpu memory allocation to be at 512 byte boundaries. > Reduce force-close allocation from 10000 objects to 64 objects. > Add memory write barriers for read and wait status functions > in ddm, udm and mpu. > Configuration status updates for internal packet checker and > generator. > Hi John, When all above done in same patch, it is harder to differentiate what change bellow is for any item listed above. And this will be challenge for whoever wants to debug code and reads this commit to figure out. As far as I understand these 'various performance optimizations' are independent updates, can you split them into their own patches? Each independent and logically separate optimization can go into a separate patch. Thanks, ferruh > Signed-off-by: John Miller > > --- > v2: > - Added more details to the git log. > --- > drivers/net/ark/ark_ddm.c | 1 + > drivers/net/ark/ark_ethdev_rx.c | 16 +++++++++------- > drivers/net/ark/ark_mpu.c | 1 + > drivers/net/ark/ark_pktchkr.c | 2 +- > drivers/net/ark/ark_pktgen.c | 2 +- > drivers/net/ark/ark_udm.c | 3 +++ > 6 files changed, 16 insertions(+), 9 deletions(-) > > diff --git a/drivers/net/ark/ark_ddm.c b/drivers/net/ark/ark_ddm.c > index 2321371572..b16c739d50 100644 > --- a/drivers/net/ark/ark_ddm.c > +++ b/drivers/net/ark/ark_ddm.c > @@ -55,6 +55,7 @@ ark_ddm_stop(struct ark_ddm_t *ddm, const int wait) > int cnt = 0; > > ddm->cfg.command = 2; > + rte_wmb(); > while (wait && (ddm->cfg.stop_flushed & 0x01) == 0) { > if (cnt++ > 1000) > return 1; > diff --git a/drivers/net/ark/ark_ethdev_rx.c b/drivers/net/ark/ark_ethdev_rx.c > index 1000f50be0..49134ea08f 100644 > --- a/drivers/net/ark/ark_ethdev_rx.c > +++ b/drivers/net/ark/ark_ethdev_rx.c > @@ -12,6 +12,7 @@ > > #define ARK_RX_META_SIZE 32 > #define ARK_RX_META_OFFSET (RTE_PKTMBUF_HEADROOM - ARK_RX_META_SIZE) > +#define ARK_RX_MPU_CHUNK (64U) > > /* Forward declarations */ > struct ark_rx_queue; > @@ -104,7 +105,7 @@ static inline void > eth_ark_rx_update_cons_index(struct ark_rx_queue *queue, uint32_t cons_index) > { > queue->cons_index = cons_index; > - if ((cons_index + queue->queue_size - queue->seed_index) >= 64U) { > + if ((cons_index + queue->queue_size - queue->seed_index) >= ARK_RX_MPU_CHUNK) { > eth_ark_rx_seed_mbufs(queue); > ark_mpu_set_producer(queue->mpu, queue->seed_index); > } > @@ -179,12 +180,12 @@ eth_ark_dev_rx_queue_setup(struct rte_eth_dev *dev, > queue->reserve_q = > rte_zmalloc_socket("Ark_rx_queue mbuf", > nb_desc * sizeof(struct rte_mbuf *), > - 64, > + 512, > socket_id); > queue->paddress_q = > rte_zmalloc_socket("Ark_rx_queue paddr", > nb_desc * sizeof(rte_iova_t), > - 64, > + 512, > socket_id); > > if (queue->reserve_q == 0 || queue->paddress_q == 0) { > @@ -455,7 +456,8 @@ eth_ark_rx_stop_queue(struct rte_eth_dev *dev, uint16_t queue_id) > static inline int > eth_ark_rx_seed_mbufs(struct ark_rx_queue *queue) > { > - uint32_t limit = queue->cons_index + queue->queue_size; > + uint32_t limit = (queue->cons_index & ~(ARK_RX_MPU_CHUNK - 1)) + > + queue->queue_size; > uint32_t seed_index = queue->seed_index; > > uint32_t count = 0; > @@ -618,14 +620,14 @@ eth_ark_udm_force_close(struct rte_eth_dev *dev) > > ark_mpu_start(queue->mpu); > /* Add some buffers */ > - index = 100000 + queue->seed_index; > + index = ARK_RX_MPU_CHUNK + queue->seed_index; > ark_mpu_set_producer(queue->mpu, index); > } > /* Wait to allow data to pass */ > usleep(100); > > - ARK_PMD_LOG(DEBUG, "UDM forced flush attempt, stopped = %d\n", > - ark_udm_is_flushed(ark->udm.v)); > + ARK_PMD_LOG(NOTICE, "UDM forced flush attempt, stopped = %d\n", > + ark_udm_is_flushed(ark->udm.v)); > } > ark_udm_reset(ark->udm.v); > } > diff --git a/drivers/net/ark/ark_mpu.c b/drivers/net/ark/ark_mpu.c > index 8160c1de7b..b8e94b6ed3 100644 > --- a/drivers/net/ark/ark_mpu.c > +++ b/drivers/net/ark/ark_mpu.c > @@ -68,6 +68,7 @@ ark_mpu_reset(struct ark_mpu_t *mpu) > int cnt = 0; > > mpu->cfg.command = MPU_CMD_RESET; > + rte_wmb(); > > while (mpu->cfg.command != MPU_CMD_IDLE) { > if (cnt++ > 1000) > diff --git a/drivers/net/ark/ark_pktchkr.c b/drivers/net/ark/ark_pktchkr.c > index 84bb567a41..12a5abb2f7 100644 > --- a/drivers/net/ark/ark_pktchkr.c > +++ b/drivers/net/ark/ark_pktchkr.c > @@ -113,7 +113,7 @@ ark_pktchkr_stopped(ark_pkt_chkr_t handle) > struct ark_pkt_chkr_inst *inst = (struct ark_pkt_chkr_inst *)handle; > uint32_t r = inst->sregs->pkt_start_stop; > > - return (((r >> 16) & 1) == 1); > + return (((r >> 16) & 1) == 1) || (r == 0); > } > > void > diff --git a/drivers/net/ark/ark_pktgen.c b/drivers/net/ark/ark_pktgen.c > index 515bfe461c..6195ef997f 100644 > --- a/drivers/net/ark/ark_pktgen.c > +++ b/drivers/net/ark/ark_pktgen.c > @@ -107,7 +107,7 @@ ark_pktgen_paused(ark_pkt_gen_t handle) > struct ark_pkt_gen_inst *inst = (struct ark_pkt_gen_inst *)handle; > uint32_t r = inst->regs->pkt_start_stop; > > - return (((r >> 16) & 1) == 1); > + return (((r >> 24) & 1) == 1) || (((r >> 16) & 1) == 1) || (r == 0); > } > > void > diff --git a/drivers/net/ark/ark_udm.c b/drivers/net/ark/ark_udm.c > index 28c4500a2c..9ebed89627 100644 > --- a/drivers/net/ark/ark_udm.c > +++ b/drivers/net/ark/ark_udm.c > @@ -33,7 +33,9 @@ ark_udm_stop(struct ark_udm_t *udm, const int wait) > { > int cnt = 0; > > + udm->setup.r0 = 0; > udm->cfg.command = 2; > + rte_wmb(); > > while (wait && (udm->cfg.stop_flushed & 0x01) == 0) { > if (cnt++ > 1000) > @@ -70,6 +72,7 @@ ark_udm_reset(struct ark_udm_t *udm) > void > ark_udm_start(struct ark_udm_t *udm) > { > + udm->setup.r0 = 0x100; > udm->cfg.command = 1; > } >