From patchwork Wed Apr 15 12:30:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ding Tianhong X-Patchwork-Id: 6220051 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B03AD9F313 for ; Wed, 15 Apr 2015 12:35:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D733A2015E for ; Wed, 15 Apr 2015 12:35:11 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0CA702014A for ; Wed, 15 Apr 2015 12:35:10 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YiMUu-0007hq-3s; Wed, 15 Apr 2015 12:32:52 +0000 Received: from szxga02-in.huawei.com ([119.145.14.65]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YiMUP-0007V4-MX for linux-arm-kernel@lists.infradead.org; Wed, 15 Apr 2015 12:32:24 +0000 Received: from 172.24.2.119 (EHLO SZXEML429-HUB.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CJV15119; Wed, 15 Apr 2015 20:30:18 +0800 (CST) Received: from localhost (10.177.22.246) by SZXEML429-HUB.china.huawei.com (10.82.67.184) with Microsoft SMTP Server id 14.3.158.1; Wed, 15 Apr 2015 20:30:10 +0800 From: Ding Tianhong To: , , Subject: [PATCH net-next 1/6] net: hip04: Set more appropriate value for tx coalesce num Date: Wed, 15 Apr 2015 20:30:03 +0800 Message-ID: <1429101008-9464-2-git-send-email-dingtianhong@huawei.com> X-Mailer: git-send-email 1.8.5.2.msysgit.0 In-Reply-To: <1429101008-9464-1-git-send-email-dingtianhong@huawei.com> References: <1429101008-9464-1-git-send-email-dingtianhong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.22.246] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150415_053222_595766_46D04FCA X-CRM114-Status: UNSURE ( 7.54 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) Cc: devicetree@vger.kernel.org, linux@arm.linux.org.uk, sergei.shtylyov@cogentembedded.com, eric.dumazet@gmail.com, netdev@vger.kernel.org, joe@perches.com, zhangfei.gao@linaro.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP According Arnd's suggestion, the user might set the tx coalesce value in large range for different workloads, so we should define them to appropriate value. Signed-off-by: Ding Tianhong Cc: "David S. Miller" Cc: Eric Dumazet Cc: Arnd Bergmann Cc: Zhangfei Gao Cc: Dan Carpenter Cc: Joe Perches Acked-by: Arnd Bergmann --- drivers/net/ethernet/hisilicon/hip04_eth.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c index b72d238..b0a7f03 100644 --- a/drivers/net/ethernet/hisilicon/hip04_eth.c +++ b/drivers/net/ethernet/hisilicon/hip04_eth.c @@ -126,10 +126,10 @@ #define DRV_NAME "hip04-ether" #define DRV_VERSION "v1.0" -#define HIP04_MAX_TX_COALESCE_USECS 200 -#define HIP04_MIN_TX_COALESCE_USECS 100 -#define HIP04_MAX_TX_COALESCE_FRAMES 200 -#define HIP04_MIN_TX_COALESCE_FRAMES 100 +#define HIP04_MAX_TX_COALESCE_USECS 100000 +#define HIP04_MIN_TX_COALESCE_USECS 1 +#define HIP04_MAX_TX_COALESCE_FRAMES (TX_DESC_NUM - 1) +#define HIP04_MIN_TX_COALESCE_FRAMES 1 struct tx_desc { u32 send_addr;