@@ -350,6 +350,22 @@ mlx5_flow_os_create_flow_action_drop(void **action)
return (*action) ? 0 : -1;
}
+/**
+ * Create flow action: default miss.
+ *
+ * @param[out] action
+ * Pointer to a valid action on success, NULL otherwise.
+ *
+ * @return
+ * 0 on success, or -1 on failure and errno is set.
+ */
+static inline int
+mlx5_flow_os_create_flow_action_default_miss(void **action)
+{
+ *action = mlx5_glue->dr_create_flow_action_default_miss();
+ return (*action) ? 0 : -1;
+}
+
/**
* Destroy flow action.
*
@@ -8763,11 +8763,13 @@ flow_dv_sample_create_cb(struct mlx5_cache_list *list __rte_unused,
"for sample");
goto error;
}
+ int ret;
+
cache_resource->normal_path_tbl = tbl;
if (resource->ft_type == MLX5DV_FLOW_TABLE_TYPE_FDB) {
- cache_resource->default_miss =
- mlx5_glue->dr_create_flow_action_default_miss();
- if (!cache_resource->default_miss) {
+ ret = mlx5_flow_os_create_flow_action_default_miss
+ (&cache_resource->default_miss);
+ if (!ret) {
rte_flow_error_set(error, ENOMEM,
RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
NULL,