[dpdk-dev] [PATCH v4 12/22] net/atlantic: device statistics, xstats
Ferruh Yigit
ferruh.yigit at intel.com
Wed Oct 10 12:27:46 CEST 2018
On 10/9/2018 10:31 AM, Igor Russkikh wrote:
> From: Pavel Belous <Pavel.Belous at aquantia.com>
>
> Signed-off-by: Igor Russkikh <igor.russkikh at aquantia.com>
> Signed-off-by: Pavel Belous <Pavel.Belous at aquantia.com>
<...>
> +static void
> +atl_dev_stats_reset(struct rte_eth_dev *dev)
> +{
> + struct aq_hw_s *hw = ATL_DEV_PRIVATE_TO_HW(dev->data->dev_private);
> +
> + hw->aq_fw_ops->update_stats(hw);
> +
> + /* Reset software totals */
> + memset(&hw->curr_stats, 0, sizeof(hw->curr_stats));
Where "adapter->sw_stats" reset?
<...>
> +static void
> +atl_dev_xstats_reset(struct rte_eth_dev *dev __rte_unused)
> +{
> +}
Shouldn't this reset the hw->curr_stats? Instead of implementing this fucntion
you can reuse atl_dev_stats_reset() as ".xstats_reset" since it seems there is
not specific need for xstats_reset
> +
> +static int
> +atl_dev_queue_stats_mapping_set(struct rte_eth_dev *eth_dev __rte_unused,
> + uint16_t queue_id __rte_unused,
> + uint8_t stat_idx __rte_unused,
> + uint8_t is_rx __rte_unused)
> +{
> + /* The mapping is hardcoded: queue 0 -> stat 0, etc */
> + return 0;
> +}
No need to add this function if there is no specific mapping requirement.
More information about the dev
mailing list