ethtool: add ethtool_rx_flow_spec to flow_rule structure translator
authorPablo Neira Ayuso <pablo@netfilter.org>
Sat, 2 Feb 2019 11:50:51 +0000 (12:50 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Feb 2019 18:38:26 +0000 (10:38 -0800)
commiteca4205f9ec3bea2d5aad0493c19f5d2675a20fc
tree3068cfcdfbd7cf6f2e95d0e69d8fba8c10ee15e3
parent8bec2833fb28d7c8fcc25127190abbe3eb0ca260
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>
include/linux/ethtool.h
net/core/ethtool.c