aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ethtool.h
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2011-03-09 10:15:44 -0500
committerMichal Marek <mmarek@suse.cz>2011-03-09 10:15:44 -0500
commit2d8ad8719591fa803b0d589ed057fa46f49b7155 (patch)
tree4ae051577dad1161c91dafbf4207bb10a9dc91bb /include/linux/ethtool.h
parent9b4ce7bce5f30712fd926ab4599a803314a07719 (diff)
parentc56eb8fb6dccb83d9fe62fd4dc00c834de9bc470 (diff)
Merge commit 'v2.6.38-rc1' into kbuild/packaging
Diffstat (limited to 'include/linux/ethtool.h')
-rw-r--r--include/linux/ethtool.h318
1 files changed, 252 insertions, 66 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index ef4a2d84d922..1908929204a9 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -14,6 +14,7 @@
14#define _LINUX_ETHTOOL_H 14#define _LINUX_ETHTOOL_H
15 15
16#include <linux/types.h> 16#include <linux/types.h>
17#include <linux/if_ether.h>
17 18
18/* This should work for both 32 and 64 bit userland. */ 19/* This should work for both 32 and 64 bit userland. */
19struct ethtool_cmd { 20struct ethtool_cmd {
@@ -61,6 +62,13 @@ struct ethtool_drvinfo {
61 /* For PCI devices, use pci_name(pci_dev). */ 62 /* For PCI devices, use pci_name(pci_dev). */
62 char reserved1[32]; 63 char reserved1[32];
63 char reserved2[12]; 64 char reserved2[12];
65 /*
66 * Some struct members below are filled in
67 * using ops->get_sset_count(). Obtaining
68 * this info from ethtool_drvinfo is now
69 * deprecated; Use ETHTOOL_GSSET_INFO
70 * instead.
71 */
64 __u32 n_priv_flags; /* number of flags valid in ETHTOOL_GPFLAGS */ 72 __u32 n_priv_flags; /* number of flags valid in ETHTOOL_GPFLAGS */
65 __u32 n_stats; /* number of u64's from ETHTOOL_GSTATS */ 73 __u32 n_stats; /* number of u64's from ETHTOOL_GSTATS */
66 __u32 testinfo_len; 74 __u32 testinfo_len;
@@ -242,6 +250,7 @@ enum ethtool_stringset {
242 ETH_SS_TEST = 0, 250 ETH_SS_TEST = 0,
243 ETH_SS_STATS, 251 ETH_SS_STATS,
244 ETH_SS_PRIV_FLAGS, 252 ETH_SS_PRIV_FLAGS,
253 ETH_SS_NTUPLE_FILTERS,
245}; 254};
246 255
247/* for passing string sets for data tagging */ 256/* for passing string sets for data tagging */
@@ -252,6 +261,17 @@ struct ethtool_gstrings {
252 __u8 data[0]; 261 __u8 data[0];
253}; 262};
254 263
264struct ethtool_sset_info {
265 __u32 cmd; /* ETHTOOL_GSSET_INFO */
266 __u32 reserved;
267 __u64 sset_mask; /* input: each bit selects an sset to query */
268 /* output: each bit a returned sset */
269 __u32 data[0]; /* ETH_SS_xxx count, in order, based on bits
270 in sset_mask. One bit implies one
271 __u32, two bits implies two
272 __u32's, etc. */
273};
274
255enum ethtool_test_flags { 275enum ethtool_test_flags {
256 ETH_TEST_FL_OFFLINE = (1 << 0), /* online / offline */ 276 ETH_TEST_FL_OFFLINE = (1 << 0), /* online / offline */
257 ETH_TEST_FL_FAILED = (1 << 1), /* test passed / failed */ 277 ETH_TEST_FL_FAILED = (1 << 1), /* test passed / failed */
@@ -289,13 +309,28 @@ struct ethtool_perm_addr {
289 * flag differs from the read-only value. 309 * flag differs from the read-only value.
290 */ 310 */
291enum ethtool_flags { 311enum ethtool_flags {
312 ETH_FLAG_TXVLAN = (1 << 7), /* TX VLAN offload enabled */
313 ETH_FLAG_RXVLAN = (1 << 8), /* RX VLAN offload enabled */
292 ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */ 314 ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */
315 ETH_FLAG_NTUPLE = (1 << 27), /* N-tuple filters enabled */
316 ETH_FLAG_RXHASH = (1 << 28),
293}; 317};
294 318
295/* The following structures are for supporting RX network flow 319/* The following structures are for supporting RX network flow
296 * classification configuration. Note, all multibyte fields, e.g., 320 * classification and RX n-tuple configuration. Note, all multibyte
297 * ip4src, ip4dst, psrc, pdst, spi, etc. are expected to be in network 321 * fields, e.g., ip4src, ip4dst, psrc, pdst, spi, etc. are expected to
298 * byte order. 322 * be in network byte order.
323 */
324
325/**
326 * struct ethtool_tcpip4_spec - flow specification for TCP/IPv4 etc.
327 * @ip4src: Source host
328 * @ip4dst: Destination host
329 * @psrc: Source port
330 * @pdst: Destination port
331 * @tos: Type-of-service
332 *
333 * This can be used to specify a TCP/IPv4, UDP/IPv4 or SCTP/IPv4 flow.
299 */ 334 */
300struct ethtool_tcpip4_spec { 335struct ethtool_tcpip4_spec {
301 __be32 ip4src; 336 __be32 ip4src;
@@ -305,6 +340,15 @@ struct ethtool_tcpip4_spec {
305 __u8 tos; 340 __u8 tos;
306}; 341};
307 342
343/**
344 * struct ethtool_ah_espip4_spec - flow specification for IPsec/IPv4
345 * @ip4src: Source host
346 * @ip4dst: Destination host
347 * @spi: Security parameters index
348 * @tos: Type-of-service
349 *
350 * This can be used to specify an IPsec transport or tunnel over IPv4.
351 */
308struct ethtool_ah_espip4_spec { 352struct ethtool_ah_espip4_spec {
309 __be32 ip4src; 353 __be32 ip4src;
310 __be32 ip4dst; 354 __be32 ip4dst;
@@ -312,21 +356,17 @@ struct ethtool_ah_espip4_spec {
312 __u8 tos; 356 __u8 tos;
313}; 357};
314 358
315struct ethtool_rawip4_spec {
316 __be32 ip4src;
317 __be32 ip4dst;
318 __u8 hdata[64];
319};
320
321struct ethtool_ether_spec {
322 __be16 ether_type;
323 __u8 frame_size;
324 __u8 eframe[16];
325};
326
327#define ETH_RX_NFC_IP4 1 359#define ETH_RX_NFC_IP4 1
328#define ETH_RX_NFC_IP6 2
329 360
361/**
362 * struct ethtool_usrip4_spec - general flow specification for IPv4
363 * @ip4src: Source host
364 * @ip4dst: Destination host
365 * @l4_4_bytes: First 4 bytes of transport (layer 4) header
366 * @tos: Type-of-service
367 * @ip_ver: Value must be %ETH_RX_NFC_IP4; mask must be 0
368 * @proto: Transport protocol number; mask must be 0
369 */
330struct ethtool_usrip4_spec { 370struct ethtool_usrip4_spec {
331 __be32 ip4src; 371 __be32 ip4src;
332 __be32 ip4dst; 372 __be32 ip4dst;
@@ -336,6 +376,15 @@ struct ethtool_usrip4_spec {
336 __u8 proto; 376 __u8 proto;
337}; 377};
338 378
379/**
380 * struct ethtool_rx_flow_spec - specification for RX flow filter
381 * @flow_type: Type of match to perform, e.g. %TCP_V4_FLOW
382 * @h_u: Flow fields to match (dependent on @flow_type)
383 * @m_u: Masks for flow field bits to be ignored
384 * @ring_cookie: RX ring/queue index to deliver to, or %RX_CLS_FLOW_DISC
385 * if packets should be discarded
386 * @location: Index of filter in hardware table
387 */
339struct ethtool_rx_flow_spec { 388struct ethtool_rx_flow_spec {
340 __u32 flow_type; 389 __u32 flow_type;
341 union { 390 union {
@@ -344,25 +393,124 @@ struct ethtool_rx_flow_spec {
344 struct ethtool_tcpip4_spec sctp_ip4_spec; 393 struct ethtool_tcpip4_spec sctp_ip4_spec;
345 struct ethtool_ah_espip4_spec ah_ip4_spec; 394 struct ethtool_ah_espip4_spec ah_ip4_spec;
346 struct ethtool_ah_espip4_spec esp_ip4_spec; 395 struct ethtool_ah_espip4_spec esp_ip4_spec;
347 struct ethtool_rawip4_spec raw_ip4_spec;
348 struct ethtool_ether_spec ether_spec;
349 struct ethtool_usrip4_spec usr_ip4_spec; 396 struct ethtool_usrip4_spec usr_ip4_spec;
350 __u8 hdata[64]; 397 struct ethhdr ether_spec;
351 } h_u, m_u; /* entry, mask */ 398 __u8 hdata[72];
399 } h_u, m_u;
352 __u64 ring_cookie; 400 __u64 ring_cookie;
353 __u32 location; 401 __u32 location;
354}; 402};
355 403
404/**
405 * struct ethtool_rxnfc - command to get or set RX flow classification rules
406 * @cmd: Specific command number - %ETHTOOL_GRXFH, %ETHTOOL_SRXFH,
407 * %ETHTOOL_GRXRINGS, %ETHTOOL_GRXCLSRLCNT, %ETHTOOL_GRXCLSRULE,
408 * %ETHTOOL_GRXCLSRLALL, %ETHTOOL_SRXCLSRLDEL or %ETHTOOL_SRXCLSRLINS
409 * @flow_type: Type of flow to be affected, e.g. %TCP_V4_FLOW
410 * @data: Command-dependent value
411 * @fs: Flow filter specification
412 * @rule_cnt: Number of rules to be affected
413 * @rule_locs: Array of valid rule indices
414 *
415 * For %ETHTOOL_GRXFH and %ETHTOOL_SRXFH, @data is a bitmask indicating
416 * the fields included in the flow hash, e.g. %RXH_IP_SRC. The following
417 * structure fields must not be used.
418 *
419 * For %ETHTOOL_GRXRINGS, @data is set to the number of RX rings/queues
420 * on return.
421 *
422 * For %ETHTOOL_GRXCLSRLCNT, @rule_cnt is set to the number of defined
423 * rules on return.
424 *
425 * For %ETHTOOL_GRXCLSRULE, @fs.@location specifies the index of an
426 * existing filter rule on entry and @fs contains the rule on return.
427 *
428 * For %ETHTOOL_GRXCLSRLALL, @rule_cnt specifies the array size of the
429 * user buffer for @rule_locs on entry. On return, @data is the size
430 * of the filter table and @rule_locs contains the indices of the
431 * defined rules.
432 *
433 * For %ETHTOOL_SRXCLSRLINS, @fs specifies the filter rule to add or
434 * update. @fs.@location specifies the index to use and must not be
435 * ignored.
436 *
437 * For %ETHTOOL_SRXCLSRLDEL, @fs.@location specifies the index of an
438 * existing filter rule on entry.
439 *
440 * Implementation of indexed classification rules generally requires a
441 * TCAM.
442 */
356struct ethtool_rxnfc { 443struct ethtool_rxnfc {
357 __u32 cmd; 444 __u32 cmd;
358 __u32 flow_type; 445 __u32 flow_type;
359 /* The rx flow hash value or the rule DB size */
360 __u64 data; 446 __u64 data;
361 struct ethtool_rx_flow_spec fs; 447 struct ethtool_rx_flow_spec fs;
362 __u32 rule_cnt; 448 __u32 rule_cnt;
363 __u32 rule_locs[0]; 449 __u32 rule_locs[0];
364}; 450};
365 451
452/**
453 * struct ethtool_rxfh_indir - command to get or set RX flow hash indirection
454 * @cmd: Specific command number - %ETHTOOL_GRXFHINDIR or %ETHTOOL_SRXFHINDIR
455 * @size: On entry, the array size of the user buffer. On return from
456 * %ETHTOOL_GRXFHINDIR, the array size of the hardware indirection table.
457 * @ring_index: RX ring/queue index for each hash value
458 */
459struct ethtool_rxfh_indir {
460 __u32 cmd;
461 __u32 size;
462 __u32 ring_index[0];
463};
464
465/**
466 * struct ethtool_rx_ntuple_flow_spec - specification for RX flow filter
467 * @flow_type: Type of match to perform, e.g. %TCP_V4_FLOW
468 * @h_u: Flow field values to match (dependent on @flow_type)
469 * @m_u: Masks for flow field value bits to be ignored
470 * @vlan_tag: VLAN tag to match
471 * @vlan_tag_mask: Mask for VLAN tag bits to be ignored
472 * @data: Driver-dependent data to match
473 * @data_mask: Mask for driver-dependent data bits to be ignored
474 * @action: RX ring/queue index to deliver to (non-negative) or other action
475 * (negative, e.g. %ETHTOOL_RXNTUPLE_ACTION_DROP)
476 *
477 * For flow types %TCP_V4_FLOW, %UDP_V4_FLOW and %SCTP_V4_FLOW, where
478 * a field value and mask are both zero this is treated as if all mask
479 * bits are set i.e. the field is ignored.
480 */
481struct ethtool_rx_ntuple_flow_spec {
482 __u32 flow_type;
483 union {
484 struct ethtool_tcpip4_spec tcp_ip4_spec;
485 struct ethtool_tcpip4_spec udp_ip4_spec;
486 struct ethtool_tcpip4_spec sctp_ip4_spec;
487 struct ethtool_ah_espip4_spec ah_ip4_spec;
488 struct ethtool_ah_espip4_spec esp_ip4_spec;
489 struct ethtool_usrip4_spec usr_ip4_spec;
490 struct ethhdr ether_spec;
491 __u8 hdata[72];
492 } h_u, m_u;
493
494 __u16 vlan_tag;
495 __u16 vlan_tag_mask;
496 __u64 data;
497 __u64 data_mask;
498
499 __s32 action;
500#define ETHTOOL_RXNTUPLE_ACTION_DROP (-1) /* drop packet */
501#define ETHTOOL_RXNTUPLE_ACTION_CLEAR (-2) /* clear filter */
502};
503
504/**
505 * struct ethtool_rx_ntuple - command to set or clear RX flow filter
506 * @cmd: Command number - %ETHTOOL_SRXNTUPLE
507 * @fs: Flow filter specification
508 */
509struct ethtool_rx_ntuple {
510 __u32 cmd;
511 struct ethtool_rx_ntuple_flow_spec fs;
512};
513
366#define ETHTOOL_FLASH_MAX_FILENAME 128 514#define ETHTOOL_FLASH_MAX_FILENAME 128
367enum ethtool_flash_op_type { 515enum ethtool_flash_op_type {
368 ETHTOOL_FLASH_ALL_REGIONS = 0, 516 ETHTOOL_FLASH_ALL_REGIONS = 0,
@@ -377,6 +525,20 @@ struct ethtool_flash {
377 525
378#ifdef __KERNEL__ 526#ifdef __KERNEL__
379 527
528#include <linux/rculist.h>
529
530struct ethtool_rx_ntuple_flow_spec_container {
531 struct ethtool_rx_ntuple_flow_spec fs;
532 struct list_head list;
533};
534
535struct ethtool_rx_ntuple_list {
536#define ETHTOOL_MAX_NTUPLE_LIST_ENTRY 1024
537#define ETHTOOL_MAX_NTUPLE_STRING_PER_ENTRY 14
538 struct list_head list;
539 unsigned int count;
540};
541
380struct net_device; 542struct net_device;
381 543
382/* Some generic methods drivers may use in their ethtool_ops */ 544/* Some generic methods drivers may use in their ethtool_ops */
@@ -393,7 +555,8 @@ int ethtool_op_set_tso(struct net_device *dev, u32 data);
393u32 ethtool_op_get_ufo(struct net_device *dev); 555u32 ethtool_op_get_ufo(struct net_device *dev);
394int ethtool_op_set_ufo(struct net_device *dev, u32 data); 556int ethtool_op_set_ufo(struct net_device *dev, u32 data);
395u32 ethtool_op_get_flags(struct net_device *dev); 557u32 ethtool_op_get_flags(struct net_device *dev);
396int ethtool_op_set_flags(struct net_device *dev, u32 data); 558int ethtool_op_set_flags(struct net_device *dev, u32 data, u32 supported);
559void ethtool_ntuple_flush(struct net_device *dev);
397 560
398/** 561/**
399 * &ethtool_ops - Alter and report network device settings 562 * &ethtool_ops - Alter and report network device settings
@@ -426,12 +589,12 @@ int ethtool_op_set_flags(struct net_device *dev, u32 data);
426 * get_ufo: Report whether UDP fragmentation offload is enabled 589 * get_ufo: Report whether UDP fragmentation offload is enabled
427 * set_ufo: Turn UDP fragmentation offload on or off 590 * set_ufo: Turn UDP fragmentation offload on or off
428 * self_test: Run specified self-tests 591 * self_test: Run specified self-tests
429 * get_strings: Return a set of strings that describe the requested objects 592 * get_strings: Return a set of strings that describe the requested objects
430 * phys_id: Identify the device 593 * phys_id: Identify the device
431 * get_stats: Return statistics about the device 594 * get_stats: Return statistics about the device
432 * get_flags: get 32-bit flags bitmap 595 * get_flags: get 32-bit flags bitmap
433 * set_flags: set 32-bit flags bitmap 596 * set_flags: set 32-bit flags bitmap
434 * 597 *
435 * Description: 598 * Description:
436 * 599 *
437 * get_settings: 600 * get_settings:
@@ -467,14 +630,20 @@ struct ethtool_ops {
467 int (*nway_reset)(struct net_device *); 630 int (*nway_reset)(struct net_device *);
468 u32 (*get_link)(struct net_device *); 631 u32 (*get_link)(struct net_device *);
469 int (*get_eeprom_len)(struct net_device *); 632 int (*get_eeprom_len)(struct net_device *);
470 int (*get_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *); 633 int (*get_eeprom)(struct net_device *,
471 int (*set_eeprom)(struct net_device *, struct ethtool_eeprom *, u8 *); 634 struct ethtool_eeprom *, u8 *);
635 int (*set_eeprom)(struct net_device *,
636 struct ethtool_eeprom *, u8 *);
472 int (*get_coalesce)(struct net_device *, struct ethtool_coalesce *); 637 int (*get_coalesce)(struct net_device *, struct ethtool_coalesce *);
473 int (*set_coalesce)(struct net_device *, struct ethtool_coalesce *); 638 int (*set_coalesce)(struct net_device *, struct ethtool_coalesce *);
474 void (*get_ringparam)(struct net_device *, struct ethtool_ringparam *); 639 void (*get_ringparam)(struct net_device *,
475 int (*set_ringparam)(struct net_device *, struct ethtool_ringparam *); 640 struct ethtool_ringparam *);
476 void (*get_pauseparam)(struct net_device *, struct ethtool_pauseparam*); 641 int (*set_ringparam)(struct net_device *,
477 int (*set_pauseparam)(struct net_device *, struct ethtool_pauseparam*); 642 struct ethtool_ringparam *);
643 void (*get_pauseparam)(struct net_device *,
644 struct ethtool_pauseparam*);
645 int (*set_pauseparam)(struct net_device *,
646 struct ethtool_pauseparam*);
478 u32 (*get_rx_csum)(struct net_device *); 647 u32 (*get_rx_csum)(struct net_device *);
479 int (*set_rx_csum)(struct net_device *, u32); 648 int (*set_rx_csum)(struct net_device *, u32);
480 u32 (*get_tx_csum)(struct net_device *); 649 u32 (*get_tx_csum)(struct net_device *);
@@ -486,20 +655,29 @@ struct ethtool_ops {
486 void (*self_test)(struct net_device *, struct ethtool_test *, u64 *); 655 void (*self_test)(struct net_device *, struct ethtool_test *, u64 *);
487 void (*get_strings)(struct net_device *, u32 stringset, u8 *); 656 void (*get_strings)(struct net_device *, u32 stringset, u8 *);
488 int (*phys_id)(struct net_device *, u32); 657 int (*phys_id)(struct net_device *, u32);
489 void (*get_ethtool_stats)(struct net_device *, struct ethtool_stats *, u64 *); 658 void (*get_ethtool_stats)(struct net_device *,
659 struct ethtool_stats *, u64 *);
490 int (*begin)(struct net_device *); 660 int (*begin)(struct net_device *);
491 void (*complete)(struct net_device *); 661 void (*complete)(struct net_device *);
492 u32 (*get_ufo)(struct net_device *); 662 u32 (*get_ufo)(struct net_device *);
493 int (*set_ufo)(struct net_device *, u32); 663 int (*set_ufo)(struct net_device *, u32);
494 u32 (*get_flags)(struct net_device *); 664 u32 (*get_flags)(struct net_device *);
495 int (*set_flags)(struct net_device *, u32); 665 int (*set_flags)(struct net_device *, u32);
496 u32 (*get_priv_flags)(struct net_device *); 666 u32 (*get_priv_flags)(struct net_device *);
497 int (*set_priv_flags)(struct net_device *, u32); 667 int (*set_priv_flags)(struct net_device *, u32);
498 int (*get_sset_count)(struct net_device *, int); 668 int (*get_sset_count)(struct net_device *, int);
499 int (*get_rxnfc)(struct net_device *, struct ethtool_rxnfc *, void *); 669 int (*get_rxnfc)(struct net_device *,
670 struct ethtool_rxnfc *, void *);
500 int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *); 671 int (*set_rxnfc)(struct net_device *, struct ethtool_rxnfc *);
501 int (*flash_device)(struct net_device *, struct ethtool_flash *); 672 int (*flash_device)(struct net_device *, struct ethtool_flash *);
502 int (*reset)(struct net_device *, u32 *); 673 int (*reset)(struct net_device *, u32 *);
674 int (*set_rx_ntuple)(struct net_device *,
675 struct ethtool_rx_ntuple *);
676 int (*get_rx_ntuple)(struct net_device *, u32 stringset, void *);
677 int (*get_rxfh_indir)(struct net_device *,
678 struct ethtool_rxfh_indir *);
679 int (*set_rxfh_indir)(struct net_device *,
680 const struct ethtool_rxfh_indir *);
503}; 681};
504#endif /* __KERNEL__ */ 682#endif /* __KERNEL__ */
505 683
@@ -513,7 +691,9 @@ struct ethtool_ops {
513#define ETHTOOL_GMSGLVL 0x00000007 /* Get driver message level */ 691#define ETHTOOL_GMSGLVL 0x00000007 /* Get driver message level */
514#define ETHTOOL_SMSGLVL 0x00000008 /* Set driver msg level. */ 692#define ETHTOOL_SMSGLVL 0x00000008 /* Set driver msg level. */
515#define ETHTOOL_NWAY_RST 0x00000009 /* Restart autonegotiation. */ 693#define ETHTOOL_NWAY_RST 0x00000009 /* Restart autonegotiation. */
516#define ETHTOOL_GLINK 0x0000000a /* Get link status (ethtool_value) */ 694/* Get link status for host, i.e. whether the interface *and* the
695 * physical port (if there is one) are up (ethtool_value). */
696#define ETHTOOL_GLINK 0x0000000a
517#define ETHTOOL_GEEPROM 0x0000000b /* Get EEPROM data */ 697#define ETHTOOL_GEEPROM 0x0000000b /* Get EEPROM data */
518#define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data. */ 698#define ETHTOOL_SEEPROM 0x0000000c /* Set EEPROM data. */
519#define ETHTOOL_GCOALESCE 0x0000000e /* Get coalesce config */ 699#define ETHTOOL_GCOALESCE 0x0000000e /* Get coalesce config */
@@ -546,18 +726,23 @@ struct ethtool_ops {
546#define ETHTOOL_GPFLAGS 0x00000027 /* Get driver-private flags bitmap */ 726#define ETHTOOL_GPFLAGS 0x00000027 /* Get driver-private flags bitmap */
547#define ETHTOOL_SPFLAGS 0x00000028 /* Set driver-private flags bitmap */ 727#define ETHTOOL_SPFLAGS 0x00000028 /* Set driver-private flags bitmap */
548 728
549#define ETHTOOL_GRXFH 0x00000029 /* Get RX flow hash configuration */ 729#define ETHTOOL_GRXFH 0x00000029 /* Get RX flow hash configuration */
550#define ETHTOOL_SRXFH 0x0000002a /* Set RX flow hash configuration */ 730#define ETHTOOL_SRXFH 0x0000002a /* Set RX flow hash configuration */
551#define ETHTOOL_GGRO 0x0000002b /* Get GRO enable (ethtool_value) */ 731#define ETHTOOL_GGRO 0x0000002b /* Get GRO enable (ethtool_value) */
552#define ETHTOOL_SGRO 0x0000002c /* Set GRO enable (ethtool_value) */ 732#define ETHTOOL_SGRO 0x0000002c /* Set GRO enable (ethtool_value) */
553#define ETHTOOL_GRXRINGS 0x0000002d /* Get RX rings available for LB */ 733#define ETHTOOL_GRXRINGS 0x0000002d /* Get RX rings available for LB */
554#define ETHTOOL_GRXCLSRLCNT 0x0000002e /* Get RX class rule count */ 734#define ETHTOOL_GRXCLSRLCNT 0x0000002e /* Get RX class rule count */
555#define ETHTOOL_GRXCLSRULE 0x0000002f /* Get RX classification rule */ 735#define ETHTOOL_GRXCLSRULE 0x0000002f /* Get RX classification rule */
556#define ETHTOOL_GRXCLSRLALL 0x00000030 /* Get all RX classification rule */ 736#define ETHTOOL_GRXCLSRLALL 0x00000030 /* Get all RX classification rule */
557#define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */ 737#define ETHTOOL_SRXCLSRLDEL 0x00000031 /* Delete RX classification rule */
558#define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */ 738#define ETHTOOL_SRXCLSRLINS 0x00000032 /* Insert RX classification rule */
559#define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */ 739#define ETHTOOL_FLASHDEV 0x00000033 /* Flash firmware to device */
560#define ETHTOOL_RESET 0x00000034 /* Reset hardware */ 740#define ETHTOOL_RESET 0x00000034 /* Reset hardware */
741#define ETHTOOL_SRXNTUPLE 0x00000035 /* Add an n-tuple filter to device */
742#define ETHTOOL_GRXNTUPLE 0x00000036 /* Get n-tuple filters from device */
743#define ETHTOOL_GSSET_INFO 0x00000037 /* Get string set info */
744#define ETHTOOL_GRXFHINDIR 0x00000038 /* Get RX flow hash indir'n table */
745#define ETHTOOL_SRXFHINDIR 0x00000039 /* Set RX flow hash indir'n table */
561 746
562/* compatibility with older code */ 747/* compatibility with older code */
563#define SPARC_ETH_GSET ETHTOOL_GSET 748#define SPARC_ETH_GSET ETHTOOL_GSET
@@ -663,22 +848,23 @@ struct ethtool_ops {
663#define WAKE_MAGIC (1 << 5) 848#define WAKE_MAGIC (1 << 5)
664#define WAKE_MAGICSECURE (1 << 6) /* only meaningful if WAKE_MAGIC */ 849#define WAKE_MAGICSECURE (1 << 6) /* only meaningful if WAKE_MAGIC */
665 850
666/* L3-L4 network traffic flow types */ 851/* L2-L4 network traffic flow types */
667#define TCP_V4_FLOW 0x01 852#define TCP_V4_FLOW 0x01 /* hash or spec (tcp_ip4_spec) */
668#define UDP_V4_FLOW 0x02 853#define UDP_V4_FLOW 0x02 /* hash or spec (udp_ip4_spec) */
669#define SCTP_V4_FLOW 0x03 854#define SCTP_V4_FLOW 0x03 /* hash or spec (sctp_ip4_spec) */
670#define AH_ESP_V4_FLOW 0x04 855#define AH_ESP_V4_FLOW 0x04 /* hash only */
671#define TCP_V6_FLOW 0x05 856#define TCP_V6_FLOW 0x05 /* hash only */
672#define UDP_V6_FLOW 0x06 857#define UDP_V6_FLOW 0x06 /* hash only */
673#define SCTP_V6_FLOW 0x07 858#define SCTP_V6_FLOW 0x07 /* hash only */
674#define AH_ESP_V6_FLOW 0x08 859#define AH_ESP_V6_FLOW 0x08 /* hash only */
675#define AH_V4_FLOW 0x09 860#define AH_V4_FLOW 0x09 /* hash or spec (ah_ip4_spec) */
676#define ESP_V4_FLOW 0x0a 861#define ESP_V4_FLOW 0x0a /* hash or spec (esp_ip4_spec) */
677#define AH_V6_FLOW 0x0b 862#define AH_V6_FLOW 0x0b /* hash only */
678#define ESP_V6_FLOW 0x0c 863#define ESP_V6_FLOW 0x0c /* hash only */
679#define IP_USER_FLOW 0x0d 864#define IP_USER_FLOW 0x0d /* spec only (usr_ip4_spec) */
680#define IPV4_FLOW 0x10 865#define IPV4_FLOW 0x10 /* hash only */
681#define IPV6_FLOW 0x11 866#define IPV6_FLOW 0x11 /* hash only */
867#define ETHER_FLOW 0x12 /* spec only (ether_spec) */
682 868
683/* L3-L4 network traffic flow hash options */ 869/* L3-L4 network traffic flow hash options */
684#define RXH_L2DA (1 << 1) 870#define RXH_L2DA (1 << 1)