Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp249397pxy; Thu, 22 Apr 2021 00:57:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxiWKi3VqlDOtspy3uwOUvsR/GlN+4nBc5WGOQO9+Q9nrvnD8LmND2wDnKUcrxPn912XF/T X-Received: by 2002:a63:40c1:: with SMTP id n184mr2262432pga.219.1619078223850; Thu, 22 Apr 2021 00:57:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619078223; cv=none; d=google.com; s=arc-20160816; b=loR21/7fCuJEZeMTNC4SrqAF3eZv5hSiT+he/GFXicvo7lytYmydyXlwg1O4W1NBda 6si9ziy7JyTbdPpuFN9rGwc5ZlkpQe/7bq8rdi/+aMffwwv3Nu3VSKAixHRXnr7nt7Bq OzJyZresgMR4kAyTBrTjL1QupUDuKKUzT21Xrxe6RwiwwjEaf+O42bZA+ibHy308PJJ0 DSANHklAHxjY+Uu96AJWHLEGsvDO8g0aOixvDdaK6PK4nFLT4mbrIaM6Cod9ESDyEGMf PRKXVFRcVGlhysTI4wC13KogOjFXgAYKpbL/7DZqpDuVSIyDASvmWgtdBhbb8BPWHOPs MNZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:ironport-sdr:ironport-sdr; bh=VQwep6Eb+jcq5biOz218VdLoxuYB0j7bX3AQXxUXe1g=; b=juLkUdif0HfvVOaeVW6JSK4beaF/JzCrO5H8QcR1taha8NeoibiTgkyJ1cY6igdJv9 fWJFG7JbOKxLj0umMnxOyoETqeZGe3MMW3UzIk2vfPIZ84Y2Ach2F3qqoBYzqe16pp9w E2AIqd9kzsciJlWo+RwzxN2VEUBylOoXTshUd5dd7uEzNBTYdOJQgowTbj5ABmtTrIpj B5z+mtG11fnpOcI4KjBFlzAdc7IMjJASv65L4gzhBh7cgO72yGgTjeKk0F6sx9TflDG3 naKud1RkI/9DNwOUwShnTaD008UklKSra3iiRcWmRzkBMxOtTXqRU7QeIM4oygI/w2j6 e2EQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i10si2443632pli.1.2021.04.22.00.56.51; Thu, 22 Apr 2021 00:57:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235242AbhDVH4X (ORCPT + 99 others); Thu, 22 Apr 2021 03:56:23 -0400 Received: from mga09.intel.com ([134.134.136.24]:8505 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235216AbhDVH4W (ORCPT ); Thu, 22 Apr 2021 03:56:22 -0400 IronPort-SDR: OqLHi50YqvrKXDavl7Q9poUmzrRFeUhwvjPM4WyPfGLCp4pRFCrZ4aqKCDbxeOcOXKhnH1xQjr DEwIBj8nrneg== X-IronPort-AV: E=McAfee;i="6200,9189,9961"; a="195956917" X-IronPort-AV: E=Sophos;i="5.82,241,1613462400"; d="scan'208";a="195956917" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2021 00:55:30 -0700 IronPort-SDR: AnLohqrXKePUG3FK/r/YhrgSUVOLhDx35E99eZ0bP/F835kQJLLCBvwb72EMuNWCFRIPT1SolH iNkXSTlJh7fQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,242,1613462400"; d="scan'208";a="421282417" Received: from mismail5-ilbpg0.png.intel.com ([10.88.229.82]) by fmsmga008.fm.intel.com with ESMTP; 22 Apr 2021 00:55:26 -0700 From: mohammad.athari.ismail@intel.com To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Jakub Kicinski , Maxime Coquelin , Chuah@vger.kernel.org, Kim Tatt Cc: Ong Boon Leong , Voon Weifeng , Wong Vee Khee , Tan Tee Min , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, mohammad.athari.ismail@intel.com Subject: [PATCH net-next 2/2] stmmac: intel: Enable HW descriptor prefetch by default Date: Thu, 22 Apr 2021 15:55:01 +0800 Message-Id: <20210422075501.20207-3-mohammad.athari.ismail@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210422075501.20207-1-mohammad.athari.ismail@intel.com> References: <20210422075501.20207-1-mohammad.athari.ismail@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mohammad Athari Bin Ismail Enable HW descriptor prefetch by default by setting plat->dma_cfg->dche = true in intel_mgbe_common_data(). Need to be noted that this capability only be supported in DWMAC core version 5.20 onwards. In stmmac, there is a checking to check the core version. If the core version is below 5.20, this capability wouldn`t be configured. Below is the iperf result comparison between HW descriptor prefetch disabled(DCHE=0b) and enabled(DCHE=1b). Tested on Intel Elkhartlake platform with DWMAC Core 5.20. Observed line rate performance improvement with HW descriptor prefetch enabled. DCHE = 0b [ 5] local 169.254.1.162 port 42123 connected to 169.254.244.142 port 5201 [ ID] Interval Transfer Bitrate Total Datagrams [ 5] 0.00-1.00 sec 96.7 MBytes 811 Mbits/sec 70050 [ 5] 1.00-2.00 sec 96.5 MBytes 809 Mbits/sec 69850 [ 5] 2.00-3.00 sec 96.3 MBytes 808 Mbits/sec 69720 [ 5] 3.00-4.00 sec 95.9 MBytes 804 Mbits/sec 69450 [ 5] 4.00-5.00 sec 96.0 MBytes 806 Mbits/sec 69530 [ 5] 5.00-6.00 sec 96.8 MBytes 812 Mbits/sec 70080 [ 5] 6.00-7.00 sec 96.9 MBytes 813 Mbits/sec 70140 [ 5] 7.00-8.00 sec 96.8 MBytes 812 Mbits/sec 70080 [ 5] 8.00-9.00 sec 97.0 MBytes 814 Mbits/sec 70230 [ 5] 9.00-10.00 sec 96.9 MBytes 813 Mbits/sec 70170 - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 5] 0.00-10.00 sec 966 MBytes 810 Mbits/sec 0.000 ms 0/699300 (0%) sender [ 5] 0.00-10.00 sec 966 MBytes 810 Mbits/sec 0.011 ms 0/699265 (0%) receiver DCHE = 1b [ 5] local 169.254.1.162 port 49740 connected to 169.254.244.142 port 5201 [ ID] Interval Transfer Bitrate Total Datagrams [ 5] 0.00-1.00 sec 97.9 MBytes 821 Mbits/sec 70880 [ 5] 1.00-2.00 sec 98.1 MBytes 823 Mbits/sec 71060 [ 5] 2.00-3.00 sec 98.2 MBytes 824 Mbits/sec 71140 [ 5] 3.00-4.00 sec 98.2 MBytes 824 Mbits/sec 71090 [ 5] 4.00-5.00 sec 98.1 MBytes 823 Mbits/sec 71050 [ 5] 5.00-6.00 sec 98.1 MBytes 823 Mbits/sec 71040 [ 5] 6.00-7.00 sec 98.1 MBytes 823 Mbits/sec 71050 [ 5] 7.00-8.00 sec 98.2 MBytes 824 Mbits/sec 71140 [ 5] 8.00-9.00 sec 98.2 MBytes 824 Mbits/sec 71120 [ 5] 9.00-10.00 sec 98.3 MBytes 824 Mbits/sec 71150 - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 5] 0.00-10.00 sec 981 MBytes 823 Mbits/sec 0.000 ms 0/710720 (0%) sender [ 5] 0.00-10.00 sec 981 MBytes 823 Mbits/sec 0.041 ms 0/710650 (0%) receiver Signed-off-by: Mohammad Athari Bin Ismail --- drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c index 4bd038acb1b9..80728a4c0e3f 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c @@ -471,6 +471,7 @@ static int intel_mgbe_common_data(struct pci_dev *pdev, plat->dma_cfg->fixed_burst = 0; plat->dma_cfg->mixed_burst = 0; plat->dma_cfg->aal = 0; + plat->dma_cfg->dche = true; plat->axi = devm_kzalloc(&pdev->dev, sizeof(*plat->axi), GFP_KERNEL); -- 2.17.1