Linux Kernel
3.7.1
|
#include <ethtool.h>
Data Fields | |
__u32 | cmd |
__u32 | flow_type |
__u64 | data |
struct ethtool_rx_flow_spec | fs |
__u32 | rule_cnt |
__u32 | rule_locs [0] |
struct ethtool_rxnfc - command to get or set RX flow classification rules : Specific command number - ETHTOOL_GRXFH, ETHTOOL_SRXFH, ETHTOOL_GRXRINGS, ETHTOOL_GRXCLSRLCNT, ETHTOOL_GRXCLSRULE, ETHTOOL_GRXCLSRLALL, ETHTOOL_SRXCLSRLDEL or ETHTOOL_SRXCLSRLINS : Type of flow to be affected, e.g. TCP_V4_FLOW : Command-dependent value : Flow classification rule : Number of rules to be affected : Array of used rule locations
For ETHTOOL_GRXFH and ETHTOOL_SRXFH, is a bitmask indicating the fields included in the flow hash, e.g. RXH_IP_SRC. The following structure fields must not be used.
For ETHTOOL_GRXRINGS, is set to the number of RX rings/queues on return.
For ETHTOOL_GRXCLSRLCNT, is set to the number of defined rules on return. If is non-zero on return then it is the size of the rule table, plus the flag RX_CLS_LOC_SPECIAL if the driver supports any special location values. If that flag is not set in then special location values should not be used.
For ETHTOOL_GRXCLSRULE, . specifies the location of an existing rule on entry and contains the rule on return.
For ETHTOOL_GRXCLSRLALL, specifies the array size of the user buffer for on entry. On return, is the size of the rule table, is the number of defined rules, and contains the locations of the defined rules. Drivers must use the second parameter to get_rxnfc() instead of .
For ETHTOOL_SRXCLSRLINS, specifies the rule to add or update. . either specifies the location to use or is a special location value with RX_CLS_LOC_SPECIAL flag set. On return, . is the actual rule location.
For ETHTOOL_SRXCLSRLDEL, . specifies the location of an existing rule on entry.
A driver supporting the special location values for ETHTOOL_SRXCLSRLINS may add the rule at any suitable unused location, and may remove a rule at a later location (lower priority) that matches exactly the same set of flows. The special values are: RX_CLS_LOC_ANY, selecting any location; RX_CLS_LOC_FIRST, selecting the first suitable location (maximum priority); and RX_CLS_LOC_LAST, selecting the last suitable location (minimum priority). Additional special values may be defined in future and drivers must return -EINVAL for any unrecognised value.