individual queue blocking entire rx unit on ixgbe (Re: How do I balance bandwidth over several virtual NICs?)

Luigi Rizzo rizzo at iet.unipi.it
Sat Oct 11 22:21:33 UTC 2014


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 */


More information about the freebsd-net mailing list