From owner-svn-src-stable-10@FreeBSD.ORG Sat Oct 18 01:02:31 2014 Return-Path: Delivered-To: svn-src-stable-10@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 81AD97E0; Sat, 18 Oct 2014 01:02:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D46A8BF; Sat, 18 Oct 2014 01:02:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9I12VBA092251; Sat, 18 Oct 2014 01:02:31 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9I12VMh092250; Sat, 18 Oct 2014 01:02:31 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201410180102.s9I12VMh092250@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 18 Oct 2014 01:02:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r273244 - stable/10/sys/dev/ixgbe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Oct 2014 01:02:31 -0000 Author: adrian Date: Sat Oct 18 01:02:30 2014 New Revision: 273244 URL: https://svnweb.freebsd.org/changeset/base/273244 Log: MFC r273112: Set the DROP_EN bit before the RX queue is brought up and active. He noticed issues setting this bit in SRRCTL after the queue was up, so doing it from the sysctl handler isn't enough and may not actually work correctly. This commit doesn't remove the sysctl path or try to change its behaviour. I'll talk with others about how to finish fixing that before I tackle that. PR: kern/194311 Submitted by: luigi MFC after: 3 days Sponsored by: Norse Corp, Inc Modified: stable/10/sys/dev/ixgbe/ixgbe.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/10/sys/dev/ixgbe/ixgbe.c Fri Oct 17 21:52:57 2014 (r273243) +++ stable/10/sys/dev/ixgbe/ixgbe.c Sat Oct 18 01:02:30 2014 (r273244) @@ -4190,6 +4190,20 @@ ixgbe_initialize_receive_units(struct ad 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 */