Skip to content

Commit

Permalink
net: hns: change the default coalesce usecs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daode Huang authored and David S. Miller committed Jun 21, 2016
1 parent 8ae7b8a commit f28f34c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f28f34c

Please sign in to comment.