From owner-freebsd-net@FreeBSD.ORG Sun Dec 15 20:46:04 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5672790A for ; Sun, 15 Dec 2013 20:46:04 +0000 (UTC) Received: from mail-qc0-x233.google.com (mail-qc0-x233.google.com [IPv6:2607:f8b0:400d:c01::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 149E010BB for ; Sun, 15 Dec 2013 20:46:04 +0000 (UTC) Received: by mail-qc0-f179.google.com with SMTP id i8so3077921qcq.24 for ; Sun, 15 Dec 2013 12:46:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=JuxmNBUu0VsvDD3NVTV5sV7Cg1jICcjlaHRwezRCtCI=; b=0ohmZeYzgjol/Z3Bsba+/zQaa5c7n71JDVufKdHQu3/MqLryQOylsuSnDHtFW57tO/ 0EHehs2HVNT8P4k+kREomJAvFHWt+VNYkoLx87AG/XdumQZOBBOhPYf/LKMZuS601AZr IwqWGlQk7Jw4Nbo7CcQqFSO3nDYAzuAPR/ijh4OSgWhL5NXbw+gBhIgQETbNqUwjUZ9/ SWjLtx40KAsWcNrdeamDQFQnfhXbcTcjvW44NENDMjwFtL556UMmzyEAWWqPRKJ6thMF uC9eai6IWb19iv0J03kufjMR6uF5MiCWtl4HM9URZpKGxN4eVjVTBous3DAPGWEzQPff YKZg== MIME-Version: 1.0 X-Received: by 10.229.53.68 with SMTP id l4mr26088838qcg.21.1387140363257; Sun, 15 Dec 2013 12:46:03 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.53.200 with HTTP; Sun, 15 Dec 2013 12:46:03 -0800 (PST) In-Reply-To: References: Date: Sun, 15 Dec 2013 12:46:03 -0800 X-Google-Sender-Auth: 0_XD_XVBtSV5L4f5PInF2sQQANA Message-ID: Subject: Re: buf_ring in HEAD is racy From: Adrian Chadd To: Ryan Stone Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-net X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Dec 2013 20:46:04 -0000 On 14 December 2013 22:40, Ryan Stone wrote: > On Sat, Dec 14, 2013 at 7:06 PM, Adrian Chadd 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