summaryrefslogtreecommitdiff
path: root/ethtool-copy.h
diff options
context:
space:
mode:
authorPeter Waskiewicz <peter.p.waskiewicz.jr@intel.com>2010-02-03 23:51:01 -0800
committerJeff Garzik <jgarzik@redhat.com>2010-02-24 22:36:40 -0500
commitb26637b69054a84ac7f7012680d22a25ad9a6b5c (patch)
tree9df491a61c955d622872e03e09732c97aad99789 /ethtool-copy.h
parent08d81cfc5034f28b24c775b8b4e7ad722d61ef84 (diff)
downloadethtool-b26637b69054a84ac7f7012680d22a25ad9a6b5c.tar.gz
Support n-tuple filter programming
Program underlying ethernet devices with n-tuple flow classification filters. This also adds a new flag to ethtool_flags, allowing n-tuple programming to be toggled using the set_flags call. Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'ethtool-copy.h')
-rw-r--r--ethtool-copy.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/ethtool-copy.h b/ethtool-copy.h
index 09dd548..77b375d 100644
--- a/ethtool-copy.h
+++ b/ethtool-copy.h
@@ -242,6 +242,7 @@ enum ethtool_stringset {
ETH_SS_TEST = 0,
ETH_SS_STATS,
ETH_SS_PRIV_FLAGS,
+ ETH_SS_NTUPLE_FILTERS,
};
/* for passing string sets for data tagging */
@@ -290,6 +291,7 @@ struct ethtool_perm_addr {
*/
enum ethtool_flags {
ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */
+ ETH_FLAG_NTUPLE = (1 << 27), /* N-tuple filters enabled */
};
/* The following structures are for supporting RX network flow
@@ -375,6 +377,36 @@ struct ethtool_flash {
char data[ETHTOOL_FLASH_MAX_FILENAME];
};
+struct ethtool_rx_ntuple_flow_spec {
+ int flow_type;
+ union {
+ struct ethtool_tcpip4_spec tcp_ip4_spec;
+ struct ethtool_tcpip4_spec udp_ip4_spec;
+ struct ethtool_tcpip4_spec sctp_ip4_spec;
+ struct ethtool_ah_espip4_spec ah_ip4_spec;
+ struct ethtool_ah_espip4_spec esp_ip4_spec;
+ struct ethtool_rawip4_spec raw_ip4_spec;
+ struct ethtool_ether_spec ether_spec;
+ struct ethtool_usrip4_spec usr_ip4_spec;
+ __u8 hdata[64];
+ } h_u, m_u; /* entry, mask */
+
+ __u16 vlan_tag;
+ __u16 vlan_tag_mask;
+ __u64 data; /* user-defined flow spec data */
+ __u64 data_mask; /* user-defined flow spec mask */
+
+ /* signed to distinguish between queue and actions (DROP) */
+ int action;
+#define ETHTOOL_RXNTUPLE_ACTION_DROP -1
+};
+
+#define ETHTOOL_MAX_NTUPLE_LIST_ENTRY 1024
+#define ETHTOOL_MAX_NTUPLE_STRING_PER_ENTRY 14
+struct ethtool_rx_ntuple {
+ __u32 cmd;
+ struct ethtool_rx_ntuple_flow_spec fs;
+};
/* CMDs currently supported */
#define ETHTOOL_GSET 0x00000001 /* Get settings. */
@@ -432,6 +464,9 @@ struct ethtool_flash {
#define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */
#define ETHTOOL_RESET 0x00000034 /* Reset hardware */
+#define ETHTOOL_SRXNTUPLE 0x00000035 /* Add an n-tuple filter to device */
+#define ETHTOOL_GRXNTUPLE 0x00000036 /* Get n-tuple filters from device */
+
/* compatibility with older code */
#define SPARC_ETH_GSET ETHTOOL_GSET
#define SPARC_ETH_SSET ETHTOOL_SSET