Drop Tx path in pcap is Tx that just drops the packets, which is used
for the case only Rx from a pcap file is requested/matters.
The byte stats was calculated using first mbuf segment, which gives
wrong values for multi segmented mbufs, updated to use packet length
instead.
Bugzilla ID: 597
Fixes: a3f5252e5cbd ("net/pcap: enable infinitely Rx a pcap file")
Cc: stable@dpdk.org
Reported-by: Cian Ferriter <redacted>
Signed-off-by: Ferruh Yigit <redacted>
---
drivers/net/pcap/rte_eth_pcap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
-----Original Message-----
From: Yigit, Ferruh <redacted>
Sent: Wednesday 3 February 2021 17:30
To: Ferriter, Cian <redacted>
Cc: Yigit, Ferruh <redacted>; dev@dpdk.org; stable@dpdk.org
Subject: [PATCH] net/pcap: fix byte stats for drop Tx
Drop Tx path in pcap is Tx that just drops the packets, which is used
for the case only Rx from a pcap file is requested/matters.
The byte stats was calculated using first mbuf segment, which gives
wrong values for multi segmented mbufs, updated to use packet length
instead.
Bugzilla ID: 597
Fixes: a3f5252e5cbd ("net/pcap: enable infinitely Rx a pcap file")
Cc: stable@dpdk.org
Reported-by: Cian Ferriter <redacted>
Signed-off-by: Ferruh Yigit <redacted>
---
Acked-by: Cian Ferriter <redacted>
Tested this with 2 large PCAPs and it works as expected:
testpmd> show port stats all
######################## NIC statistics for port 0 ########################
RX-packets: 2 RX-missed: 0 RX-bytes: 131070
RX-errors: 0
RX-nombuf: 0
TX-packets: 2 TX-errors: 0 TX-bytes: 131070
Throughput (since last show)
Rx-pps: 0 Rx-bps: 0
Tx-pps: 0 Tx-bps: 0
############################################################################
Subject: [PATCH] net/pcap: fix byte stats for drop Tx
Drop Tx path in pcap is Tx that just drops the packets, which is used
for the case only Rx from a pcap file is requested/matters.
The byte stats was calculated using first mbuf segment, which gives
wrong values for multi segmented mbufs, updated to use packet length
instead.
Bugzilla ID: 597
Fixes: a3f5252e5cbd ("net/pcap: enable infinitely Rx a pcap file")
Cc: stable@dpdk.org
Reported-by: Cian Ferriter <redacted>
Signed-off-by: Ferruh Yigit <redacted>
---
Acked-by: Cian Ferriter <redacted>
Tested this with 2 large PCAPs and it works as expected:
testpmd> show port stats all
######################## NIC statistics for port 0
########################
RX-packets: 2 RX-missed: 0 RX-bytes: 131070
RX-errors: 0
RX-nombuf: 0
TX-packets: 2 TX-errors: 0 TX-bytes: 131070
Throughput (since last show)
Rx-pps: 0 Rx-bps: 0
Tx-pps: 0 Tx-bps: 0
##########################################################
##################
[Cian Ferriter]
Just to clarify, the Testpmd CMD used to get the stats I pasted above is:
dpdk-testpmd -l 1,2 -w 0:00.0 --vdev net_pcap0,rx_pcap=/root/udp_2_max_jumbo.pcap -- --no-flush-rx --i
This means that tx_drop was enabled because no tx_pcap file was passed to the PCAP PMD as an arg.
-----Original Message-----
From: Yigit, Ferruh <redacted>
Sent: Wednesday 3 February 2021 17:30
To: Ferriter, Cian <redacted>
Cc: Yigit, Ferruh <redacted>; dev@dpdk.org; stable@dpdk.org
Subject: [PATCH] net/pcap: fix byte stats for drop Tx
Drop Tx path in pcap is Tx that just drops the packets, which is used
for the case only Rx from a pcap file is requested/matters.
The byte stats was calculated using first mbuf segment, which gives
wrong values for multi segmented mbufs, updated to use packet length
instead.
Bugzilla ID: 597
Fixes: a3f5252e5cbd ("net/pcap: enable infinitely Rx a pcap file")
Cc: stable@dpdk.org
Reported-by: Cian Ferriter <redacted>
Signed-off-by: Ferruh Yigit <redacted>
---
Acked-by: Cian Ferriter <redacted>
Tested this with 2 large PCAPs and it works as expected: