*engine = iavf_parse_engine(ad, flow, &vf->rss_parser_list, pattern,
actions, error);
- if (*engine != NULL)
+ if (*engine)
return 0;
*engine = iavf_parse_engine(ad, flow, &vf->dist_parser_list, pattern,
actions, error);
- if (*engine == NULL)
- return -EINVAL;
+ if (!*engine) {
+ rte_flow_error_set(error, EINVAL,
+ RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
+ "Failed to create parser engine.");
+ return -rte_errno;
+ }
return 0;
}
flow->rule = rss_cfg;
} else {
PMD_DRV_LOG(ERR, "fail to add RSS configure");
+ rte_flow_error_set(error, -ret,
+ RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
+ "Failed to add rss rule.");
rte_free(rss_cfg);
+ return -rte_errno;
}
rte_free(meta);
rss_cfg = (struct virtchnl_rss_cfg *)flow->rule;
ret = iavf_add_del_rss_cfg(ad, rss_cfg, false);
- if (ret)
+ if (ret) {
PMD_DRV_LOG(ERR, "fail to del RSS configure");
-
+ rte_flow_error_set(error, -ret,
+ RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
+ "Failed to delete rss rule.");
+ return -rte_errno;
+ }
return ret;
}