net/dpaa: support basic stats

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
This commit is contained in:
Shreyansh Jain 2017-09-28 17:59:52 +05:30 committed by Ferruh Yigit
parent fe6c603211
commit e1ad3a059f
2 changed files with 21 additions and 0 deletions

View File

@ -11,5 +11,6 @@ MTU update = Y
Promiscuous mode = Y
Allmulticast mode = Y
Unicast MAC filter = Y
Basic stats = Y
ARMv8 = Y
Usage doc = Y

View File

@ -183,6 +183,24 @@ static int dpaa_eth_link_update(struct rte_eth_dev *dev,
return 0;
}
static void dpaa_eth_stats_get(struct rte_eth_dev *dev,
struct rte_eth_stats *stats)
{
struct dpaa_if *dpaa_intf = dev->data->dev_private;
PMD_INIT_FUNC_TRACE();
fman_if_stats_get(dpaa_intf->fif, stats);
}
static void dpaa_eth_stats_reset(struct rte_eth_dev *dev)
{
struct dpaa_if *dpaa_intf = dev->data->dev_private;
PMD_INIT_FUNC_TRACE();
fman_if_stats_reset(dpaa_intf->fif);
}
static void dpaa_eth_promiscuous_enable(struct rte_eth_dev *dev)
{
@ -367,6 +385,8 @@ static struct eth_dev_ops dpaa_devops = {
.tx_queue_release = dpaa_eth_tx_queue_release,
.link_update = dpaa_eth_link_update,
.stats_get = dpaa_eth_stats_get,
.stats_reset = dpaa_eth_stats_reset,
.promiscuous_enable = dpaa_eth_promiscuous_enable,
.promiscuous_disable = dpaa_eth_promiscuous_disable,
.allmulticast_enable = dpaa_eth_multicast_enable,