diff options
| author | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-02-02 06:50:51 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2019-02-06 13:38:26 -0500 |
| commit | eca4205f9ec3bea2d5aad0493c19f5d2675a20fc (patch) | |
| tree | 3068cfcdfbd7cf6f2e95d0e69d8fba8c10ee15e3 /include/linux | |
| parent | 8bec2833fb28d7c8fcc25127190abbe3eb0ca260 (diff) | |
ethtool: add ethtool_rx_flow_spec to flow_rule structure translator
This patch adds a function to translate the ethtool_rx_flow_spec
structure to the flow_rule representation.
This allows us to reuse code from the driver side given that both flower
and ethtool_rx_flow interfaces use the same representation.
This patch also includes support for the flow type flags FLOW_EXT,
FLOW_MAC_EXT and FLOW_RSS.
The ethtool_rx_flow_spec_input wrapper structure is used to convey the
rss_context field, that is away from the ethtool_rx_flow_spec structure,
and the ethtool_rx_flow_spec structure.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -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 afd9596ce636..19a8de5326fb 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
| @@ -400,4 +400,19 @@ struct ethtool_ops { | |||
| 400 | void (*get_ethtool_phy_stats)(struct net_device *, | 400 | void (*get_ethtool_phy_stats)(struct net_device *, |
| 401 | struct ethtool_stats *, u64 *); | 401 | struct ethtool_stats *, u64 *); |
| 402 | }; | 402 | }; |
| 403 | |||
| 404 | struct ethtool_rx_flow_rule { | ||
| 405 | struct flow_rule *rule; | ||
| 406 | unsigned long priv[0]; | ||
| 407 | }; | ||
| 408 | |||
| 409 | struct ethtool_rx_flow_spec_input { | ||
| 410 | const struct ethtool_rx_flow_spec *fs; | ||
| 411 | u32 rss_ctx; | ||
| 412 | }; | ||
| 413 | |||
| 414 | struct ethtool_rx_flow_rule * | ||
| 415 | ethtool_rx_flow_rule_create(const struct ethtool_rx_flow_spec_input *input); | ||
| 416 | void ethtool_rx_flow_rule_destroy(struct ethtool_rx_flow_rule *rule); | ||
| 417 | |||
| 403 | #endif /* _LINUX_ETHTOOL_H */ | 418 | #endif /* _LINUX_ETHTOOL_H */ |
