From owner-freebsd-net@FreeBSD.ORG Mon Feb 11 21:06:24 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9A1AC480 for ; Mon, 11 Feb 2013 21:06:24 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-x231.google.com (we-in-x0231.1e100.net [IPv6:2a00:1450:400c:c03::231]) by mx1.freebsd.org (Postfix) with ESMTP id 3671EE14 for ; Mon, 11 Feb 2013 21:06:24 +0000 (UTC) Received: by mail-we0-f177.google.com with SMTP id d7so5242057wer.22 for ; Mon, 11 Feb 2013 13:06:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:date:x-google-sender-auth:message-id :subject:from:to:content-type; bh=0n8Y+HVOxMo7dbdji2DXBGeZY48LzzPqeoK2n8Fg2P0=; b=yyCFszHi5vTXNQPEaY2OPuD5pSAOdOT8G6H8LfONQYSwKwzX6eCDS2Roous+jT6Gjj V+LAXZixdlALd99tcB/6Ha7vC3fUjqGdOz1OIPPpgDkJFrbyraOLbIxvBbam0mF3PIrT jwqPOVn+StngRkaIFjI21Oi4JeHQr/2gT05a9Mo5wC9yXWZlLDv6Ei/L1y7E47oXjsiy MxK9Z0OvrfOHg00AOTJjfRYQNzx8cW1ICfuK5oMjKcPaHxTirp1jXTgKlyBcolVop5Os HSXz31SaXfnYx+TPDXq3FXlx92HmL+Xe8+2EFMzuK0DJgd2cT9cSqaksZTKv50vMsrCf O7uQ== MIME-Version: 1.0 X-Received: by 10.181.12.103 with SMTP id ep7mr18509931wid.12.1360616783200; Mon, 11 Feb 2013 13:06:23 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.236.88 with HTTP; Mon, 11 Feb 2013 13:06:23 -0800 (PST) Date: Mon, 11 Feb 2013 13:06:23 -0800 X-Google-Sender-Auth: 3_Uthi0A9k_MQb6Co06bhZS6NjM Message-ID: Subject: Who should be incrementing the ifp error counters? From: Adrian Chadd To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Feb 2013 21:06:24 -0000 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