filter->enables |=
HWRM_CFA_EM_FLOW_ALLOC_INPUT_ENABLES_L2_FILTER_ID;
ret = bnxt_hwrm_set_em_filter(bp, filter->dst_id, filter);
+ if (ret != 0) {
+ rte_flow_error_set(error, -ret,
+ RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
+ "Failed to create EM filter");
+ goto free_filter;
+ }
}
if (filter->filter_type == HWRM_CFA_NTUPLE_FILTER) {
filter->enables |=
HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_ENABLES_L2_FILTER_ID;
ret = bnxt_hwrm_set_ntuple_filter(bp, filter->dst_id, filter);
+ if (ret != 0) {
+ rte_flow_error_set(error, -ret,
+ RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
+ "Failed to create ntuple filter");
+ goto free_filter;
+ }
}
vnic = find_matching_vnic(bp, filter);
*/
flow_id = filter->flow_id & BNXT_FLOW_ID_MASK;
if (bp->mark_table[flow_id].valid) {
- PMD_DRV_LOG(ERR,
- "Entry for Mark id 0x%x occupied"
- " flow id 0x%x\n",
- filter->mark, filter->flow_id);
+ rte_flow_error_set(error, EEXIST,
+ RTE_FLOW_ERROR_TYPE_HANDLE,
+ NULL,
+ "Flow with mark id exists");
goto free_filter;
}
bp->mark_table[flow_id].valid = true;