FILE
fs_ethtool.h
File preview with syntax highlighting.
linux-6.19.14/drivers/net/ethernet/mellanox/mlx5/core/en/fs_ethtool.h
1/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ 2/* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. */ 3 4#ifndef __MLX5E_FS_ETHTOOL_H__ 5#define __MLX5E_FS_ETHTOOL_H__ 6 7struct mlx5e_priv; 8struct mlx5e_ethtool_steering; 9#ifdef CONFIG_MLX5_EN_RXNFC 10int mlx5e_ethtool_alloc(struct mlx5e_ethtool_steering **ethtool); 11void mlx5e_ethtool_free(struct mlx5e_ethtool_steering *ethtool); 12void mlx5e_ethtool_init_steering(struct mlx5e_flow_steering *fs); 13void mlx5e_ethtool_cleanup_steering(struct mlx5e_flow_steering *fs); 14int mlx5e_ethtool_set_rxfh_fields(struct mlx5e_priv *priv, 15 const struct ethtool_rxfh_fields *nfc, 16 struct netlink_ext_ack *extack); 17int mlx5e_ethtool_get_rxfh_fields(struct mlx5e_priv *priv, 18 struct ethtool_rxfh_fields *nfc); 19int mlx5e_ethtool_set_rxnfc(struct mlx5e_priv *priv, struct ethtool_rxnfc *cmd); 20int mlx5e_ethtool_get_rxnfc(struct mlx5e_priv *priv, 21 struct ethtool_rxnfc *info, u32 *rule_locs); 22#else 23static inline int mlx5e_ethtool_alloc(struct mlx5e_ethtool_steering **ethtool) 24{ return 0; } 25static inline void mlx5e_ethtool_free(struct mlx5e_ethtool_steering *ethtool) { } 26static inline void mlx5e_ethtool_init_steering(struct mlx5e_flow_steering *fs) { } 27static inline void mlx5e_ethtool_cleanup_steering(struct mlx5e_flow_steering *fs) { } 28static inline int 29mlx5e_ethtool_set_rxfh_fields(struct mlx5e_priv *priv, 30 const struct ethtool_rxfh_fields *nfc, 31 struct netlink_ext_ack *extack) 32{ return -EOPNOTSUPP; } 33static inline int 34mlx5e_ethtool_get_rxfh_fields(struct mlx5e_priv *priv, 35 struct ethtool_rxfh_fields *nfc) 36{ return -EOPNOTSUPP; } 37static inline int mlx5e_ethtool_set_rxnfc(struct mlx5e_priv *priv, struct ethtool_rxnfc *cmd) 38{ return -EOPNOTSUPP; } 39static inline int mlx5e_ethtool_get_rxnfc(struct mlx5e_priv *priv, 40 struct ethtool_rxnfc *info, u32 *rule_locs) 41{ return -EOPNOTSUPP; } 42#endif 43#endif
~/
Read-only file preview.