[PATCH v2] net/idpf: add hw stats ierrors

Xing, Beilei beilei.xing at intel.com
Fri Feb 24 04:52:35 CET 2023



> -----Original Message-----
> From: Liu, Mingxia <mingxia.liu at intel.com>
> Sent: Friday, February 24, 2023 10:43 AM
> To: dev at dpdk.org
> Cc: Wu, Jingjing <jingjing.wu at intel.com>; Xing, Beilei <beilei.xing at intel.com>;
> Liu, Mingxia <mingxia.liu at intel.com>
> Subject: [PATCH v2] net/idpf: add hw stats ierrors
> 
> This patch adds hw stats ierrors, when receiving packets with bad csum, ierrors
> value will increase.
> 
> Signed-off-by: Mingxia Liu <mingxia.liu at intel.com>
> ---
>  drivers/net/idpf/idpf_ethdev.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c
> index 38cbbf369d..5b4f4fd82b 100644
> --- a/drivers/net/idpf/idpf_ethdev.c
> +++ b/drivers/net/idpf/idpf_ethdev.c
> @@ -291,6 +291,7 @@ idpf_dev_stats_get(struct rte_eth_dev *dev, struct
> rte_eth_stats *stats)
>  				pstats->rx_broadcast - pstats->rx_discards;
>  		stats->opackets = pstats->tx_broadcast + pstats->tx_multicast
> +
>  						pstats->tx_unicast;
> +		stats->ierrors = pstats->rx_errors;
>  		stats->imissed = pstats->rx_discards;
>  		stats->oerrors = pstats->tx_errors + pstats->tx_discards;
>  		stats->ibytes = pstats->rx_bytes;
> --
> 2.25.1

Acked-by: Beilei Xing <beilei.xing at intel.com>



More information about the dev mailing list