net/mlx5: Add NIC TX domain namespace
Add new namespace that represents the NIC TX domain. Signed-off-by: Huy Nguyen <huyn@mellanox.com> Signed-off-by: Raed Salem <raeds@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
Родитель
825f8b0b17
Коммит
ee92e4f1f9
|
@ -236,6 +236,7 @@ struct mlx5e_accel_fs_tcp;
|
|||
|
||||
struct mlx5e_flow_steering {
|
||||
struct mlx5_flow_namespace *ns;
|
||||
struct mlx5_flow_namespace *egress_ns;
|
||||
#ifdef CONFIG_MLX5_EN_RXNFC
|
||||
struct mlx5e_ethtool_steering ethtool;
|
||||
#endif
|
||||
|
|
|
@ -776,6 +776,9 @@ static int mlx5_cmd_modify_header_alloc(struct mlx5_flow_root_namespace *ns,
|
|||
table_type = FS_FT_NIC_RX;
|
||||
break;
|
||||
case MLX5_FLOW_NAMESPACE_EGRESS:
|
||||
#ifdef CONFIG_MLX5_IPSEC
|
||||
case MLX5_FLOW_NAMESPACE_EGRESS_KERNEL:
|
||||
#endif
|
||||
max_actions = MLX5_CAP_FLOWTABLE_NIC_TX(dev, max_modify_header_actions);
|
||||
table_type = FS_FT_NIC_TX;
|
||||
break;
|
||||
|
|
|
@ -126,6 +126,10 @@
|
|||
#define LAG_NUM_PRIOS 1
|
||||
#define LAG_MIN_LEVEL (OFFLOADS_MIN_LEVEL + 1)
|
||||
|
||||
#define KERNEL_TX_IPSEC_NUM_PRIOS 1
|
||||
#define KERNEL_TX_IPSEC_NUM_LEVELS 1
|
||||
#define KERNEL_TX_MIN_LEVEL (KERNEL_TX_IPSEC_NUM_LEVELS)
|
||||
|
||||
struct node_caps {
|
||||
size_t arr_sz;
|
||||
long *caps;
|
||||
|
@ -180,13 +184,24 @@ static struct init_tree_node {
|
|||
|
||||
static struct init_tree_node egress_root_fs = {
|
||||
.type = FS_TYPE_NAMESPACE,
|
||||
#ifdef CONFIG_MLX5_IPSEC
|
||||
.ar_size = 2,
|
||||
#else
|
||||
.ar_size = 1,
|
||||
#endif
|
||||
.children = (struct init_tree_node[]) {
|
||||
ADD_PRIO(0, MLX5_BY_PASS_NUM_PRIOS, 0,
|
||||
FS_CHAINING_CAPS_EGRESS,
|
||||
ADD_NS(MLX5_FLOW_TABLE_MISS_ACTION_DEF,
|
||||
ADD_MULTIPLE_PRIO(MLX5_BY_PASS_NUM_PRIOS,
|
||||
BY_PASS_PRIO_NUM_LEVELS))),
|
||||
#ifdef CONFIG_MLX5_IPSEC
|
||||
ADD_PRIO(0, KERNEL_TX_MIN_LEVEL, 0,
|
||||
FS_CHAINING_CAPS_EGRESS,
|
||||
ADD_NS(MLX5_FLOW_TABLE_MISS_ACTION_DEF,
|
||||
ADD_MULTIPLE_PRIO(KERNEL_TX_IPSEC_NUM_PRIOS,
|
||||
KERNEL_TX_IPSEC_NUM_LEVELS))),
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -2165,8 +2180,10 @@ struct mlx5_flow_namespace *mlx5_get_flow_namespace(struct mlx5_core_dev *dev,
|
|||
break;
|
||||
}
|
||||
|
||||
if (type == MLX5_FLOW_NAMESPACE_EGRESS) {
|
||||
if (type == MLX5_FLOW_NAMESPACE_EGRESS ||
|
||||
type == MLX5_FLOW_NAMESPACE_EGRESS_KERNEL) {
|
||||
root_ns = steering->egress_root_ns;
|
||||
prio = type - MLX5_FLOW_NAMESPACE_EGRESS;
|
||||
} else if (type == MLX5_FLOW_NAMESPACE_RDMA_RX) {
|
||||
root_ns = steering->rdma_rx_root_ns;
|
||||
prio = RDMA_RX_BYPASS_PRIO;
|
||||
|
|
|
@ -76,6 +76,7 @@ enum mlx5_flow_namespace_type {
|
|||
MLX5_FLOW_NAMESPACE_SNIFFER_RX,
|
||||
MLX5_FLOW_NAMESPACE_SNIFFER_TX,
|
||||
MLX5_FLOW_NAMESPACE_EGRESS,
|
||||
MLX5_FLOW_NAMESPACE_EGRESS_KERNEL,
|
||||
MLX5_FLOW_NAMESPACE_RDMA_RX,
|
||||
MLX5_FLOW_NAMESPACE_RDMA_RX_KERNEL,
|
||||
MLX5_FLOW_NAMESPACE_RDMA_TX,
|
||||
|
|
Загрузка…
Ссылка в новой задаче