New upstream version 17.11.4
[deb_dpdk.git] / drivers / net / mlx5 / mlx5_rxmode.c
index 23eae7c..617138c 100644 (file)
 void
 mlx5_promiscuous_enable(struct rte_eth_dev *dev)
 {
+       struct priv *priv = dev->data->dev_private;
        int ret;
 
        dev->data->promiscuous = 1;
+       if (priv->isolated) {
+               DRV_LOG(WARNING,
+                       "port %u cannot enable promiscuous mode"
+                       " in flow isolation mode",
+                       dev->data->port_id);
+               return;
+       }
        ret = mlx5_traffic_restart(dev);
        if (ret)
                DRV_LOG(ERR, "port %u cannot enable promiscuous mode: %s",
@@ -96,9 +104,17 @@ mlx5_promiscuous_disable(struct rte_eth_dev *dev)
 void
 mlx5_allmulticast_enable(struct rte_eth_dev *dev)
 {
+       struct priv *priv = dev->data->dev_private;
        int ret;
 
        dev->data->all_multicast = 1;
+       if (priv->isolated) {
+               DRV_LOG(WARNING,
+                       "port %u cannot enable allmulticast mode"
+                       " in flow isolation mode",
+                       dev->data->port_id);
+               return;
+       }
        ret = mlx5_traffic_restart(dev);
        if (ret)
                DRV_LOG(ERR, "port %u cannot enable allmulicast mode: %s",