Message ID | 1454640371-21600-1-git-send-email-shaopeng.he@intel.com (mailing list archive) |
---|---|
State | Accepted, archived |
Delegated to: | Bruce Richardson |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id B954C9612; Fri, 5 Feb 2016 03:46:21 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id BA31393FE for <dev@dpdk.org>; Fri, 5 Feb 2016 03:46:19 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP; 04 Feb 2016 18:46:19 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,398,1449561600"; d="scan'208";a="877436401" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 04 Feb 2016 18:46:18 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id u152kGOi030719; Fri, 5 Feb 2016 10:46:16 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u152kDeP021637; Fri, 5 Feb 2016 10:46:15 +0800 Received: (from heshaope@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u152kDa4021633; Fri, 5 Feb 2016 10:46:13 +0800 From: Shaopeng He <shaopeng.he@intel.com> To: dev@dpdk.org Date: Fri, 5 Feb 2016 10:46:11 +0800 Message-Id: <1454640371-21600-1-git-send-email-shaopeng.he@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1454589920-801-1-git-send-email-shaopeng.he@intel.com> References: <1454589920-801-1-git-send-email-shaopeng.he@intel.com> Subject: [dpdk-dev] [PATCH v3] fm10k: fix switch manager high CPU usage X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
He, Shaopeng
Feb. 5, 2016, 2:46 a.m. UTC
fm10k switch core uses source MAC + VID + SGLORT to do
look up in MAC table. If no match, an exception interrupt
will be sent to the switch manager. Too much of this kind
of exception interrupts cause switch manager side high CPU
usage.
To reproduce this issue, one DPDK testpmd runs on a server
with one fm10k NIC, mac forwards test traffic from one of
fm10k ports to another port. The CPU usage for the switch
manager will go up to about 20% for test traffic rate at
10G bps, comparing to near 0% for no test traffic.
This patch fixes this issue. A default SGLORT is assigned
to each TX queue. This default value works for non-VMDq mode
and current VMDq example. For advanced VMDq usage, e.g.
different source MAC address for different TX queue, FTAG
forwarding function could be used to change this default
SGLORT value.
Fixes: 9ae6068c ("fm10k: add dev start/stop")
Signed-off-by: Shaopeng He <shaopeng.he@intel.com>
---
v3: - add fixes line
v2: - reword the commit log message
---
drivers/net/fm10k/fm10k_ethdev.c | 3 +++
1 file changed, 3 insertions(+)
Comments
Hi, Best Regards, Mark > -----Original Message----- > From: He, Shaopeng > Sent: Friday, February 05, 2016 10:46 AM > To: dev@dpdk.org > Cc: Chen, Jing D; Wang, Xiao W; He, Shaopeng > Subject: [PATCH v3] fm10k: fix switch manager high CPU usage > > fm10k switch core uses source MAC + VID + SGLORT to do > look up in MAC table. If no match, an exception interrupt > will be sent to the switch manager. Too much of this kind > of exception interrupts cause switch manager side high CPU > usage. > To reproduce this issue, one DPDK testpmd runs on a server > with one fm10k NIC, mac forwards test traffic from one of > fm10k ports to another port. The CPU usage for the switch > manager will go up to about 20% for test traffic rate at > 10G bps, comparing to near 0% for no test traffic. > This patch fixes this issue. A default SGLORT is assigned > to each TX queue. This default value works for non-VMDq mode > and current VMDq example. For advanced VMDq usage, e.g. > different source MAC address for different TX queue, FTAG > forwarding function could be used to change this default > SGLORT value. > > Fixes: 9ae6068c ("fm10k: add dev start/stop") > > Signed-off-by: Shaopeng He <shaopeng.he@intel.com> Acked-by : Jing Chen <jing.d.chen@intel.com>
On Tue, Feb 16, 2016 at 08:34:21AM +0000, Chen, Jing D wrote: > Hi, > > Best Regards, > Mark > > > > -----Original Message----- > > From: He, Shaopeng > > Sent: Friday, February 05, 2016 10:46 AM > > To: dev@dpdk.org > > Cc: Chen, Jing D; Wang, Xiao W; He, Shaopeng > > Subject: [PATCH v3] fm10k: fix switch manager high CPU usage > > > > fm10k switch core uses source MAC + VID + SGLORT to do > > look up in MAC table. If no match, an exception interrupt > > will be sent to the switch manager. Too much of this kind > > of exception interrupts cause switch manager side high CPU > > usage. > > To reproduce this issue, one DPDK testpmd runs on a server > > with one fm10k NIC, mac forwards test traffic from one of > > fm10k ports to another port. The CPU usage for the switch > > manager will go up to about 20% for test traffic rate at > > 10G bps, comparing to near 0% for no test traffic. > > This patch fixes this issue. A default SGLORT is assigned > > to each TX queue. This default value works for non-VMDq mode > > and current VMDq example. For advanced VMDq usage, e.g. > > different source MAC address for different TX queue, FTAG > > forwarding function could be used to change this default > > SGLORT value. > > > > Fixes: 9ae6068c ("fm10k: add dev start/stop") > > > > Signed-off-by: Shaopeng He <shaopeng.he@intel.com> > Acked-by : Jing Chen <jing.d.chen@intel.com> Applied to dpdk-next-net/rel_16_04 Thanks, /Bruce
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index e4aed94..f6eb05d 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -675,6 +675,9 @@ fm10k_dev_tx_init(struct rte_eth_dev *dev) FM10K_WRITE_REG(hw, FM10K_TDBAH(i), base_addr >> (CHAR_BIT * sizeof(uint32_t))); FM10K_WRITE_REG(hw, FM10K_TDLEN(i), size); + + /* assign default SGLORT for each TX queue */ + FM10K_WRITE_REG(hw, FM10K_TX_SGLORT(i), hw->mac.dglort_map); } /* set up vector or scalar TX function as appropriate */