DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shaopeng He <shaopeng.he@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] fm10k: fix switch manager high CPU usage
Date: Thu, 28 Jan 2016 13:47:03 +0800	[thread overview]
Message-ID: <1453960023-31402-1-git-send-email-shaopeng.he@intel.com> (raw)

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 <shaopeng.he@intel.com>
---
 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

             reply	other threads:[~2016-01-28  5:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-28  5:47 Shaopeng He [this message]
2016-02-03  7:22 ` Chen, Jing D
2016-02-04  0:38   ` He, Shaopeng
2016-02-04 12:45 ` [dpdk-dev] [PATCH v2] " Shaopeng He
2016-02-05  2:46   ` [dpdk-dev] [PATCH v3] " Shaopeng He
2016-02-16  8:34     ` Chen, Jing D
2016-02-25 21:54       ` Bruce Richardson
2016-02-05  9:26   ` [dpdk-dev] [PATCH v2] " Chen, Jing D

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1453960023-31402-1-git-send-email-shaopeng.he@intel.com \
    --to=shaopeng.he@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).