- /* Rehash flows in all hash RX queues. */
- priv_mac_addrs_disable(priv);
- priv_special_flow_disable_all(priv);
- return priv_rehash_flows(priv);
-}
-
-/**
- * DPDK callback to configure a VLAN filter.
- *
- * @param dev
- * Pointer to Ethernet device structure.
- * @param vlan_id
- * VLAN ID to filter.
- * @param on
- * Toggle filter.
- *
- * @return
- * 0 on success, negative errno value on failure.
- */
-int
-mlx5_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
-{
- struct priv *priv = dev->data->dev_private;
- int ret;
-
- priv_lock(priv);
- ret = vlan_filter_set(dev, vlan_id, on);
- priv_unlock(priv);
- assert(ret >= 0);
- return -ret;
-}
-
-/**
- * Set/reset VLAN stripping for a specific queue.
- *
- * @param priv
- * Pointer to private structure.
- * @param idx
- * RX queue index.
- * @param on
- * Enable/disable VLAN stripping.
- */
-static void
-priv_vlan_strip_queue_set(struct priv *priv, uint16_t idx, int on)
-{
- struct rxq *rxq = (*priv->rxqs)[idx];
-#ifdef HAVE_EXP_DEVICE_ATTR_VLAN_OFFLOADS
- struct ibv_exp_wq_attr mod;
- uint16_t vlan_offloads =
- (on ? IBV_EXP_RECEIVE_WQ_CVLAN_STRIP : 0) |
- 0;
- int err;
-
- DEBUG("set VLAN offloads 0x%x for port %d queue %d",
- vlan_offloads, rxq->port_id, idx);
- mod = (struct ibv_exp_wq_attr){
- .attr_mask = IBV_EXP_WQ_ATTR_VLAN_OFFLOADS,
- .vlan_offloads = vlan_offloads,
- };
-
- err = ibv_exp_modify_wq(rxq->wq, &mod);
- if (err) {
- ERROR("%p: failed to modified stripping mode: %s",
- (void *)priv, strerror(err));
- return;
- }
-
-#endif /* HAVE_EXP_DEVICE_ATTR_VLAN_OFFLOADS */
-
- /* Update related bits in RX queue. */
- rxq->vlan_strip = !!on;