net/cnxk: support queue infos query
Initial apis to get default queue information. Signed-off-by: Satha Rao <skoteshwar@marvell.com>
This commit is contained in:
parent
8075b057b6
commit
62dcd9343b
@ -1204,6 +1204,8 @@ struct eth_dev_ops cnxk_eth_dev_ops = {
|
|||||||
.xstats_reset = cnxk_nix_xstats_reset,
|
.xstats_reset = cnxk_nix_xstats_reset,
|
||||||
.xstats_get_by_id = cnxk_nix_xstats_get_by_id,
|
.xstats_get_by_id = cnxk_nix_xstats_get_by_id,
|
||||||
.xstats_get_names_by_id = cnxk_nix_xstats_get_names_by_id,
|
.xstats_get_names_by_id = cnxk_nix_xstats_get_names_by_id,
|
||||||
|
.rxq_info_get = cnxk_nix_rxq_info_get,
|
||||||
|
.txq_info_get = cnxk_nix_txq_info_get,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -305,6 +305,10 @@ int cnxk_nix_xstats_get_names_by_id(struct rte_eth_dev *eth_dev,
|
|||||||
int cnxk_nix_xstats_get_by_id(struct rte_eth_dev *eth_dev, const uint64_t *ids,
|
int cnxk_nix_xstats_get_by_id(struct rte_eth_dev *eth_dev, const uint64_t *ids,
|
||||||
uint64_t *values, unsigned int n);
|
uint64_t *values, unsigned int n);
|
||||||
int cnxk_nix_xstats_reset(struct rte_eth_dev *eth_dev);
|
int cnxk_nix_xstats_reset(struct rte_eth_dev *eth_dev);
|
||||||
|
void cnxk_nix_rxq_info_get(struct rte_eth_dev *eth_dev, uint16_t qid,
|
||||||
|
struct rte_eth_rxq_info *qinfo);
|
||||||
|
void cnxk_nix_txq_info_get(struct rte_eth_dev *eth_dev, uint16_t qid,
|
||||||
|
struct rte_eth_txq_info *qinfo);
|
||||||
|
|
||||||
/* Lookup configuration */
|
/* Lookup configuration */
|
||||||
const uint32_t *cnxk_nix_supported_ptypes_get(struct rte_eth_dev *eth_dev);
|
const uint32_t *cnxk_nix_supported_ptypes_get(struct rte_eth_dev *eth_dev);
|
||||||
|
@ -628,3 +628,33 @@ cnxk_nix_pool_ops_supported(struct rte_eth_dev *eth_dev, const char *pool)
|
|||||||
|
|
||||||
return -ENOTSUP;
|
return -ENOTSUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cnxk_nix_rxq_info_get(struct rte_eth_dev *eth_dev, uint16_t qid,
|
||||||
|
struct rte_eth_rxq_info *qinfo)
|
||||||
|
{
|
||||||
|
void *rxq = eth_dev->data->rx_queues[qid];
|
||||||
|
struct cnxk_eth_rxq_sp *rxq_sp = cnxk_eth_rxq_to_sp(rxq);
|
||||||
|
|
||||||
|
memset(qinfo, 0, sizeof(*qinfo));
|
||||||
|
|
||||||
|
qinfo->mp = rxq_sp->qconf.mp;
|
||||||
|
qinfo->scattered_rx = eth_dev->data->scattered_rx;
|
||||||
|
qinfo->nb_desc = rxq_sp->qconf.nb_desc;
|
||||||
|
|
||||||
|
memcpy(&qinfo->conf, &rxq_sp->qconf.conf.rx, sizeof(qinfo->conf));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cnxk_nix_txq_info_get(struct rte_eth_dev *eth_dev, uint16_t qid,
|
||||||
|
struct rte_eth_txq_info *qinfo)
|
||||||
|
{
|
||||||
|
void *txq = eth_dev->data->tx_queues[qid];
|
||||||
|
struct cnxk_eth_txq_sp *txq_sp = cnxk_eth_txq_to_sp(txq);
|
||||||
|
|
||||||
|
memset(qinfo, 0, sizeof(*qinfo));
|
||||||
|
|
||||||
|
qinfo->nb_desc = txq_sp->qconf.nb_desc;
|
||||||
|
|
||||||
|
memcpy(&qinfo->conf, &txq_sp->qconf.conf.tx, sizeof(qinfo->conf));
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user