From owner-freebsd-net@FreeBSD.ORG Mon Feb 4 18:11:10 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 9BD7CC4E; Mon, 4 Feb 2013 18:11:10 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-vb0-f47.google.com (mail-vb0-f47.google.com [209.85.212.47]) by mx1.freebsd.org (Postfix) with ESMTP id 140DCE0; Mon, 4 Feb 2013 18:11:09 +0000 (UTC) Received: by mail-vb0-f47.google.com with SMTP id e21so4063547vbm.34 for ; Mon, 04 Feb 2013 10:11:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=Qk74qJKy68r7kX2OHTZ8zPFfIPIqSCfFwaTitGi9Hu4=; b=PG4cKJjiY0B0MF/xmAm1YCHbNvWlzZnVRMZ632JoEB1FxQWxc874vUhdJBx6lsxEbu J1n7+PL/+CC2RWISmI2tlLI4vDJ5PGMq31GUhdHy0zJlvSupsOm3Gaz7LwQPdmAK9T3v T2OH05AJkr/UmCb0cx/Ife7UoG23d18Hvy2qHCMMRq7rx9BC1f1ZlalFN7pA/Pw/lcMp 27566iGM+DglYAngcMtQ+wHLsbBBdyxnjNIzRdsNS8KUOB6YD3Hd0+hsllxvzO5mToT0 b3TstXBWbQR6lGLrgJ8m7aX0wuyMgh2fS5Wmk46L10kjLPvGj6FT9mEN4OWoyWALunjt v3Pg== MIME-Version: 1.0 X-Received: by 10.52.240.146 with SMTP id wa18mr20734212vdc.47.1360001463776; Mon, 04 Feb 2013 10:11:03 -0800 (PST) Received: by 10.220.191.132 with HTTP; Mon, 4 Feb 2013 10:11:03 -0800 (PST) In-Reply-To: References: Date: Mon, 4 Feb 2013 10:11:03 -0800 Message-ID: Subject: Re: Driver patch to look at... From: Jack Vogel To: Randy Stewart Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Kip Macy , John Baldwin , freebsd-net , Robert Watson , Jack F Vogel 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, 04 Feb 2013 18:11:10 -0000 On Mon, Feb 4, 2013 at 9:22 AM, Randy Stewart wrote: > All: > > I have been working with TCP in gigabit networks (igb driver actually) and > have > found a very nasty problem with the way the driver is doing its put back > when > it fills the out-bound transmit queue. > > Basically it has taken a packet from the head of the ring buffer, and then > realizes it can't fit it into the transmit queue. So it just re-enqueue's > it > into the ring buffer. Whats wrong with that? Well most of the time there > are anywhere from 10-50 packets (maybe more) in that ring buffer when you > are > operating at full speed (or trying to). This means you will see 10 > duplicate > ACKs, do a fast retransmit and cut your cwnd in half.. not very nice > actually. > > The patch I have attached makes it so that > > 1) There are ways to swap back. > 2) Use the peek in the ring buffer and only > dequeue the packet if we put it into the transmit ring > 3) If something goes wrong and the transmit frees the packet we dequeue it. > 4) If the transmit changed it (defrag etc) then swap out the new mbuf that > has taken its place. > > I have fixed the four intel drivers that had this systemic issue, but there > are still more to fix. > > Comments/review .. rotten egg's etc.. would be most welcome before > I commit this.. > > Jack are you out there? > > Yes, I'm usually perceived as being 'out there' :) If you had addressed it to 'jfv' rather than 'jv' it would have worked better. I have no theoretical objection to this, how much testing has it had? Jack