git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
40f8402
)
net/dpaa2: configure per-class distribution size
author
Jun Yang
<jun.yang@nxp.com>
Tue, 7 Jul 2020 09:22:43 +0000
(14:52 +0530)
committer
Ferruh Yigit
<ferruh.yigit@intel.com>
Sat, 11 Jul 2020 04:18:52 +0000
(06:18 +0200)
TC distribution size is set with dist_queues or
nb_rx_queues % dist_queues in order of TC priority.
Signed-off-by: Jun Yang <jun.yang@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
drivers/net/dpaa2/base/dpaa2_hw_dpni.c
patch
|
blob
|
history
diff --git
a/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
b/drivers/net/dpaa2/base/dpaa2_hw_dpni.c
index
d69156b
..
25b1d2b
100644
(file)
--- a/
drivers/net/dpaa2/base/dpaa2_hw_dpni.c
+++ b/
drivers/net/dpaa2/base/dpaa2_hw_dpni.c
@@
-88,7
+88,21
@@
dpaa2_setup_flow_dist(struct rte_eth_dev *eth_dev,
struct dpni_rx_dist_cfg tc_cfg;
struct dpkg_profile_cfg kg_cfg;
void *p_params;
struct dpni_rx_dist_cfg tc_cfg;
struct dpkg_profile_cfg kg_cfg;
void *p_params;
- int ret;
+ int ret, tc_dist_queues;
+
+ /*TC distribution size is set with dist_queues or
+ * nb_rx_queues % dist_queues in order of TC priority index.
+ * Calculating dist size for this tc_index:-
+ */
+ tc_dist_queues = eth_dev->data->nb_rx_queues -
+ tc_index * priv->dist_queues;
+ if (tc_dist_queues <= 0) {
+ DPAA2_PMD_INFO("No distribution on TC%d", tc_index);
+ return 0;
+ }
+
+ if (tc_dist_queues > priv->dist_queues)
+ tc_dist_queues = priv->dist_queues;
p_params = rte_malloc(
NULL, DIST_PARAM_IOVA_SIZE, RTE_CACHE_LINE_SIZE);
p_params = rte_malloc(
NULL, DIST_PARAM_IOVA_SIZE, RTE_CACHE_LINE_SIZE);
@@
-109,7
+123,7
@@
dpaa2_setup_flow_dist(struct rte_eth_dev *eth_dev,
}
tc_cfg.key_cfg_iova = (uint64_t)(DPAA2_VADDR_TO_IOVA(p_params));
}
tc_cfg.key_cfg_iova = (uint64_t)(DPAA2_VADDR_TO_IOVA(p_params));
- tc_cfg.dist_size =
priv->
dist_queues;
+ tc_cfg.dist_size =
tc_
dist_queues;
tc_cfg.enable = true;
tc_cfg.tc = tc_index;
tc_cfg.enable = true;
tc_cfg.tc = tc_index;