Skip to content

Commit

Permalink
mlx5: DR, Remove unneeded misc3 variable
Browse files Browse the repository at this point in the history
This variable is not needed and can be dropped once the ICMP
macro is fixed.

Signed-off-by: Alex Vesker <valex@mellanox.com>
Reviewed-by: Erez Shitrit <erezsh@mellanox.com>
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
  • Loading branch information
alexvesker authored and yishaih committed Jul 15, 2020
1 parent a6c3abd commit b62d868
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions providers/mlx5/dr_matcher.c
Expand Up @@ -239,7 +239,6 @@ static int dr_matcher_set_ste_builders(struct mlx5dv_dr_matcher *matcher,
struct mlx5dv_dr_domain *dmn = matcher->tbl->dmn;
struct dr_match_param mask = {};
bool allow_empty_match = false;
struct dr_match_misc3 *misc3;
bool inner, rx;
uint8_t ipv;
int idx = 0;
Expand Down Expand Up @@ -352,8 +351,7 @@ static int dr_matcher_set_ste_builders(struct mlx5dv_dr_matcher *matcher,
if (DR_MASK_IS_FLEX_PARSER_0_SET(mask.misc2))
dr_ste_build_flex_parser_0(&sb[idx++], &mask, inner, rx);

misc3 = &mask.misc3;
if ((DR_MASK_IS_FLEX_PARSER_ICMPV4_SET(misc3) &&
if ((DR_MASK_IS_FLEX_PARSER_ICMPV4_SET(&mask.misc3) &&
dr_matcher_supp_flex_parser_icmp_v4(&dmn->info.caps)) ||
(dr_mask_is_flex_parser_icmpv6_set(&mask.misc3) &&
dr_matcher_supp_flex_parser_icmp_v6(&dmn->info.caps))) {
Expand Down
6 changes: 3 additions & 3 deletions providers/mlx5/mlx5dv_dr.h
Expand Up @@ -561,9 +561,9 @@ struct dr_match_param {
struct dr_match_misc3 misc3;
};

#define DR_MASK_IS_FLEX_PARSER_ICMPV4_SET(_misc3) (_misc3->icmpv4_type || \
_misc3->icmpv4_code || \
_misc3->icmpv4_header_data)
#define DR_MASK_IS_FLEX_PARSER_ICMPV4_SET(_misc3) ((_misc3)->icmpv4_type || \
(_misc3)->icmpv4_code || \
(_misc3)->icmpv4_header_data)

struct dr_esw_caps {
uint64_t drop_icm_address_rx;
Expand Down

0 comments on commit b62d868

Please sign in to comment.