David Marchand, Feb 06, 2023 at 09:58:
I have been playing a bit with this series with two lcores, each one
polling a net/null port.
At first it looked good, but then I started to have one idle lcore, by
asking net/null not to receive anything.
$ build-clang/app/dpdk-testpmd -c 7 --no-huge -m 40 -a 0:0.0 --vdev
net_null1,no-rx=1 --vdev net_null2 -- --no-mlockall
--total-num-mbufs=2048 -ia --record-core-cycles --nb-cores=2
One thing that struck me is that an idle lcore was always showing less
"total_cycles" than a busy one.
The more time testpmd was running, the bigger the divergence between
lcores would be.
Re-reading the API, it is unclear to me (which is the reason for my
comments on patch 2).
Let's first sort out my patch 2 comments and we may revisit this patch
4 implementation afterwards (as I think we are not accounting some
mainloop cycles with current implementation).
Indeed, we are not accounting for all cycles. Only the cycles spent in
the packet_fwd_t functions. This was already the case before my series
I only added the busy cycles accounting.
However, I agree that this should be updated to take all cycles into
account (as much as it is possible with the current code base). Maybe
this could be done as a separate patch or do you want to include it in
this series?
A fwd_lcore object is bound to a single lcore, so this lcore_id is
unneeded.
[snip]
You can find which fwd_lcore is mapped to a lcore using existing
structures. This requires updating some helper, something like:
I had missed that. Indeed, no need for a new field. I'll address that in
v9.