From patchwork Sat Apr 1 07:25:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ding Tianhong X-Patchwork-Id: 96538 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp1058149qgd; Sat, 1 Apr 2017 00:26:51 -0700 (PDT) X-Received: by 10.99.155.17 with SMTP id r17mr6663959pgd.193.1491031611200; Sat, 01 Apr 2017 00:26:51 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 2si7403635plb.41.2017.04.01.00.26.51; Sat, 01 Apr 2017 00:26:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751267AbdDAH0t (ORCPT + 6 others); Sat, 1 Apr 2017 03:26:49 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:5294 "EHLO dggrg01-dlp.huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750793AbdDAH0q (ORCPT ); Sat, 1 Apr 2017 03:26:46 -0400 Received: from 172.30.72.53 (EHLO DGGEML402-HUB.china.huawei.com) ([172.30.72.53]) by dggrg01-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id ALV84944; Sat, 01 Apr 2017 15:26:11 +0800 (CST) Received: from localhost (10.177.23.32) by DGGEML402-HUB.china.huawei.com (10.3.17.38) with Microsoft SMTP Server id 14.3.301.0; Sat, 1 Apr 2017 15:26:00 +0800 From: Ding Tianhong To: , , , , , , , , CC: Ding Tianhong Subject: [PATCH net-next 1/4] ixgbe: sparc: rename the ARCH_WANT_RELAX_ORDER to IXGBE_ALLOW_RELAXED_ORDER Date: Sat, 1 Apr 2017 15:25:51 +0800 Message-ID: <1491031554-19516-2-git-send-email-dingtianhong@huawei.com> X-Mailer: git-send-email 1.8.5.2.msysgit.0 In-Reply-To: <1491031554-19516-1-git-send-email-dingtianhong@huawei.com> References: <1491031554-19516-1-git-send-email-dingtianhong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.23.32] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090201.58DF5614.002E, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: f0a0384365ed7cbd438a1a63a3f74b6e Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Till now only the Intel ixgbe could support enable Relaxed ordering in the drivers for special architecture, but the ARCH_WANT_RELAX_ORDER is looks like a general name for all arch, so rename to a specific name for intel card looks more appropriate. Signed-off-by: Ding Tianhong --- arch/Kconfig | 2 +- arch/sparc/Kconfig | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) -- 1.9.0 diff --git a/arch/Kconfig b/arch/Kconfig index cd211a1..bc0ab44 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -844,7 +844,7 @@ config STRICT_MODULE_RWX and non-text memory will be made non-executable. This provides protection against certain security exploits (e.g. writing to text) -config ARCH_WANT_RELAX_ORDER +config IXGBE_ALLOW_RELAXED_ORDER bool source "kernel/gcov/Kconfig" diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 68ac5c7..f56bcf4 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@ -44,7 +44,7 @@ config SPARC select CPU_NO_EFFICIENT_FFS select HAVE_ARCH_HARDENED_USERCOPY select PROVE_LOCKING_SMALL if PROVE_LOCKING - select ARCH_WANT_RELAX_ORDER + select IXGBE_ALLOW_RELAXED_ORDER config SPARC32 def_bool !64BIT diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c index c38d50c..563ea15 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c @@ -350,7 +350,7 @@ s32 ixgbe_start_hw_gen2(struct ixgbe_hw *hw) } IXGBE_WRITE_FLUSH(hw); -#ifndef CONFIG_ARCH_WANT_RELAX_ORDER +#ifndef CONFIG_IXGBE_ALLOW_RELAX_ORDER /* Disable relaxed ordering */ for (i = 0; i < hw->mac.max_tx_queues; i++) { u32 regval; From patchwork Sat Apr 1 07:25:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ding Tianhong X-Patchwork-Id: 96539 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp1058197qgd; Sat, 1 Apr 2017 00:27:03 -0700 (PDT) X-Received: by 10.98.211.143 with SMTP id z15mr6303591pfk.46.1491031623581; Sat, 01 Apr 2017 00:27:03 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 2si7403635plb.41.2017.04.01.00.27.03; Sat, 01 Apr 2017 00:27:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750849AbdDAH0q (ORCPT + 6 others); Sat, 1 Apr 2017 03:26:46 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:5292 "EHLO dggrg01-dlp.huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750801AbdDAH0p (ORCPT ); Sat, 1 Apr 2017 03:26:45 -0400 Received: from 172.30.72.53 (EHLO DGGEML402-HUB.china.huawei.com) ([172.30.72.53]) by dggrg01-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id ALV84943; Sat, 01 Apr 2017 15:26:11 +0800 (CST) Received: from localhost (10.177.23.32) by DGGEML402-HUB.china.huawei.com (10.3.17.38) with Microsoft SMTP Server id 14.3.301.0; Sat, 1 Apr 2017 15:26:01 +0800 From: Ding Tianhong To: , , , , , , , , CC: Ding Tianhong Subject: [PATCH net-next 2/4] ixgbe: ixgbevf: Clear the CONFIG_SPARC for ixgbevf and 82598 Date: Sat, 1 Apr 2017 15:25:52 +0800 Message-ID: <1491031554-19516-3-git-send-email-dingtianhong@huawei.com> X-Mailer: git-send-email 1.8.5.2.msysgit.0 In-Reply-To: <1491031554-19516-1-git-send-email-dingtianhong@huawei.com> References: <1491031554-19516-1-git-send-email-dingtianhong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.23.32] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090204.58DF5614.0023, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 892776acf77c11ab34267f0423c8fb6e Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The CONFIG_SPARC in ixgbevf and ixgbe_82598 is only used to enable relaxed ordering, the CONFIG_IXBGE_WANT_RELAXED_ORDER already did this, so rename this config for the same setting. Signed-off-by: Ding Tianhong --- drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c | 4 ++-- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- 1.9.0 diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c index 523f9d0..c7f95ae 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_82598.c @@ -175,7 +175,7 @@ static s32 ixgbe_init_phy_ops_82598(struct ixgbe_hw *hw) **/ static s32 ixgbe_start_hw_82598(struct ixgbe_hw *hw) { -#ifndef CONFIG_SPARC +#ifndef CONFIG_IXGBE_ALLOW_RELAXED_ORDER u32 regval; u32 i; #endif @@ -183,7 +183,7 @@ static s32 ixgbe_start_hw_82598(struct ixgbe_hw *hw) ret_val = ixgbe_start_hw_generic(hw); -#ifndef CONFIG_SPARC +#ifndef CONFIG_IXGBE_ALLOW_RELAXED_ORDER /* Disable relaxed ordering */ for (i = 0; ((i < hw->mac.max_tx_queues) && (i < IXGBE_DCA_MAX_QUEUES_82598)); i++) { diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c index 80bab26..c27932d 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c @@ -1713,7 +1713,7 @@ static void ixgbevf_configure_rx_ring(struct ixgbevf_adapter *adapter, IXGBE_WRITE_REG(hw, IXGBE_VFRDLEN(reg_idx), ring->count * sizeof(union ixgbe_adv_rx_desc)); -#ifndef CONFIG_SPARC +#ifndef CONFIG_IXGBE_ALLOW_RELAXED_ORDER /* enable relaxed ordering */ IXGBE_WRITE_REG(hw, IXGBE_VFDCA_RXCTRL(reg_idx), IXGBE_DCA_RXCTRL_DESC_RRO_EN); From patchwork Sat Apr 1 07:25:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ding Tianhong X-Patchwork-Id: 96536 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp1058146qgd; Sat, 1 Apr 2017 00:26:50 -0700 (PDT) X-Received: by 10.99.127.11 with SMTP id a11mr6831869pgd.53.1491031610804; Sat, 01 Apr 2017 00:26:50 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 2si7403635plb.41.2017.04.01.00.26.50; Sat, 01 Apr 2017 00:26:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750950AbdDAH0s (ORCPT + 6 others); Sat, 1 Apr 2017 03:26:48 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:5296 "EHLO dggrg01-dlp.huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750808AbdDAH0q (ORCPT ); Sat, 1 Apr 2017 03:26:46 -0400 Received: from 172.30.72.53 (EHLO DGGEML402-HUB.china.huawei.com) ([172.30.72.53]) by dggrg01-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id ALV84937; Sat, 01 Apr 2017 15:26:10 +0800 (CST) Received: from localhost (10.177.23.32) by DGGEML402-HUB.china.huawei.com (10.3.17.38) with Microsoft SMTP Server id 14.3.301.0; Sat, 1 Apr 2017 15:26:02 +0800 From: Ding Tianhong To: , , , , , , , , CC: Ding Tianhong Subject: [PATCH net-next 3/4] ixgbe: move IXGBE_ALLOW_RELAXED_ORDER from architecture to driver Date: Sat, 1 Apr 2017 15:25:53 +0800 Message-ID: <1491031554-19516-4-git-send-email-dingtianhong@huawei.com> X-Mailer: git-send-email 1.8.5.2.msysgit.0 In-Reply-To: <1491031554-19516-1-git-send-email-dingtianhong@huawei.com> References: <1491031554-19516-1-git-send-email-dingtianhong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.23.32] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090202.58DF5613.0058, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 09461abf4df4823227abdff89b843170 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The Relaxed Ordering is an specific PCI option and impact some architecture performance just like SPARC and ARM64, so compare to drop this to the several architecture folder, put it in driver looks more appropriate, it will not impact or be seen for other architectures. Signed-off-by: Ding Tianhong --- arch/Kconfig | 3 --- arch/sparc/Kconfig | 1 - drivers/net/ethernet/intel/Kconfig | 4 ++++ 3 files changed, 4 insertions(+), 4 deletions(-) -- 1.9.0 diff --git a/arch/Kconfig b/arch/Kconfig index bc0ab44..e03d354 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -844,7 +844,4 @@ config STRICT_MODULE_RWX and non-text memory will be made non-executable. This provides protection against certain security exploits (e.g. writing to text) -config IXGBE_ALLOW_RELAXED_ORDER - bool - source "kernel/gcov/Kconfig" diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index f56bcf4..cf4034c 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@ -44,7 +44,6 @@ config SPARC select CPU_NO_EFFICIENT_FFS select HAVE_ARCH_HARDENED_USERCOPY select PROVE_LOCKING_SMALL if PROVE_LOCKING - select IXGBE_ALLOW_RELAXED_ORDER config SPARC32 def_bool !64BIT diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig index 1349b45..33ef2b6 100644 --- a/drivers/net/ethernet/intel/Kconfig +++ b/drivers/net/ethernet/intel/Kconfig @@ -275,4 +275,8 @@ config FM10K To compile this driver as a module, choose M here. The module will be called fm10k. MSI-X interrupt support is required +config IXGBE_ALLOW_RELAXED_ORDER + bool "Intel(R) 10GbE PCI Express adapters Enable Relaxed Ordering" if SPARC + default y if SPARC + endif # NET_VENDOR_INTEL From patchwork Sat Apr 1 07:25:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ding Tianhong X-Patchwork-Id: 96537 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp1058147qgd; Sat, 1 Apr 2017 00:26:51 -0700 (PDT) X-Received: by 10.84.209.133 with SMTP id y5mr7713214plh.25.1491031610989; Sat, 01 Apr 2017 00:26:50 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 2si7403635plb.41.2017.04.01.00.26.50; Sat, 01 Apr 2017 00:26:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751034AbdDAH0s (ORCPT + 6 others); Sat, 1 Apr 2017 03:26:48 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:5293 "EHLO dggrg01-dlp.huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750787AbdDAH0q (ORCPT ); Sat, 1 Apr 2017 03:26:46 -0400 Received: from 172.30.72.53 (EHLO DGGEML402-HUB.china.huawei.com) ([172.30.72.53]) by dggrg01-dlp.huawei.com (MOS 4.4.6-GA FastPath queued) with ESMTP id ALV84946; Sat, 01 Apr 2017 15:26:12 +0800 (CST) Received: from localhost (10.177.23.32) by DGGEML402-HUB.china.huawei.com (10.3.17.38) with Microsoft SMTP Server id 14.3.301.0; Sat, 1 Apr 2017 15:26:02 +0800 From: Ding Tianhong To: , , , , , , , , CC: Ding Tianhong Subject: [PATCH net-next 4/4] ixgbe: enable IXGBE_ALLOW_RELAXED_ORDER for ARM64 Date: Sat, 1 Apr 2017 15:25:54 +0800 Message-ID: <1491031554-19516-5-git-send-email-dingtianhong@huawei.com> X-Mailer: git-send-email 1.8.5.2.msysgit.0 In-Reply-To: <1491031554-19516-1-git-send-email-dingtianhong@huawei.com> References: <1491031554-19516-1-git-send-email-dingtianhong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.23.32] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090205.58DF5614.0027, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 3c06e6e5719d20fa4225224f0b60ab3f Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The IXGBE_ALLOW_RELAXED_ORDER will enable Relaxed Ordering (RO) which allows transactions that do not have any order of completion requirements to complete more efficiently compare to the Stricted Ordering (SO) for ixgbe net card. Some architecture will see high write-to-memory performance when RO is enabled on the data transactions just like the SPARC did. The aarch64 could both support Relaxed Ordering (RO) and Stricted Ordering (SO), so enable this config could get much more better performance, didn't see any adverse effects. Signed-off-by: Ding Tianhong --- drivers/net/ethernet/intel/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.9.0 diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig index 33ef2b6..6743b7e 100644 --- a/drivers/net/ethernet/intel/Kconfig +++ b/drivers/net/ethernet/intel/Kconfig @@ -276,7 +276,7 @@ config FM10K will be called fm10k. MSI-X interrupt support is required config IXGBE_ALLOW_RELAXED_ORDER - bool "Intel(R) 10GbE PCI Express adapters Enable Relaxed Ordering" if SPARC - default y if SPARC + bool "Intel(R) 10GbE PCI Express adapters Enable Relaxed Ordering" if (SPARC || ARM64) + default y if (SPARC || ARM64) endif # NET_VENDOR_INTEL