-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/mlx5e: Add CONFIG_MLX5_EN_RXNFC for ethtool rx nfc
Add new mlx5 Kconfig flag to allow selecting ethtool rx nfc support, and compile out en_fs_ehtool.c if not selected. Add en/fs.h header file to host all steering declarations and definitions. Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Reviewed-by: Moshe Shemesh <moshe@mellanox.com>
- Loading branch information
Saeed Mahameed
committed
Aug 13, 2018
1 parent
cff2b1e
commit fe6d86b
Showing
5 changed files
with
53 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ | ||
/* Copyright (c) 2018 Mellanox Technologies. */ | ||
|
||
#ifndef __MLX5E_FLOW_STEER_H__ | ||
#define __MLX5E_FLOW_STEER_H__ | ||
|
||
#ifdef CONFIG_MLX5_EN_RXNFC | ||
|
||
struct mlx5e_ethtool_table { | ||
struct mlx5_flow_table *ft; | ||
int num_rules; | ||
}; | ||
|
||
#define ETHTOOL_NUM_L3_L4_FTS 7 | ||
#define ETHTOOL_NUM_L2_FTS 4 | ||
|
||
struct mlx5e_ethtool_steering { | ||
struct mlx5e_ethtool_table l3_l4_ft[ETHTOOL_NUM_L3_L4_FTS]; | ||
struct mlx5e_ethtool_table l2_ft[ETHTOOL_NUM_L2_FTS]; | ||
struct list_head rules; | ||
int tot_num_rules; | ||
}; | ||
|
||
void mlx5e_ethtool_init_steering(struct mlx5e_priv *priv); | ||
void mlx5e_ethtool_cleanup_steering(struct mlx5e_priv *priv); | ||
int mlx5e_set_rxnfc(struct net_device *dev, struct ethtool_rxnfc *cmd); | ||
int mlx5e_get_rxnfc(struct net_device *dev, | ||
struct ethtool_rxnfc *info, u32 *rule_locs); | ||
#else | ||
static inline void mlx5e_ethtool_init_steering(struct mlx5e_priv *priv) { } | ||
static inline void mlx5e_ethtool_cleanup_steering(struct mlx5e_priv *priv) { } | ||
#endif /* CONFIG_MLX5_EN_RXNFC */ | ||
|
||
#endif /* __MLX5E_FLOW_STEER_H__ */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters