Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Oct 2014 01:22:56 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r273112 - head/sys/dev/ixgbe
Message-ID:  <201410150122.s9F1Mudu083306@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Wed Oct 15 01:22:56 2014
New Revision: 273112
URL: https://svnweb.freebsd.org/changeset/base/273112

Log:
  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:
  head/sys/dev/ixgbe/ixgbe.c

Modified: head/sys/dev/ixgbe/ixgbe.c
==============================================================================
--- head/sys/dev/ixgbe/ixgbe.c	Wed Oct 15 01:16:11 2014	(r273111)
+++ head/sys/dev/ixgbe/ixgbe.c	Wed Oct 15 01:22:56 2014	(r273112)
@@ -4377,6 +4377,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 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410150122.s9F1Mudu083306>