aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/nfp/nfp_net.c
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2017-12-08 17:16:13 +0000
committerLuca Boccassi <luca.boccassi@gmail.com>2017-12-08 17:16:56 +0000
commit47d9763a1dd3103d732da9eec350cfc1cd784717 (patch)
treee44976be8d0ddfb4a054556d07b3b6036cf88e87 /drivers/net/nfp/nfp_net.c
parentfdd2322bb45e83d3fd96b06ea32a4afbb60bcb6f (diff)
New upstream version 16.11.4
Change-Id: I733e0292d2e060161d148b3e114065d00b36d2ba Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'drivers/net/nfp/nfp_net.c')
-rw-r--r--drivers/net/nfp/nfp_net.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 49c52930..74453204 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -857,6 +857,8 @@ nfp_net_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)
/* RTE_ETHDEV_QUEUE_STAT_CNTRS default value is 16 */
+ memset(&nfp_dev_stats, 0, sizeof(nfp_dev_stats));
+
/* reading per RX ring stats */
for (i = 0; i < dev->data->nb_rx_queues; i++) {
if (i == RTE_ETHDEV_QUEUE_STAT_CNTRS)
@@ -2120,7 +2122,8 @@ nfp_net_reta_update(struct rte_eth_dev *dev,
reta &= ~(0xFF << (8 * j));
reta |= reta_conf[idx].reta[shift + j] << (8 * j);
}
- nn_cfg_writel(hw, NFP_NET_CFG_RSS_ITBL + shift, reta);
+ nn_cfg_writel(hw, NFP_NET_CFG_RSS_ITBL + (idx * 64) + shift,
+ reta);
}
update = NFP_NET_CFG_UPDATE_RSS;
@@ -2167,7 +2170,8 @@ nfp_net_reta_query(struct rte_eth_dev *dev,
if (!mask)
continue;
- reta = nn_cfg_readl(hw, NFP_NET_CFG_RSS_ITBL + shift);
+ reta = nn_cfg_readl(hw, NFP_NET_CFG_RSS_ITBL + (idx * 64) +
+ shift);
for (j = 0; j < 4; j++) {
if (!(mask & (0x1 << j)))
continue;
@@ -2217,6 +2221,9 @@ nfp_net_rss_hash_update(struct rte_eth_dev *dev,
NFP_NET_CFG_RSS_IPV6_TCP |
NFP_NET_CFG_RSS_IPV6_UDP;
+ cfg_rss_ctrl |= NFP_NET_CFG_RSS_MASK;
+ cfg_rss_ctrl |= NFP_NET_CFG_RSS_TOEPLITZ;
+
/* configuring where to apply the RSS hash */
nn_cfg_writel(hw, NFP_NET_CFG_RSS_CTRL, cfg_rss_ctrl);