From owner-freebsd-net@FreeBSD.ORG Tue Feb 8 22:49:00 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A97D1106564A; Tue, 8 Feb 2011 22:49:00 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 37A938FC0C; Tue, 8 Feb 2011 22:49:00 +0000 (UTC) Received: by gxk8 with SMTP id 8so2393344gxk.13 for ; Tue, 08 Feb 2011 14:48:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=+O7h9Tm3Utg8t3KLBqENCwVJIIxG17/P2q4aQElE7Hc=; b=H8Ntrh8vOeAuftbNjPb940vtAQoMcV7CpfcsvwJvY/A38XLUyclBEkKzuN2yafLwv3 z5UpvSM7GFAbME9eV0tWDP/96Fn1onoY9crtdxWfSUQ4eFFNUoTl30GWZsNwE7miNrNR DOIoq/wSaUSHj03Z9OC7XW/YaWLl0gVbkCuPg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=LPfmMynTN360c0PLIp0modC6WKxBNPcT5P9uclnehDQX+jKQdFV65xIogk/mbnDUWC zZ3S3iAR+FumgJ8aYcNgkEzBCL8TJ4yqvcxOdMwTIXqOSedz4MtBwf+JacQ9fButA9iG 5LBYl298Wq36GWKYLwrdS/fCSwUlYQu5Mrpvw= MIME-Version: 1.0 Received: by 10.91.54.29 with SMTP id g29mr630911agk.46.1297205339438; Tue, 08 Feb 2011 14:48:59 -0800 (PST) Received: by 10.147.171.17 with HTTP; Tue, 8 Feb 2011 14:48:59 -0800 (PST) In-Reply-To: References: Date: Tue, 8 Feb 2011 14:48:59 -0800 Message-ID: From: Jack Vogel To: Karim Fodil-Lemelin , Pyun YongHyeon , Michael Tuexen , beezarliu Content-Type: multipart/mixed; boundary=001485f92346754a72049bcd27d7 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org Subject: Re: igb driver RX (was TX) hangs when out of mbuf clusters X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 08 Feb 2011 22:49:00 -0000 --001485f92346754a72049bcd27d7 Content-Type: text/plain; charset=ISO-8859-1 I have been following this, and thinking about it. I still am working from a theoretical standpoint, but based on a patch I got quite a long time back and never quite groked, I believe now that I might have a solution. The original PR and patch was kern/150516 from Beezar Liu, I was never quite comfortable with the code changes, nor convinced that it was a real issue and not a misunderstanding. However I think now that this very report might be behind what we are seeing today. I have a slightly different approach to solving it, of course it remains to be seen if it handles it properly. Please try the patch I've attached, I'm open to further correction or polishing of the changes. And thanks to Beezar for his original report and changes, this is not for em, but if this eliminates the problem its clearly needed in all drivers. Jack --001485f92346754a72049bcd27d7 Content-Type: text/x-patch; charset=US-ASCII; name="igb.patch" Content-Disposition: attachment; filename="igb.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gjwwm4jo0 UHJveHlDaGFpbnMtMy4xIChodHRwOi8vcHJveHljaGFpbnMuc2YubmV0KQpJbmRleDogaWZfaWdi LmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PQotLS0gaWZfaWdiLmMJKHJldmlzaW9uIDIxODQ2MykKKysrIGlmX2lnYi5j CSh3b3JraW5nIGNvcHkpCkBAIC00MzEyLDYgKzQzMTIsNyBAQAogCQlzdHJ1Y3QgbWJ1ZgkJKnNl bmRtcCwgKm1oLCAqbXA7CiA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