From patchwork Thu Aug 9 08:02:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 143818 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1786140ljj; Thu, 9 Aug 2018 01:02:43 -0700 (PDT) X-Google-Smtp-Source: AA+uWPywji3aMmlTz56rVfG5votv3PBE/qCbY/ZTpBkLFuOuaSpClxSNriSe9fnKRfIIwyUkRN+Q X-Received: by 2002:a62:67c2:: with SMTP id t63-v6mr1247154pfj.204.1533801763299; Thu, 09 Aug 2018 01:02:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533801763; cv=none; d=google.com; s=arc-20160816; b=B8Xmwn9P36eAe9llevzYauXlEtSIhqFqBv49nHGX/PPtQENji9K1OGvsAsoKEffe/u xYCnHLMD3sVn/BKUfrlB0xgmBQ3PHmTlAO8Ff+QKjsNBPdCpaAGNdMoALd48KbZwQ8l5 7QQdA77QlaURFzaDC9/94tC6ruLOGvttUm6qYB8X4CSsEmZZVw3IJDfXQGKBwGbZeF4n WHq6AN4xXajB7f6PymFCpTaCW90T7+CXv9ZJxwVwNNGiPnO6WrlgTNu/TZ5Qijn44CT9 PDnRdzqdYHqXGb5Atz0lIWEzZOhZdiqwNbCM4kBXn2W8gcaMZrRJKfC7QiXXdsnnooS2 GyZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=c7GOW8Pf0xyqoRCogNqf/1gToPxOKjhwr//APGgf3KE=; b=qWG/Hm0SIidrTB0Q3qtrWbZ4+5YfUv5NMv7O8DcHUqMRDIVCc0baIG+TK+zFTdmG3E thiiPr+BFRLKVxIssEOCEVOY+lOEpXsQ2mvkvKZ79mQz8BTFcHemscm3XfDCcHLvjfuZ oYMCV5OXs5ssqUq0KBi7hlo7JJsqjF7dEeGxdTVOpgtnqiBVM4stSA4CP89i4U3ZCdqC c2aNVYmtys6Om1knmqy7MKhAqOfJXgGcu6CkB/d06OpiFUWhHcw0Z1ZYWd2/rL3oR/Gg dQwTjTbwCMx5aWkLiN+/+0tBWxzhR6NR74ByhzZak8noca1ro3ak0jmQLwLITc1gX+UM pN0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dAqo6Dgg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y23-v6si5333350pll.224.2018.08.09.01.02.43; Thu, 09 Aug 2018 01:02:43 -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; dkim=pass header.i=@linaro.org header.s=google header.b=dAqo6Dgg; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728156AbeHIK0N (ORCPT + 10 others); Thu, 9 Aug 2018 06:26:13 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35986 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727786AbeHIK0N (ORCPT ); Thu, 9 Aug 2018 06:26:13 -0400 Received: by mail-wm0-f67.google.com with SMTP id w24-v6so5435944wmc.1 for ; Thu, 09 Aug 2018 01:02:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=c7GOW8Pf0xyqoRCogNqf/1gToPxOKjhwr//APGgf3KE=; b=dAqo6DggLmLwP1HQJRQ1ZjzKvfUAH5WHN8ezOgf9wPKJUBMBO+UG/gRlRRcCoXG2lu U14Lcf+omj59YbIoEOFRFD49pKSHEHjlniehafm+rbsen9bID9L5qQFYRSNq7Pr3FrOB XWS2AjXZFJlqbyBcJNLqxOHyfWrHMLKDOdqEg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=c7GOW8Pf0xyqoRCogNqf/1gToPxOKjhwr//APGgf3KE=; b=I8VOeHD2hpCffADjYC/ylWcHGn1rhd1D0g186mIBA8SMlJqjy1BegeRSBZMAcCfLu6 bWtNPQt7p0yLQqKiRiaCpNUavCn63RaW6Qx1ycY3R5oddsXzB1VBcX8aJF/IxBk0o9NA wB2OnlM2mH/sWxjxzE6sGMZmLlmu+51EAZDOw0oQF4W8VVEj9tlAOc8YiATER+1EUewl yj1UnQYyLSOFT+O4vhKe/ZiqnHV657GVDZpqPdKN6NBPglEfSmeVDH8bxJvdWsyzXv4f WXe57Nm4QwcXZn3E+mhuHTyMB6TMFu7dV7tmBS4j2sh6IfjlVxGjYLl4kMiJIB6oTRPN M0Eg== X-Gm-Message-State: AOUpUlHxPFTvZPwZTiuussUFD2JooSObeHkrPnKQbo974ho1lD9d9oZ0 1qwTseTNnyw8YiswRG0/nOyD1FMoug4= X-Received: by 2002:a1c:4b0c:: with SMTP id y12-v6mr819824wma.22.1533801753355; Thu, 09 Aug 2018 01:02:33 -0700 (PDT) Received: from localhost.localdomain ([2a02:587:4605:8300:2e56:dcff:fe9a:8f06]) by smtp.gmail.com with ESMTPSA id r140-v6sm16753589wmd.7.2018.08.09.01.02.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Aug 2018 01:02:32 -0700 (PDT) From: Ilias Apalodimas To: netdev@vger.kernel.org, jaswinder.singh@linaro.org Cc: arnd@arndb.de, Ilias Apalodimas Subject: [net-next, PATCH 2/2] net: socionext: Increase descriptors to 256 Date: Thu, 9 Aug 2018 11:02:19 +0300 Message-Id: <1533801739-15312-2-git-send-email-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533801739-15312-1-git-send-email-ilias.apalodimas@linaro.org> References: <1533801739-15312-1-git-send-email-ilias.apalodimas@linaro.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Increasing descriptors to 256 from 128 and adjusting the NAPI weight to 64 increases performace on Rx by ~20% on 64byte packets Signed-off-by: Ilias Apalodimas --- drivers/net/ethernet/socionext/netsec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c index ae32909..5d2007b 100644 --- a/drivers/net/ethernet/socionext/netsec.c +++ b/drivers/net/ethernet/socionext/netsec.c @@ -232,8 +232,7 @@ #define NETSEC_EEPROM_PKT_ME_ADDRESS 0x20 #define NETSEC_EEPROM_PKT_ME_SIZE 0x24 -#define DESC_NUM 128 -#define NAPI_BUDGET (DESC_NUM / 2) +#define DESC_NUM 256 #define DESC_SZ sizeof(struct netsec_de) @@ -1655,7 +1654,7 @@ static int netsec_probe(struct platform_device *pdev) dev_info(&pdev->dev, "hardware revision %d.%d\n", hw_ver >> 16, hw_ver & 0xffff); - netif_napi_add(ndev, &priv->napi, netsec_napi_poll, NAPI_BUDGET); + netif_napi_add(ndev, &priv->napi, netsec_napi_poll, NAPI_POLL_WEIGHT); ndev->netdev_ops = &netsec_netdev_ops; ndev->ethtool_ops = &netsec_ethtool_ops;