Lines Matching defs:fs

74 struct mlx5_flow_handle *mlx5e_accel_fs_add_sk(struct mlx5e_flow_steering *fs,
78 struct mlx5e_accel_fs_tcp *fs_tcp = mlx5e_fs_get_accel_tcp(fs);
95 fs_dbg(fs, "%s flow is %pI4:%d -> %pI4:%d\n", __func__,
141 fs_err(fs, "mlx5_add_flow_rules() failed, flow is %ld\n", PTR_ERR(flow));
148 static int accel_fs_tcp_add_default_rule(struct mlx5e_flow_steering *fs,
151 struct mlx5e_accel_fs_tcp *fs_tcp = mlx5e_fs_get_accel_tcp(fs);
152 struct mlx5_ttc_table *ttc = mlx5e_fs_get_ttc(fs, false);
165 fs_err(fs, "%s: add default rule failed, accel_fs type=%d, err %d\n",
265 static int accel_fs_tcp_create_table(struct mlx5e_flow_steering *fs, enum accel_fs_tcp_type type)
267 struct mlx5e_accel_fs_tcp *accel_tcp = mlx5e_fs_get_accel_tcp(fs);
268 struct mlx5_flow_namespace *ns = mlx5e_fs_get_ns(fs, false);
286 fs_dbg(fs, "Created fs accel table id %u level %u\n",
293 err = accel_fs_tcp_add_default_rule(fs, type);
303 static int accel_fs_tcp_disable(struct mlx5e_flow_steering *fs)
305 struct mlx5_ttc_table *ttc = mlx5e_fs_get_ttc(fs, false);
312 fs_err(fs,
322 static int accel_fs_tcp_enable(struct mlx5e_flow_steering *fs)
324 struct mlx5e_accel_fs_tcp *accel_tcp = mlx5e_fs_get_accel_tcp(fs);
325 struct mlx5_ttc_table *ttc = mlx5e_fs_get_ttc(fs, false);
336 fs_err(fs, "%s: modify ttc[%d] destination to accel failed, err(%d)\n",
344 static void accel_fs_tcp_destroy_table(struct mlx5e_flow_steering *fs, int i)
346 struct mlx5e_accel_fs_tcp *fs_tcp = mlx5e_fs_get_accel_tcp(fs);
356 void mlx5e_accel_fs_tcp_destroy(struct mlx5e_flow_steering *fs)
358 struct mlx5e_accel_fs_tcp *accel_tcp = mlx5e_fs_get_accel_tcp(fs);
364 accel_fs_tcp_disable(fs);
367 accel_fs_tcp_destroy_table(fs, i);
370 mlx5e_fs_set_accel_tcp(fs, NULL);
373 int mlx5e_accel_fs_tcp_create(struct mlx5e_flow_steering *fs)
378 if (!MLX5_CAP_FLOWTABLE_NIC_RX(mlx5e_fs_get_mdev(fs), ft_field_support.outer_ip_version))
384 mlx5e_fs_set_accel_tcp(fs, accel_tcp);
387 err = accel_fs_tcp_create_table(fs, i);
392 err = accel_fs_tcp_enable(fs);
400 accel_fs_tcp_destroy_table(fs, i);
402 mlx5e_fs_set_accel_tcp(fs, NULL);