-/**
- * Query RETA table.
- *
- * @param priv
- * Pointer to private structure.
- * @param[in, out] reta_conf
- * Pointer to the first RETA configuration structure.
- * @param reta_size
- * Number of entries.
- *
- * @return
- * 0 on success, errno value on failure.
- */
-static int
-priv_dev_rss_reta_query(struct priv *priv,
- struct rte_eth_rss_reta_entry64 *reta_conf,
- unsigned int reta_size)
-{
- unsigned int idx;
- unsigned int i;
-
- if (!reta_size || reta_size > priv->reta_idx_n)
- return EINVAL;
- /* Fill each entry of the table even if its bit is not set. */
- for (idx = 0, i = 0; (i != reta_size); ++i) {
- idx = i / RTE_RETA_GROUP_SIZE;
- reta_conf[idx].reta[i % RTE_RETA_GROUP_SIZE] =
- (*priv->reta_idx)[i];
- }
- return 0;
-}
-
-/**
- * Update RETA table.
- *
- * @param priv
- * Pointer to private structure.
- * @param[in] reta_conf
- * Pointer to the first RETA configuration structure.
- * @param reta_size
- * Number of entries.
- *
- * @return
- * 0 on success, errno value on failure.
- */
-static int
-priv_dev_rss_reta_update(struct priv *priv,
- struct rte_eth_rss_reta_entry64 *reta_conf,
- unsigned int reta_size)
-{
- unsigned int idx;
- unsigned int i;
- unsigned int pos;
- int ret;
-
- if (!reta_size)
- return EINVAL;
- ret = priv_rss_reta_index_resize(priv, reta_size);
- if (ret)
- return ret;
-
- for (idx = 0, i = 0; (i != reta_size); ++i) {
- idx = i / RTE_RETA_GROUP_SIZE;
- pos = i % RTE_RETA_GROUP_SIZE;
- if (((reta_conf[idx].mask >> i) & 0x1) == 0)
- continue;
- assert(reta_conf[idx].reta[pos] < priv->rxqs_n);
- (*priv->reta_idx)[i] = reta_conf[idx].reta[pos];
- }
- return 0;
-}
-