net: hns: change the default coalesce usecs
authorDaode Huang <huangdaode@hisilicon.com>
Tue, 21 Jun 2016 03:56:38 +0000 (11:56 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jun 2016 08:51:56 +0000 (04:51 -0400)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h

index 3ce24097fcf44a5e0abe716005390d022dd79ae9..ef1107777c08d58117110cf2c5da08c2dcec3e23 100644 (file)
@@ -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);
index bd54dac82ee0dcaea38750a13e61cdb855006346..99b4e1ba0a9411a9889cbf8343605a8e79616bb6 100644 (file)
@@ -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