From owner-freebsd-net@FreeBSD.ORG Tue Dec 25 03:08:20 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 DA29225B for ; Tue, 25 Dec 2012 03:08:20 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by mx1.freebsd.org (Postfix) with ESMTP id 65AD28FC15 for ; Tue, 25 Dec 2012 03:08:19 +0000 (UTC) Received: by mail-wg0-f47.google.com with SMTP id dq11so3499901wgb.14 for ; Mon, 24 Dec 2012 19:08:13 -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=uhj/z6bGAHpjHuVIXXItGIoP6VJB1xcHOop++sivFSs=; b=w9u686aVkA3GxKa4PSWdG+YLeYxpd2SK7IyICOGmv5zet73VdxrVVc611beMizRaGa ScfSVue0ffcn08Xi2di2IsEN7U6umha9ut5oEINzaELNUzfZpKapqooWnhIS8KSUoF6y LDUkWWM5DwpKH1szigmRbeZTH+ihZyt4l2JcEj5x4IMd4Xg4ntZ+3tMycACu9nwmJsXG pBit6OShAqo7POwKNZciydAaCmSYwys7rERMvx6PFHWXl+mL6nzklbTHt5aNfaNnIp3q tmHZ404adEyzrfYXkbFhr4bI9DPXzFjcdycmLRx6GicBVDkycRmLUgfPjXeitVyLE0D8 Pa/g== MIME-Version: 1.0 Received: by 10.180.100.197 with SMTP id fa5mr29356302wib.32.1356404892998; Mon, 24 Dec 2012 19:08:12 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.217.57.9 with HTTP; Mon, 24 Dec 2012 19:08:12 -0800 (PST) In-Reply-To: <201212250159.qBP1x63t099398@mail.karels.net> References: <201212250159.qBP1x63t099398@mail.karels.net> Date: Mon, 24 Dec 2012 19:08:12 -0800 X-Google-Sender-Auth: 7EhZ3qQIqWDpAkI6Y6suEpe_c5c Message-ID: Subject: Re: 'no buffer space available' after switch goes down on freeBSD 7.3 From: Adrian Chadd To: mike@karels.net Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-net , Ryan Stone , 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 03:08:21 -0000 On 24 December 2012 17:59, Mike Karels wrote: >> [adrian] >> 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. > In my opinion, it is wrong of the drivers to queue packets while link > is down. The packets are delayed indefinitely, and are useless at best. > In my company's product (McAfee firewall), we had problems with state-sharing > packets that were way out of date in a cluster. We changed the drivers to > empty the queue and discard subsequent packets when link was down. No > special change is needed to restart: the next time a packet is transmitted > after link comes up, that packet is sent. Our change is not necessarily > done the way I'd do it for FreeBSD, but it minimizes changes. Patch > available on request. I think that's a good way to treat it. Adrian