]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/linux/ethtool.h
ethtool: Define RX n-tuple action to clear a rule
[mv-sheeva.git] / include / linux / ethtool.h
index d64e246a39e7b955cda894259ec15ab310a131c6..3350870001feea47ff388139a02946213e57e787 100644 (file)
@@ -470,8 +470,9 @@ struct ethtool_rxfh_indir {
  * @action: RX ring/queue index to deliver to (non-negative) or other action
  *     (negative, e.g. %ETHTOOL_RXNTUPLE_ACTION_DROP)
  *
- * Zero values in @h_u may be ignored, as if all the corresponding
- * mask bits were set.
+ * For flow types %TCP_V4_FLOW, %UDP_V4_FLOW and %SCTP_V4_FLOW, where
+ * a field value and mask are both zero this is treated as if all mask
+ * bits are set i.e. the field is ignored.
  */
 struct ethtool_rx_ntuple_flow_spec {
        __u32            flow_type;
@@ -491,11 +492,12 @@ struct ethtool_rx_ntuple_flow_spec {
        __u64           data_mask;
 
        __s32           action;
-#define ETHTOOL_RXNTUPLE_ACTION_DROP -1                /* drop packet */
+#define ETHTOOL_RXNTUPLE_ACTION_DROP   (-1)    /* drop packet */
+#define ETHTOOL_RXNTUPLE_ACTION_CLEAR  (-2)    /* clear filter */
 };
 
 /**
- * struct ethtool_rx_ntuple - command to set RX flow filter
+ * struct ethtool_rx_ntuple - command to set or clear RX flow filter
  * @cmd: Command number - %ETHTOOL_SRXNTUPLE
  * @fs: Flow filter specification
  */
@@ -840,21 +842,21 @@ struct ethtool_ops {
 #define WAKE_MAGICSECURE       (1 << 6) /* only meaningful if WAKE_MAGIC */
 
 /* L3-L4 network traffic flow types */
-#define        TCP_V4_FLOW     0x01
-#define        UDP_V4_FLOW     0x02
-#define        SCTP_V4_FLOW    0x03
-#define        AH_ESP_V4_FLOW  0x04
-#define        TCP_V6_FLOW     0x05
-#define        UDP_V6_FLOW     0x06
-#define        SCTP_V6_FLOW    0x07
-#define        AH_ESP_V6_FLOW  0x08
-#define        AH_V4_FLOW      0x09
-#define        ESP_V4_FLOW     0x0a
-#define        AH_V6_FLOW      0x0b
-#define        ESP_V6_FLOW     0x0c
-#define        IP_USER_FLOW    0x0d
-#define        IPV4_FLOW       0x10
-#define        IPV6_FLOW       0x11
+#define        TCP_V4_FLOW     0x01    /* hash or spec (tcp_ip4_spec) */
+#define        UDP_V4_FLOW     0x02    /* hash or spec (udp_ip4_spec) */
+#define        SCTP_V4_FLOW    0x03    /* hash or spec (sctp_ip4_spec) */
+#define        AH_ESP_V4_FLOW  0x04    /* hash only */
+#define        TCP_V6_FLOW     0x05    /* hash only */
+#define        UDP_V6_FLOW     0x06    /* hash only */
+#define        SCTP_V6_FLOW    0x07    /* hash only */
+#define        AH_ESP_V6_FLOW  0x08    /* hash only */
+#define        AH_V4_FLOW      0x09    /* hash or spec (ah_ip4_spec) */
+#define        ESP_V4_FLOW     0x0a    /* hash or spec (esp_ip4_spec) */
+#define        AH_V6_FLOW      0x0b    /* hash only */
+#define        ESP_V6_FLOW     0x0c    /* hash only */
+#define        IP_USER_FLOW    0x0d    /* spec only (usr_ip4_spec) */
+#define        IPV4_FLOW       0x10    /* hash only */
+#define        IPV6_FLOW       0x11    /* hash only */
 
 /* L3-L4 network traffic flow hash options */
 #define        RXH_L2DA        (1 << 1)