aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ethtool.h
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2011-04-08 14:01:59 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-11 16:20:49 -0400
commit127fe533ae56d7f4e7b5011869870982eba25723 (patch)
tree05a0752df856b975524fb1dbb302c2c84253aab9 /include/linux/ethtool.h
parent5d9f11cf5038587cc53975deb8beaa1a876a7a7b (diff)
v3 ethtool: add ntuple flow specifier data to network flow classifier
This change is meant to add an ntuple data extensions to the rx network flow classification specifiers. The idea is to allow ntuple to be displayed via the network flow classification interface. The first patch had some left over stuff from the original flow extension flags I had added. That bit is removed in this patch. The second had some left over comments that stated we ignored bits in the masks when we actually match them. This work is based on input from Ben Hutchings. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/ethtool.h')
-rw-r--r--include/linux/ethtool.h53
1 files changed, 32 insertions, 21 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index c04d1316d221..c7eff13d2f34 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -380,27 +380,42 @@ struct ethtool_usrip4_spec {
380 __u8 proto; 380 __u8 proto;
381}; 381};
382 382
383union ethtool_flow_union {
384 struct ethtool_tcpip4_spec tcp_ip4_spec;
385 struct ethtool_tcpip4_spec udp_ip4_spec;
386 struct ethtool_tcpip4_spec sctp_ip4_spec;
387 struct ethtool_ah_espip4_spec ah_ip4_spec;
388 struct ethtool_ah_espip4_spec esp_ip4_spec;
389 struct ethtool_usrip4_spec usr_ip4_spec;
390 struct ethhdr ether_spec;
391 __u8 hdata[60];
392};
393
394struct ethtool_flow_ext {
395 __be16 vlan_etype;
396 __be16 vlan_tci;
397 __be32 data[2];
398};
399
383/** 400/**
384 * struct ethtool_rx_flow_spec - specification for RX flow filter 401 * struct ethtool_rx_flow_spec - specification for RX flow filter
385 * @flow_type: Type of match to perform, e.g. %TCP_V4_FLOW 402 * @flow_type: Type of match to perform, e.g. %TCP_V4_FLOW
386 * @h_u: Flow fields to match (dependent on @flow_type) 403 * @h_u: Flow fields to match (dependent on @flow_type)
387 * @m_u: Masks for flow field bits to be ignored 404 * @h_ext: Additional fields to match
405 * @m_u: Masks for flow field bits to be matched
406 * @m_ext: Masks for additional field bits to be matched
407 * Note, all additional fields must be ignored unless @flow_type
408 * includes the %FLOW_EXT flag.
388 * @ring_cookie: RX ring/queue index to deliver to, or %RX_CLS_FLOW_DISC 409 * @ring_cookie: RX ring/queue index to deliver to, or %RX_CLS_FLOW_DISC
389 * if packets should be discarded 410 * if packets should be discarded
390 * @location: Index of filter in hardware table 411 * @location: Index of filter in hardware table
391 */ 412 */
392struct ethtool_rx_flow_spec { 413struct ethtool_rx_flow_spec {
393 __u32 flow_type; 414 __u32 flow_type;
394 union { 415 union ethtool_flow_union h_u;
395 struct ethtool_tcpip4_spec tcp_ip4_spec; 416 struct ethtool_flow_ext h_ext;
396 struct ethtool_tcpip4_spec udp_ip4_spec; 417 union ethtool_flow_union m_u;
397 struct ethtool_tcpip4_spec sctp_ip4_spec; 418 struct ethtool_flow_ext m_ext;
398 struct ethtool_ah_espip4_spec ah_ip4_spec;
399 struct ethtool_ah_espip4_spec esp_ip4_spec;
400 struct ethtool_usrip4_spec usr_ip4_spec;
401 struct ethhdr ether_spec;
402 __u8 hdata[72];
403 } h_u, m_u;
404 __u64 ring_cookie; 419 __u64 ring_cookie;
405 __u32 location; 420 __u32 location;
406}; 421};
@@ -458,16 +473,10 @@ struct ethtool_rxnfc {
458 473
459struct compat_ethtool_rx_flow_spec { 474struct compat_ethtool_rx_flow_spec {
460 u32 flow_type; 475 u32 flow_type;
461 union { 476 union ethtool_flow_union h_u;
462 struct ethtool_tcpip4_spec tcp_ip4_spec; 477 struct ethtool_flow_ext h_ext;
463 struct ethtool_tcpip4_spec udp_ip4_spec; 478 union ethtool_flow_union m_u;
464 struct ethtool_tcpip4_spec sctp_ip4_spec; 479 struct ethtool_flow_ext m_ext;
465 struct ethtool_ah_espip4_spec ah_ip4_spec;
466 struct ethtool_ah_espip4_spec esp_ip4_spec;
467 struct ethtool_usrip4_spec usr_ip4_spec;
468 struct ethhdr ether_spec;
469 u8 hdata[72];
470 } h_u, m_u;
471 compat_u64 ring_cookie; 480 compat_u64 ring_cookie;
472 u32 location; 481 u32 location;
473}; 482};
@@ -1072,6 +1081,8 @@ struct ethtool_ops {
1072#define IPV4_FLOW 0x10 /* hash only */ 1081#define IPV4_FLOW 0x10 /* hash only */
1073#define IPV6_FLOW 0x11 /* hash only */ 1082#define IPV6_FLOW 0x11 /* hash only */
1074#define ETHER_FLOW 0x12 /* spec only (ether_spec) */ 1083#define ETHER_FLOW 0x12 /* spec only (ether_spec) */
1084/* Flag to enable additional fields in struct ethtool_rx_flow_spec */
1085#define FLOW_EXT 0x80000000
1075 1086
1076/* L3-L4 network traffic flow hash options */ 1087/* L3-L4 network traffic flow hash options */
1077#define RXH_L2DA (1 << 1) 1088#define RXH_L2DA (1 << 1)