From owner-freebsd-net@FreeBSD.ORG Sat Sep 13 20:09:55 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8281EE8A; Sat, 13 Sep 2014 20:09:55 +0000 (UTC) Received: from mail-pd0-x229.google.com (mail-pd0-x229.google.com [IPv6:2607:f8b0:400e:c02::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4A32EB; Sat, 13 Sep 2014 20:09:55 +0000 (UTC) Received: by mail-pd0-f169.google.com with SMTP id fp1so3628861pdb.14 for ; Sat, 13 Sep 2014 13:09:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=0tdqeIHeQU2SDAJs5vcUa4aDl/OyerjwIJ89xBj70Rk=; b=jzG1xDqZbvATswcBbXwkHyH7CNtpk9zLLqxjaklnYeHuflLQdgKL3BinDi/F6Ufglk eohzr756+fCm0a2fNSzO2wBe+E9lYjE7vTZTA7oPdVpNqjYbqGFpff3GxcFnAjqeNBk+ Stff3zhdbNpQimDgR3s6LrlnPEtRZgvgoAqCJl5b1IQ5xq2uoIjePVdRJ2kjeiCAlIGh fP7eOF+SjIYkJWNZ4RNNzE9nsgmB7XbMiXXa0qIXXLmSm8zamhHpw9mfx4mj1XlX0456 llM91YxaXCIwvSYaUDfGGVoJsL3Ry1zqJbwOTUMRiKbQZVrGiFf3Lvtd21e1MXcKpdVi cohg== X-Received: by 10.68.161.197 with SMTP id xu5mr25661217pbb.160.1410638994808; Sat, 13 Sep 2014 13:09:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.70.55.162 with HTTP; Sat, 13 Sep 2014 13:09:14 -0700 (PDT) In-Reply-To: References: From: Eric Joyner Date: Sat, 13 Sep 2014 13:09:14 -0700 Message-ID: Subject: Re: [igb] add DROP_EN to each RX queue config if TX flow control is disabled To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Jack F Vogel , FreeBSD Net , "Joyner, Eric" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Sep 2014 20:09:55 -0000 This looks good to me. The only comment I have is that according to the I350 datasheet, DROP_EN is already set on all the queues but 0 by default, but I haven't checked for the other adapters covered by igb. --- - Eric Joyner On Mon, Sep 8, 2014 at 10:12 PM, Adrian Chadd wrote: > Hi, > > This patch enables the DROP_EN flag to each RX queue if TX flow > control is disabled. It (mostly) mirrors what the ixgbe driver does. > > This prevents a single full RX ring from stalling the rest of the RX rings. > > How's it look? (indenting and such aside, thanks google.) > > > > -a > > Index: sys/dev/e1000/if_igb.c > =================================================================== > --- sys/dev/e1000/if_igb.c (revision 271290) > +++ sys/dev/e1000/if_igb.c (working copy) > @@ -4712,6 +4712,18 @@ > rctl |= E1000_RCTL_SZ_2048; > } > > + /* > + * If TX flow control is disabled and there's >1 queue defined, > + * enable DROP. > + * > + * This drops frames rather than hanging the RX MAC for all queues. > + */ > + if ((adapter->num_queues > 1) && > + (adapter->fc == e1000_fc_none || > + adapter->fc == e1000_fc_rx_pause)) { > + srrctl |= E1000_SRRCTL_DROP_EN; > + } > + > /* Setup the Base and Length of the Rx Descriptor Rings */ > for (int i = 0; i < adapter->num_queues; i++, rxr++) { > u64 bus_addr = rxr->rxdma.dma_paddr; > @@ -6255,6 +6267,7 @@ > > adapter->hw.fc.current_mode = adapter->hw.fc.requested_mode; > e1000_force_mac_fc(&adapter->hw); > + /* XXX TODO: update DROP_EN on each RX queue if appropriate */ > return (error); > } > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >