History

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.

Pablo Neira Ayuso committed 7 years ago

Commit eca42051 parent 8bec2832 files · +256 −0Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/ethtool.h+15−0
@@ -400,4 +400,19 @@ struct ethtool_ops { · 399 unmodified lines
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
404struct ethtool_rx_flow_rule {
405 struct flow_rule *rule;
406 unsigned long priv[0];
407};
408
409struct ethtool_rx_flow_spec_input {
410 const struct ethtool_rx_flow_spec *fs;
411 u32 rss_ctx;
412};
413
414struct ethtool_rx_flow_rule *
415ethtool_rx_flow_rule_create(const struct ethtool_rx_flow_spec_input *input);
416void ethtool_rx_flow_rule_destroy(struct ethtool_rx_flow_rule *rule);
417
403#endif /* _LINUX_ETHTOOL_H */418#endif /* _LINUX_ETHTOOL_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t