ethtool: Explicitly state that RX NFC rule locations are priorities
authorBen Hutchings <bhutchings@solarflare.com>
Tue, 6 Sep 2011 13:48:56 +0000 (13:48 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Sep 2011 23:25:10 +0000 (19:25 -0400)
The location of an RX flow classification rule is needed to identify
it for retrieval, replacement or deletion.  However it also defines
the priority of the rule in the case that a flow is matched by
multiple rules.  This is what I intended to imply by referring to the
use of a TCAM, commonly used to implement that behaviour.

However there are other ways this can be done, and it is better to
specify this explicitly.  Further, I want to add the option for
automatic selection of rule locations.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/ethtool.h

index 30a4f90..b5d1893 100644 (file)
@@ -456,7 +456,9 @@ struct ethtool_flow_ext {
  *     includes the %FLOW_EXT flag.
  * @ring_cookie: RX ring/queue index to deliver to, or %RX_CLS_FLOW_DISC
  *     if packets should be discarded
  *     includes the %FLOW_EXT flag.
  * @ring_cookie: RX ring/queue index to deliver to, or %RX_CLS_FLOW_DISC
  *     if packets should be discarded
- * @location: Location of rule in the table
+ * @location: Location of rule in the table.  Locations must be
+ *     numbered such that a flow matching multiple rules will be
+ *     classified according to the first (lowest numbered) rule.
  */
 struct ethtool_rx_flow_spec {
        __u32           flow_type;
  */
 struct ethtool_rx_flow_spec {
        __u32           flow_type;
@@ -502,9 +504,6 @@ struct ethtool_rx_flow_spec {
  *
  * For %ETHTOOL_SRXCLSRLDEL, @fs.@location specifies the location of an
  * existing rule on entry.
  *
  * For %ETHTOOL_SRXCLSRLDEL, @fs.@location specifies the location of an
  * existing rule on entry.
- *
- * Implementation of indexed classification rules generally requires a
- * TCAM.
  */
 struct ethtool_rxnfc {
        __u32                           cmd;
  */
 struct ethtool_rxnfc {
        __u32                           cmd;