}
}
- if (rx_offloads & DEV_RX_OFFLOAD_VLAN_STRIP)
+ if (rx_offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP)
vnic->vlan_strip = true;
else
vnic->vlan_strip = false;
break;
case RTE_FLOW_ACTION_TYPE_RSS:
break;
- case RTE_FLOW_ACTION_TYPE_MARK:
- break;
- case RTE_FLOW_ACTION_TYPE_COUNT:
- break;
default:
return -ENOTSUP;
}
}
/* Currently RSS hash on inner and outer headers are supported.
- * 0 => Default setting
- * 1 => Inner
- * 2 => Outer
+ * 0 => Default (innermost RSS) setting
+ * 1 => Outermost
*/
- if (rss->level > 2) {
+ if (rss->level > 1) {
rte_flow_error_set(error,
ENOTSUP,
RTE_FLOW_ERROR_TYPE_ACTION,
}
/* If RSS types is 0, use a best effort configuration */
- types = rss->types ? rss->types : ETH_RSS_IPV4;
+ types = rss->types ? rss->types : RTE_ETH_RSS_IPV4 | RTE_ETH_RSS_IPV6;
hash_type = bnxt_rte_to_hwrm_hash_types(types);
skip_rss_table:
rc = bnxt_hwrm_vnic_rss_cfg(bp, vnic);
+ if (rc != 0) {
+ rte_flow_error_set(error,
+ -rc,
+ RTE_FLOW_ERROR_TYPE_ACTION,
+ act,
+ "VNIC RSS configure failed");
+ rc = -rte_errno;
+ goto ret;
+ }
ret:
return rc;
}
}
PMD_DRV_LOG(DEBUG, "Queue index %d\n", act_q->index);
- if (use_ntuple && !BNXT_RFS_NEEDS_VNIC(bp)) {
- filter->flags =
- HWRM_CFA_NTUPLE_FILTER_ALLOC_INPUT_FLAGS_DEST_RFS_RING_IDX;
- filter->dst_id = act_q->index;
- goto skip_vnic_alloc;
- }
-
vnic_id = attr->group;
if (!vnic_id) {
PMD_DRV_LOG(DEBUG, "Group id is 0\n");
rxq = bp->rx_queues[act_q->index];
- if (!(dev_conf->rxmode.mq_mode & ETH_MQ_RX_RSS) && rxq &&
+ if (!(dev_conf->rxmode.mq_mode & RTE_ETH_MQ_RX_RSS) && rxq &&
vnic->fw_vnic_id != INVALID_HW_RING_ID)
goto use_vnic;
PMD_DRV_LOG(DEBUG,
"Setting vnic ff_idx %d\n", vnic->ff_pool_idx);
filter->dst_id = vnic->fw_vnic_id;
-skip_vnic_alloc:
+
/* For ntuple filter, create the L2 filter with default VNIC.
* The user specified redirect queue will be set while creating
* the ntuple filter in hardware.
/* RSS config update requested */
rc = bnxt_vnic_rss_cfg_update(bp, vnic, act, error);
if (rc != 0)
- return -rte_errno;
+ goto ret;
filter->dst_id = vnic->fw_vnic_id;
break;
}
}
- if (BNXT_RFS_NEEDS_VNIC(bp))
- vnic = find_matching_vnic(bp, filter);
- else
- vnic = BNXT_GET_DEFAULT_VNIC(bp);
+ vnic = find_matching_vnic(bp, filter);
done:
if (!ret || update_flow) {
flow->filter = filter;