net/enic: avoid error message when no advanced filtering
[dpdk.git] / drivers / net / mlx5 / mlx5_rxmode.c
index 760cc2f..7f19b23 100644 (file)
@@ -7,20 +7,10 @@
 #include <errno.h>
 #include <string.h>
 
-/* Verbs header. */
-/* ISO C doesn't support unnamed structs/unions, disabling -pedantic. */
-#ifdef PEDANTIC
-#pragma GCC diagnostic ignored "-Wpedantic"
-#endif
-#include <infiniband/verbs.h>
-#ifdef PEDANTIC
-#pragma GCC diagnostic error "-Wpedantic"
-#endif
-
-#include <rte_ethdev_driver.h>
+#include <ethdev_driver.h>
 
+#include <mlx5_glue.h>
 #include "mlx5.h"
-#include "mlx5_rxtx.h"
 #include "mlx5_utils.h"
 
 /**
@@ -46,8 +36,8 @@ mlx5_promiscuous_enable(struct rte_eth_dev *dev)
                        dev->data->port_id);
                return 0;
        }
-       if (priv->config.vf) {
-               ret = mlx5_nl_promisc(dev, 1);
+       if (priv->config.vf || priv->config.sf) {
+               ret = mlx5_os_set_promisc(dev, 1);
                if (ret)
                        return ret;
        }
@@ -79,8 +69,8 @@ mlx5_promiscuous_disable(struct rte_eth_dev *dev)
        int ret;
 
        dev->data->promiscuous = 0;
-       if (priv->config.vf) {
-               ret = mlx5_nl_promisc(dev, 0);
+       if (priv->config.vf || priv->config.sf) {
+               ret = mlx5_os_set_promisc(dev, 0);
                if (ret)
                        return ret;
        }
@@ -119,8 +109,8 @@ mlx5_allmulticast_enable(struct rte_eth_dev *dev)
                        dev->data->port_id);
                return 0;
        }
-       if (priv->config.vf) {
-               ret = mlx5_nl_allmulti(dev, 1);
+       if (priv->config.vf || priv->config.sf) {
+               ret = mlx5_os_set_allmulti(dev, 1);
                if (ret)
                        goto error;
        }
@@ -152,8 +142,8 @@ mlx5_allmulticast_disable(struct rte_eth_dev *dev)
        int ret;
 
        dev->data->all_multicast = 0;
-       if (priv->config.vf) {
-               ret = mlx5_nl_allmulti(dev, 0);
+       if (priv->config.vf || priv->config.sf) {
+               ret = mlx5_os_set_allmulti(dev, 0);
                if (ret)
                        goto error;
        }