Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c
Show First 20 Lines • Show All 848 Lines • ▼ Show 20 Lines | |||||
static int | static int | ||||
mlx5e_create_main_flow_table(struct mlx5e_priv *priv) | mlx5e_create_main_flow_table(struct mlx5e_priv *priv) | ||||
{ | { | ||||
struct mlx5_flow_table_group *g; | struct mlx5_flow_table_group *g; | ||||
u8 *dmac; | u8 *dmac; | ||||
g = malloc(9 * sizeof(*g), M_MLX5EN, M_WAITOK | M_ZERO); | g = malloc(9 * sizeof(*g), M_MLX5EN, M_WAITOK | M_ZERO); | ||||
if (g == NULL) | |||||
return (-ENOMEM); | |||||
g[0].log_sz = 2; | g[0].log_sz = 2; | ||||
g[0].match_criteria_enable = MLX5_MATCH_OUTER_HEADERS; | g[0].match_criteria_enable = MLX5_MATCH_OUTER_HEADERS; | ||||
MLX5_SET_TO_ONES(fte_match_param, g[0].match_criteria, | MLX5_SET_TO_ONES(fte_match_param, g[0].match_criteria, | ||||
outer_headers.ethertype); | outer_headers.ethertype); | ||||
MLX5_SET_TO_ONES(fte_match_param, g[0].match_criteria, | MLX5_SET_TO_ONES(fte_match_param, g[0].match_criteria, | ||||
outer_headers.ip_protocol); | outer_headers.ip_protocol); | ||||
▲ Show 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
static int | static int | ||||
mlx5e_create_vlan_flow_table(struct mlx5e_priv *priv) | mlx5e_create_vlan_flow_table(struct mlx5e_priv *priv) | ||||
{ | { | ||||
struct mlx5_flow_table_group *g; | struct mlx5_flow_table_group *g; | ||||
g = malloc(2 * sizeof(*g), M_MLX5EN, M_WAITOK | M_ZERO); | g = malloc(2 * sizeof(*g), M_MLX5EN, M_WAITOK | M_ZERO); | ||||
if (g == NULL) | |||||
return (-ENOMEM); | |||||
g[0].log_sz = 12; | g[0].log_sz = 12; | ||||
g[0].match_criteria_enable = MLX5_MATCH_OUTER_HEADERS; | g[0].match_criteria_enable = MLX5_MATCH_OUTER_HEADERS; | ||||
MLX5_SET_TO_ONES(fte_match_param, g[0].match_criteria, | MLX5_SET_TO_ONES(fte_match_param, g[0].match_criteria, | ||||
outer_headers.vlan_tag); | outer_headers.vlan_tag); | ||||
MLX5_SET_TO_ONES(fte_match_param, g[0].match_criteria, | MLX5_SET_TO_ONES(fte_match_param, g[0].match_criteria, | ||||
outer_headers.first_vid); | outer_headers.first_vid); | ||||
▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines |