uint8_t supp_mask[sizeof(uint64_t)];
const uint8_t *spec = NULL;
const uint8_t *mask = NULL;
- const void *def_mask;
int rc;
/*
* sfc_mae_rule_encap_parse_init(). Default mask
* was also picked by that helper. Use it here.
*/
- def_mask = ctx_mae->tunnel_def_mask;
-
rc = sfc_flow_parse_init(item,
(const void **)&spec, (const void **)&mask,
- (const void *)&supp_mask, def_mask,
- sizeof(def_mask), error);
+ (const void *)&supp_mask,
+ ctx_mae->tunnel_def_mask,
+ ctx_mae->tunnel_def_mask_size, error);
if (rc != 0)
return rc;
case RTE_FLOW_ITEM_TYPE_VXLAN:
ctx->encap_type = EFX_TUNNEL_PROTOCOL_VXLAN;
ctx->tunnel_def_mask = &rte_flow_item_vxlan_mask;
- RTE_BUILD_BUG_ON(sizeof(ctx->tunnel_def_mask) !=
- sizeof(rte_flow_item_vxlan_mask));
+ ctx->tunnel_def_mask_size =
+ sizeof(rte_flow_item_vxlan_mask);
break;
case RTE_FLOW_ITEM_TYPE_GENEVE:
ctx->encap_type = EFX_TUNNEL_PROTOCOL_GENEVE;
ctx->tunnel_def_mask = &rte_flow_item_geneve_mask;
- RTE_BUILD_BUG_ON(sizeof(ctx->tunnel_def_mask) !=
- sizeof(rte_flow_item_geneve_mask));
+ ctx->tunnel_def_mask_size =
+ sizeof(rte_flow_item_geneve_mask);
break;
case RTE_FLOW_ITEM_TYPE_NVGRE:
ctx->encap_type = EFX_TUNNEL_PROTOCOL_NVGRE;
ctx->tunnel_def_mask = &rte_flow_item_nvgre_mask;
- RTE_BUILD_BUG_ON(sizeof(ctx->tunnel_def_mask) !=
- sizeof(rte_flow_item_nvgre_mask));
+ ctx->tunnel_def_mask_size =
+ sizeof(rte_flow_item_nvgre_mask);
break;
case RTE_FLOW_ITEM_TYPE_END:
break;
* which part of the pattern is being parsed.
*/
const efx_mae_field_id_t *field_ids_remap;
- /* This points to a tunnel-specific default mask. */
+ /* These two fields correspond to the tunnel-specific default mask. */
+ size_t tunnel_def_mask_size;
const void *tunnel_def_mask;
bool match_mport_set;
struct sfc_mae_pattern_data pattern_data;