From: Xiao Wang Date: Wed, 19 Oct 2016 01:30:14 +0000 (+0800) Subject: net/fm10k: fix VF Tx queue initialization X-Git-Tag: spdx-start~5467 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2c448da6aa1028fd75d631d3aa3c265483042aaa;p=dpdk.git net/fm10k: fix VF Tx queue initialization The SGLORT (Source Global Resource Tag) of the VF queues should be assigned by PF driver, VF driver should not set these registers. Fixes: 3b845bf6bcd9 ("fm10k: fix switch manager high CPU usage") Reported-by: Sarath Somasekharan Signed-off-by: Xiao Wang --- diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index c804436964..923690c0fa 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -695,8 +695,9 @@ fm10k_dev_tx_init(struct rte_eth_dev *dev) 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); + /* assign default SGLORT for each TX queue by PF */ + if (hw->mac.type == fm10k_mac_pf) + FM10K_WRITE_REG(hw, FM10K_TX_SGLORT(i), hw->mac.dglort_map); } /* set up vector or scalar TX function as appropriate */