From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 1040C9A92 for ; Thu, 28 Jan 2016 06:47:14 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP; 27 Jan 2016 21:47:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,357,1449561600"; d="scan'208";a="37515552" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga004.fm.intel.com with ESMTP; 27 Jan 2016 21:47:13 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id u0S5lBv9031690; Thu, 28 Jan 2016 13:47:11 +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 u0S5l7Il031436; Thu, 28 Jan 2016 13:47:09 +0800 Received: (from heshaope@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u0S5l7LO031432; Thu, 28 Jan 2016 13:47:07 +0800 From: Shaopeng He To: dev@dpdk.org Date: Thu, 28 Jan 2016 13:47:03 +0800 Message-Id: <1453960023-31402-1-git-send-email-shaopeng.he@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2016 05:47:15 -0000 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, and cause high CPU usage. 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. Signed-off-by: Shaopeng He --- drivers/net/fm10k/fm10k_ethdev.c | 3 +++ 1 file changed, 3 insertions(+) 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 */ -- 1.9.3