GENEVE header has field named "opt_len" describing the total length of
all GENEVE options in 4-byte granularity.
In SW sreering implementation, only single option with single DW data is
supported. When matching on GENEVE option data is requested, matching on
"opt_len" field is added according to given option length.
This behaveior assumes that only packets with single option can be
matched, but it is wrong, packet with a few option can be matched but
only one of them can match its value.
This patch removes the "opt_len" matching unless user ask it explicitly.
Fixes: e440d6cf589e ("net/mlx5: add GENEVE TLV option flow translation")
Cc: shirik@nvidia.com
Signed-off-by: Michael Baum <michaelba@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_dv.c | 16 ----------------
1 file changed, 16 deletions(-)
@@ -9986,7 +9986,6 @@ flow_dv_translate_item_geneve_opt(struct rte_eth_dev *dev, void *key,
const struct rte_flow_item_geneve_opt *geneve_opt_m;
const struct rte_flow_item_geneve_opt *geneve_opt_v;
const struct rte_flow_item_geneve_opt *geneve_opt_vv = item->spec;
- void *misc_v = MLX5_ADDR_OF(fte_match_param, key, misc_parameters);
void *misc3_v = MLX5_ADDR_OF(fte_match_param, key, misc_parameters_3);
rte_be32_t opt_data_key = 0, opt_data_mask = 0;
uint32_t *data;
@@ -10005,21 +10004,6 @@ flow_dv_translate_item_geneve_opt(struct rte_eth_dev *dev, void *key,
return ret;
}
}
- /*
- * Set the option length in GENEVE header if not requested.
- * The GENEVE TLV option length is expressed by the option length field
- * in the GENEVE header.
- * If the option length was not requested but the GENEVE TLV option item
- * is present we set the option length field implicitly.
- */
- if (!MLX5_GET16(fte_match_set_misc, misc_v, geneve_opt_len)) {
- if (key_type & MLX5_SET_MATCHER_M)
- MLX5_SET(fte_match_set_misc, misc_v, geneve_opt_len,
- MLX5_GENEVE_OPTLEN_MASK);
- else
- MLX5_SET(fte_match_set_misc, misc_v, geneve_opt_len,
- geneve_opt_v->option_len + 1);
- }
/* Set the data. */
if (key_type == MLX5_SET_MATCHER_SW_V)
data = geneve_opt_vv->data;