From owner-freebsd-net@FreeBSD.ORG Tue Dec 25 01:45:48 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A69C3B28 for ; Tue, 25 Dec 2012 01:45:48 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x22a.google.com (mail-wg0-x22a.google.com [IPv6:2a00:1450:400c:c00::22a]) by mx1.freebsd.org (Postfix) with ESMTP id 30C8F8FC13 for ; Tue, 25 Dec 2012 01:45:48 +0000 (UTC) Received: by mail-wg0-f42.google.com with SMTP id dr1so2817439wgb.5 for ; Mon, 24 Dec 2012 17:45:47 -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 :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=c0gQNfcvowWqRpP6C2S2gVDFBeMCsw3xC9Sm0LSF8Pw=; b=MJIqPIs6JgyNAFtjMjvJlYsmP0EekFl1IuX2s60z/4Jig6jWI6Z/KaEhKEzFyotA3W 021Zt3nXBlc9IEoAki53l7Dqgxw8GZ/OCAvjFervSCZULUzFt86KNcOlUMp5LjRwNi41 CuWqKBoTqRm9Pjz6Z3x6XDtZB+SN22QFBwkSnJ5dAYH9VM+SIU1Uo1kQYbq0+N8o1Dl7 cpiNcDWQjCQ2h3EHPdaKohNAhgTcJGNTxehRXZRaZp8aqhGrXHur2OYVkeJLFWBvSoZs CMU0tDuUUMruP5S01pZeD53K8Z76Eams68B7CCPcUzMkalsr5bp4B54vK1wDXZQY+WJZ LYhA== MIME-Version: 1.0 Received: by 10.194.179.34 with SMTP id dd2mr38012352wjc.1.1356399947398; Mon, 24 Dec 2012 17:45:47 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.217.57.9 with HTTP; Mon, 24 Dec 2012 17:45:47 -0800 (PST) In-Reply-To: References: <50D45282.5080708@extrim.it> <50D7F61A.5020304@extrim.it> Date: Mon, 24 Dec 2012 17:45:47 -0800 X-Google-Sender-Auth: TRvrga4QS-Th86fcKiHmXewh9fg Message-ID: Subject: Re: 'no buffer space available' after switch goes down on freeBSD 7.3 From: Adrian Chadd To: Ryan Stone Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-net , Tsaregorodtsev Denis 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: Tue, 25 Dec 2012 01:45:48 -0000 On 24 December 2012 17:01, Ryan Stone wrote: > I don't believe that this is fixed in later versions of the driver. The > problem is that when the interface loses link the transmit queue can fill > up. Once that happens the driver never gets any more calls from the network > stack to make it send packets. Pinging the interface fixes it because the > driver processes rx.and tx from the same context, so when it receives a > packet it starts transmitting again. > > The patch that I sent fixes the problem by forcing the driver to process > the tx queue when ever links goes from down to up. This is a cute fix, and I've noticed similar issues in net80211. In net80211, the stack currently calls if_start() to re-attempt frame transmission during a VAP state transition to RUN. This has similar issues (ie, it assumes that if_start() DTRT; it assumes OACTIVE has been cleared, etc.) I think we may need another if_* method which specifically attempts to service the TX queue again; versus just waiting for if_transmit() to make some progress. Adrian