Subject: Re: [PATCH 1/2] net: Add RX queue weights

From: Dimitris Michailidis <[email-masked]>
Date: Fri, 11 Feb 2011 19:49:36 -0800

Tom Herbert wrote:
> This patch adds a weight attribute to the netdev RX queues.  This allows
> control over the relative receive packet load for each queue.  These
> values are set in sysfs variable 'weight' in the rxq directory for
> a device.  When a weight is set, a new netdev operation is called to
> inform the driver of the changed weight.  The driver is expected to
> apply the queue weights in a logical manner to the RSS indirection table
> of the device to achieve the desired weighting.  The driver
> implementation for this is unspecified.
> 
> If a weight for a queue is zero, this effectively disables that queue
> for RSS (but possibly still usable by accelerated RFS, etc.), except
> in the case that all queue weights are zero, then all queues are
> considered equally weighted (the default).
> 
> Example configuration:
> echo 1 > /sys/class/net/eth4/queues/rx-0/weight
> echo 1 > /sys/class/net/eth4/queues/rx-1/weight
> echo 5 > /sys/class/net/eth4/queues/rx-2/weight
> echo 0 > /sys/class/net/eth4/queues/rx-3/weight
> 
> So rx queue 0 and 1 have equal weight, queue 2 is 5X in weight and
> queue 3 is disabled for RSS.

Doesn't ethtool -X already do this?  With the added benefit that ethtool 
doesn't need each driver to provide its own weight handling arithmetic.