buf_ring in HEAD is racy

Adrian Chadd adrian at freebsd.org
Sun Dec 15 20:46:04 UTC 2013


On 14 December 2013 22:40, Ryan Stone <rysto32 at gmail.com> wrote:
> On Sat, Dec 14, 2013 at 7:06 PM, Adrian Chadd <adrian at freebsd.org> wrote:
>> oh cool, you just did the output-drops thing I was about to code up.
>> We're missing those counters at work and the ops guys poked me about
>> it.
>>
>> I'll also give that a whirl locally and see about working with jack to
>> get it into -HEAD / MFC'ed to 10.
>>
>> Thanks!
>
> The reason why I call it hacky is because these drops are properly
> categorized as discards, not errors.  But there's not currently a
> really good way to distinguish between the two in FreeBSD right now
> (there is the drops counter in the if_snd queue but netstat seemed to
> be ignoring that even with -d specified and blindly overwriting it
> would seem to be incompatible with altq anyway)

Hm. A few drivers (eg cxgbe) update the ifsnd drops counter.

oh, holy crap! How'd I never notice that the drops column is empty?

How about I just go ahead and add that field to the ifnet statistics
and then teach netstat how to display them? What do you think?

Then we can "fix" the other drivers such as cxgbe (for reasons
surrounding "we use this at work" :) so they can properly use this?



-adrian


More information about the freebsd-net mailing list