From owner-freebsd-net@FreeBSD.ORG Sat Oct 11 22:40:43 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C35077C; Sat, 11 Oct 2014 22:40:43 +0000 (UTC) Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [IPv6:2a00:1450:400c:c05::22d]) (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 8959F111; Sat, 11 Oct 2014 22:40:42 +0000 (UTC) Received: by mail-wi0-f173.google.com with SMTP id fb4so4748066wid.12 for ; Sat, 11 Oct 2014 15:40:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Bcqy9GbiBNQs3yt6slbPZQD9CiwLIgdporz40LMhTfs=; b=xrcV0DB1lVvPqNhxneMN/Ff9E6lXi7NLI6rbP6BHZ8KaSPipTryya9Ex/w/1OYQBa7 3u/YhdW2YPHnVnhWEhVqFQvy61uGBRBblCS7jaWgfEslcjQya7b6+UvQPInRhUb3gtYH h/VA5yYCIDiXNgTCL3ouFxV5cJ5c4PILQxCV6me9PxES6rJ6NkLwExhqXo2aC+pxagan y740F3JU5sDZ8Ik2ebGTkJsuuQRtywYnP0o56AhISR9LYjZsq60mltzl+tuHYhUuLHoW /wgx/n7tr/6ieO1GS9AtgvkLPmpsm+cMtyn4mnQmr3w7dYVLE0iC2cj3m4du9gEpAFc6 LSBA== MIME-Version: 1.0 X-Received: by 10.180.107.100 with SMTP id hb4mr11760244wib.59.1413067239475; Sat, 11 Oct 2014 15:40:39 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.106.136 with HTTP; Sat, 11 Oct 2014 15:40:39 -0700 (PDT) In-Reply-To: <20141011222457.GA11694@onelab2.iet.unipi.it> References: <20141001203223.GA12122@onelab2.iet.unipi.it> <20141001234926.GC13187@onelab2.iet.unipi.it> <20141001235312.GA14593@onelab2.iet.unipi.it> <20141011222457.GA11694@onelab2.iet.unipi.it> Date: Sat, 11 Oct 2014 15:40:39 -0700 X-Google-Sender-Auth: dIyVT6h7xbroB6Hdq7cISbCDDxY Message-ID: Subject: Re: individual queue blocking entire rx unit on ixgbe (Re: How do I balance bandwidth over several virtual NICs?) From: Adrian Chadd To: Luigi Rizzo Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-net@freebsd.org" , Elof Ofel , "Alexander V. Chernikov" , Jack Vogel 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, 11 Oct 2014 22:40:43 -0000 Thanks! I'll review/commit this to -HEAD now. -a On 11 October 2014 15:24, Luigi Rizzo wrote: > On Sat, Oct 11, 2014 at 03:03:13PM -0700, Adrian Chadd wrote: >> Ping, >> >> Luigi - would you mind sending through a diff ? I'd like to get this >> into -HEAD on both igb and ixgbe. > > > here it is. > > As a result of this patch, ixgbe_rx_enable_drop() and the disable function > become useless and should be removed. > Probably the code (or the commit log) should also mention that the DROP_EN > bit is only read when the rx unit is started, this is why the code should > go here and not in the sysctl handler. > > cheers > luigi > > Index: ixgbe.c > =================================================================== > --- ixgbe.c (revision 272603) > +++ ixgbe.c (working copy) > @@ -4377,6 +4377,19 @@ > srrctl &= ~IXGBE_SRRCTL_BSIZEPKT_MASK; > srrctl |= bufsz; > srrctl |= IXGBE_SRRCTL_DESCTYPE_ADV_ONEBUF; > + /* > + * Set DROP_EN iff we have no flow control and >1 queue. > + * Note that srrctl was cleared shortly before during reset, > + * so we do not need to clear the bit, but do it just in case > + * this code is moved elsewhere. > + */ > + if (adapter->num_queues > 1 && > + adapter->hw.fc.requested_mode == ixgbe_fc_none) { > + srrctl |= IXGBE_SRRCTL_DROP_EN; > + } else { > + srrctl &= ~IXGBE_SRRCTL_DROP_EN; > + } > + > IXGBE_WRITE_REG(hw, IXGBE_SRRCTL(i), srrctl); > > /* Setup the HW Rx Head and Tail Descriptor Pointers */