On 11/20/2018 6:51 PM, Pablo Neira Ayuso wrote:
> 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.
> 
> Signed-off-by: Pablo Neira Ayuso <pa...@netfilter.org>
> ---
> v3: Suggested by Jiri Pirko:
>         - Add struct ethtool_rx_flow_rule, keep placeholder to private
>           dissector information.
>     Reported by Manish Chopra:
>       - Fix incorrect dissector user_keys flags.
> 
>  include/linux/ethtool.h |  10 +++
>  net/core/ethtool.c      | 189 
> ++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 199 insertions(+)
> 
> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
> index afd9596ce636..99849e0858b2 100644
> --- a/include/linux/ethtool.h
> +++ b/include/linux/ethtool.h
> @@ -400,4 +400,14 @@ struct ethtool_ops {
>       void    (*get_ethtool_phy_stats)(struct net_device *,
>                                        struct ethtool_stats *, u64 *);
>  };
> +
> +struct ethtool_rx_flow_rule {
> +     struct flow_rule        *rule;
> +     unsigned long           priv[0];

This forces you to cast to/from that member, any reason this is just not
a void *priv here?
-- 
Florian

Reply via email to