diff options
author | Eli Britstein <elibr@mellanox.com> | 2020-05-11 19:20:29 +0000 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2020-05-27 18:13:50 -0700 |
commit | 4a5d5d7392106a48c7db345a3843e854b66ea0ff (patch) | |
tree | 88a1e0a6aa19df437656ed97570160512ed9a976 /drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | |
parent | 810cbb25549b81f0c0848320f8a1614106d3a0e1 (diff) | |
download | linux-4a5d5d7392106a48c7db345a3843e854b66ea0ff.tar.bz2 |
net/mlx5e: Helper function to set ethertype
Set ethertype match in a helper function as a pre-step towards
optimizing it.
Signed-off-by: Eli Britstein <elibr@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c index 995b2ef1fb3b..ba72410c55fa 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c @@ -134,10 +134,7 @@ mlx5_tc_ct_set_tuple_match(struct mlx5_flow_spec *spec, flow_rule_match_basic(rule, &match); - MLX5_SET(fte_match_set_lyr_2_4, headers_c, ethertype, - ntohs(match.mask->n_proto)); - MLX5_SET(fte_match_set_lyr_2_4, headers_v, ethertype, - ntohs(match.key->n_proto)); + mlx5e_tc_set_ethertype(headers_c, headers_v, &match); MLX5_SET(fte_match_set_lyr_2_4, headers_c, ip_protocol, match.mask->ip_proto); MLX5_SET(fte_match_set_lyr_2_4, headers_v, ip_protocol, |