net/mlx5: remove unused calculation in RSS expansion
[dpdk.git] / drivers / net / mlx5 / mlx5_rxmode.c
index 84c8b05..7613ff7 100644 (file)
@@ -7,18 +7,9 @@
 #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 <mlx5_glue.h>
 #include "mlx5.h"
 #include "mlx5_rxtx.h"
 #include "mlx5_utils.h"
@@ -47,8 +38,7 @@ mlx5_promiscuous_enable(struct rte_eth_dev *dev)
                return 0;
        }
        if (priv->config.vf) {
-               ret = mlx5_nl_promisc(priv->nl_socket_route, mlx5_ifindex(dev),
-                                     1);
+               ret = mlx5_os_set_promisc(dev, 1);
                if (ret)
                        return ret;
        }
@@ -81,8 +71,7 @@ mlx5_promiscuous_disable(struct rte_eth_dev *dev)
 
        dev->data->promiscuous = 0;
        if (priv->config.vf) {
-               ret = mlx5_nl_promisc(priv->nl_socket_route, mlx5_ifindex(dev),
-                                     0);
+               ret = mlx5_os_set_promisc(dev, 0);
                if (ret)
                        return ret;
        }
@@ -122,8 +111,7 @@ mlx5_allmulticast_enable(struct rte_eth_dev *dev)
                return 0;
        }
        if (priv->config.vf) {
-               ret = mlx5_nl_allmulti(priv->nl_socket_route, mlx5_ifindex(dev),
-                                      1);
+               ret = mlx5_os_set_allmulti(dev, 1);
                if (ret)
                        goto error;
        }
@@ -156,8 +144,7 @@ mlx5_allmulticast_disable(struct rte_eth_dev *dev)
 
        dev->data->all_multicast = 0;
        if (priv->config.vf) {
-               ret = mlx5_nl_allmulti(priv->nl_socket_route, mlx5_ifindex(dev),
-                                      0);
+               ret = mlx5_os_set_allmulti(dev, 0);
                if (ret)
                        goto error;
        }