Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1427245

[PATCH net-next 18/19] net: hns: change the default coalesce usecs

From Yisen Zhuang <Yisen.Zhuang@huawei.com>
Newsgroups linux.kernel
Subject [PATCH net-next 18/19] net: hns: change the default coalesce usecs
Date 2016-06-21 05:50 +0200
Message-ID <rMkRj-qs-15@gated-at.bofh.it> (permalink)
References <rMkHD-l2-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Daode Huang <huangdaode@hisilicon.com>

The default coalesce timeout is 3us, which is will cause CPU
usage is too high. This patch change it to 50us in order to reduce
CPU usage and the value makes sure network latency also meets requirement.

Signed-off-by: Daode Huang <huangdaode@hisilicon.com>
Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com>
---
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 2 +-
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
index 3ce2409..ef11077 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
@@ -540,7 +540,7 @@ int hns_rcb_set_coalesce_usecs(
 	}
 	if (timeout > HNS_RCB_MAX_COALESCED_USECS) {
 		dev_err(rcb_common->dsaf_dev->dev,
-			"error: not support coalesce %dus!\n", timeout);
+			"error: coalesce_usecs setting supports 0~1023us\n");
 		return -EINVAL;
 	}
 	hns_rcb_set_port_timeout(rcb_common, port_idx, timeout);
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h
index bd54dac..99b4e1b 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h
@@ -40,7 +40,7 @@ struct rcb_common_cb;
 #define HNS_RCB_DEF_COALESCED_FRAMES		50
 #define HNS_RCB_CLK_FREQ_MHZ			350
 #define HNS_RCB_MAX_COALESCED_USECS		0x3ff
-#define HNS_RCB_DEF_COALESCED_USECS		3
+#define HNS_RCB_DEF_COALESCED_USECS		50
 
 #define HNS_RCB_COMMON_ENDIAN			1
 
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH net-next 00/19] net: hns: fix some bugs in hns driver Yisen Zhuang <Yisen.Zhuang@huawei.com> - 2016-06-21 05:50 +0200
  [PATCH net-next 08/19] net: hns: fix ethtool loopback fail bug Yisen Zhuang <Yisen.Zhuang@huawei.com> - 2016-06-21 05:50 +0200
  [PATCH net-next 16/19] net: hns: fix bug that alloc skb fail lead to port unavailable Yisen Zhuang <Yisen.Zhuang@huawei.com> - 2016-06-21 05:50 +0200
    Re: [PATCH net-next 16/19] net: hns: fix bug that alloc skb fail lead  to port unavailable Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-06-21 15:30 +0200
      Re: [PATCH net-next 16/19] net: hns: fix bug that alloc skb fail lead  to port unavailable Yisen Zhuang <Yisen.zhuang@huawei.com> - 2016-06-22 03:50 +0200
  [PATCH net-next 05/19] net: hns: Remove unnecessary device resource free Yisen Zhuang <Yisen.Zhuang@huawei.com> - 2016-06-21 05:50 +0200
  [PATCH net-next 10/19] net: hns: bugfix about pfc pause frame statistics Yisen Zhuang <Yisen.Zhuang@huawei.com> - 2016-06-21 05:50 +0200
    Re: [PATCH net-next 10/19] net: hns: bugfix about pfc pause frame  statistics Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-06-21 12:50 +0200
      Re: [PATCH net-next 10/19] net: hns: bugfix about pfc pause frame  statistics Yisen Zhuang <Yisen.zhuang@huawei.com> - 2016-06-22 03:50 +0200
        Re: [PATCH net-next 10/19] net: hns: bugfix about pfc pause frame  statistics Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2016-06-22 11:50 +0200
          Re: [PATCH net-next 10/19] net: hns: bugfix about pfc pause frame  statistics Yisen Zhuang <Yisen.zhuang@huawei.com> - 2016-06-23 07:50 +0200
  [PATCH net-next 18/19] net: hns: change the default coalesce usecs Yisen Zhuang <Yisen.Zhuang@huawei.com> - 2016-06-21 05:50 +0200
  [PATCH net-next 04/19] net: hns: typo fix of annotation info for hns_nic_reset_subtask() Yisen Zhuang <Yisen.Zhuang@huawei.com> - 2016-06-21 05:50 +0200
  [PATCH net-next 12/19] net: hns: fix bug of getting the wrong tcam data Yisen Zhuang <Yisen.Zhuang@huawei.com> - 2016-06-21 05:50 +0200
  [PATCH net-next 15/19] net: hns: bug fix about led control logic when link down Yisen Zhuang <Yisen.Zhuang@huawei.com> - 2016-06-21 05:50 +0200
  [PATCH net-next 03/19] net: hns: add skb_reset_mac_header() after skb being alloc Yisen Zhuang <Yisen.Zhuang@huawei.com> - 2016-06-21 05:50 +0200
  [PATCH net-next 17/19] net: hns: fix sbm default parameters config error Yisen Zhuang <Yisen.Zhuang@huawei.com> - 2016-06-21 05:50 +0200
  [PATCH net-next 02/19] net: hns: fix hns dsaf v1 dont support tx_pause close Yisen Zhuang <Yisen.Zhuang@huawei.com> - 2016-06-21 05:50 +0200
  [PATCH net-next 14/19] net: hns: delete redundancy ring enable operations Yisen Zhuang <Yisen.Zhuang@huawei.com> - 2016-06-21 05:50 +0200
  Re: [PATCH net-next 00/19] net: hns: fix some bugs in hns driver David Miller <davem@davemloft.net> - 2016-06-21 11:00 +0200

csiph-web