[dpdk-dev] [PATCH 3/3] pcap: add byte and error counters into statistics
Mcnamara, John
john.mcnamara at intel.com
Tue Apr 28 16:00:38 CEST 2015
> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Tero Aho
> Sent: Friday, February 27, 2015 1:43 PM
> To: dev at dpdk.org
> Subject: [dpdk-dev] [PATCH 3/3] pcap: add byte and error counters into
> statistics
>
> Added input/ouput byte counters into pcap interface statistics, also calls
> pcap_stats to add dropped packets into input errors.
>
> Signed-off-by: Tero Aho <tero.aho at coriant.com>
> ---
> lib/librte_pmd_pcap/rte_eth_pcap.c | 37 +++++++++++++++++++++++++++++----
> ----
> 1 file changed, 29 insertions(+), 8 deletions(-)
>
> diff --git a/lib/librte_pmd_pcap/rte_eth_pcap.c
> b/lib/librte_pmd_pcap/rte_eth_pcap.c
> index 3f23f0a..1c472ac 100644
> --- a/lib/librte_pmd_pcap/rte_eth_pcap.c
> +++ b/lib/librte_pmd_pcap/rte_eth_pcap.c
> @@ -71,6 +71,7 @@ struct pcap_rx_queue {
> uint8_t in_port;
> struct rte_mempool *mb_pool;
> volatile unsigned long rx_pkts;
> + volatile unsigned long rx_octs;
Hi Tero,
The equivalent rx/tx_octs members in rte_eth_stats are called ibytes/obytes so these variables should be called rx_bytes/tx_bytes for consistency.
Also, not really your issue, but do these members actually need to be volatile for pcap?
Otherwise looks okay.
John.
--
More information about the dev
mailing list