- priv_lock(priv);
- priv->promisc_req = 0;
- priv_promiscuous_disable(priv);
- priv_unlock(priv);
-}
-
-/**
- * Enable allmulti mode in a hash RX queue.
- *
- * @param hash_rxq
- * Pointer to hash RX queue structure.
- *
- * @return
- * 0 on success, errno value on failure.
- */
-static int
-hash_rxq_allmulticast_enable(struct hash_rxq *hash_rxq)
-{
- struct ibv_flow *flow;
- struct ibv_flow_attr attr = {
- .type = IBV_FLOW_ATTR_MC_DEFAULT,
- .num_of_specs = 0,
- .port = hash_rxq->priv->port,
- .flags = 0
- };
-
- if (hash_rxq->allmulti_flow != NULL)
- return 0;
- DEBUG("%p: enabling allmulticast mode", (void *)hash_rxq);
- errno = 0;
- flow = ibv_create_flow(hash_rxq->qp, &attr);
- if (flow == NULL) {
- /* It's not clear whether errno is always set in this case. */
- ERROR("%p: flow configuration failed, errno=%d: %s",
- (void *)hash_rxq, errno,
- (errno ? strerror(errno) : "Unknown error"));
- if (errno)
- return errno;
- return EINVAL;
- }
- hash_rxq->allmulti_flow = flow;
- DEBUG("%p: allmulticast mode enabled", (void *)hash_rxq);
- return 0;
-}
-
-/**
- * Enable allmulti mode in most hash RX queues.
- * TCP queues are exempted to save resources.
- *
- * @param priv
- * Private structure.
- *
- * @return
- * 0 on success, errno value on failure.
- */
-int
-priv_allmulticast_enable(struct priv *priv)
-{
- unsigned int i;
-
- for (i = 0; (i != priv->hash_rxqs_n); ++i) {
- struct hash_rxq *hash_rxq = &(*priv->hash_rxqs)[i];
- int ret;
-
- /* allmulticast not relevant for TCP. */
- if (hash_rxq->type == HASH_RXQ_TCPV4)
- continue;
- ret = hash_rxq_allmulticast_enable(hash_rxq);
- if (!ret)
- continue;
- /* Failure, rollback. */
- while (i != 0) {
- hash_rxq = &(*priv->hash_rxqs)[--i];
- hash_rxq_allmulticast_disable(hash_rxq);
- }
- return ret;
- }
- return 0;
+ dev->data->promiscuous = 0;
+ if (priv->config.vf)
+ mlx5_nl_promisc(dev, 0);
+ ret = mlx5_traffic_restart(dev);
+ if (ret)
+ DRV_LOG(ERR, "port %u cannot disable promiscuous mode: %s",
+ dev->data->port_id, strerror(rte_errno));