- assert(mac_index < RTE_DIM(rxq->mac_flow));
- ret = rxq_add_mac_flow(rxq, mac_index);
- if (ret)
- return ret;
+ assert(mac_index < RTE_DIM(hash_rxq->mac_flow));
+ assert(RTE_DIM(hash_rxq->mac_flow[mac_index]) ==
+ RTE_DIM(priv->vlan_filter));
+ /* Add a MAC address for each VLAN filter, or at least once. */
+ do {
+ ret = hash_rxq_add_mac_flow(hash_rxq, mac_index, i);
+ if (ret) {
+ /* Failure, rollback. */
+ while (i != 0)
+ hash_rxq_del_mac_flow(hash_rxq, mac_index,
+ --i);
+ return ret;
+ }
+ } while (++i < priv->vlan_filter_n);