Hi Yiping Wang,
I had previously edited my post May13 10:32pm. I initially
misinterpreted the counts. In fact, fm0-port-rx4 has the same count as
the pktgen traffic generator. It's just that the frames are not being
returned/counted by rte_eth_rx_burst()
i.e. for pktgen tx -> wire -> Rx MAC -> FMAN Rx -> Frame Queue -> cpu
(rte_eth_rx_burst())
pktgen tx == fm0-port-rx4 != cpu (rte_eth_rx_burst())
So I presume I don't need to look at the mac counter? Addressing your
suggestions in your post:
my port 0 is fm1-mac5 0xe8000, which has its base address in
qoriq-fman3-0-1g-4.dtsi
I have attached this file as in my build, unchanged from LSDK2004. The
address matches your post, but there is no
phandle = <0x2e>;
entry in the structure.
I have attached some files with captured counts from another test run.
I think
cat
/sys/devices/platform/soc/soc:fsl,dpaa/soc:fsl,dpaa:ethernet@0/net/fm1-mac1/mac_rx_stats
is giving me stats for the port used by linux.
I couldn't find stats for my userspace receiver port. There is no "net"
directory under
/sys/devices/platform/soc/soc:fsl,dpaa/soc:fsl,dpaa:ethernet@4
But perhaps there is enough info in the attached files:
pre-run_DPAA_count_may15.txt the various counters you suggested,
before the test run
pktgen_summary_may15.txt captured output from pktgen after the run
hyprfire_may15.txt printed stats from my app.
Line 4 is the interesting one.
post-run_DPAA_count_may15.txt the various counters you suggested,
after the test run
( Note: 1,000,000 = 0xf4240, 911,886 = 0xdea0e)
In summary:
pktgen sends 1,000,000 frames
fm0-port-rx4 counter: 1000000
port_rx_out_of_buffers_discard: 0
from fm_port_qmi_regs:
0xFFFFC38C2AD4D420: 0x000dea0e fmqm_pnetfc
(0xdea0e = 911,886)
my app (hyprfire) receives 911,886 frames from rte_eth_rx_burst()
the fmqm_pnetfc is interesting.
Cheers,
Mark