diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2010-06-30 01:05:23 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-30 17:09:37 -0400 |
commit | a5b6ee291e39e285e021cf251dbcf770c83cd74e (patch) | |
tree | 4fa96af8095cda9949fff3e79e2c5e8ef7328dbd /include | |
parent | cbf2d604a1cd77944a795bb8dbe844eaa38b44c8 (diff) |
ethtool: Add support for control of RX flow hash indirection
Many NICs use an indirection table to map an RX flow hash value to one
of an arbitrary number of queues (not necessarily a power of 2). It
can be useful to remove some queues from this indirection table so
that they are only used for flows that are specifically filtered
there. It may also be useful to weight the mapping to account for
user processes with the same CPU-affinity as the RX interrupts.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ethtool.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index 084ddb3c8032..c1be61f3938b 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -384,6 +384,15 @@ struct ethtool_rxnfc { | |||
384 | __u32 rule_locs[0]; | 384 | __u32 rule_locs[0]; |
385 | }; | 385 | }; |
386 | 386 | ||
387 | struct ethtool_rxfh_indir { | ||
388 | __u32 cmd; | ||
389 | /* On entry, this is the array size of the user buffer. On | ||
390 | * return from ETHTOOL_GRXFHINDIR, this is the array size of | ||
391 | * the hardware indirection table. */ | ||
392 | __u32 size; | ||
393 | __u32 ring_index[0]; /* ring/queue index for each hash value */ | ||
394 | }; | ||
395 | |||
387 | struct ethtool_rx_ntuple_flow_spec { | 396 | struct ethtool_rx_ntuple_flow_spec { |
388 | __u32 flow_type; | 397 | __u32 flow_type; |
389 | union { | 398 | union { |
@@ -576,6 +585,10 @@ struct ethtool_ops { | |||
576 | int (*set_rx_ntuple)(struct net_device *, | 585 | int (*set_rx_ntuple)(struct net_device *, |
577 | struct ethtool_rx_ntuple *); | 586 | struct ethtool_rx_ntuple *); |
578 | int (*get_rx_ntuple)(struct net_device *, u32 stringset, void *); | 587 | int (*get_rx_ntuple)(struct net_device *, u32 stringset, void *); |
588 | int (*get_rxfh_indir)(struct net_device *, | ||
589 | struct ethtool_rxfh_indir *); | ||
590 | int (*set_rxfh_indir)(struct net_device *, | ||
591 | const struct ethtool_rxfh_indir *); | ||
579 | }; | 592 | }; |
580 | #endif /* __KERNEL__ */ | 593 | #endif /* __KERNEL__ */ |
581 | 594 | ||
@@ -637,6 +650,8 @@ struct ethtool_ops { | |||
637 | #define ETHTOOL_SRXNTUPLE 0x00000035 /* Add an n-tuple filter to device */ | 650 | #define ETHTOOL_SRXNTUPLE 0x00000035 /* Add an n-tuple filter to device */ |
638 | #define ETHTOOL_GRXNTUPLE 0x00000036 /* Get n-tuple filters from device */ | 651 | #define ETHTOOL_GRXNTUPLE 0x00000036 /* Get n-tuple filters from device */ |
639 | #define ETHTOOL_GSSET_INFO 0x00000037 /* Get string set info */ | 652 | #define ETHTOOL_GSSET_INFO 0x00000037 /* Get string set info */ |
653 | #define ETHTOOL_GRXFHINDIR 0x00000038 /* Get RX flow hash indir'n table */ | ||
654 | #define ETHTOOL_SRXFHINDIR 0x00000039 /* Set RX flow hash indir'n table */ | ||
640 | 655 | ||
641 | /* compatibility with older code */ | 656 | /* compatibility with older code */ |
642 | #define SPARC_ETH_GSET ETHTOOL_GSET | 657 | #define SPARC_ETH_GSET ETHTOOL_GSET |