Who should be incrementing the ifp error counters?

Adrian Chadd adrian at freebsd.org
Mon Feb 11 21:06:24 UTC 2013


Hi all,

During my efforts to convert ath(4) and net80211(4) to if_transmit
based queues, I've noticed that the error counters aren't being
incremented correctly.

In the ifq past, the _ENQUEUE macro(s) did this, with a call to
IFQ_DROP() if the frame is being dropped.

This was done behind the ifq lock so the counters were correctly updated.

In the if_transmit() world, this isn't as clear. I know that ath(4)
and net82011(4) just aren't updating the if drop counter, so it's not
obvious when things are being dropped.

so - what's the story with this? Where should the counters be updated?
And what kinds of concurrency handling do people think is "right" here
for updating said counters?

Thanks,



Adrian


More information about the freebsd-net mailing list